/* ========== СКЕЛЕТОНЫ ========== */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 400px 100%;
    animation: shimmer 1.5s infinite;
}

/* Скелетон-заглушка для изображения (полная высота контейнера) */
.skeleton-placeholder {
    width: 100%;
    height: 100%;
    aspect-ratio: 1000 / 1350;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 400px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
    display: block;
}

/* Фиксированные размеры для текстовых скелетонов */
.skeleton-title {
    height: 26px;
    width: 70%;
    border-radius: 6px;
    margin-bottom: 6px;
}

.skeleton-subtitle {
    height: 16px;
    width: 90%;
    border-radius: 4px;
    margin-bottom: 4px;
}

.skeleton-price {
    height: 18px;
    width: 40%;
    border-radius: 4px;
}

.skeleton-product { height: 100%; border-radius: 16px; }
.skeleton-banner { border-radius: 20px; }

:root {
    --red: #dd1847;
    --red-dark: #c1163d;
    --bg: #f5f5f5;
    --text: #1a1a1a;
    --text-secondary: #666;
    --border: #f0f0f0;
    --card: #ffffff;
    --shadow: 0 2px 8px rgba(0,0,0,0.04);
    --purple: #a73afd;
    --purple-hover: #9326e8;
    --price-red: #ff4444;
    --card-red: #dd1847;
    --cart-red: #dd1847;
    --img-bg: #f6f6f9;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    padding-bottom: 90px;
}

/* ========== ХЕДЕР ========== */
.header-container {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04); border-radius: 0 0 20px 20px;
}
.header-inner { max-width: 100%; padding: 0 20px; }
.header-top-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.header-city { font-size: 14px; font-weight: 500; color: var(--text); display: flex; align-items: center; gap: 4px; cursor: pointer; }
.header-city:hover { color: var(--red); }
.header-city svg { width: 14px; height: 14px; stroke: var(--red); }
.currency-selector { position: relative; cursor: pointer; user-select: none; }
.currency-current { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-secondary); padding: 4px 8px; border-radius: 6px; transition: background 0.15s; }
.currency-current:hover { background: #f5f5f5; }
.currency-current .currency-flag { width: 16px; height: 12px; border-radius: 2px; }
.currency-current .currency-arrow { width: 10px; height: 10px; stroke: #999; }
.currency-dropdown { display: none; position: absolute; top: 100%; right: 0; background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); min-width: 160px; z-index: 200; overflow: hidden; animation: fadeDown 0.2s ease; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.currency-dropdown-item { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-size: 13px; color: var(--text); cursor: pointer; transition: background 0.15s; }
.currency-dropdown-item:hover { background: #f8f8f8; }
.currency-dropdown-item.active { color: var(--red); font-weight: 600; background: #fdf2f5; }
.currency-dropdown-item .currency-flag { width: 20px; height: 14px; border-radius: 3px; }
.header-main-row { display: flex; align-items: center; gap: 16px; padding: 8px 0 12px; }
.header-logo { height: 48px; width: auto; flex-shrink: 0; }
.menu-btn { width: 50px; height: 50px; border: none; background: #f5f5f5; border-radius: 15px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; transition: background 0.15s; flex-shrink: 0; }
.menu-btn:hover { background: #eee; }
.menu-btn span { width: 22px; height: 2px; background: var(--text-secondary); border-radius: 2px; }

/* Кнопка корзины с бейджем */
.cart-btn {
    position: relative;
    text-decoration: none;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #dd1847;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    pointer-events: none;
}

.mobile-top-row { 
    display: none; 
    justify-content: space-between; 
    align-items: center; 
    padding: 6px 0; 
    overflow: visible !important; 
}
/* ========== БАННЕР ========== */
.banner-carousel { margin: 0 0 12px; padding: 140px 20px 0; }
.banner-carousel-inner { background: linear-gradient(135deg, #fdf2f5, #ffe4e9); border-radius: 20px; height: 300px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 600; color: var(--red); }

/* ========== СЕТКА ТОВАРОВ ========== */
.products-section { margin: 0; padding: 0; }
.products-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px 2px;
    max-width: 100%;
    padding: 0;
    margin: 0 auto;
    align-items: stretch;
    contain: layout style;
}

/* ===== КАРТОЧКА ===== */
.product-card {
    position: relative;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    color: #242424;
    font-size: 16px;
    font-family: "Segoe UI", -apple-system, Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
    height: 100%;
    contain: layout style;
}

/* Скелетон-карточка — идентичная структура с плавным затуханием */
.product-card-skeleton {
    position: relative;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    contain: layout style;
    transition: opacity 0.3s ease;
}

.product-card-skeleton.fade-out {
    opacity: 0;
    pointer-events: none;
}

.product-card-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.product-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
}

/* ===== TOP ===== */
.product-card-top {
    position: relative;
    width: 100%;
    border-radius: 12px;
    background: var(--img-bg);
    flex-shrink: 0;
    overflow: visible;
    aspect-ratio: 1000 / 1350;
}

/* Обрезаем только галерею */
.product-card-img-strip {
    width: 100%;
    height: 100%;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
    z-index: 4;
    border-radius: 12px;
}
.product-card-img-strip::-webkit-scrollbar {
    display: none;
}

.product-card-img-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
}

.product-card-img-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}

.product-card-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 14px;
    background: #f6f6f9;
    border-radius: 12px;
    overflow: hidden;
}

.product-card-dots {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 5;
    pointer-events: none;
    height: 5px;
}
.product-card-dots.has-multiple {
    pointer-events: auto;
}
.product-card-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}
.product-card-dot.active {
    background: #dd1847;
    width: 16px;
    border-radius: 3px;
}

/* Сердечко */
.product-card-heart-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 6;
    display: grid;
    height: 48px;
    pointer-events: none;
}

.product-card-heart {
    justify-self: end;
    width: 48px;
    height: 48px;
    background: url('data:image/svg+xml,%3Csvg width="23" height="21" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M11.5 19.5C5.5 15 1 10.8 1 7 1 4.2 3.1 1.5 6.5 1.5c1.5 0 3 .5 4.2 1.5L11.5 3l.8-.8C13.5 2 15 1.5 16.5 1.5 19.9 1.5 22 4.2 22 7c0 3.8-4.5 8-10.5 12.5z" stroke="%23999" stroke-width="1.5" fill="none"/%3E%3C/svg%3E') center / 28px 25px no-repeat;
    border: none;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s;
    padding: 0;
    position: relative;
    margin-right: 12px;
    pointer-events: auto;
}
.product-card-heart:hover { opacity: 1; }
.product-card-heart.active {
    background-image: url('data:image/svg+xml,%3Csvg width="23" height="21" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M12.113 19.777a.98.98 0 0 1-1.246 0C5.327 15.102.85 10.749 1.004 6.985c0-2.764 2.093-5.693 5.743-5.973 1.274-.071 3.22.194 4.741 1.542 1.55-1.352 3.65-1.632 4.735-1.537 3.216.187 5.776 2.77 5.776 5.968.082 3.87-4.32 8.125-9.886 12.792Z" fill="%23dd1847"/%3E%3Cpath fill-rule="evenodd" clip-rule="evenodd" d="M7.225 3C4.805 3 3 4.796 3 7.082c0 1.36.91 3.034 2.65 5.023 1.554 1.777 3.621 3.644 5.85 5.574 2.229-1.93 4.296-3.797 5.85-5.574C19.09 10.116 20 8.443 20 7.081 20 4.796 18.194 3 15.775 3c-1.326 0-2.666.614-3.52 1.597a1 1 0 0 1-1.51 0C9.892 3.614 8.552 3 7.226 3Z" fill="%23dd1847"/%3E%3C/svg%3E');
    opacity: 1;
}

.product-card-cart-btn {
    position: absolute;
    bottom: -5px;
    right: 22px;
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--cart-red);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.product-card-cart-btn:hover {
    background: #c1163d;
    transform: scale(1.05);
}
.product-card-cart-btn svg {
    width: 26px;
    height: 26px;
    stroke: #fff;
    fill: none;
    stroke-width: 2;
}

.product-card-out .product-card-cart-btn {
    background: #e0e0e0;
    cursor: default;
    pointer-events: none;
}
.product-card-out .product-card-cart-btn svg {
    stroke: #fff;
}

/* Плашки */
.product-card-badges {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 8px;
    pointer-events: none;
}
.product-card-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    color: #fff;
    white-space: nowrap;
}
.product-card-badge.sale { background: #ff4444; }
.product-card-badge.promo-badge { background: #dd1847; }

/* ===== MIDDLE ===== */
.product-card-middle {
    position: relative;
    padding: 0 8px 0px;
    margin-top: 6px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2px;
    min-height: 0;
}

/* Скелетон-карточка: отступы как у реальной */
.product-card-skeleton .product-card-middle {
    padding: 0 8px 6px;
    margin-top: 13px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 5px;
    min-height: 100px;
}

.product-card-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    overflow: hidden;
    max-width: 100%;
}
.product-card-price-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
    overflow: hidden;
}
.product-card-price-row {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
    overflow: hidden;
    max-width: 100%;
    flex-wrap: nowrap;
}

.product-card-price-card {
    display: flex;
    align-items: baseline;
    gap: 3px;
    font-size: clamp(14px, 4vw, 26px);
    font-weight: 700;
    line-height: 1.1;
    color: var(--card-red);
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}
.product-card-price-card .card-icon {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
    color: var(--card-red);
    align-self: center;
    position: relative;
    top: 0.05em;
}

.product-card-price-sale {
    display: flex;
    align-items: baseline;
    gap: 2px;
    font-size: clamp(14px, 4vw, 26px);
    font-weight: 700;
    line-height: 1.1;
    color: var(--price-red);
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}
.product-card-price-sale .sale-percent {
    font-size: clamp(14px, 4vw, 26px);
    font-weight: 700;
    line-height: 1.1;
}

.product-card-price-old {
    font-size: clamp(11px, 2.5vw, 22px);
    line-height: 1.1;
    color: #868695;
    text-decoration: line-through;
    white-space: nowrap;
    flex-shrink: 0;
}

.product-card-brand {
    display: block;
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 18px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.product-card-brand-name { color: #242424; }
.product-card-name { color: #9d9da5; }
.product-card-name-sep { color: #9d9da5; }

.product-card-rating {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    font-size: 13px;
    line-height: 18px;
    color: #242424;
    white-space: nowrap;
    width: 100%;
    min-height: 18px;
}
.product-card-rating-star { color: #fc0; font-size: 14px; line-height: 1; }
.product-card-rating-value { color: #242424; font-size: 13px; line-height: 18px; }
.product-card-rating-count { color: #9d9da5; font-size: 13px; line-height: 18px; }

/* ========== ФУТЕР ========== */
.site-footer {
    margin: 40px 0 0; padding: 40px 20px 20px; border-top: 1px solid #e0e0e0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
}
.footer-col h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; color: var(--text); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col ul li { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.footer-col ul li a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--red); }
.footer-company-info { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.footer-company-info p { margin-bottom: 6px; }
.footer-company-info a { color: var(--text-secondary); text-decoration: none; }
.footer-company-info a:hover { color: var(--red); }
.footer-bottom { margin: 0; padding: 20px; text-align: center; font-size: 12px; color: #999; border-top: 1px solid #f0f0f0; }

/* ========== ПК: 6 в ряд ========== */
@media (min-width: 1024px) {
    .products-section { padding: 0 20px; }
    .products-grid { grid-template-columns: repeat(6, 1fr); max-width: 100%; gap: 16px 12px; }
    .product-card-price-card, .product-card-price-sale { font-size: 22px; }
    .product-card-price-old { font-size: 18px; }
    .product-card-price-card .card-icon { width: 22px; height: 22px; }
    .product-card-rating { font-size: 12px; }
    .product-card-rating-star { font-size: 13px; }
    .product-card-rating-value, .product-card-rating-count { font-size: 12px; }
    .product-card-brand { font-size: 12px; line-height: 16px; }
}

/* ========== ПЛАНШЕТ ========== */
@media (min-width: 768px) and (max-width: 1023px) {
    .products-grid { grid-template-columns: repeat(4, 1fr); }
    .product-card-price-card, .product-card-price-sale { font-size: 18px; }
    .product-card-price-old { font-size: 14px; }
    .sale-percent { font-size: 18px; }
    .product-card-price-card .card-icon { width: 18px; height: 18px; }
    .product-card-price-row { gap: 3px; }
    .product-card-rating { font-size: 11px; }
    .product-card-rating-star { font-size: 12px; }
    .product-card-rating-value, .product-card-rating-count { font-size: 11px; }
    .product-card-brand { font-size: 11px; line-height: 15px; }
    .product-card-middle { padding: 0 6px 4px; }
}

/* ========== МОБИЛКА (стандартная) ========== */
@media (max-width: 767px) {
    .header-inner { border-radius: 0 0 20px 20px; padding: 0 12px; }
    .header-top-row { display: none; }
    .header-main-row { display: none; }
    .mobile-top-row { display: flex; }
    .mobile-search-row { display: block; }
    .header-logo-mobile { height: 32px; }
    .banner-carousel { margin-top: 119px; padding: 0 12px 0; }
    .banner-carousel-inner { height: 180px; font-size: 18px; border-radius: 16px; }
    .mobile-quick-actions {
        display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px;
        padding: 0 8px 12px; margin: 0;
    }
    .mobile-quick-action {
        display: flex; flex-direction: column; align-items: center; gap: 4px;
        font-size: 9px; color: var(--text-secondary); cursor: pointer;
        padding: 8px 0; width: calc(100% / 5 - 2px); text-align: center; line-height: 1.2;
    }
    .mobile-quick-action svg { width: 22px; height: 22px; }
    .site-footer { grid-template-columns: 1fr; gap: 28px; padding: 32px 16px 20px; }
    .footer-col ul { gap: 10px; }
    .footer-col ul li { font-size: 13px; }

    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0 2px;
        padding: 0;
        align-items: stretch;
    }
    .product-card { height: 100%; padding-top: 5px; }
    .product-card:first-child, .product-card:nth-child(2) { padding-top: 0; }
    .product-card-wrapper { height: 100%; }
    .product-card-top { border-radius: 10px; overflow: visible; }
    .product-card-middle {
        flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
        padding: 0 8px 6px; margin-top: 13px; gap: 5px;
    }
    .product-card-price { gap: 0; }
    .product-card-price-left { gap: 0; width: 100%; }
    .product-card-price-row { gap: 3px; }
    .product-card-price-card, .product-card-price-sale {
        font-size: clamp(13px, 4.5vw, 22px);
        line-height: 1.1;
    }
    .product-card-price-card .card-icon { width: 1em; height: 1em; }
    .product-card-price-old {
        font-size: clamp(11px, 3vw, 17px);
        line-height: 1.1;
    }
    .sale-percent {
        font-size: clamp(13px, 4.5vw, 22px);
    }
    .product-card-brand { font-size: 13px; line-height: 17px; }
    .product-card-rating { font-size: 12px; gap: 4px; justify-content: flex-start; }
    .product-card-rating-star { font-size: 14px; }
    .product-card-rating-value, .product-card-rating-count { font-size: 12px; }
    .product-card-heart-wrap { height: 48px; }
    .product-card-heart { width: 48px; height: 48px; background-size: 28px 25px; margin-right: 12px; }
    .product-card-cart-btn {
        width: 50px; height: 50px; bottom: -8px; right: 22px; border-radius: 14px;
    }
    .product-card-cart-btn svg { width: 23px; height: 30px; margin: 11px 9px 9px 5px; }

    .product-card-overlay {
        pointer-events: none !important;
    }

    .product-card-heart,
    .product-card-cart-btn {
        pointer-events: auto !important;
        position: absolute;
    }
    
    .product-card-heart {
        right: auto;
        top: auto;
    }
    
    .product-card-cart-btn {
        right: 22px;
        bottom: -8px;
    }

    .product-card-dots {
        opacity: 1 !important;
        pointer-events: auto !important;
        gap: 5px;
        bottom: -8px;
    }
    .product-card-dot {
        width: 5px;
        height: 5px;
    }
    .product-card-dot.active {
        width: 16px;
    }
}

/* ========== УЗКИЕ МОБИЛКИ (до 360px: iPhone 5/SE, iPhone 6/7/8 с Display Zoom) ========== */
@media (max-width: 360px) {
    .product-card-price-card, .product-card-price-sale { 
        font-size: clamp(12px, 5vw, 15px); 
    }
    .product-card-price-old { 
        font-size: clamp(10px, 3.5vw, 12px); 
    }
    .sale-percent { 
        font-size: clamp(12px, 5vw, 15px); 
    }
    .product-card-price-card .card-icon { 
        width: 0.9em; 
        height: 0.9em; 
    }
    .product-card-price-row { 
        gap: 2px; 
    }
    .product-card-middle { 
        padding: 0 6px 2px; 
        gap: 4px;
    }
    .product-card-cart-btn {
        width: 36px; 
        height: 36px; 
        bottom: -4px; 
        right: 8px;
        border-radius: 10px;
    }
    .product-card-cart-btn svg { 
        width: 18px; 
        height: 22px; 
        margin: 7px 5px 5px 4px; 
    }
    .product-card-heart {
        width: 36px; 
        height: 36px; 
        background-size: 22px 20px; 
        margin-right: 8px;
    }
    .product-card-heart-wrap { 
        height: 40px; 
    }
    .product-card-brand { 
        font-size: 11px; 
        line-height: 14px; 
    }
    .product-card-rating { 
        font-size: 10px; 
        gap: 2px; 
    }
    .product-card-rating-star { 
        font-size: 11px; 
    }
    .product-card-rating-value, .product-card-rating-count { 
        font-size: 10px; 
    }
    .product-card-badge { 
        font-size: 9px; 
        padding: 1px 3px; 
    }
}

/* ========== СРЕДНИЕ МОБИЛКИ (361-420px: iPhone 11/12/13/14/15) ========== */
@media (min-width: 361px) and (max-width: 420px) {
    .product-card-price-card, .product-card-price-sale { 
        font-size: clamp(13px, 4.5vw, 17px); 
    }
    .product-card-price-old { 
        font-size: clamp(11px, 3vw, 14px); 
    }
    .sale-percent { 
        font-size: clamp(13px, 4.5vw, 17px); 
    }
    .product-card-price-card .card-icon { 
        width: 1em; 
        height: 1em; 
    }
    .product-card-price-row { 
        gap: 3px; 
    }
    .product-card-middle { 
        padding: 0 8px 4px; 
        gap: 5px;
    }
    .product-card-cart-btn {
        width: 40px; 
        height: 40px; 
        bottom: -5px; 
        right: 12px;
    }
    .product-card-cart-btn svg { 
        width: 20px; 
        height: 24px; 
        margin: 8px 6px 6px 4px; 
    }
    .product-card-heart {
        width: 40px; 
        height: 40px; 
        background-size: 24px 22px; 
        margin-right: 10px;
    }
    .product-card-heart-wrap { 
        height: 44px; 
    }
    .product-card-brand { 
        font-size: 12px; 
        line-height: 15px; 
    }
    .product-card-rating { 
        font-size: 11px; 
        gap: 3px; 
    }
    .product-card-rating-star { 
        font-size: 12px; 
    }
    .product-card-rating-value, .product-card-rating-count { 
        font-size: 11px; 
    }
}

@media (min-width: 768px) { .mobile-quick-actions { display: none; } }

/* Нижнее мобильное меню */
.bottom-nav-wrapper {
    position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%);
    z-index: 100; max-width: 600px; width: calc(100% - 40px);
}
.bottom-nav {
    background: #fff; border: 1px solid var(--border); border-radius: 20px;
    display: flex; box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    padding: 8px 12px; padding-bottom: max(8px, env(safe-area-inset-bottom));
}
.bottom-nav-item {
    flex: 1; padding: 10px 6px; text-align: center; cursor: pointer;
    font-size: 12px; color: var(--text-secondary); border: none;
    background: transparent; border-radius: 14px; font-weight: 500;
    position: relative;
    z-index: 1;
}
.bottom-nav-item.active { color: var(--red); background: #fdf2f5; font-weight: 600; }
.bottom-nav-item svg { width: 24px; height: 24px; display: block; margin: 0 auto 4px; pointer-events: none; }
@media (min-width: 768px) { .bottom-nav-wrapper { display: none; } }
.products-loader {
    text-align: center;
    padding: 24px;
    color: #999;
    font-size: 14px;
    width: 100%;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 97;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

.sidebar-menu-panel {
    position: fixed;
    top: 72px;
    left: -320px;
    width: 300px;
    height: calc(100vh - 72px);
    background: #fff;
    z-index: 98;
    transition: left 0.3s;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}
.sidebar-menu-panel.open { left: 0; }

.sidebar-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.sidebar-menu-header h3 { font-size: 16px; font-weight: 700; }
.sidebar-menu-close {
    width: 32px; height: 32px;
    border: none; background: #f5f5f5;
    border-radius: 8px; cursor: pointer;
    font-size: 20px; display: flex;
    align-items: center; justify-content: center;
}

.sidebar-menu-nav { padding: 8px 0; }
.sidebar-menu-item { border-bottom: 1px solid #f5f5f5; position: relative; }

.sidebar-menu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s;
}
.sidebar-menu-link:hover { background: #f9f9f9; }

.sidebar-menu-count {
    font-size: 11px;
    color: #999;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
}

.sidebar-menu-toggle {
    position: absolute;
    right: 12px;
    top: 10px;
    width: 28px; height: 28px;
    border: none; background: #f5f5f5;
    border-radius: 6px; cursor: pointer;
    font-size: 16px; font-weight: 700;
    z-index: 1;
}

.sidebar-submenu {
    display: none;
    background: #fafafa;
    padding: 4px 0;
}
.sidebar-submenu.open { display: block; }

.sidebar-submenu-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px 10px 36px;
    text-decoration: none;
    color: #666;
    font-size: 13px;
    transition: background 0.15s;
}
.sidebar-submenu-link:hover { background: #f0f0f0; color: #1a1a1a; }
.sidebar-sub-link {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s;
}

/* Мобилка */
@media (max-width: 767px) {
    .sidebar-menu-panel {
        top: 56px;
        height: calc(100vh - 56px);
    }
    .sidebar-overlay {
        top: 0 !important;
        height: 100vh !important;
    }
}

/* ========== ИНИЦИАЛЫ ПРОФИЛЯ В ХЕДЕРЕ ========== */
.profile-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #dd1847;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: profileFadeIn 0.3s ease;
}
#headerProfileBtn .profile-initials {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    font-size: 16px;
}

#bottomNavProfile .profile-initials {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 13px;
    margin: 0 auto 2px;
}

@keyframes profileFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#headerProfileBtn:hover .profile-initials {
    background: #c1163d;
    transform: scale(1.05);
}

@media (max-width: 767px) {
    .header-container,
    .header-inner {
        overflow: visible !important;
    }
    
    #currencyMobileDropdown {
        position: fixed !important;
        top: 45px !important;
        right: 10px !important;
        z-index: 99999 !important;
    }
}
/* ===== МОДАЛКА ВЫБОРА ГОРОДА ===== */
.city-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: flex-end;
    justify-content: center;
}
.city-modal.active {
    display: flex !important;
}

.city-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(2px);
}

.city-modal-content {
    position: relative;
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
    animation: citySlideUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    overflow: hidden;
}

@keyframes citySlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.city-modal-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 20px 0;
    position: relative;
}
.city-modal-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
}
.city-modal-close {
    position: absolute;
    right: 16px;
    top: 16px;
    width: 32px; height: 32px;
    border: none; background: #f5f5f5;
    border-radius: 10px; cursor: pointer;
    font-size: 18px; display: flex;
    align-items: center; justify-content: center;
    color: #999; transition: all 0.15s;
}
.city-modal-close:hover { background: #eee; color: #666; }

.city-modal-search {
    position: relative;
    margin: 16px 20px 0;
}
.city-modal-search svg {
    position: absolute;
    left: 16px; top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
}
.city-modal-search input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    border: 2px solid #f0f0f0;
    border-radius: 16px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    background: #f8f8fa;
    transition: all 0.2s;
    color: #1a1a1a;
}
.city-modal-search input:focus {
    border-color: var(--red);
    background: #fff;
}
.city-modal-search input::placeholder {
    color: #bbb;
}

/* Популярные города */
.city-modal-popular {
    padding: 20px;
    transition: all 0.3s ease;
}
.city-modal-popular.hidden {
    display: none;
}
.city-modal-label {
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}
.city-popular-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.city-popular-item {
    padding: 10px 18px;
    background: #f5f5f7;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.2s;
    color: #555;
    white-space: nowrap;
}
.city-popular-item:hover {
    background: #e8e8ef;
    color: #1a1a1a;
    transform: translateY(-1px);
}

/* Результаты поиска */
.city-modal-results {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px;
    min-height: 100px;
}
.city-modal-results.has-results {
    padding-top: 8px;
}
.city-modal-empty,
.city-modal-loading {
    text-align: center;
    color: #bbb;
    padding: 32px 20px;
    font-size: 14px;
}

.city-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: none;
    text-align: left;
    font-size: 15px;
    color: #1a1a1a;
    cursor: pointer;
    border-radius: 12px;
    font-family: inherit;
    transition: background 0.15s;
    line-height: 1.3;
}
.city-result-item:hover {
    background: #f6f6f9;
}
.city-result-item::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #ddd;
    flex-shrink: 0;
}
.city-result-item:hover::before {
    background: var(--red);
}
.city-result-item span {
    font-size: 11px;
    color: #999;
    margin-left: auto;
    flex-shrink: 0;
}

/* Уведомление */
.city-notification {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    padding: 14px 28px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    animation: notifyIn 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    transition: opacity 0.3s, transform 0.3s;
}
.city-notification.fade-out {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
}

@keyframes notifyIn {
    from { opacity: 0; transform: translateX(-50%) translateY(20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
/* На ПК — попап под кнопкой */
@media (min-width: 768px) {
    .city-modal {
        align-items: flex-start;
        justify-content: flex-start;
        padding-top: 60px;
        padding-left: 20px;
    }
    
    .city-modal-overlay {
        background: rgba(0,0,0,0.15);
        backdrop-filter: none;
    }
    
    .city-modal-content {
        border-radius: 16px;
        width: 400px;
        max-height: 500px;
        animation: cityFadeIn 0.2s ease;
        box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    }
    
    @keyframes cityFadeIn {
        from { opacity: 0; transform: translateY(-8px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    @keyframes citySlideUp {
        from { opacity: 0; transform: translateY(-8px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* На мобилке — снизу */
@media (max-width: 767px) {
    .city-modal-content {
        border-radius: 20px 20px 0 0;
    }
}
@font-face {
    font-family: "nbrb";
    src: url("/assets/font/nbrb.woff2") format("woff2"),
         url("/assets/font/nbrb.ttf") format("truetype"),
         url("/assets/font/nbrb.woff") format("woff");
    unicode-range: U+E901, U+42, U+59, U+4E;
}

.nbrb-icon {
    font-family: "nbrb" !important;
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.price-symbol .nbrb-icon {
    font-family: "nbrb" !important;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}
/* Состояние загрузки для сердечка */
.product-card-heart.loading {
    opacity: 0.5;
    pointer-events: none;
    animation: heartPulse 0.6s ease-in-out infinite;
}

@keyframes heartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.product-card-video-slide {
    background: #000;
    aspect-ratio: 1000 / 1350;
}
.product-card-video-slide video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block; /* 🔥 Вместо inline */
    border-radius: 20px;
}
.product-card-video-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 5px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    border-radius: 6px;
    pointer-events: none;
    z-index: 1;
}