:root {
    --bg-milk: #F4F1EB;
    --text-wine: #4A1525;
    --text-dark: #1A1A1A;
    --text-light: #777777;
    --accent-gold: #D4AF37;
    --accent-red: #D93838;
    --radius-squircle: 32px;

    /* Шум */
    --noise-bg: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Manrope', sans-serif;
    background: radial-gradient(circle at 50% 0%, #FFFFFF 0%, var(--bg-milk) 80%);
    color: var(--text-dark);
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before {
    content: ''; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: var(--noise-bg); pointer-events: none; z-index: 9999; opacity: 0.8;
}

h1, .serif-text { font-family: 'Playfair Display', serif; color: var(--text-wine); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; width: 100%; position: relative; z-index: 10; }

/* ================= ЖИВОЙ HERO ЭКРАН ================= */
.hero {
    padding-top: 140px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: center;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-content h1 {
    font-size: 96px;
    line-height: 0.9;
    letter-spacing: -3px;
    margin-bottom: 24px;
    text-shadow: 0 10px 30px rgba(244, 241, 235, 0.8);
}

.hero-content h1 i { font-style: italic; color: var(--accent-gold); }

.hero-subtitle {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 450px;
    font-weight: 500;
    color: #4A4A4A;
}

.btn-primary {
    display: inline-flex;
    background: var(--text-wine);
    color: #fff;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 700;
    padding: 20px 40px;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 30px rgba(74, 21, 37, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: buttonShine 3s infinite;
}

.btn-primary:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 20px 40px rgba(74, 21, 37, 0.3); }

.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    margin-left: -50px;
}

.glow-blob-1 { position: absolute; width: 400px; height: 400px; background: rgba(217, 56, 56, 0.2); border-radius: 50%; top: -50px; left: 0; filter: blur(60px); animation: float 8s ease-in-out infinite alternate; z-index: 1;}
.glow-blob-2 { position: absolute; width: 300px; height: 300px; background: rgba(212, 175, 55, 0.2); border-radius: 50%; bottom: -50px; right: 0; filter: blur(60px); animation: float 6s ease-in-out infinite alternate-reverse; z-index: 1;}

.product-showcase {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 3/4;
    background: url('https://images.unsplash.com/photo-1610832958506-aa56368176cf?q=80&w=1000&auto=format&fit=crop') center/cover;
    border-radius: var(--radius-squircle);
    box-shadow:
        -20px 20px 60px rgba(74, 21, 37, 0.15),
        inset 0 0 0 1px rgba(255,255,255,0.4);
    animation: levitate 6s ease-in-out infinite;
    overflow: hidden;
}

.product-showcase img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.glass-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    padding: 16px 24px;
    z-index: 6;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

.badge-1 { bottom: 40px; left: -60px; animation: float 5s ease-in-out infinite 1s; }
.badge-2 { top: 60px; right: -40px; animation: float 7s ease-in-out infinite 0.5s; }

.glass-badge span { display: block; }
.glass-badge .title { font-family: 'Playfair Display', serif; font-size: 20px; color: var(--text-wine); font-style: italic; margin-bottom: 4px;}
.glass-badge .subtitle { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dark); }

.floating-leaf {
    position: absolute;
    font-size: 60px;
    filter: blur(4px);
    z-index: 10;
    pointer-events: none;
}
.leaf-1 { top: 10%; left: -10%; animation: levitate 7s infinite alternate; transform: rotate(15deg); opacity: 0.8;}
.leaf-2 { bottom: 0; right: 10%; animation: levitate 5s infinite alternate-reverse; transform: rotate(-45deg); font-size: 80px; filter: blur(6px); opacity: 0.6;}

/* ================= АНИМАЦИИ ================= */
@keyframes levitate {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes float {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-10px, -15px); }
    100% { transform: translate(0, 0); }
}

@keyframes buttonShine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}
@keyframes pulse { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } 100% { opacity: 1; transform: scale(1); } }

/* ==========================================
   ПОПАП АВТОРИЗАЦИИ (MODAL)
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(26, 26, 26, 0.4);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-milk);
    border-radius: var(--radius-squircle);
    padding: 40px; width: 90%; max-width: 420px;
    position: relative;
    transform: translateY(40px) scale(0.95);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 40px 80px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.8);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute; top: 20px; right: 24px;
    font-size: 24px; color: var(--text-light);
    cursor: pointer; transition: 0.2s;
}

.modal-close:hover {
    color: var(--text-wine);
    transform: scale(1.1);
}

.auth-block {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 24px;
    padding: 20px;
    text-align: center;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
}

.super-input {
    width: 100%; padding: 16px;
    border: 2px solid transparent;
    border-radius: 16px;
    font-family: 'Manrope', sans-serif;
    background: rgba(0,0,0,0.03);
    outline: none;
    transition: 0.3s;
}

.super-input:focus {
    background: #fff;
    border-color: var(--text-wine);
    box-shadow: 0 0 0 4px rgba(74, 21, 37, 0.1);
}

/* ==========================================
   ОБЩИЕ ЗАГОЛОВКИ СЕКЦИЙ
   ========================================== */
.section-title-wrap {
    margin-bottom: 48px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}
.section-title-wrap.text-center {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.section-subtitle {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-gold);
    display: block;
    margin-bottom: 8px;
}
.section-title {
    font-size: 48px;
    line-height: 1.1;
    letter-spacing: -1px;
}
.section-title i {
    font-style: italic;
    color: var(--text-wine);
}
.section-desc {
    max-width: 400px;
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.5;
}

/* ==========================================
   БЛОК 3: КАТАЛОГ И КАРТОЧКИ
   ========================================== */
.showcase {
    padding: 80px 0;
}
.catalog-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.tab-btn {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(59, 13, 27, 0.08);
    padding: 12px 24px;
    border-radius: 100px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
}
.tab-btn.active, .tab-btn:hover {
    background: var(--text-wine);
    color: var(--bg-milk);
    border-color: var(--text-wine);
    box-shadow: 0 8px 20px rgba(59, 13, 27, 0.15);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.product-card {
    background: #FFFFFF;
    border-radius: var(--radius-squircle);
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(59, 13, 27, 0.1);
    border-color: rgba(59, 13, 27, 0.1);
}

.card-badge {
    position: absolute;
    top: 28px;
    left: 28px;
    z-index: 5;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 800;
    color: var(--text-wine);
}
.card-badge.gold { background: var(--accent-gold); color: #fff; }
.card-badge.alert { background: var(--accent-red); color: #fff; }

.card-img-holder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #141316;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-img-holder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.product-card:hover .card-img-holder img {
    transform: scale(1.06);
}

.card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.card-meta {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 4px;
}
.card-name {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.2;
}
.card-desc {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 16px;
}

.ripeness-selector {
    display: flex;
    background: var(--bg-milk);
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
    margin-bottom: 16px;
}
.ripe-tag {
    flex: 1;
    border: none;
    background: transparent;
    padding: 6px 0;
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-light);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}
.ripe-tag.active {
    background: #fff;
    color: var(--text-wine);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-wine);
}
.card-unit {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 600;
}
.add-to-cart-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--bg-milk);
    color: var(--text-wine);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.add-to-cart-btn svg { width: 20px; height: 20px; }
.add-to-cart-btn:hover {
    background: var(--text-wine);
    color: #fff;
    transform: scale(1.1) rotate(90deg);
}

/* ==========================================
   БЛОК 4: ГИПЕРЛОКАЛЬНОСТЬ И СОСЕДИ
   ========================================== */
.local-community {
    padding: 40px 0 80px;
}

.community-card {
    background: #FFFFFF;
    border-radius: var(--radius-squircle);
    padding: 48px;
    border: 1px solid rgba(59, 13, 27, 0.08);
    box-shadow: 0 20px 50px rgba(59, 13, 27, 0.06);
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.community-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-milk);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-wine);
    margin-bottom: 20px;
}

.community-title {
    font-size: 42px;
    line-height: 1.1;
    margin-bottom: 16px;
}

.community-text {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 32px;
}

.progress-wrap {
    background: var(--bg-milk);
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 32px;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 10px;
}

.gold-text { color: var(--text-wine); }

.progress-bar-bg {
    height: 10px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-gold), var(--text-wine));
    border-radius: 100px;
    transition: width 1s ease-in-out;
}

.community-action {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.timer-note {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-red);
}

.live-feed-wrap {
    background: var(--bg-milk);
    padding: 28px;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.feed-header {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.feed-ticker {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feed-item {
    background: #FFFFFF;
    padding: 14px 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    position: relative;
}

.feed-icon { font-size: 24px; }
.feed-user { font-size: 13px; font-weight: 800; color: var(--text-dark); }
.feed-product { font-size: 12px; color: var(--text-light); }
.feed-time {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-gold);
    white-space: nowrap;
}

/* ==========================================
   БЛОК 5: МАНИФЕСТ ДОВЕРИЯ
   ========================================== */
.manifest-section {
    padding: 40px 0 100px;
}

.manifest-card {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--bg-milk) 100%);
    border-radius: var(--radius-squircle);
    padding: 64px 48px;
    border: 1px solid rgba(59, 13, 27, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
    text-align: center;
}

.manifest-text {
    max-width: 720px;
    margin: 0 auto 56px;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-dark);
    font-weight: 500;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: left;
}

.value-item {
    background: #FFFFFF;
    padding: 28px;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
}

.value-icon { font-size: 32px; margin-bottom: 16px; }
.value-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: var(--text-wine);
    margin-bottom: 8px;
}
.value-item p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
}

/* ==========================================
   ПОИСК И ПЛИТКА КАТЕГОРИЙ
   ========================================== */
.catalog-header-section {
    padding-top: 20px;
    padding-bottom: 20px;
}

.search-bar-wrap {
    margin-bottom: 32px;
}

.search-input-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border-radius: 100px;
    padding: 6px 20px;
    border: 1px solid rgba(59, 13, 27, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.search-input-box:focus-within {
    border-color: var(--text-wine);
    box-shadow: 0 12px 35px rgba(59, 13, 27, 0.12);
}

.search-icon {
    width: 20px;
    height: 20px;
    stroke: var(--text-light);
    margin-right: 12px;
}

.search-input-box input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    padding: 12px 0;
}

.clear-search-btn {
    background: var(--bg-milk);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-light);
}

.quick-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.tag-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
}

.quick-tags button {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 6px 14px;
    border-radius: 100px;
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    transition: 0.2s;
}

.quick-tags button:hover {
    background: var(--text-wine);
    color: #fff;
}

.category-tiles-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.category-tile {
    background: #FFFFFF;
    border-radius: 28px;
    padding: 24px 20px;
    height: 145px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px rgba(59, 13, 27, 0.08);
    border-color: rgba(59, 13, 27, 0.1);
}

.tile-info {
    max-width: 65%;
    z-index: 2;
    position: relative;
}

.tile-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 21px;
    font-weight: 700;
    color: #1A1A1A;
    margin-bottom: 6px;
    line-height: 1.15;
    letter-spacing: -0.3px;
}

.tile-info span {
    font-size: 13px;
    color: #777777;
    font-weight: 500;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tile-img {
    position: absolute;
    bottom: -12px;
    right: -12px;
    width: 105px;
    height: 105px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    transition: transform 0.4s ease;
    z-index: 1;
}

.category-tile:hover .tile-img {
    transform: scale(1.08) rotate(-4deg);
}

.sale-tile {
    background: linear-gradient(135deg, #FBF6EC 0%, #F4E8D6 100%);
    border-color: rgba(212, 175, 55, 0.25);
}

.sale-tile .tile-info h3 { color: #1A1A1A; }

.tile-badge {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 11px;
    font-weight: 800;
    color: rgba(26, 26, 26, 0.35);
    z-index: 3;
}

a.category-tile {
    text-decoration: none;
    color: inherit;
    display: flex;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ==========================================
   КАТАЛОГ С СЕКЦИЯМИ ПО КАТЕГОРИЯМ
   ========================================== */
.category-block {
    padding: 32px 0;
    border-bottom: 1px solid rgba(59, 13, 27, 0.05);
}

.category-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.category-block-title {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    color: var(--text-wine);
}

.see-all-link {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-wine);
    text-decoration: none;
    transition: 0.2s;
}

.see-all-link:hover {
    opacity: 0.7;
    transform: translateX(4px);
}

/* ==========================================
   ПЛАВАЮЩАЯ КОРЗИНА ВНИЗУ (STICKY CART)
   ========================================== */
.floating-cart-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    z-index: 1000;
    width: 90%;
    max-width: 460px;
    background: rgba(59, 13, 27, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    padding: 10px 14px 10px 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-cart-bar.active { transform: translateX(-50%) translateY(0); }

.cart-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-info {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
}

.cart-count-badge {
    background: var(--accent-gold);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
}

.cart-title-text {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

.cart-total-price { font-size: 18px; font-weight: 800; }

.cart-checkout-btn {
    background: #FFFFFF;
    color: var(--text-wine);
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 100px;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.3s;
}

.cart-checkout-btn:hover { background: var(--accent-gold); color: #fff; }

/* ==========================================
   СТИЛИ СЕТОВ V3
   ========================================== */
.smart-sets {
    padding: 60px 0 80px;
    overflow: hidden;
}

.sets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.set-card-v3 {
    position: relative;
    border-radius: 36px;
    padding: 40px 32px 32px;
    display: flex;
    flex-direction: column;
    min-height: 540px;
    box-sizing: border-box;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform;
}

.set-card-v3:nth-child(3n+1) { background: #D8E2D7; }
.set-card-v3:nth-child(3n+2) { background: #EFE7DA; }
.set-card-v3:nth-child(3n+3) { background: #F5E0DC; }

.set-card-v3:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.08);
}

.set-header-v3 { text-align: center; }

.set-title-v3 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 4vw, 42px);
    font-weight: 600;
    color: #1A1A1A;
    line-height: 1.05;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.set-subtitle-v3 {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(18px, 2vw, 22px);
    color: #A07C3D;
    display: block;
}

.set-card-v3:nth-child(3n+3) .set-subtitle-v3 { color: #A65D50; }

.set-png-holder-v3 {
    width: 100%;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
    flex-shrink: 0;
}

.set-png-img-v3 {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.10));
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.5s ease;
}

.set-card-v3:hover .set-png-img-v3 {
    transform: scale(1.06) translateY(-6px);
    filter: drop-shadow(0 20px 28px rgba(0, 0, 0, 0.15));
}

.set-composition-v3 {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 20px;
}

.comp-pill {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 4px 11px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    color: #2C2C2C;
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.25s ease;
}

.comp-pill:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.comp-qty { color: #1A1A1A; font-weight: 800; }

.set-footer-v3 {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.set-meta-v3 {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.set-desc-v3 {
    font-size: 14px;
    font-weight: 500;
    color: #2C2C2C;
    margin: 0;
    letter-spacing: -0.2px;
}

.set-price-v3 {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-current { font-size: 22px; font-weight: 800; color: #1A1A1A; }
.price-old { font-size: 14px; text-decoration: line-through; color: #777777; }

.set-btn-v3 {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: #FFFFFF;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.set-card-v3:nth-child(3n+1) .set-btn-v3 { background: #1C2E24; }
.set-card-v3:nth-child(3n+2) .set-btn-v3 { background: #9E7B3B; }
.set-card-v3:nth-child(3n+3) .set-btn-v3 { background: #9E3B43; }

.btn-arrow {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.set-btn-v3:hover .btn-arrow { transform: translateX(4px); }
.set-btn-v3:hover { transform: scale(1.08); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18); }
.set-btn-v3:active { transform: scale(0.95); }

/* ==========================================
   АДАПТИВ (TABLET & MOBILE)
   ========================================== */
@media (max-width: 1200px) {
    .tile-info h3 { font-size: 18px; }
    .tile-info span { font-size: 12px; }
    .tile-img { width: 90px; height: 90px; }
}

@media (max-width: 1024px) {
    .community-card { grid-template-columns: 1fr; gap: 36px; padding: 36px; }
    .community-title { font-size: 36px; }
    .manifest-card { padding: 48px 32px; }
    .values-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .value-item { padding: 20px; }
    .value-item h3 { font-size: 18px; }
    .smart-sets { padding: 40px 0; }
    .sets-grid { gap: 20px; }
    .set-card-v3 { padding: 32px 24px 26px; min-height: 500px; }
    .set-png-holder-v3 { height: 180px; }
    .showcase { padding: 60px 0; }
    .products-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}

@media (max-width: 992px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 20px; }
    .hero-content { display: flex; flex-direction: column; align-items: center; }
    .hero-visual { margin-left: 0; margin-top: 40px; }
    .hero-content h1 { font-size: 64px; }
    .hero-subtitle { margin: 0 auto 32px; }
    .badge-1 { left: 10%; bottom: -20px; }
    .badge-2 { right: 10%; top: -20px; }

    .category-tiles-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        margin: 0 -20px 20px;
        padding: 4px 20px 12px;
        scrollbar-width: none;
    }
    .category-tiles-grid::-webkit-scrollbar { display: none; }
    .category-tile {
        flex: 0 0 180px;
        scroll-snap-align: start;
        height: 130px;
        padding: 18px 16px;
        border-radius: 22px;
    }
    .tile-info { max-width: 70%; }
    .tile-info h3 { font-size: 17px; }
    .tile-info span { font-size: 11px; }
    .tile-img { width: 80px; height: 80px; bottom: -10px; right: -10px; }
}

@media (max-width: 850px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .section-title { font-size: 36px; }
    .section-title-wrap { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 768px) {
    .hero { padding-top: 100px; padding-bottom: 60px; min-height: auto; }
    .hero-content h1 { font-size: clamp(48px, 15vw, 96px); line-height: 0.95; letter-spacing: -1px; margin-bottom: 16px;}
    .hero-subtitle { font-size: 15px; padding: 0 10px; margin-bottom: 32px; max-width: 100%;}
    .btn-primary { width: 100%; max-width: 340px; font-size: 15px; padding: 18px 24px; }
    .product-showcase { max-width: 280px; aspect-ratio: 4/5; }
    .glass-badge { padding: 12px 16px; border-radius: 16px; }
    .glass-badge .title { font-size: 16px; }
    .glass-badge .subtitle { font-size: 9px; }
    .badge-1 { bottom: 10px; left: -15px; animation: float 4s ease-in-out infinite alternate; }
    .badge-2 { top: 20px; right: -15px; animation: float 5s ease-in-out infinite alternate-reverse;}
    .glow-blob-1 { width: 250px; height: 250px; top: 0;}
    .glow-blob-2 { width: 200px; height: 200px; bottom: 0;}
    .floating-leaf.leaf-1 { font-size: 40px; left: -2%; top: 2%; filter: blur(2px);}
    .floating-leaf.leaf-2 { font-size: 50px; right: -2%; bottom: 5%; filter: blur(3px);}

    /* Блок 2: Сеты мобильный свайпер */
    .smart-sets { padding: 40px 0 50px; }
    .sets-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 16px;
        margin: 0 -20px;
        padding: 10px 20px 20px;
        scrollbar-width: none;
    }
    .sets-grid::-webkit-scrollbar { display: none; }
    .set-card-v3 {
        flex: 0 0 84%;
        scroll-snap-align: center;
        border-radius: 28px;
        padding: 28px 20px 22px;
        min-height: 460px;
    }
    .set-png-holder-v3 { height: 170px; margin: 12px 0; }
    .comp-pill { font-size: 10px; padding: 3px 9px; }
    .set-desc-v3 { font-size: 13px; }
    .price-current { font-size: 20px; }
    .set-btn-v3 { width: 44px; height: 44px; font-size: 18px; }

    /* Блок 3: Витрина */
    .showcase { padding: 40px 0; }
    .section-title-wrap { margin-bottom: 28px; }
    .section-title { font-size: clamp(30px, 7.5vw, 40px); }
    .catalog-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        margin: 0 -20px 28px;
        padding: 0 20px 8px;
        scrollbar-width: none;
        justify-content: flex-start;
    }
    .catalog-tabs::-webkit-scrollbar { display: none; }
    .tab-btn { flex: 0 0 auto; scroll-snap-align: start; padding: 10px 18px; font-size: 13px; white-space: nowrap; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .product-card { padding: 12px; border-radius: 20px; }
    .card-badge { top: 18px; left: 18px; font-size: 9px; padding: 3px 8px; }
    .card-img-holder { border-radius: 16px; margin-bottom: 10px; }
    .card-meta { font-size: 10px; }
    .card-name { font-size: 16px; line-height: 1.25; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .card-desc { display: none; }
    .ripeness-selector { padding: 3px; border-radius: 10px; margin-bottom: 12px; }
    .ripe-tag { padding: 5px 0; font-size: 10px; }
    .card-price { font-size: 18px; }
    .card-unit { font-size: 11px; }
    .add-to-cart-btn { width: 38px; height: 38px; }
    .add-to-cart-btn svg { width: 18px; height: 18px; }

    /* Блок 4: Соседи */
    .local-community { padding: 20px 0 40px; }
    .community-card { padding: 24px 18px; border-radius: 28px; gap: 28px; }
    .community-tag { font-size: 11px; padding: 5px 12px; margin-bottom: 14px; }
    .community-title { font-size: clamp(28px, 7vw, 36px); margin-bottom: 12px; }
    .community-text { font-size: 14px; line-height: 1.5; margin-bottom: 20px; }
    .progress-wrap { padding: 16px 14px; border-radius: 16px; margin-bottom: 24px; }
    .progress-labels { font-size: 12px; }
    .community-action { flex-direction: column; align-items: stretch; gap: 12px; }
    .community-action .btn-primary { width: 100%; text-align: center; padding: 16px 20px; font-size: 15px; }
    .timer-note { text-align: center; font-size: 12px; }
    .live-feed-wrap { padding: 18px 14px; border-radius: 20px; }
    .feed-header { font-size: 11px; margin-bottom: 14px; }
    .feed-ticker { gap: 10px; }
    .feed-item { padding: 10px 12px; border-radius: 14px; gap: 10px; }
    .feed-icon { font-size: 20px; }
    .feed-user { font-size: 12px; }
    .feed-product { font-size: 11px; }
    .feed-time { font-size: 9px; }

    /* Блок 5: Манифест свайпер */
    .manifest-section { padding: 20px 0 60px; }
    .manifest-card { padding: 32px 16px; border-radius: 28px; }
    .manifest-card .section-title { font-size: clamp(26px, 6.5vw, 34px); }
    .manifest-text { font-size: 14px; line-height: 1.6; margin-bottom: 32px; }
    .values-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 14px;
        padding-bottom: 12px;
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
        scrollbar-width: none;
    }
    .values-grid::-webkit-scrollbar { display: none; }
    .value-item { flex: 0 0 82%; scroll-snap-align: center; padding: 22px 18px; border-radius: 20px; }
    .value-icon { font-size: 28px; margin-bottom: 12px; }
    .value-item h3 { font-size: 17px; }
    .value-item p { font-size: 12px; line-height: 1.4; }
}

@media (max-width: 600px) {
    .floating-cart-bar { bottom: 16px; width: 94%; }
}

@media (max-width: 380px) {
    .products-grid { gap: 8px; }
    .product-card { padding: 10px; }
    .card-name { font-size: 14px; }
    .card-price { font-size: 16px; }
    .add-to-cart-btn { width: 34px; height: 34px; }
    .community-card, .manifest-card { padding: 20px 12px; }
    .values-grid .value-item { flex: 0 0 90%; }
    .set-card-v3 { flex: 0 0 88%; padding: 24px 16px 18px; }
}


/* ========================================================
   HOMEPAGE BOUTIQUE CATALOG INTEGRATION
   ======================================================== */

   .category-block {
    padding: 36px 0 20px;
    border-bottom: 1px solid rgba(62, 16, 29, 0.05);
}

.category-block:last-child {
    border-bottom: none;
}

.category-block-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 22px;
}

.category-block-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, 3.5vw, 36px);
    font-weight: 600;
    color: var(--text-wine, #3E101D);
    margin: 0;
}

.see-all-link {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--gold-accent, #9A7B56);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.see-all-link:hover {
    color: var(--text-wine, #3E101D);
    transform: translateX(3px);
}

/* Бейдж ХИТ на главной */
.media-badge.hit {
    background: #A6825B;
    color: #FFFFFF;
}

/* Адаптив сетки под главную */
@media (min-width: 1200px) {
    .catalog-sections .boutique-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 1199px) and (min-width: 769px) {
    .catalog-sections .boutique-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .category-block {
        padding: 24px 0 14px;
    }

    .category-block-header {
        margin-bottom: 14px;
    }

    .category-block-title {
        font-size: 20px;
    }

    .see-all-link {
        font-size: 12px;
    }

    /* Строго 2 в ряд на мобилках */
    .catalog-sections .boutique-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
}
