:root {
    --foodzu-green: #248943;
    --foodzu-dark: #183c29;
    --foodzu-soft: #f3f7ef;
    --foodzu-yellow: #f5d77b;
    --foodzu-radius: 18px;
}

body {
    background: #fff;
    color: var(--foodzu-dark);
}

header {
    min-height: 76px;
    height: auto;
    gap: 28px;
    padding: 12px max(4vw, 24px);
    box-shadow: 0 2px 18px rgba(24, 60, 41, .06);
}

.logo-link img {
    width: 142px;
    height: 52px;
    object-fit: contain;
}

.header-search {
    position: relative;
    flex: 1;
    max-width: 520px;
    order: 0;
}

.header-search input {
    height: 48px;
    border: 0;
    border-radius: 14px;
    background: #f3f5f1;
    padding: 0 74px 0 45px;
}

.header-search::before {
    content: '⌕';
    position: absolute;
    z-index: 1;
    top: 10px;
    left: 16px;
    font-size: 24px;
    color: #66746a;
}

header nav a {
    padding: 9px 2px;
    border-bottom: 2px solid transparent;
}

header nav a.active:not(.cart-link) {
    color: var(--foodzu-green);
    border-color: var(--foodzu-green);
}

.cart-link {
    border: 0;
    background: var(--foodzu-green);
    padding: 11px 16px;
}

.category-section {
    padding: 38px max(5vw, 24px) 26px;
    background: #fff;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 5px 0 0;
    font: 700 clamp(28px, 3vw, 40px) Fraunces, serif;
}

.section-heading > a,
.section-heading > span {
    color: var(--foodzu-green);
    font-size: 13px;
    font-weight: 700;
}

.category-bar {
    position: static;
    gap: 24px;
    padding: 0 0 8px;
    border: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
    display: none;
}

.category-bar .category-card,
.category-bar .nutri-pill {
    display: grid;
    flex: 0 0 116px;
    gap: 10px;
    padding: 0;
    color: var(--foodzu-dark);
    background: transparent;
    border-radius: 0;
    text-align: center;
}

.category-bar .category-card:hover,
.category-bar .category-card.active {
    color: var(--foodzu-green);
    background: transparent;
}

.category-image {
    display: block;
    width: 104px;
    height: 104px;
    margin: auto;
    overflow: hidden;
    border: 3px solid transparent;
    border-radius: 50%;
    background: var(--foodzu-soft);
    transition: transform .2s, border-color .2s;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-all {
    display: grid;
    place-items: center;
    background: var(--foodzu-dark);
    color: #fff;
    font: 700 24px Fraunces, serif;
}

.category-card:hover .category-image,
.category-card.active .category-image {
    transform: translateY(-3px);
    border-color: var(--foodzu-green);
}

.category-card b {
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    text-overflow: ellipsis;
}

.hero.hero-compact {
    width: min(1440px, 94%);
    min-height: 360px;
    height: 39vw;
    max-height: 490px;
    margin: 0 auto;
    padding: 42px clamp(25px, 5vw, 70px);
    border-radius: 26px;
    background: #e8f2df;
}

.hero-compact h1 {
    letter-spacing: -.035em;
}

.hero-triptych figure {
    border-radius: 18px 80px 18px 80px;
}

.hero-triptych figure:nth-child(2) {
    border-radius: 80px 18px 80px 18px;
}

.button {
    border-radius: 12px;
    background: var(--foodzu-green);
}

.product-heading {
    padding: 64px max(5vw, 24px) 0;
}

.grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.product {
    border: 0;
    border-radius: var(--foodzu-radius);
    box-shadow: 0 4px 22px rgba(24, 60, 41, .09);
}

.photo {
    height: auto;
    aspect-ratio: 1 / .84;
    border-radius: var(--foodzu-radius);
    overflow: hidden;
}

.photo img {
    transition: transform .35s ease;
}

.product:hover .photo img {
    transform: scale(1.035);
}

.photo span {
    top: 11px;
    left: 11px;
    max-width: calc(100% - 22px);
    overflow: hidden;
    background: rgba(255, 255, 255, .92);
    color: var(--foodzu-dark);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-info {
    min-height: 185px;
    padding: 16px;
}

.product h3 {
    font: 700 20px DM Sans, sans-serif;
    letter-spacing: -.02em;
}

.product-info p {
    display: -webkit-box;
    overflow: hidden;
    margin: 7px 0 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.buy {
    gap: 8px;
}

.buy strong {
    font-size: 17px;
}

.buy button {
    min-width: 68px;
    min-height: 40px;
    border: 0;
    border-radius: 11px;
    background: var(--foodzu-green);
    color: #fff;
}

.buy button.added,
.detail-add.added {
    background: #e4f4e7;
    color: var(--foodzu-green);
}

.nutripress-teaser {
    border-radius: 24px;
}

.product-detail {
    width: min(1300px, 100%);
    margin: auto;
}

.gallery-main {
    border-radius: 22px;
}

.detail-copy h1 {
    letter-spacing: -.04em;
}

.mobile-dock {
    display: none;
}

@media (max-width: 1050px) {
    header nav {
        gap: 14px;
    }

    header nav > a:not(.cart-link) {
        display: none;
    }

    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 750px) {
    body {
        padding-bottom: 72px;
    }

    header {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 8px 14px;
        padding: 8px 16px 11px;
    }

    .logo-link img {
        width: 116px;
        height: 42px;
    }

    header nav {
        width: auto;
        order: 0;
        overflow: visible;
    }

    header nav .cart-link {
        display: flex;
        align-items: center;
        min-height: 42px;
        padding: 8px 13px;
    }

    .header-search {
        grid-column: 1 / -1;
        width: 100%;
        max-width: none;
        order: 3;
    }

    .header-search input {
        height: 44px;
    }

    .category-section {
        padding: 25px 16px 20px;
    }

    .section-heading {
        margin-bottom: 17px;
    }

    .category-bar {
        gap: 14px;
        margin-right: -16px;
        padding-right: 16px;
        scroll-snap-type: x proximity;
    }

    .category-bar .category-card,
    .category-bar .nutri-pill {
        flex-basis: 82px;
        scroll-snap-align: start;
    }

    .category-image {
        width: 76px;
        height: 76px;
    }

    .category-card b {
        font-size: 12px;
    }

    .hero.hero-compact {
        display: block;
        width: calc(100% - 32px);
        height: 385px;
        min-height: 0;
        padding: 25px;
        position: relative;
        overflow: hidden;
    }

    .hero-copy {
        position: relative;
        z-index: 2;
    }

    .hero-compact h1 {
        margin: 8px 0 9px;
        font-size: 40px;
    }

    .hero-compact p {
        max-width: 85%;
        font-size: 14px;
    }

    .hero-actions {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 14px;
        margin-top: 15px;
    }

    .hero-actions .button {
        padding: 12px 15px;
    }

    .hero-link {
        font-size: 12px;
    }

    .hero-triptych {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        height: 145px;
        padding: 0 15px 15px;
    }

    .hero-triptych figure,
    .hero-triptych figure:nth-child(2) {
        border-radius: 14px;
        transform: none;
    }

    .product-heading {
        padding: 42px 16px 0;
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 0 16px 58px;
    }

    .product-info {
        min-height: 170px;
        padding: 12px;
    }

    .product h3 {
        font-size: 15px;
    }

    .product-info p {
        font-size: 12px;
    }

    .buy {
        align-items: end;
    }

    .buy strong {
        font-size: 14px;
    }

    .buy small {
        display: block;
        font-size: 10px;
    }

    .buy button {
        min-width: 58px;
        min-height: 36px;
        padding: 7px 9px;
        font-size: 12px;
    }

    .photo span {
        top: 8px;
        left: 8px;
        padding: 5px 7px;
        font-size: 9px;
    }

    .nutripress-teaser {
        margin: 0 16px 55px;
        border-radius: 20px;
    }

    .product-detail {
        gap: 22px;
        padding: 18px 16px 115px;
    }

    .gallery-main {
        height: auto;
        aspect-ratio: 1 / .92;
        border-radius: 18px;
    }

    .detail-copy h1 {
        margin: 10px 0 14px;
        font-size: 38px;
    }

    .detail-description {
        margin: 20px 0;
        font-size: 15px;
    }

    .detail-add {
        position: fixed;
        z-index: 30;
        right: 14px;
        bottom: 78px;
        left: 14px;
        width: calc(100% - 28px);
        margin: 0;
        box-shadow: 0 8px 30px rgba(24, 60, 41, .24);
    }

    .site-footer {
        padding-bottom: 45px;
    }

    .mobile-dock {
        position: fixed;
        z-index: 40;
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        min-height: 66px;
        padding: 7px 6px max(6px, env(safe-area-inset-bottom));
        border-top: 1px solid #e5e9e3;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 -5px 20px rgba(24, 60, 41, .08);
    }

    .mobile-dock a,
    .mobile-dock button {
        display: grid;
        place-items: center;
        gap: 2px;
        border: 0;
        background: none;
        color: #6c776f;
        font-size: 10px;
        font-weight: 600;
    }

    .mobile-dock span {
        position: relative;
        font-size: 21px;
        line-height: 1;
    }

    .mobile-dock .active {
        color: var(--foodzu-green);
    }

    .mobile-dock b {
        position: absolute;
        top: -7px;
        right: -11px;
        display: grid;
        place-items: center;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        border-radius: 10px;
        background: #f07955;
        color: #fff;
        font-size: 9px;
    }

    .toast {
        bottom: 82px;
    }
}

@media (max-width: 380px) {
    .hero.hero-compact {
        height: 405px;
    }

    .hero-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .grid {
        gap: 9px;
        padding-right: 10px;
        padding-left: 10px;
    }
}
