.nav {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    background: linear-gradient(to right, #318835, #308735, #43ac48);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
    border-bottom: 1px solid #f2f2f2;
}

.hamburger {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    margin-inline: 6px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .10);
    align-items: center;
    justify-content: center;
    position: relative;
}

.hamburger span { display: none; }

.hamburger::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 2px;
    background: #1f2937;
    border-radius: 1px;
    transform: translate(-50%, -50%);
    box-shadow: 0 6px 0 #1f2937, 0 -6px 0 #1f2937;
}

.icons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.icon-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fff;
    font-weight: 700;
}

.icon-badge .badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: #e11d48;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    line-height: 1;
    min-width: 18px;
    text-align: center;
}

.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
body.menu-open .backdrop { opacity: 1; pointer-events: auto; }

.side-menu {
    position: fixed;
    inset-block: 0;
    right: 0;
    width: min(86vw, 360px);
    background: #fff;
    z-index: 50;
    box-shadow: -10px 0 30px rgba(0, 0, 0, .12);
    transform: translateX(110%);
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
}
body.menu-open .side-menu { transform: translateX(0); }

.side-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px;
    border-bottom: 1px solid #f2f2f2;
}

.side-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--brand, #2e7d32); }

.close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid #eee;
    background: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.side-body {
    padding: 14px;
    overflow: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sheet-search .search { width: 100%; display: flex; }

.sheet-links { display: grid; gap: 8px; }

.sheet-link {
    display: block;
    padding: 10px 12px;
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fafafa;
    transition: background .15s ease, transform .15s ease;
    text-decoration: none;
    color: #111;
}
.sheet-link:active { transform: scale(.98); background: #f3f3f3; }
.sheet-link--withicon { display: flex; align-items: center; gap: 10px; }
.sheet-link-icon { width: 18px; height: 18px; object-fit: contain; color: #2b2b2b; }

.menu-badge {
    margin-inline-start: auto;
    background: #2e7d32;
    color: #fff;
    font-size: 12px;
    line-height: 1;
    padding: 3px 8px;
    border-radius: 999px;
    min-width: 24px;
    text-align: center;
    font-weight: 700;
}

.sheet-icons { display: flex; gap: 8px; flex-wrap: wrap; }
.sheet-icons .icon-badge { flex: 1 1 48%; }
.sheet-icons .social-link { display: none; }

.side-footer { padding: 10px 14px; border-top: 1px solid #f2f2f2; color: #777; }

@media (max-width: 768px) {
    .nav { grid-template-columns: auto 1fr auto; gap: 10px; }
    .hamburger { display: inline-flex; }
    .icons { display: none; }
    .search { order: 3; width: 100%; }
}

.brand { font-weight: 800; font-size: clamp(18px, 2vw, 20px); color: var(--brand); }
.search { flex: 1; display: flex; justify-content: center; min-width: 200px; }
.search input {
    width: min(800px, 100%);
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--brand);
    outline: none;
    background: var(--bg);
    background-color: #fff;
}
.social-link { display: inline-block; margin: 0 4px; }
.social-icon { width: 35px; height: 35px; object-fit: contain; vertical-align: middle; }

@media (max-width: 768px) {
    .nav { gap: 10px; }
    .brand { order: 1; font-size: medium; }
    .search { order: 3; width: 100%; }
}

/* Hero */
.hero {
    position: relative;
    min-height: 52vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    padding: clamp(32px, 6vw, 60px) clamp(12px, 3vw, 24px);
}
.hero::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.5) 10%, rgba(0, 0, 0, 0) 100%);
}
.hero .inner { width: 100%; max-width: 1200px; margin: auto; z-index: 1; }
.hero h1 {
    font-size: clamp(28px, 5vw, 54px);
    line-height: 1.1;
    margin: 0 0 10px;
    font-weight: 800;
    color: #ff7b00;
    text-shadow: 0 10px 12px rgb(0, 0, 0);
}
.hero p {
    max-width: 680px;
    margin: 10px 0 24px;
    color: #f3f4f6;
    font-size: clamp(14px, 2.2vw, 18px);
    text-shadow: 0 12px 12px rgb(0, 0, 0);
}
.hero-fade { position: absolute; bottom: -1px; right: 0; left: 0; height: 90px; background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--bg)); }

/* Categories */
.cat-wrap { position: relative; margin-top: 10px; }
.cats {
    display: flex; gap: 16px; overflow: auto; scroll-snap-type: x mandatory; padding: 10px 6px;
}
.cats::-webkit-scrollbar { height: 8px; }
.cats::-webkit-scrollbar-thumb { background: #ddd; border-radius: 8px; }
.cat-card {
    min-width: clamp(180px, 38vw, 250px);
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 12px;
    scroll-snap-align: center;
    display: flex; flex-direction: column; gap: 10px;
    transition: transform .15s ease;
}
.cat-card:hover { transform: translateY(-6px); }
.cat-title { font-weight: 700; }
.cat-meta { color: var(--muted); font-size: 13px; }
.cat-img { height: 120px; border-radius: 12px; overflow: hidden; display: flex; justify-content: center; }

.nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px; border-radius: 999px; border: 1px solid #eee;
    background: #fff; box-shadow: 0 10px 15px rgba(0, 0, 0, .1); cursor: pointer;
}
.nav-btn.left { right: -6px; }
.nav-btn.right { left: -6px; }
@media (max-width: 576px) { .nav-btn { display: none; } }

/* Toolbar */
.toolbar {
    display: flex; justify-content: space-between; align-items: center;
    margin: 16px 2px 8px; gap: 12px; flex-wrap: wrap;
}

/* Product grid / cards */
.grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(clamp(220px, 42vw, 280px), 1fr));
}
.card {
    background: #f1f1f1;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    opacity: 0;
    transform: translateY(14px);
    transition: transform .4s ease, opacity .5s ease;
}
.card.show { opacity: 1; transform: translateY(0); }
.card:hover { transform: translateY(-6px); }
.card.clickable { cursor: pointer; }

.card-img {
    height: clamp(160px, 30vw, 260px);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; background: #fff; position: relative;
}
.card-img img { width: 100%; height: 100%; object-fit: contain; object-position: center; }

.content { padding: 14px; }
.title { font-weight: 800; margin: 0 0 6px; font-size: clamp(15px, 2.2vw, 18px); }
.desc { color: var(--muted); font-size: clamp(13px, 2vw, 14px); line-height: 1.6; height: 44px; overflow: hidden; }

.price { display: flex; align-items: center; gap: 10px; margin: 10px 0 12px; }
.price .now { font-size: clamp(18px, 2.8vw, 20px); font-weight: 800; color: #1f2937; }
.price .old { text-decoration: line-through; color: #9ca3af; }

.ribbon {
    position: absolute; left: 12px; top: 12px;
    background: var(--brand-2); color: #fff; padding: 4px 8px; border-radius: 8px; font-size: 12px;
}
.oos {
    position: absolute; left: 12px; bottom: 12px;
    background: #b91c1c; color: #fff; padding: 4px 8px; border-radius: 8px; font-size: 12px;
}

/* Actions row */
.actions {
    display: flex; justify-content: center; align-items: center;
    gap: 10px; flex-wrap: nowrap; margin-top: 8px;
}
.actions .btn-sm {
    display: inline-flex; align-items: center; justify-content: center;
    height: 40px; padding: 0 10px; border-radius: 12px; font-weight: 800;
    border: 1px solid #e5e7eb; background: #fff; color: #111;
    box-shadow: 0 6px 14px rgba(0,0,0,.06);
    transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
    flex: 0 0 auto;
}
.actions .btn-sm:hover { transform: translateY(-1px); box-shadow: 0 10px 18px rgba(0,0,0,.10); filter: brightness(1.02); }
.actions .btn-sm:active { transform: translateY(0); filter: brightness(.98); }

.actions .btn-add {
    min-width: 128px; border: none;
    background: linear-gradient(135deg, var(--brand, #2e7d32), #43ac48);
    color: #fff; box-shadow: 0 10px 20px rgba(46,125,50,.20);
}
.actions .btn-details { min-width: 50px; background: #f8fafc; border: 1px solid #e5e7eb; }

/* FAVORITE: gentle by default, red when active */
.actions .btn-fav,
.btn-fav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    padding: 0;
    background: #f8fafc;           /* gentle */
    color: #6b7280;                /* neutral gray heart */
    border: 1px solid #e5e7eb;     /* soft border */
    border-radius: 12px;
    transition: box-shadow .2s ease, filter .2s ease, transform .12s ease, color .2s ease, background .2s ease, border-color .2s ease;
}
.actions .btn-fav:hover,
.btn-fav:hover {
    filter: brightness(1.03);
    box-shadow: 0 6px 14px rgba(0,0,0,.06);
}
.actions .btn-fav.active,
.btn-fav.active {
    background: #ffe4e6;           /* light rose */
    color: #e11d48;                /* red heart */
    border-color: #fecdd3;         /* soft red border */
    box-shadow: 0 0 0 3px rgba(225,29,72,.12);
}

.btn-disabled { opacity: .6; pointer-events: none; }

@media (max-width: 576px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .card-img { height: 170px; }
    .content { padding: 10px; }
    .title { font-size: 14px; }
    .desc { font-size: 12px; height: 36px; }
    .price .now { font-size: 16px; }
    .actions { gap: 8px; margin: 5px; }
    .actions .btn-add { min-width: 44px; width: 44px; }
    .btn-details { display: none; }

    /* Cart icon only (hide text) */
    .actions .btn-add {
        position: relative;
        color: transparent;
        text-indent: -9999px;
        overflow: hidden;
        height: 40px;
        padding: 0;
        border-radius: 12px;
    }
    .actions .btn-add::before {
        content: "";
        position: absolute;
        width: 22px; height: 22px;
        top: 50%; left: 50%;
        transform: translate(-50%, -50%);
        background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' stroke='%23ffffff' fill='none' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.5'/%3E%3Ccircle cx='18' cy='20' r='1.5'/%3E%3Cpath d='M2 3h2l2.4 10.4A2 2 0 0 0 8.35 15H17a2 2 0 0 0 2-1.6L21 7H6'/%3E%3C/svg%3E");
        background-repeat: no-repeat; background-size: contain; background-position: center;
    }
}
