/*
 * Legacy compatibility layer for older storefront selectors.
 * Brand colors must derive from the approved design tokens (--color-*) so tenant
 * theme overrides in head.html apply coherently. Do not reintroduce Dona-only hex.
 */
:root {
    /* Aliases kept only for any residual references; map onto design tokens. */
    --dbb-raspberry: var(--color-primary);
    --dbb-raspberry-dark: var(--color-primary-dark);
    --dbb-pink: var(--color-secondary-light);
    --dbb-cream: var(--color-background);
    --dbb-warm: var(--color-cream);
    --dbb-burgundy: var(--color-primary-dark);
    --dbb-sage: var(--color-success);
    --dbb-ink: var(--color-text);
    --dbb-muted: var(--color-text-muted);
    --dbb-border: var(--color-border);
}

/* Prefer body.public-site rules in base.css; these are fallbacks for non-scoped pages. */
body {
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-body);
}

a {
    color: var(--color-primary);
}

.site-nav {
    background: color-mix(in srgb, var(--color-background) 92%, transparent);
    border-bottom: 1px solid var(--color-border);
    backdrop-filter: blur(16px);
}

.brand-mark {
    align-items: center;
    color: var(--color-primary-dark);
    display: inline-flex;
    font-family: var(--font-heading);
    font-weight: 700;
    gap: 0.65rem;
    letter-spacing: 0;
}

.brand-symbol {
    align-items: center;
    background: var(--color-primary-dark);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-family: var(--font-body);
    font-size: 0.72rem;
    height: 2.25rem;
    justify-content: center;
    width: 2.25rem;
}

.btn-brand {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    box-shadow: 0 10px 22px color-mix(in srgb, var(--color-primary) 22%, transparent);
}

.btn-brand:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline-brand {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-outline-brand:hover {
    background: var(--color-primary);
    color: #fff;
}

.hero {
    background-image:
        linear-gradient(90deg,
            color-mix(in srgb, var(--color-background) 96%, transparent) 0%,
            color-mix(in srgb, var(--color-background) 82%, transparent) 38%,
            color-mix(in srgb, var(--color-background) 20%, transparent) 70%),
        url("/images/hero-catering-spread.png");
    background-position: center;
    background-size: cover;
    min-height: min(720px, 78vh);
    padding: 6rem 0;
}

.hero-copy {
    max-width: 620px;
}

.eyebrow {
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12rem;
    text-transform: uppercase;
}

.display-title {
    color: var(--color-primary-dark);
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 6vw, 5rem);
    line-height: 1;
}

.section-band {
    padding: 4.5rem 0;
}

.section-band-alt {
    background: var(--color-cream);
}

.section-title {
    color: var(--color-primary-dark);
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3vw, 2.7rem);
}

.soft-card,
.product-card,
.admin-panel {
    background: color-mix(in srgb, var(--color-surface) 88%, transparent);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-subtle);
}

.product-card {
    height: 100%;
    overflow: hidden;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.product-card:hover {
    box-shadow: var(--shadow-soft);
    transform: translateY(-3px);
}

.product-image {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
}

/*
 * Product photography is the main selling element, so the media column is the photo: no reserved
 * decorative box, no inner padding, and nothing forcing a height the picture then has to sit inside.
 * The box is sized by the image; only the poor-source fallback below reserves any space of its own.
 */
.product-detail-media {
    display: grid;
    isolation: isolate;
    overflow: hidden;
    place-items: center;
    position: relative;
}

/* Only a poor-fit image (too small, or a mismatched ratio - see media-fit-detection.js) gets a
   background/border/padding at all; a normal, large-enough photo is shown clean and as big as the
   column allows, with no default card frame. */
.product-detail-media--has-backdrop {
    background: color-mix(in srgb, var(--color-background) 66%, #fff);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-subtle);
    /* Only a source that cannot fill the column on its own gets a slot to sit in. */
    min-height: clamp(14rem, 32vw, 22rem);
}

.product-detail-image {
    display: block;
}

.product-detail-image--backdrop {
    filter: blur(24px);
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    pointer-events: none;
    inset: 0;
    position: absolute;
    transform: scale(1.08);
    width: 100%;
}

.product-detail-image--foreground {
    /* Rounded on the picture itself, so there is no frame drawn around it. */
    border-radius: var(--radius-card);
    height: auto;
    /* Landscape and square photos take the whole column; a tall one is capped by height instead,
       which keeps its shape without letterboxing it inside a wider box. */
    max-height: min(38rem, 82vh);
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    position: relative;
    width: auto;
    z-index: 1;
}

.product-detail-media--has-backdrop .product-detail-image--foreground {
    max-height: min(30rem, 70vh);
    padding: clamp(0.5rem, 1.4vw, 1rem);
}

.price {
    color: var(--color-primary);
    font-weight: 800;
}

.tag {
    background: color-mix(in srgb, var(--color-success) 13%, transparent);
    border: 1px solid color-mix(in srgb, var(--color-success) 25%, transparent);
    border-radius: 999px;
    color: var(--color-success);
    display: inline-flex;
    font-size: 0.82rem;
    padding: 0.3rem 0.7rem;
}

.form-control,
.form-select {
    border-color: var(--color-border);
    border-radius: 8px;
}

.table {
    --bs-table-bg: transparent;
}

.site-footer {
    background: var(--color-primary-dark);
    color: rgba(255, 255, 255, 0.86);
    padding: 2.4rem 0;
}

.footer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-meta span {
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
}

.fade-in {
    animation: fadeIn 420ms ease both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .hero {
        background-image:
            linear-gradient(180deg,
                color-mix(in srgb, var(--color-background) 98%, transparent) 0%,
                color-mix(in srgb, var(--color-background) 78%, transparent) 58%,
                color-mix(in srgb, var(--color-background) 20%, transparent) 100%),
            url("/images/hero-catering-spread.png");
        padding: 4rem 0 12rem;
    }
}
