/* =========================
   1. ОДНАКОВІ КАРТКИ ТОВАРІВ
   ========================= */

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 560px;
    background:
        linear-gradient(180deg, rgba(28, 29, 36, 0.96) 0%, rgba(18, 19, 25, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
    transition: transform 0.25s ease, border-color 0.25s.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 240, 230, 0.45);
    box-shadow:
        0 14px 36px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(245, 240, 230, 0.12);
}

.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #131319;
    border-radius: 0;
    flex-shrink: 0;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 18px 10px;
}

.product-title {
    margin: 0 0 10px;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 800;
    color: #fff;
}

.product-rating {
    min-height: 30px;
    margin: 4px 0 10px;
}

.product-desc {
    color: #b8b8c2;
    font-size: 15px;
    line-height: 1.45;
    min-height: 68px;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-top: auto;
    padding: 0 18px;
    margin-bottom: 16px;
}

.product-weight {
    color: #b5b5bf;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
}

.product-price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.old-price,
.product-old-price {
    font-size: 14px;
    color: #888;
    text-decoration: line-through;
}

.product-price,
.product-price-promo {
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
    color: #F5F0E6;
    text-shadow: 0 0 12px rgba(245, 240, 230, 0.18);
}

.add-to-cart-btn {
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    min-height: 48px;
    border: none;
    border-radius: 999px;
    background: #fff;
    color: #161616;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #F5F0E6, #E8DDC8);
    color: #fff;
}

.promo-card {
    border-color: rgba(245, 240, 230, 0.55);
    box-shadow:
        0 0 0 1px rgba(245, 240, 230, 0.14),
        0 16px 34px rgba(0, 0, 0, 0.34),
        0 0 28px rgba(245, 240, 230, 0.12);
}

/* =========================
   2. КРАСИВІШИЙ "СЕТ ТИЖНЯ"
   ========================= */

#weekly-banner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 40px 16px;
    border-radius: 0;
    overflow: hidden;
    background-image:
        linear-gradient(
            90deg,
            rgba(6, 7, 12, 0.82) 0%,
            rgba(6, 7, 12, 0.45) 45%,
            rgba(6, 7, 12, 0.82) 100%
        ),
        url("https://images.unsplash.com/photo-1579871494447-9811cf80d66c?auto=format&fit=crop&w=1600&q=80");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-banner {
    position: relative;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 92, 124, 0.12), transparent 28%),
        radial-gradient(circle at 80% 70%, rgba(255, 111, 145, 0.10), transparent 24%);
    z-index: 0;
}

.weekly-hero-card {
    position: relative;
    z-index: 1;
    width: min(980px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 34px;
    align-items: center;
    padding: 28px;
    border-radius: 30px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(12, 13, 22, 0.86) 0%, rgba(18, 12, 22, 0.74) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 18px 50px rgba(0, 0, 0, 0.34),
        0 0 0 1px rgba(245, 240, 230, 0.06);
    backdrop-filter: blur(10px);
}

.weekly-hero-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(245, 240, 230, 0.28),
        rgba(255, 255, 255, 0.06),
        rgba(221, 208, 180, 0.20)
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.weekly-hero-media {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.30);
}

.weekly-hero-media img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.weekly-hero-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 9px 15px;
    border-radius: 999px;
    background: linear-gradient(135deg, #F5F0E6, #DDD0B4);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(245, 240, 230, 0.34);
}

.weekly-hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    color: #fff;
}

.weekly-hero-topline {
    color: #ffb2c1;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.weekly-hero-content h1 {
    margin: 0;
    font-size: clamp(42px, 5vw, 64px);
    line-height: 0.98;
    font-weight: 900;
    color: #ff5c7c;
    text-shadow: 0 0 18px rgba(255, 92, 124, 0.12);
}

.weekly-hero-prices {
    display: flex;
    align-items: baseline;
    gap: 14px;
    flex-wrap: wrap;
}

.weekly-old-price {
    color: rgba(255, 255, 255, 0.42);
    font-size: 22px;
    text-decoration: line-through;
}

.weekly-new-price {
    color: #fff;
    font-size: 54px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.08);
}

.weekly-hero-meta {
    color: rgba(255, 255, 255, 0.78);
    font-size: 18px;
    font-weight: 600;
}

.weekly-hero-list {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.weekly-hero-list li {
    position: relative;
    padding-left: 18px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 18px;
    line-height: 1.35;
}

.weekly-hero-list li::before {
    content: "✦";
    position: absolute;
    left: 0;
    top: 0;
    color: #DDD0B4;
}

.weekly-hero-actions {
    margin-top: 8px;
}

.weekly-order-btn {
    min-width: 230px;
    min-height: 56px;
    border: none;
    border-radius: 999px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #F5F0E6, #E8DDC8);
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(245, 240, 230, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.weekly-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(245, 240, 230, 0.36);
}

/* =========================
   3. АДАПТИВ
   ========================= */

@media (max-width: 1100px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .weekly-hero-card {
        grid-template-columns: 300px 1fr;
        gap: 24px;
    }

    .weekly-hero-media img {
        height: 330px;
    }
}

@media (max-width: 900px) {
    #weekly-banner {
        padding: 24px 12px;
        background-position: center;
    }

    .hero-banner {
        min-height: auto;
    }

    .weekly-hero-card {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
        border-radius: 24px;
    }

    .weekly-hero-media {
        display: block;
    }

    .weekly-hero-media img {
        height: 240px;
    }

    .weekly-hero-content {
        text-align: center;
        align-items: center;
    }

    .weekly-hero-list li {
        padding-left: 0;
        font-size: 16px;
    }

    .weekly-hero-list li::before {
        display: none;
    }

    .weekly-new-price {
        font-size: 42px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .product-card {
        min-height: 0;
        max-width: 420px;
        width: 100%;
        margin: 0 auto;
    }

    .product-card img {
        height: 220px;
    }
}

@media (max-width: 520px) {
    .weekly-hero-content h1 {
        font-size: 30px;
    }

    .weekly-new-price {
        font-size: 34px;
    }

    .weekly-hero-meta {
        font-size: 15px;
    }

    .weekly-hero-list li {
        font-size: 15px;
    }

    .weekly-order-btn {
        width: 100%;
        min-width: 0;
        font-size: 18px;
    }

    .product-title {
        min-height: auto;
        font-size: 22px;
    }

    .product-desc {
        min-height: 60px;
    }
}

/* важливо: sticky ламається, якщо десь вище стоїть overflow hidden/auto */
.menu-section,
.content-section,
#menu {
    overflow: visible !important;
}

/* сама липучка */
.menu-filters-sticky {
    position: sticky;
    top: 82px; /* відступ під хедер */
    z-index: 500;
    display: flex;
    justify-content: center;
    padding: 12px 16px;
    background: transparent; /* більше не буде чорної полоски */
}

/* липкий контейнер кнопок */
.categories-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;

    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 12px 16px;
    border-radius: 999px;

    background: rgba(12, 12, 16, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.category-btn {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #2a2b30;
    color: #fff;
    border-radius: 999px;
    padding: 12px 22px;
    min-height: 46px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.category-btn:hover {
    transform: translateY(-1px);
}

.category-btn.active {
    background: linear-gradient(135deg, #F5F0E6, #E8DDC8);
    border-color: transparent;
    color: #fff;
}

.promo-btn {
    border: 1px solid #F5F0E6;
    color: #F5F0E6;
    background: transparent;
}

.promo-btn.active {
    background: linear-gradient(135deg, #F5F0E6, #E8DDC8);
    border-color: transparent;
    color: #fff;
}

@media (max-width: 900px) {
    .menu-filters-sticky {
        top: 72px;
        padding: 10px 12px;
    }

    .categories-bar {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 10px;
        padding: 10px 12px;
        width: 100%;
        border-radius: 20px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

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

    .category-btn {
        flex: 0 0 auto;
        font-size: 15px;
        padding: 11px 18px;
        min-height: 42px;
    }
}

/* ===== STICKY КАТЕГОРІЇ МЕНЮ ===== */

/* важливо: sticky часто вмирає через overflow у батьків */
html,
body,
main,
.menu-section,
.content-section,
#menu,
.products-grid {
    overflow: visible !important;
}

.menu-section {
    position: relative;
}

/* сама липучка */
.menu-filters-sticky {
    position: sticky !important;
    top: 86px; /* під висоту хедера */
    z-index: 950;
    display: flex;
    justify-content: center;
    padding: 12px 16px;
    margin: 0 0 18px;
    background: transparent !important; /* прибирає чорну полосу */
}

/* красивий контейнер саме навколо кнопок */
.categories.categories-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;

    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    padding: 12px 16px;
    border-radius: 999px;

    background: rgba(12, 12, 16, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

/* кнопки */
.category-btn {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #2a2b30;
    color: #fff;
    border-radius: 999px;
    padding: 12px 22px;
    min-height: 46px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.category-btn:hover {
    transform: translateY(-1px);
}

.category-btn.active {
    background: linear-gradient(135deg, #F5F0E6, #E8DDC8);
    border-color: transparent;
    color: #fff;
}

.category-btn.promo-btn {
    border: 1px solid #F5F0E6;
    color: #F5F0E6;
    background: transparent;
}

.category-btn.promo-btn.active {
    background: linear-gradient(135deg, #F5F0E6, #E8DDC8);
    border-color: transparent;
    color: #fff;
}

/* мобілка */
@media (max-width: 900px) {
    .menu-filters-sticky {
        top: 72px;
        padding: 10px 12px;
    }

    .categories.categories-bar {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 10px;
        padding: 10px 12px;
        width: 100%;
        border-radius: 20px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

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

    .category-btn {
        flex: 0 0 auto;
        font-size: 15px;
        padding: 11px 18px;
        min-height: 42px;
    }
}
