.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%;
}

.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%
    }
}

body.menu-open {
    overflow: hidden;
}

.container>h2 {
    margin: 0 0 12px;
    font-weight: 800;
}

.topbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.top-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    background: linear-gradient(135deg, var(--brand, #2e7d32) 0%, var(--brand-2, #E67000) 100%);
    color: #fff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .12), inset 0 0 0 1px rgba(255, 255, 255, .2);
    transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}

.top-home-btn .icon {
    font-size: 18px;
    line-height: 1;
}

.top-home-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(0, 0, 0, .16), inset 0 0 0 1px rgba(255, 255, 255, .25);
    filter: brightness(1.03);
}

.top-home-btn:active {
    transform: translateY(0);
    filter: brightness(.98);
}

@media (max-width:520px) {
    .topbar {
        margin: 10px 0
    }

    .top-home-btn {
        padding: 10px 14px;
        font-size: 14px
    }
}

.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-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;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-sm {
    flex: 1;
    text-align: center;
    padding: 5px;
    border-radius: 12px;
    border: 1px solid #2e7d32;
    background: var(--bg);
}

.btn-sm.details {
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-add {
    background: var(--brand);
    color: #fff;
    border: none;
}

.btn-fav {
    width: 44px;
    flex: 0 0 44px;
}

.btn-disabled {
    opacity: .6;
    pointer-events: none;
}

@media (max-width:480px) {
    .btn-fav {
        width: 100%;
        flex: 1 0 100%
    }

    .btn-add {
        flex: 1 0 100%
    }
}

.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;
}

#emptyFav {
    text-align: center;
    padding: 40px 20px 80px;
    animation: fadeInUp .4s ease;
}

#emptyFav p {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 16px;
}

#emptyFav .btn {
    margin-top: 6px;
}

.favorites-empty-wrapper {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    padding: 30px 20px 100px;
    text-align: center;
}