/* ============================================
   styles.css - ГЛАВНАЯ СТРАНИЦА
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    
    /* ===== ФОН ===== */
    background-image: url('/photo/background.webp');
    background-attachment: fixed;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* ============================================
   ХЕДЕР И ФУТЕР - НА ПК ПОЛНОСТЬЮ ПРОЗРАЧНЫЕ, БЕЗ ПОЛОСОК
   ============================================ */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 16px 20px 10px 20px;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: translateY(0);
    transition: transform 0.3s ease;
    border-bottom: none !important;
    box-shadow: none !important;
}

.header.hidden {
    transform: translateY(-100%);
}

.footer {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 2rem 20px 1.5rem;
    text-align: center;
    flex-shrink: 0;
    border-top: none !important;
    box-shadow: none !important;
}

/* ===== НА ТЕЛЕФОНАХ - СЕРЫЙ ФОН, БЕЗ ПОЛОСОК ===== */
@media (max-width: 768px) {
    body {
        background-image: none !important;
        background-color: #e8eaed !important;
    }
    
    .header {
        background: #e8eaed !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-bottom: none !important;
        box-shadow: none !important;
        padding: 12px 16px 8px 16px;
    }
    
    .footer {
        background: #e8eaed !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-top: none !important;
        box-shadow: none !important;
        padding: 20px 16px 16px;
    }
}

@media (max-width: 480px) {
    body {
        background-color: #e8eaed !important;
    }
    
    .header {
        background: #e8eaed !important;
        padding: 10px 12px 6px 12px;
    }
    
    .footer {
        background: #e8eaed !important;
        padding: 16px 12px 12px;
    }
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
    padding-top: 0;
}

.header-logo {
    flex-shrink: 0;
    text-decoration: none;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0;
}

.header-logo:hover {
    opacity: 0.7;
}

.header-logo img {
    height: 40px;
    width: auto;
    display: block;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    margin-left: auto;
}

.header-actions .cart-link {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a1a1a;
    opacity: 0.7;
    transition: opacity 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-actions .cart-link:hover {
    opacity: 1;
}

.header-actions .cart-link .cart-badge {
    background: #1a1a1a;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.header-nav {
    display: flex;
    gap: 32px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 4px 0;
    width: 100%;
}

.header-nav a {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a1a1a;
    opacity: 0.4;
    transition: opacity 0.3s;
    white-space: nowrap;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    text-decoration: none;
}

.header-nav a:hover,
.header-nav a.active {
    opacity: 1;
    border-bottom-color: #1a1a1a;
}

/* ===== НА ТЕЛЕФОНАХ БОЛЬШИЕ НАДПИСИ ===== */
@media (max-width: 768px) {
    .header-actions .cart-link {
        font-size: 1.1rem;
        font-weight: 800;
        gap: 10px;
    }
    
    .header-actions .cart-link .cart-badge {
        font-size: 0.7rem;
        min-width: 22px;
        height: 22px;
    }
    
    .header-nav {
        gap: 18px;
    }
    
    .header-nav a {
        font-size: 0.85rem;
        font-weight: 700;
        letter-spacing: 0.8px;
    }
}

@media (max-width: 480px) {
    .header-actions .cart-link {
        font-size: 1rem;
        font-weight: 800;
    }
    
    .header-nav {
        gap: 12px;
    }
    
    .header-nav a {
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        padding: 2px 0;
    }
}

/* ============================================
   ОСНОВНОЙ КОНТЕНТ
   ============================================ */

.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* ============================================
   СЕТКА ТОВАРОВ
   ============================================ */

.product-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px 16px;
    padding: 10px 0;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 1199px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 18px 14px;
    }
}

@media (max-width: 991px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px 12px;
    }
}

/* ===== НА ТЕЛЕФОНАХ - 3 КАРТОЧКИ В РЯДУ ===== */
@media (max-width: 767px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px 8px;
        padding: 6px 0;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px 6px;
        padding: 4px 0;
    }
}

@media (max-width: 360px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px 4px;
    }
}

/* ===== КАРТОЧКИ ДЛЯ 6 В РЯДУ ===== */
@media (min-width: 1200px) {
    .product-title {
        font-size: 0.75rem;
        line-height: 1.2;
    }
    
    .product-price {
        font-size: 0.7rem !important;
        padding: 2px 10px !important;
    }
    
    .product-old-price {
        font-size: 0.7rem !important;
    }
    
    .product-discount-percent {
        font-size: 0.75rem !important;
    }
    
    .product-sizes .size-badge {
        font-size: 0.5rem;
        padding: 1px 6px;
    }
    
    .discount-badge {
        font-size: 0.55rem;
        padding: 2px 8px;
    }
}

/* ===== КАРТОЧКИ ДЛЯ ТЕЛЕФОНОВ (3 В РЯДУ) ===== */
@media (max-width: 767px) {
    .product-title {
        font-size: 0.7rem;
        line-height: 1.2;
        letter-spacing: 0.1px;
    }
    
    .product-price {
        font-size: 0.65rem !important;
        padding: 2px 8px !important;
    }
    
    .product-old-price {
        font-size: 0.6rem !important;
    }
    
    .product-discount-percent {
        font-size: 0.6rem !important;
    }
    
    .product-sizes .size-badge {
        font-size: 0.4rem;
        padding: 1px 4px;
        border-width: 1px;
    }
    
    .discount-badge {
        font-size: 0.45rem;
        padding: 1px 6px;
        top: 4px;
        left: 4px;
    }
    
    .product-image-container {
        aspect-ratio: 3 / 4;
        border-radius: 3px;
    }
    
    .product-info {
        padding: 4px 2px 2px 2px;
        gap: 2px;
    }
    
    .product-price-wrapper {
        gap: 4px;
    }
    
    .product-sizes {
        gap: 3px;
        margin: 3px 0 2px 0;
    }
}

@media (max-width: 480px) {
    .product-title {
        font-size: 0.6rem;
    }
    
    .product-price {
        font-size: 0.55rem !important;
        padding: 1px 6px !important;
    }
    
    .product-sizes .size-badge {
        font-size: 0.35rem;
        padding: 1px 3px;
    }
}

/* ============================================
   КАРТОЧКА ТОВАРА
   ============================================ */

.product-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: transparent;
    transition: transform 0.12s ease;
    border-radius: 0;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-2px);
}

.product-image-container {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: rgba(245, 245, 245, 0.8);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #ccc;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(248, 248, 248, 0.8);
}

.no-image-placeholder .icon {
    font-size: 2.5rem;
    margin-bottom: 6px;
    opacity: 0.3;
}

.discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #dc3545;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 3px;
    z-index: 2;
}

.product-info {
    padding: 8px 4px 4px 4px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: transparent;
    width: 100%;
}

.product-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    color: #1a1a1a;
    line-height: 1.3;
    order: 2;
}

.product-price-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    order: 1;
}

.product-price {
    color: #ffffff !important;
    background: #1a1a1a !important;
    padding: 3px 12px !important;
    border-radius: 3px !important;
    display: inline-block !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
}

.product-price.discounted {
    background: #dc3545 !important;
}

.product-old-price {
    font-size: 0.85rem !important;
    color: #999 !important;
    text-decoration: line-through !important;
    font-weight: 600 !important;
}

.product-discount-percent {
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    color: #28a745 !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    display: inline-block !important;
}

.product-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 6px 0 4px 0;
    order: 3;
}

.product-sizes .size-badge {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #1a1a1a;
    border-radius: 3px;
    font-size: 0.55rem;
    font-weight: 600;
    color: #1a1a1a;
    background: transparent;
    letter-spacing: 0.3px;
}

.product-sizes .size-badge.out-of-stock {
    border-color: #e0e0e0;
    color: #ccc;
    opacity: 0.6;
}

.product-sizes .size-badge.more {
    border-color: #1a1a1a;
    color: #1a1a1a;
}

.product-sizes .no-sizes {
    font-size: 0.6rem;
    color: #999;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.empty-catalog {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.empty-catalog .icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-catalog h3 {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.empty-catalog p {
    font-size: 0.9rem;
    color: #888;
}

/* ============================================
   ПОДВАЛ
   ============================================ */

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
}

.footer-nav a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
    padding: 4px 0;
}

.footer-nav a:hover {
    opacity: 0.6;
}

.footer-bottom {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #1a1a1a;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .footer-nav {
        gap: 8px 16px;
    }
    .footer-nav a {
        font-size: 0.8rem;
        font-weight: 700;
        letter-spacing: 0.8px;
    }
    .footer-bottom {
        font-size: 0.7rem;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 16px 12px 12px;
    }
    .footer-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px 12px;
        justify-content: center;
    }
    .footer-nav a {
        font-size: 0.65rem;
        font-weight: 700;
        padding: 2px 0;
    }
    .footer-bottom {
        font-size: 0.6rem;
    }
}

/* ============================================
   МОБИЛЬНЫЕ УЛУЧШЕНИЯ
   ============================================ */

@media (max-width: 768px) {
    .main-content {
        padding: 0 10px 20px;
    }
    
    body {
        -webkit-overflow-scrolling: touch;
        overflow-x: hidden;
    }
    
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    .btn,
    button,
    .qty-btn,
    .size-btn,
    .add-to-cart-btn,
    .checkout-btn,
    .sbp-btn {
        min-height: 44px;
        min-width: 44px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0 6px 16px;
    }
}

@media (hover: none) and (pointer: coarse) {
    .product-card:hover {
        transform: none;
    }
    
    .stat-card:hover {
        transform: none;
    }
    
    .gallery-thumb:hover {
        border-color: transparent;
    }
    
    .btn:active,
    button:active,
    .product-card:active {
        transform: scale(0.97);
        transition: transform 0.1s ease;
    }
}

/* ============================================
   ФИКСЫ ДЛЯ ОТОБРАЖЕНИЯ
   ============================================ */

.product-grid {
    display: grid !important;
    min-height: 200px !important;
}

.product-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.product-image {
    display: block !important;
}

.product-info {
    display: flex !important;
}

.product-title {
    display: block !important;
}

.product-price {
    display: inline-block !important;
}





