:root {
    color-scheme: light;
    --cream: #f7f2ea;
    --paper: #fffdf9;
    --brown: #352923;
    --muted: #695b52;
    --wine: #823247;
    --line: #e3d9cc;
    --gold: #e4c285;
    --pine: #193c32;
    --pine-dark: #102c24;
    --serif: Georgia, 'Times New Roman', serif;
    --gutter: clamp(1rem, 4vw, 2.75rem);
    --columns: 1;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--brown); font: 1rem/1.55 system-ui, sans-serif; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.1; }
a { color: var(--pine); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--wine); outline-offset: 4px; }
.wrap { width: min(74rem, calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.skip-link {
    position: fixed;
    z-index: 20;
    top: 1rem;
    left: 1rem;
    padding: .8rem 1rem;
    background: var(--paper);
    border-radius: .5rem;
}

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: .7rem max(var(--gutter), calc((100% - 74rem) / 2));
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.brand-lockup { display: flex; align-items: center; gap: .65rem; min-width: 0; text-decoration: none; }
.brand-logo, .footer-logo { display: block; object-fit: cover; border: 1px solid #a68153; border-radius: 50%; }
.brand-logo { width: clamp(2.6rem, 7vw, 3.5rem); height: auto; aspect-ratio: 1; }
.brand-name { font: 700 clamp(1.05rem, 3vw, 1.45rem)/1.12 var(--serif); }
.brand-name small { display: none; font: 500 .82rem/1.4 system-ui, sans-serif; color: var(--muted); margin-top: .25rem; }

.top-link, .hero-button, .cta, .secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: .65rem .9rem;
    border: 1px solid transparent;
    border-radius: .6rem;
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .18s, color .18s, border-color .18s;
}
.top-link { gap: .4rem; border-color: #b5bfb6; white-space: nowrap; }
.top-link:hover { background: #e8efe9; }
.order-count { min-width: 1.45rem; padding-inline: .25rem; text-align: center; border-radius: 2rem; background: var(--pine); color: #fff; }

.hero {
    display: grid;
    margin-block: clamp(1rem, 3vw, 2.5rem) 0;
    overflow: hidden;
    border-radius: 1.25rem;
    background: radial-gradient(ellipse at top left, #234d3c, var(--pine-dark) 85%);
    color: #fff8ec;
}
.hero-inner { align-self: center; padding: clamp(1.6rem, 4vw, 4rem); }
.hero h1 { margin: 0 0 .85rem; font-size: clamp(3.4rem, 10.5vw, 6.65rem); letter-spacing: -.065em; }
.hero h1 em { font-size: .52em; font-style: normal; color: var(--gold); letter-spacing: -.035em; }
.hero p { max-width: 25ch; margin: 0; color: #f1e7da; font-size: clamp(1rem, 2vw, 1.15rem); }
.hero-button { margin-top: 1.35rem; background: #f5e7cb; color: var(--pine-dark); padding-inline: 1.25rem; }
.hero-button:hover { background: #fffaef; }
.hero-button:focus-visible, .footer a:focus-visible { outline-color: var(--gold); }
.hero .hero-deadline { max-width: none; margin-top: 1rem; color: #f0d8ac; font-size: .875rem; }
.holiday-decoration { display: inline-flex; align-items: center; gap: .65rem; margin-top: .85rem; color: var(--gold); pointer-events: none; }
.holiday-tree { position: relative; width: 1.45rem; height: 1.7rem; }
.holiday-tree:first-child { transform: scale(.78); transform-origin: bottom center; }
.holiday-tree::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #7f9f81;
    clip-path: polygon(50% 2%, 76% 43%, 64% 43%, 87% 67%, 72% 67%, 100% 88%, 59% 88%, 59% 100%, 41% 100%, 41% 88%, 0 88%, 28% 67%, 13% 67%, 36% 43%, 24% 43%);
}
.holiday-tree::after {
    content: '';
    position: absolute;
    top: 22%;
    left: calc(50% - 1.5px);
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #ffe6a3;
    box-shadow: -4px 7px #ffe6a3, 4px 9px #ffd2ae, -6px 14px #ffd2ae, 5px 15px #ffe6a3;
}
.holiday-star { font-size: .8rem; }
.holiday-divider { display: flex; width: fit-content; margin-top: .65rem; color: #906426; }
.holiday-divider .holiday-tree { width: 1.65rem; height: 1.9rem; }
.holiday-margin { display: none; }
.holiday-garland {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    height: 1.6rem;
    padding-inline: clamp(.55rem, 3vw, 2rem);
    border-top: 1px solid #ad9277;
    border-radius: 50% 50% 0 0;
    pointer-events: none;
}
.holiday-garland span {
    flex: 0 0 auto;
    width: .45rem;
    height: .7rem;
    margin-top: .08rem;
    border-radius: 35% 35% 55% 55%;
    background: #a16e20;
    box-shadow: 0 0 .3rem #bc8a4450;
}
.holiday-garland span:nth-child(odd) { background: var(--wine); }
.holiday-garland span:nth-child(3n) { background: #426a53; }
.holiday-garland span:is(:first-child, :last-child) { margin-top: .42rem; }
.holiday-garland span:is(:nth-child(2), :nth-last-child(2)) { margin-top: .2rem; }
.storefront .top { position: relative; padding-top: 1.5rem; }
.header-lights {
    position: absolute;
    inset: 1px 0 auto;
    width: min(21rem, calc(100% - 2 * var(--gutter)));
    height: 1rem;
    margin-inline: auto;
    padding-inline: .75rem;
}
.header-lights span { width: .33rem; height: .48rem; }
.details .holiday-garland { margin-top: 1.15rem; }
.holiday-checkout-end { margin-top: 1.5rem; }
.hero-media { position: relative; min-width: 0; margin: 0; aspect-ratio: 3 / 2; background: #3a2c23; }
.hero-photo { display: block; width: 100%; height: 100%; object-fit: cover; }

.catalog-intro { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .35rem 1.5rem; padding-block: 2.2rem 1rem; }
.catalog-intro h2, .details h2, .checkout h2 { margin: 0; color: var(--pine); font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.045em; }
.photo-note, .sub, .note { color: var(--muted); }
.photo-note { margin: 0; font-size: .875rem; }
.category-nav { position: sticky; top: 0; z-index: 3; background: var(--cream); border-block: 1px solid var(--line); }
.category-links { display: flex; flex-wrap: wrap; gap: .35rem; padding-block: .4rem; }
.category-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 clamp(.5rem, 2vw, 1rem);
    border-radius: .5rem;
    font-size: .875rem;
    font-weight: 650;
    text-decoration: none;
    transition: background-color .18s, color .18s;
}
.category-links a:hover { background: #e9e2d7; }
.category-links a[aria-current="location"] { background: var(--pine); color: #fff; }

.section { position: relative; padding-block: clamp(1.8rem, 4vw, 3.5rem) 0; scroll-margin-top: 4.3rem; }
.section + .section { margin-top: clamp(1.3rem, 4vw, 2.75rem); border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 1.4rem; }
.section-heading h3 { margin: 0 0 .45rem; color: var(--pine); font-size: clamp(1.75rem, 4vw, 2.65rem); letter-spacing: -.035em; }
.sub { margin: 0; }
.cards { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--paper);
    box-shadow: 0 3px 12px #3b211709;
    transition: transform .22s, box-shadow .22s;
}
.photo { overflow: hidden; aspect-ratio: 4 / 3; background: #eae1d8; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.cardbody { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: clamp(1rem, 2vw, 1.35rem); }
.card h4 { margin: 0 0 .65rem; color: var(--pine); font-size: clamp(1.35rem, 2.35vw, 1.7rem); overflow-wrap: anywhere; }
.desc { flex: 1; margin: 0; color: var(--muted); font-size: .9375rem; overflow-wrap: anywhere; }
.buyrow { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; justify-content: space-between; margin-top: 1.15rem; }
.price { color: var(--wine); font: 700 clamp(1.2rem, 2.5vw, 1.55rem)/1.1 var(--serif); }
.qty { display: inline-flex; align-items: center; border: 1px solid #c8d1c8; border-radius: .65rem; background: #f1f4ee; transition: border-color .18s, background-color .18s; }
.qty.has-items { border-color: #5e816e; background: #deece1; }
.qty button { width: 44px; height: 44px; border: 0; border-radius: .55rem; background: transparent; color: var(--pine); font-size: 1.25rem; }
.qty button[data-step="1"] { background: var(--pine); color: #fff; }
.qty button:active:not(:disabled) { transform: scale(.92); }
.qty button:focus-visible { outline-offset: -4px; }
.qty button[data-step="1"]:focus-visible { outline-color: var(--gold); }
.qty output { min-width: 1.8rem; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }

.details { margin-top: clamp(2.75rem, 7vw, 5rem); padding-block: clamp(2rem, 5vw, 3.6rem); background: #ecefe7; border-block: 1px solid #d8ded3; }
.info-grid, .checkout-layout, .admin-layout { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.info-grid { margin-top: 1.35rem; }
.info { padding: 1.15rem; border: 1px solid #d8ded3; border-radius: .9rem; background: var(--paper); }
.info b { color: var(--pine); }
.info p { margin: .4rem 0 0; color: var(--muted); }
.checkout { padding-block: clamp(2.2rem, 6vw, 4.5rem); scroll-margin-top: 4.25rem; }
.checkout > .sub { margin: .65rem 0 1.45rem; }
.panel { min-width: 0; padding: clamp(1rem, 3vw, 1.7rem); border: 1px solid var(--line); border-radius: 1rem; background: var(--paper); box-shadow: 0 3px 12px #3b211709; }
.order-summary { align-self: start; }
.order-summary h3, .panel h2 { margin-top: 0; color: var(--pine); font-size: 1.65rem; }
.field { display: block; margin-bottom: .9rem; font-size: .9rem; font-weight: 650; }
.field :is(input, select, textarea) { display: block; width: 100%; min-width: 0; min-height: 44px; margin-top: .35rem; padding: .65rem; border: 1px solid #ad9f94; border-radius: .5rem; background: #fff; color: var(--brown); font-size: 1rem; }
.field textarea { min-height: 5rem; resize: vertical; }
.summary-row, .total { display: flex; justify-content: space-between; gap: .7rem; }
.summary-row { padding: .7rem 0; border-bottom: 1px solid var(--line); }
.summary-row span { overflow-wrap: anywhere; }
.summary-row strong, #total { white-space: nowrap; }
.total { margin: 1rem 0; font-size: clamp(1.1rem, 3vw, 1.35rem); font-weight: 700; }
.note { font-size: .875rem; }
.cta { width: 100%; min-height: 48px; color: #fff; background: var(--pine); }
.cta:hover:not(:disabled) { background: #285644; }
.cta:disabled, .qty button:disabled { opacity: .55; cursor: default; }
.secondary { color: var(--wine); background: transparent; border-color: var(--wine); }
.footer { padding: 2rem var(--gutter) 5.5rem; text-align: center; background: var(--pine-dark); color: #fff8ec; }
.footer-logo { width: 4.25rem; height: auto; aspect-ratio: 1; margin: 0 auto .65rem; }
.footer .brand { font: 700 1.5rem var(--serif); }
.footer a { display: inline-flex; align-items: center; min-height: 44px; color: #fff8ec; }
.footer p { margin: .35rem 0 0; }

.floating-order {
    position: fixed;
    z-index: 4;
    inset-inline: var(--gutter);
    bottom: calc(.65rem + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .65rem;
    width: min(25rem, calc(100% - 2 * var(--gutter)));
    margin-inline: auto;
    padding: .5rem .55rem .5rem .85rem;
    border: 1px solid #6b8e7d;
    border-radius: .8rem;
    background: var(--pine-dark);
    color: #fff8ec;
    box-shadow: 0 6px 22px #102c2440;
    text-decoration: none;
    transition: background-color .18s, box-shadow .18s;
}
.floating-order:hover { background: #1b4738; box-shadow: 0 8px 25px #102c2455; }
.floating-order-details { display: grid; line-height: 1.2; font-size: .85rem; }
.floating-order-details strong { font-size: 1rem; }
.floating-order-action { padding: .65rem .75rem; border-radius: .45rem; background: #f5e7cb; color: var(--pine-dark); font-size: .875rem; font-weight: 700; white-space: nowrap; }
html:has(.floating-order:not([hidden])) { scroll-padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }

.admin-page { padding-block: 2rem 4rem; }
.admin-page h1 { color: var(--pine); }
.admin-layout { align-items: start; }
.login { max-width: 430px; }
.settings { margin-top: 1.4rem; max-width: 550px; }
.product-list { padding: 0; list-style: none; }
.product-list li { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.product-list li span { font-size: .875rem; color: var(--muted); }
.check { display: block; margin-block: 12px; }
.feedback { padding: 12px 16px; background: #e3eee4; border-radius: 8px; }
.feedback.error { background: #fae4e7; color: #682537; }

@media (min-width: 36rem) {
    :root { --columns: 2; }
    .brand-name small { display: block; }
    .top-link { padding-inline: 1.15rem; }
}
@media (min-width: 48rem) {
    .hero { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); }
    .hero-media { aspect-ratio: auto; min-height: clamp(22rem, 41vw, 28rem); }
    .hero-photo { position: absolute; inset: 0; }
    .checkout-layout, .admin-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .floating-order { left: auto; width: 18.5rem; }
}
@media (min-width: 64rem) {
    :root { --columns: 3; }
}
@media (min-width: 76rem) {
    #tortas .cards { --columns: 4; }
}
@media (min-width: 88rem) {
    .holiday-margin {
        display: flex;
        position: absolute;
        top: 38%;
        right: calc(100% + 1rem);
        flex-direction: column;
        gap: .8rem;
        color: #906426;
    }
    .section:nth-of-type(even) .holiday-margin { left: calc(100% + 1rem); right: auto; }
    .holiday-margin .holiday-tree { width: 2.2rem; height: 2.6rem; }
}
@media (hover: hover) and (pointer: fine) {
    .card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px #3b211712; }
    .card:hover .photo img { transform: scale(1.025); }
    .qty button:hover:not(:disabled) { background: #cddfd2; color: var(--pine-dark); }
}
@media (prefers-reduced-motion: no-preference) {
    .hero-inner, .entered { animation: enter .45s ease-out backwards; }
    .holiday-lit .holiday-tree::after,
    .holiday-lit .holiday-star,
    .holiday-lit span:not([class]) { animation: holiday-glow 1.45s ease-in-out 3; }
    .holiday-lit .holiday-tree:last-child::after { animation-delay: .55s; }
    .holiday-lit .holiday-star { animation-delay: .25s; }
    .holiday-lit span:nth-child(2n):not([class]) { animation-delay: .35s; }
    .holiday-lit span:nth-child(3n):not([class]) { animation-delay: .55s; }
    .card.entered:nth-child(3n + 2) { animation-delay: 45ms; }
    .card.entered:nth-child(3n) { animation-delay: 85ms; }
    @keyframes enter { from { opacity: .65; transform: translateY(9px); } }
    @keyframes holiday-glow { 50% { opacity: .5; scale: .85; } }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

