/* ========================================
   msrider.ru - Запчасти для мотоциклов и снегоходов
   CSS Stylesheet
======================================== */

/* CSS Variables - Moto Theme */
:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #ef4444;
    --secondary: #ea580c;
    --accent: #f59e0b;
    --dark: #0f0f0f;
    --dark-light: #1a1a1a;
    --light: #f5f5f5;
    --gray: #6b7280;
    --gray-light: #e5e7eb;
    --white: #ffffff;
    --text-gray: #374151;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --accent-blue: #0ea5e9;
    --success: #16a34a;
    --warning: #eab308;
    --error: #dc2626;
    
    --gradient-1: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
    --gradient-2: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    --gradient-3: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
    opacity: 1;
    max-width: 100vw;
}

body.loaded {
    opacity: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: var(--gradient-1);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    color: var(--dark);
}

.section-desc {
    font-size: 18px;
    color: var(--gray);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.text-gradient {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--dark);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 18px;
    color: var(--dark);
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--gray-light);
    color: var(--primary);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--white);
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.logo-img-only {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img-only:hover {
    opacity: 0.92;
}

.logo-img {
    height: 60px;
    width: auto;
    max-width: min(280px, 50vw);
    object-fit: contain;
    display: block;
}

@media (min-width: 769px) {
    .logo-img {
        height: 72px;
        max-width: 300px;
    }
}

.logo {
    color: var(--dark);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Logo icon removed */

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Скрываем элемент выхода в мобильном меню на десктопе */
.mobile-logout-item {
    display: none;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}



.nav-link-sale {
    color: #dc2626 !important;
    font-weight: 700 !important;
}

.nav-link-sale i {
    margin-right: 3px;
}

.nav-link-sale::after {
    background: #dc2626 !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    color: var(--dark);
}

.cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: var(--accent);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle {
    display: none;
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-content {
    width: 90%;
    max-width: 600px;
    display: flex;
    gap: 16px;
    position: relative;
    transform: translateY(-20px);
    transition: var(--transition);
}

.search-modal.active .search-content {
    transform: translateY(0);
}

.search-input {
    flex: 1;
    padding: 20px 24px;
    font-size: 18px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.1);
    color: var(--white);
    outline: none;
    transition: var(--transition);
}

.search-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.search-input:focus {
    border-color: var(--secondary);
    background: rgba(255,255,255,0.15);
}

.search-close {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.search-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--white);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    transition: var(--transition-slow);
    box-shadow: var(--shadow-xl);
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid var(--gray-light);
}

.cart-header h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    color: var(--dark);
}

.cart-close {
    width: 40px;
    height: 40px;
    background: var(--gray-light);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 18px;
    transition: var(--transition);
}

.cart-close:hover {
    background: var(--error);
    color: var(--white);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.cart-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--gray);
}

.cart-empty i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--light);
    border-radius: var(--radius);
    margin-bottom: 12px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: var(--white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-variant {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 4px;
    line-height: 1.35;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.cart-item-remove {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
}

.cart-item-remove:hover {
    color: var(--error);
}

.cart-footer {
    padding: 24px;
    border-top: 1px solid var(--gray-light);
    background: var(--light);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 18px;
}

.total-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 22, 40, 0.9) 0%, rgba(10, 22, 40, 0.7) 50%, rgba(10, 22, 40, 0.5) 100%);
    z-index: -1;
}

.hero-content {
    padding: 120px 0 80px;
    color: var(--white);
    max-width: 900px;
    text-align: center;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(32px, 6vw, 64px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.7;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 64px;
}

.hero-stats {
    display: flex;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--white);
    opacity: 0.6;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--white);
    border-radius: 13px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--white);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

/* Animations */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes scroll {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 20px; }
}

.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Categories Section */
.categories {
    padding: 100px 0;
    background: var(--light);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-image {
    height: 140px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-content {
    padding: 16px;
    position: relative;
}

.category-icon {
    position: absolute;
    top: -20px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: var(--gradient-1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 14px;
    font-size: 24px;
    box-shadow: var(--shadow-lg);
}

.category-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.category-content p {
    color: var(--gray);
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.category-count {
    display: inline-block;
    padding: 4px 10px;
    background: var(--gray-light);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
}

/* Products Section */
.products {
    padding: 100px 0;
    background: var(--white);
}

.products-filter {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--light);
    border: none;
    border-radius: 30px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-1);
    color: var(--white);
}

/* Products grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    grid-auto-rows: 1fr;
    align-items: stretch;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-light);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    height: 250px;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition-slow);
    padding: 8px;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    background: var(--accent);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 20px;
}

.product-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-action-btn {
    width: 40px;
    height: 40px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.product-action-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
}

.product-brand {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 2px;
}

.product-category {
    font-size: 11px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    margin-bottom: 8px;
    padding: 3px 10px;
    background: var(--light);
    border-radius: 20px;
    display: inline-block;
    align-self: center;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
}

.product-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.old-price {
    font-size: 14px;
    color: var(--gray);
    text-decoration: line-through;
}

.btn-add-cart {
    padding: 0 12px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    white-space: nowrap;
    height: 48px;
    line-height: 1;
    box-sizing: border-box;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}

.btn-add-cart:active {
    transform: translateY(0);
}

.product-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: stretch;
    margin-top: 0;
    padding-top: 8px;
}

/* Product bottom wrapper — pushes to card bottom */
.product-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 4px;
}

.btn-view {
    padding: 0 12px;
    background: var(--white);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    height: 48px;
    line-height: 1;
    box-sizing: border-box;
}

.btn-view:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-view:active {
    transform: translateY(1px);
}

/* Ensure buttons have same height */
.product-actions-row .btn-add-cart,
.product-actions-row .btn-view {
    min-height: 48px;
    width: 100%;
}

/* Single button takes full width */
.product-actions-row .btn-add-cart:only-child {
    grid-column: 1 / -1;
}

.product-image-link {
    display: block;
}

.product-title-link {
    display: block;
    color: inherit;
}

/* ===== Product Options Row (sizes + qty) - global for all pages ===== */
.product-options-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 4px;
    flex-wrap: wrap;
}

/* Size selector */
.size-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.size-btn {
    min-width: 36px;
    height: 34px;
    padding: 0 8px;
    border: 1.5px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-family: inherit;
}

.size-btn:hover {
    border-color: #dc2626;
    color: #dc2626;
}

.size-btn.active {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

.size-btn:active {
    transform: scale(0.95);
}

/* Size button: out-of-stock */
.size-btn.size-out-of-stock {
    opacity: 0.4;
    background: #f3f4f6;
    border-color: #e5e7eb;
    text-decoration: line-through;
    color: #9ca3af;
    cursor: not-allowed;
}

/* Size button: preorder style (amber dashed) */
.size-btn.size-preorder {
    border-style: dashed;
    border-color: #d97706;
    color: #92400e;
    background: #fffbeb;
}

.size-btn.size-preorder:hover {
    border-color: #b45309;
    background: #fef3c7;
    color: #78350f;
}

.size-btn.size-preorder.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: #d97706;
    border-style: solid;
    color: #fff;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
}

/* Qty badge inside size button — shows how many items are left for that size */
.size-btn[data-qty] {
    flex-direction: column;
    gap: 1px;
    min-width: 46px;
    height: auto;
    padding: 4px 8px;
    line-height: 1.05;
}

.size-qty-badge {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    opacity: 0.85;
    color: #059669;
}

.size-btn.active .size-qty-badge {
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
}

/* Stock label row — for labeling in-stock vs preorder sections */
.stock-label-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 4px 0 3px;
}

.stock-label-row.in-stock-label {
    color: #16a34a;
}

.stock-label-row.preorder-label {
    color: #d97706;
}

/* Color selector (catalog/home cards) */
.color-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0;
}

.color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    background: #ccc;
    padding: 0;
    outline: none;
    font-size: 0;
}

.color-swatch:hover {
    transform: scale(1.15);
    border-color: var(--primary);
}

.color-swatch.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--primary);
}

.color-swatch.color-preorder {
    opacity: 0.6;
    border-style: dashed;
}

.color-swatch.color-preorder.active {
    opacity: 1;
    border-style: solid;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #d97706;
}

/* Variant mini buttons for product cards (image thumbnails) */
.variant-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 4px 0;
}

.variant-mini-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    padding: 2px;
    cursor: pointer;
    background: #fff;
    transition: all 0.15s ease;
    overflow: hidden;
    outline: none;
}

.variant-mini-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.variant-mini-btn:hover {
    border-color: var(--primary);
    transform: scale(1.1);
}

.variant-mini-btn.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--primary);
}

/* Variant button: preorder — приглушённый, пунктирная рамка, значок часов */
.variant-mini-btn.variant-preorder {
    border-style: dashed;
    border-color: #d97706;
    position: relative;
}

.variant-mini-btn.variant-preorder img {
    opacity: 0.55;
    filter: grayscale(0.4);
}

.variant-mini-btn.variant-preorder:hover img {
    opacity: 0.85;
    filter: grayscale(0);
}

.variant-mini-btn.variant-preorder.active {
    border-style: solid;
    border-color: #d97706;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #d97706;
}

.variant-mini-btn.variant-preorder.active img {
    opacity: 1;
    filter: none;
}

.variant-preorder-marker {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d97706;
    color: #fff;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 1.5px #fff;
    pointer-events: none;
}

/* Кнопка «Заказать» (preorder) на карточке товара */
.btn-add-cart.btn-add-cart-preorder {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: #d97706;
    color: #fff;
}

.btn-add-cart.btn-add-cart-preorder:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
}

/* Preorder-бейдж внутри позиции корзины */
.cart-item-preorder {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #d97706;
    background: #fffbeb;
    padding: 2px 8px;
    border-radius: 4px;
    margin: 4px 0;
    width: fit-content;
}

/* Quantity selector */
.qty-selector-catalog {
    display: flex;
    align-items: center;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
    width: 100%;
}

.qty-btn-catalog {
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    color: #374151;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.qty-btn-catalog:hover {
    background: #f97316;
    color: #fff;
}

.qty-input-catalog {
    flex: 1;
    height: 36px;
    border: none;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    background: #fff;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty-input-catalog::-webkit-outer-spin-button,
.qty-input-catalog::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

@media (max-width: 480px) {
    .product-options-row {
        flex-wrap: wrap;
        gap: 8px;
    }
}

.product-title-link:hover {
    color: var(--primary);
}

/* ===== Sales Banner on Homepage ===== */
.sales-banner-home {
    padding: 60px 0;
    background: linear-gradient(135deg, #1e1e2e 0%, #2d1b1b 50%, #1a0000 100%);
    overflow: hidden;
    position: relative;
}

.sales-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.sales-banner-text {
    flex: 1;
    max-width: 600px;
}

.sales-banner-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #fca5a5;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sales-banner-text h2 {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.2;
}

.sales-banner-text p {
    font-size: 16px;
    color: #d1d5db;
    margin-bottom: 28px;
    line-height: 1.6;
}

.sales-banner-decor {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sales-decor-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc2626, #991b1b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    font-weight: 900;
    color: rgba(255,255,255,0.9);
    box-shadow: 0 0 60px rgba(220, 38, 38, 0.4);
    animation: pulse-sale 2s ease-in-out infinite;
}

@keyframes pulse-sale {
    0%, 100% { transform: scale(1); box-shadow: 0 0 60px rgba(220, 38, 38, 0.4); }
    50% { transform: scale(1.06); box-shadow: 0 0 80px rgba(220, 38, 38, 0.6); }
}

@media (max-width: 768px) {
    .sales-banner-inner {
        flex-direction: column;
        text-align: center;
    }
    .sales-decor-circle {
        width: 120px;
        height: 120px;
        font-size: 52px;
    }
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--gradient-2);
    color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 48px;
}

.feature-item {
    text-align: center;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
    color: var(--secondary);
    transition: var(--transition);
}

.feature-item:hover .feature-icon {
    background: var(--gradient-1);
    color: var(--white);
    transform: translateY(-4px);
}

.feature-item h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-item p {
    opacity: 0.8;
    line-height: 1.7;
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--light);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.about-experience {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--gradient-1);
    color: var(--white);
    padding: 24px 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.exp-number {
    display: block;
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

.exp-text {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-content {
    padding: 24px 0;
}

.about-content .section-title {
    margin-bottom: 24px;
}

.about-content p {
    color: var(--gray);
    margin-bottom: 24px;
    line-height: 1.8;
}

.about-list {
    margin-bottom: 32px;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-weight: 500;
}

.about-list i {
    width: 24px;
    height: 24px;
    background: var(--success);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}

.contact-info {
    padding: 24px 0;
}

.contact-info p {
    color: var(--gray);
    margin-bottom: 32px;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 32px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact-item i {
    width: 48px;
    height: 48px;
    background: var(--gradient-1);
    color: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 14px;
    color: var(--gray);
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--dark);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 44px;
    height: 44px;
    background: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--gray);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--gradient-1);
    color: var(--white);
    transform: translateY(-4px);
}

.contact-form-wrapper {
    background: var(--light);
    padding: 40px;
    border-radius: var(--radius-lg);
}

.contact-form h3 {
    font-size: 24px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    font-family: inherit;
    font-size: 14px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius);
    background: var(--white);
    outline: none;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--primary);
}

.form-input::placeholder {
    color: var(--gray);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    margin-bottom: 16px;
    color: var(--white);
    justify-content: flex-start;
}

.footer-brand p {
    opacity: 0.7;
    line-height: 1.7;
    margin-bottom: 24px;
}

.footer-payments {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 14px;
    opacity: 1;
}

/* Обёртка: скругление как у SVG-карточки + overflow — без белых клиньев на чёрном фоне */
.pay-icon-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    vertical-align: middle;
    border-radius: 6px;
    overflow: hidden;
    background: transparent;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
}

.pay-icon-slot:hover {
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.55));
}

.footer-payments .pay-img {
    display: block;
    height: 28px;
    width: auto;
    max-width: 72px;
    object-fit: contain;
    object-position: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.footer-links h4,
.footer-subscribe h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    opacity: 0.7;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    opacity: 1;
    color: var(--secondary);
}

.footer-subscribe p {
    opacity: 0.7;
    margin-bottom: 16px;
}

.subscribe-form {
    display: flex;
    gap: 8px;
}

.subscribe-form input {
    flex: 1;
    padding: 14px 16px;
    border: none;
    border-radius: var(--radius);
    background: var(--dark-light);
    color: var(--white);
    outline: none;
}

.subscribe-form input::placeholder {
    color: var(--gray);
}

.subscribe-form button {
    width: 48px;
    height: 48px;
    background: var(--gradient-1);
    border: none;
    border-radius: var(--radius);
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.subscribe-form button:hover {
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid var(--dark-light);
    padding: 24px 0;
    text-align: center;
    opacity: 0.5;
    font-size: 14px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--success);
    color: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    transform: translateX(150%);
    transition: var(--transition);
    z-index: 3000;
}

.toast.active {
    transform: translateX(0);
}

.toast i {
    font-size: 20px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--gradient-1);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
}

.back-to-top:active {
    transform: translateY(0);
}

/* Responsive Design - Tablet */
@media (max-width: 1024px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
    
    .about-experience {
        right: 20px;
    }
    
    .hero-stats {
        gap: 32px;
    }
    
    .stat-number {
        font-size: 40px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .category-image {
        height: 120px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-menu {
        gap: 20px;
    }
    
    .nav-link {
        font-size: 13px;
    }
    
    .hero-title {
        font-size: clamp(32px, 5vw, 48px);
    }
    
    .hero-stats {
        gap: 32px;
    }
    
    .stat-number {
        font-size: 40px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .product-actions-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 768px) {
    /* CRITICAL: Prevent any horizontal overflow */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    * {
        max-width: 100%;
    }
    
    .container {
        padding: 0 16px;
    }
    
    /* Скрываем кнопку выхода в шапке на мобильной версии */
    #logoutBtnNav {
        display: none !important;
    }
    
    /* Мобильное меню */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background: #ffffff !important;
        flex-direction: column;
        padding: 80px 24px 32px;
        transition: var(--transition-slow);
        box-shadow: -5px 0 25px rgba(0,0,0,0.25);
        gap: 0;
        overflow-y: auto;
        z-index: 1000;
        border-left: 1px solid #e5e7eb;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        color: var(--dark) !important;
        font-size: 16px;
        width: 100%;
        padding: 16px 0;
        text-decoration: none;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .nav-link.active {
        color: var(--primary) !important;
    }
    
    .nav-link::after {
        display: none;
    }
    
    /* Показываем кнопку выхода в мобильном меню */
    .mobile-logout-item {
        display: block !important;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 2px solid #e5e7eb;
    }
    
    .mobile-logout-item a {
        color: var(--danger) !important;
        font-weight: 600;
    }
    
    /* Чат под мобильным меню */
    .chat-widget-btn {
        z-index: 999 !important;
    }
    
    .menu-toggle {
        display: flex;
        width: 40px;
        height: 40px;
    }
    
    .nav-actions {
        gap: 4px;
    }
    
    .nav-actions .btn-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    /* Navbar */
    .navbar {
        padding: 8px 0;
    }
    
    .container {
        padding: 0 16px;
    }
    
    /* Hero Section Mobile */
    .hero {
        min-height: 100vh;
    }
    
    .hero-content {
        padding: 100px 16px 60px;
        text-align: center;
    }
    
    .hero-title {
        font-size: clamp(28px, 7vw, 40px);
        line-height: 1.2;
        margin-bottom: 20px;
    }
    
    .hero-subtitle {
        font-size: 16px;
        line-height: 1.6;
        margin-bottom: 32px;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
        gap: 12px;
    }
    
    .btn-lg {
        width: 100%;
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 20px;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 48px;
    }
    
    .stat-item {
        flex: 1;
        min-width: 90px;
        max-width: 120px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    /* Sections Padding */
    .categories,
    .products,
    .about,
    .contact {
        padding: 60px 0;
    }
    
    .features {
        padding: 50px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-desc {
        font-size: 16px;
    }
    
    /* Features Grid Mobile */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-item {
        display: flex;
        align-items: flex-start;
        gap: 16px;
        text-align: left;
        padding: 20px;
        background: rgba(255,255,255,0.05);
        border-radius: var(--radius);
    }
    
    .feature-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
        margin: 0;
        flex-shrink: 0;
    }
    
    .feature-item h3 {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .feature-item p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    /* Products Grid Mobile */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-card {
        border-radius: var(--radius);
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-info {
        padding: 12px;
        gap: 4px;
    }
    
    .product-brand {
        font-size: 11px;
        margin-bottom: 2px;
    }
    
    .product-category {
        font-size: 10px;
        padding: 2px 8px;
        margin-bottom: 6px;
    }
    
    .product-title {
        font-size: 13px;
        line-height: 1.3;
        min-height: 2.6em;
        margin-bottom: 6px;
    }
    
    .current-price {
        font-size: 16px;
    }
    
    .old-price {
        font-size: 12px;
    }
    
    .product-actions-row {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-top: 8px;
    }
    
    .btn-add-cart,
    .btn-view {
        width: 100%;
        padding: 10px 12px;
        font-size: 12px;
        height: 40px;
    }
    
    /* Categories Grid Mobile */
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .category-card {
        border-radius: var(--radius);
    }
    
    .category-image {
        height: 100px;
    }
    
    .category-content {
        padding: 12px;
    }
    
    .category-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
        top: -16px;
        right: 12px;
    }
    
    .category-content h3 {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .category-content p {
        font-size: 11px;
        line-height: 1.3;
    }
    
    .category-count {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    /* About Section Mobile */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-image {
        text-align: center;
    }
    
    .about-image img {
        height: 300px;
        border-radius: var(--radius);
    }
    
    .about-experience {
        position: relative;
        bottom: auto;
        right: auto;
        margin: 20px auto 0;
        display: inline-block;
        padding: 16px 24px;
    }
    
    .exp-number {
        font-size: 36px;
    }
    
    .exp-text {
        font-size: 12px;
    }
    
    .about-content .section-title {
        font-size: 24px;
    }
    
    .about-content p {
        font-size: 14px;
        line-height: 1.7;
    }
    
    .about-list li {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    /* Contact Section Mobile */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-item {
        gap: 12px;
    }
    
    .contact-item i {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .contact-item h4 {
        font-size: 13px;
    }
    
    .contact-item p {
        font-size: 14px;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .contact-form-wrapper {
        padding: 24px;
    }
    
    .contact-form h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .form-input {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 60px 0 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }
    
    .footer-brand {
        text-align: center;
    }
    
    .footer-brand .logo {
        justify-content: center;
    }
    
    .footer-brand p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    .footer-payments {
        justify-content: center;
        gap: 10px 12px;
    }
    
    .footer-payments .pay-img {
        max-width: 60px;
        height: 22px;
    }
    
    .pay-icon-slot {
        border-radius: 4px;
    }
    
    .logo-img {
        height: 50px;
        max-width: 70vw;
    }
    
    .footer-links h4,
    .footer-subscribe h4 {
        font-size: 15px;
        margin-bottom: 16px;
    }
    
    .footer-links ul li {
        margin-bottom: 8px;
    }
    
    .footer-links ul li a {
        font-size: 14px;
    }
    
    .subscribe-form {
        max-width: 100%;
    }
    
    .subscribe-form input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .subscribe-form button {
        width: 44px;
        height: 44px;
    }
    
    .footer-bottom {
        padding: 20px 0;
        font-size: 13px;
    }
    
    /* Cart Sidebar Mobile */
    .cart-sidebar {
        width: 100%;
        max-width: 100%;
        right: -100%;
    }
    
    .cart-header {
        padding: 16px 20px;
    }
    
    .cart-header h3 {
        font-size: 18px;
    }
    
    .cart-items {
        padding: 16px;
    }
    
    .cart-item {
        padding: 12px;
        gap: 12px;
    }
    
    .cart-item-image {
        width: 60px;
        height: 60px;
    }
    
    .cart-item-title {
        font-size: 13px;
    }
    
    .cart-item-variant {
        font-size: 11px;
    }
    
    .cart-item-price {
        font-size: 14px;
    }
    
    .cart-footer {
        padding: 16px 20px;
    }
    
    .cart-total {
        font-size: 16px;
    }
    
    .total-price {
        font-size: 20px;
    }
    
    /* Search Modal Mobile */
    .search-content {
        flex-direction: column;
        width: 95%;
        gap: 12px;
    }
    
    .search-input {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .search-content .btn {
        width: 100%;
        padding: 14px;
    }
    
    /* Toast Mobile */
    .toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        transform: translateY(150%);
        padding: 14px 18px;
        font-size: 14px;
    }
    
    .toast.active {
        transform: translateY(0);
    }
    
    /* Back to Top Mobile */
    .back-to-top {
        width: 48px;
        height: 48px;
        font-size: 18px;
        bottom: 70px;
        right: 16px;
    }
    
    /* Products Filter Mobile */
    .products-filter {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    /* Checkout Modal Mobile */
    .checkout-modal {
        padding: 10px;
    }
    
    .checkout-content {
        max-height: 95vh;
        border-radius: var(--radius);
    }
    
    .checkout-header {
        padding: 16px 20px;
    }
    
    .checkout-header h3 {
        font-size: 18px;
    }
    
    .checkout-body {
        padding: 20px;
    }
    
    .checkout-body .form-group {
        margin-bottom: 14px;
    }
    
    .checkout-body .form-group label {
        font-size: 13px;
    }
    
    .checkout-body .form-group input,
    .checkout-body .form-group textarea {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .checkout-summary {
        padding: 14px;
        margin: 16px 0;
    }
    
    .checkout-summary h4 {
        font-size: 13px;
    }
    
    .checkout-item {
        font-size: 13px;
    }
    
    .checkout-total {
        font-size: 16px;
    }
    
    /* Auth Modal Mobile */
    .auth-modal {
        padding: 10px;
    }
    
    .auth-content {
        max-height: 95vh;
        border-radius: var(--radius);
    }
    
    .auth-header {
        padding: 16px 20px;
    }
    
    .auth-body {
        padding: 20px;
    }
    
    .auth-form .form-group {
        margin-bottom: 14px;
    }
    
    .auth-form .form-group label {
        font-size: 13px;
    }
    
    .auth-form .form-group input,
    .auth-form .form-group textarea,
    .auth-form .form-group select {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    /* Toolbar Mobile */
    .products-toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        padding: 12px 16px;
    }
    
    .products-count {
        font-size: 13px;
        text-align: center;
    }
    
    .products-sort {
        justify-content: space-between;
    }
    
    .products-sort label {
        font-size: 13px;
    }
    
    .products-sort select {
        padding: 10px 36px 10px 14px;
        font-size: 13px;
    }
    
    /* Pagination Mobile */
    .pagination {
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 32px;
    }
    
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    /* Sales Banner Mobile */
    .sales-banner-home {
        padding: 40px 0;
    }
    
    .sales-banner-inner {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    
    .sales-banner-text h2 {
        font-size: clamp(24px, 6vw, 36px);
    }
    
    .sales-banner-text p {
        font-size: 15px;
    }
    
    .sales-decor-circle {
        width: 120px;
        height: 120px;
        font-size: 52px;
    }
}
}

/* Responsive Design - Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    /* Navbar */
    .navbar {
        padding: 6px 0;
    }
    
    .logo-img {
        height: 46px;
        max-width: 65vw;
    }
    
    .nav-actions .btn-icon {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    
    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 10px;
        top: -3px;
        right: -3px;
    }
    
    /* Hero Section */
    .hero-content {
        padding: 90px 12px 50px;
    }
    
    .hero-title {
        font-size: clamp(24px, 8vw, 32px);
        margin-bottom: 16px;
    }
    
    .hero-subtitle {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 28px;
    }
    
    .hero-actions {
        max-width: 280px;
        gap: 10px;
    }
    
    .btn-lg {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .hero-stats {
        gap: 16px;
        margin-top: 40px;
    }
    
    .stat-item {
        min-width: 75px;
        max-width: 100px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    .stat-label {
        font-size: 10px;
    }
    
    /* Sections */
    .section-header {
        margin-bottom: 32px;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .section-desc {
        font-size: 14px;
    }
    
    .categories,
    .products,
    .about,
    .contact {
        padding: 50px 0;
    }
    
    .features {
        padding: 40px 0;
    }
    
    /* Features */
    .features-grid {
        gap: 16px;
    }
    
    .feature-item {
        padding: 16px;
        gap: 12px;
    }
    
    .feature-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .feature-item h3 {
        font-size: 15px;
        margin-bottom: 4px;
    }
    
    .feature-item p {
        font-size: 13px;
        line-height: 1.5;
    }
    
    /* Products Grid */
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .product-card {
        max-width: 100%;
    }
    
    .product-image {
        height: 240px;
    }
    
    .product-info {
        padding: 14px;
    }
    
    .product-brand {
        font-size: 12px;
    }
    
    .product-category {
        font-size: 10px;
    }
    
    .product-title {
        font-size: 14px;
        min-height: 2.8em;
    }
    
    .current-price {
        font-size: 18px;
    }
    
    .old-price {
        font-size: 13px;
    }
    
    .product-actions-row {
        gap: 8px;
    }
    
    .btn-add-cart,
    .btn-view {
        padding: 12px;
        font-size: 13px;
        height: 44px;
    }
    
    /* Categories */
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .category-card {
        max-width: 100%;
    }
    
    .category-image {
        height: 140px;
    }
    
    .category-content {
        padding: 14px;
    }
    
    .category-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        top: -18px;
    }
    
    .category-content h3 {
        font-size: 16px;
    }
    
    .category-content p {
        font-size: 12px;
    }
    
    /* About Section */
    .about-image img {
        height: 260px;
    }
    
    .about-experience {
        padding: 14px 20px;
    }
    
    .exp-number {
        font-size: 32px;
    }
    
    .exp-text {
        font-size: 11px;
    }
    
    .about-content .section-title {
        font-size: 22px;
    }
    
    .about-content p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .about-list {
        margin-bottom: 28px;
    }
    
    .about-list li {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .about-list i {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }
    
    /* Contact Section */
    .contact-items {
        gap: 20px;
    }
    
    .contact-item {
        gap: 12px;
    }
    
    .contact-item i {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .contact-item h4 {
        font-size: 12px;
    }
    
    .contact-item p {
        font-size: 13px;
    }
    
    .social-links {
        gap: 10px;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .contact-form-wrapper {
        padding: 20px;
        border-radius: var(--radius);
    }
    
    .contact-form h3 {
        font-size: 18px;
        margin-bottom: 16px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-input {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    textarea.form-input {
        min-height: 100px;
    }
    
    /* Footer */
    .footer {
        padding: 50px 0 0;
    }
    
    .footer-grid {
        gap: 28px;
    }
    
    .footer-brand p {
        font-size: 13px;
        line-height: 1.6;
    }
    
    .footer-payments {
        gap: 8px 10px;
    }
    
    .footer-payments .pay-img {
        max-width: 56px;
        height: 20px;
    }
    
    .footer-links h4,
    .footer-subscribe h4 {
        font-size: 14px;
        margin-bottom: 14px;
    }
    
    .footer-links ul li {
        margin-bottom: 6px;
    }
    
    .footer-links ul li a {
        font-size: 13px;
    }
    
    .subscribe-form input {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .subscribe-form button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .footer-bottom {
        padding: 16px 0;
        font-size: 12px;
    }
    
    /* Cart Sidebar */
    .cart-header {
        padding: 14px 16px;
    }
    
    .cart-header h3 {
        font-size: 16px;
    }
    
    .cart-close {
        width: 36px;
        height: 36px;
    }
    
    .cart-items {
        padding: 12px;
    }
    
    .cart-item {
        padding: 10px;
        gap: 10px;
    }
    
    .cart-item-image {
        width: 56px;
        height: 56px;
    }
    
    .cart-item-title {
        font-size: 12px;
    }
    
    .cart-item-variant {
        font-size: 10px;
    }
    
    .cart-item-price {
        font-size: 13px;
    }
    
    .cart-item-remove {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .cart-footer {
        padding: 14px 16px;
    }
    
    .cart-total {
        font-size: 15px;
    }
    
    .total-price {
        font-size: 18px;
    }
    
    /* Search Modal */
    .search-content {
        width: 100%;
        padding: 0 12px;
    }
    
    .search-input {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .search-content .btn {
        padding: 12px;
        font-size: 14px;
    }
    
    /* Toast */
    .toast {
        left: 12px;
        right: 12px;
        bottom: 12px;
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .toast i {
        font-size: 16px;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 44px;
        height: 44px;
        font-size: 16px;
        bottom: 60px;
        right: 12px;
    }
    
    /* Products Filter */
    .products-filter {
        gap: 6px;
    }
    
    .filter-btn {
        padding: 7px 14px;
        font-size: 12px;
    }
    
    /* Checkout Modal */
    .checkout-modal {
        padding: 8px;
    }
    
    .checkout-content {
        border-radius: var(--radius-sm);
    }
    
    .checkout-header {
        padding: 14px 16px;
    }
    
    .checkout-header h3 {
        font-size: 16px;
    }
    
    .checkout-close {
        width: 32px;
        height: 32px;
    }
    
    .checkout-body {
        padding: 16px;
    }
    
    .checkout-body .form-group {
        margin-bottom: 12px;
    }
    
    .checkout-body .form-group label {
        font-size: 12px;
    }
    
    .checkout-body .form-group input,
    .checkout-body .form-group textarea {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .checkout-summary {
        padding: 12px;
        margin: 14px 0;
    }
    
    .checkout-summary h4 {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    .checkout-items {
        max-height: 120px;
    }
    
    .checkout-item {
        font-size: 12px;
        padding: 6px 0;
    }
    
    .checkout-total {
        font-size: 15px;
        padding-top: 10px;
    }
    
    .checkout-body .btn-lg {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .consent-checks {
        margin: 0.875rem 0 1rem;
        gap: 0.625rem;
    }
    
    .consent-check-label {
        font-size: 0.8125rem;
    }
    
    .consent-check-box {
        width: 20px;
        height: 20px;
    }
    
    /* Auth Modal */
    .auth-modal {
        padding: 8px;
    }
    
    .auth-content {
        border-radius: var(--radius-sm);
    }
    
    .auth-header {
        padding: 14px 16px;
    }
    
    .auth-header h3 {
        font-size: 16px;
    }
    
    .auth-body {
        padding: 16px;
    }
    
    .auth-form .form-group {
        margin-bottom: 12px;
    }
    
    .auth-form .form-group label {
        font-size: 12px;
    }
    
    .auth-form .form-group input,
    .auth-form .form-group textarea,
    .auth-form .form-group select {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .auth-form .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .auth-switch {
        font-size: 12px;
    }
    
    /* Toolbar */
    .products-toolbar {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .products-count {
        font-size: 12px;
    }
    
    .products-sort label {
        font-size: 12px;
    }
    
    .products-sort select {
        padding: 8px 32px 8px 12px;
        font-size: 12px;
    }
    
    /* Pagination */
    .pagination {
        gap: 4px;
        margin-top: 28px;
    }
    
    .pagination-btn {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
        padding: 0 8px;
    }
    
    /* Sales Banner */
    .sales-banner-home {
        padding: 32px 0;
    }
    
    .sales-banner-inner {
        gap: 20px;
    }
    
    .sales-banner-tag {
        font-size: 11px;
        padding: 5px 12px;
    }
    
    .sales-banner-text h2 {
        font-size: clamp(22px, 7vw, 32px);
        margin-bottom: 10px;
    }
    
    .sales-banner-text p {
        font-size: 14px;
        margin-bottom: 24px;
    }
    
    .sales-decor-circle {
        width: 100px;
        height: 100px;
        font-size: 44px;
    }
    
    /* Product Options */
    .product-options-row {
        gap: 8px;
    }
    
    .size-btn {
        min-width: 32px;
        height: 32px;
        font-size: 11px;
        padding: 0 8px;
    }
    
    .color-swatch {
        width: 20px;
        height: 20px;
    }
    
    .qty-selector-catalog {
        border-width: 1px;
    }
    
    .qty-btn-catalog {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .qty-input-catalog {
        height: 32px;
        font-size: 12px;
    }
}

/* Landscape orientation for mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0;
    }
    
    .hero-content {
        padding: 80px 20px 40px;
    }
    
    .scroll-indicator {
        display: none;
    }
    
    .hero-stats {
        margin-top: 32px;
    }
}

/* Product actions row tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .product-actions-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: auto;
    }
    
    .btn-add-cart,
    .btn-view {
        width: 100%;
        padding: 0 10px;
        font-size: 12px;
    }
}

/* Product actions row mobile */
@media (max-width: 768px) {
    .product-actions-row {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: auto;
    }
    
    .btn-add-cart,
    .btn-view {
        width: 100%;
        padding: 0 12px;
        font-size: 14px;
    }
}

/* Disable legacy close icon in search modal */
.search-close { display: none !important; }

/* ========================================
   PAGINATION & TOOLBAR
======================================== */

.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    max-width: 100%;
    overflow-x: hidden;
}

.products-count {
    font-size: 14px;
    color: var(--gray);
}

.products-sort {
    display: flex;
    align-items: center;
    gap: 12px;
}

.products-sort label {
    font-size: 14px;
    color: var(--dark);
    font-weight: 500;
}

.products-sort select {
    padding: 10px 40px 10px 16px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--dark);
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    max-width: 100%;
}

.products-sort select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.pagination-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--dark);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-dots {
    color: var(--gray);
    padding: 0 8px;
}

/* Responsive toolbar */
@media (max-width: 768px) {
    .products-toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .products-sort {
        justify-content: space-between;
    }
    
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* ========================================
   SEARCH STATUS
======================================== */

.products-search-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-size: 14px;
}

.products-search-status strong {
    color: var(--dark);
}

.btn-reset-search {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: var(--transition);
}

.btn-reset-search:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ========================================
   CHECKOUT MODAL
======================================== */

.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.checkout-modal.active {
    opacity: 1;
    visibility: visible;
}

.checkout-modal.active ~ .overlay,
.checkout-modal.active + .overlay {
    opacity: 1;
    visibility: visible;
    z-index: 1999;
}

.checkout-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px);
    transition: var(--transition);
}

.checkout-modal.active .checkout-content {
    transform: translateY(0);
}

.checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-light);
}

.checkout-header h3 {
    font-size: 1.25rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-header h3 i {
    color: var(--primary);
}

.checkout-close {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--gray);
    transition: var(--transition);
}

.checkout-close:hover {
    background: var(--light);
    color: var(--dark);
}

.checkout-body {
    padding: 24px;
}

.checkout-body .form-group {
    margin-bottom: 16px;
}

.checkout-body .form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 6px;
}

.checkout-body .form-group label i {
    color: var(--primary);
    width: 16px;
}

.checkout-body .form-group input,
.checkout-body .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    transition: var(--transition);
    font-family: inherit;
}

.checkout-body .form-group input:focus,
.checkout-body .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.checkout-body .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.checkout-summary {
    background: var(--light);
    border-radius: var(--radius);
    padding: 16px;
    margin: 20px 0;
}

.checkout-summary h4 {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkout-items {
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-light);
    font-size: 0.875rem;
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item-name {
    color: var(--dark);
    flex: 1;
    margin-right: 10px;
}

.checkout-item-qty {
    color: var(--gray);
    margin-right: 10px;
}

.checkout-item-price {
    color: var(--primary);
    font-weight: 600;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 2px solid var(--gray-light);
    font-size: 1.125rem;
    font-weight: 700;
}

.checkout-total span:last-child {
    color: var(--primary);
}

.checkout-body .btn-lg {
    padding: 14px 24px;
    font-size: 1rem;
}

/* Consent checkboxes in checkout */
.consent-checks {
    margin: 1rem 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.consent-check-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.5;
}

.consent-check-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.consent-check-box {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    transition: background 0.2s;
    margin-top: 1px;
}

.consent-check-label input[type="checkbox"]:not(:checked) ~ .consent-check-box {
    background: var(--border-color);
    color: transparent;
}

.consent-check-label input[type="checkbox"]:not(:checked) ~ .consent-check-box i {
    opacity: 0;
}

.consent-check-label input[type="checkbox"]:checked ~ .consent-check-box {
    background: #22c55e;
}

.consent-check-label a {
    color: var(--accent-blue);
    text-decoration: underline;
}

@media (max-width: 480px) {
    .checkout-modal {
        padding: 10px;
    }
    
    .checkout-content {
        max-height: 95vh;
    }
    
    .checkout-header {
        padding: 16px 20px;
    }
    
    .checkout-body {
        padding: 20px;
    }
}

/* Toast error styles */
.toast-error {
    background: var(--error) !important;
}

.toast-error i {
    color: white;
}


/* ========================================
   Auth Modal Styles
======================================== */

.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.auth-modal.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal.active ~ .overlay,
.auth-modal.active + .overlay {
    opacity: 1;
    visibility: visible;
    z-index: 9998 !important;
}

.auth-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    transform: scale(0.9) translateY(20px);
    transition: var(--transition);
    position: relative;
    z-index: 10000 !important;
}

.auth-modal.active .auth-content {
    transform: scale(1) translateY(0);
}

.auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-light);
}

.auth-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-header h3 i {
    color: var(--primary);
}

.auth-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--light);
    color: var(--gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.auth-close:hover {
    background: var(--error);
    color: var(--white);
}

.auth-body {
    padding: 24px;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--dark);
    font-size: 0.9rem;
}

.auth-form .form-group label i {
    margin-right: 6px;
    color: var(--primary);
    width: 16px;
}

.auth-form .form-group input,
.auth-form .form-group select,
.auth-form .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: var(--transition);
    font-family: inherit;
}

.auth-form .form-group input:focus,
.auth-form .form-group select:focus,
.auth-form .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.auth-form .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.auth-form .btn-block {
    margin-top: 8px;
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    color: var(--gray);
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* User Profile in Modal */
.user-profile {
    text-align: center;
}

.profile-header {
    margin-bottom: 24px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
    color: var(--white);
}

.profile-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.profile-email {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Profile Link in Nav */
.nav-actions .btn-icon.profile-link {
    position: relative;
}

.nav-actions .btn-icon.profile-link.logged-in {
    color: var(--success);
}

/* Mobile logout button */
.mobile-logout {
    display: none;
}

@media (max-width: 768px) {
    .auth-modal {
        padding: 10px;
    }
    
    .auth-content {
        max-height: 95vh;
    }
}

/* Скрываем кнопку выхода в меню на ПК */
.mobile-logout-item {
    display: none;
}

@media (max-width: 768px) {
    .mobile-logout-item {
        display: block;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 2px solid var(--gray-light);
    }
    
    .mobile-logout-item a {
        display: flex;
        align-items: center;
        gap: 12px;
        color: #dc2626;
        font-size: 16px;
        font-weight: 500;
        padding: 12px 0;
        text-decoration: none;
    }
    
    .mobile-logout-item a i {
        font-size: 18px;
    }
    
    .mobile-logout {
        display: block;
    }
}

/* ========================================
   Registration Form Styles
======================================== */

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 16px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-row .form-group:first-child {
    flex: 2;
}

#fillCompanyBtn {
    padding: 12px 16px;
    font-size: 0.9rem;
    white-space: nowrap;
}

#fillCompanyBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#fillCompanyBtn i.fa-spinner {
    animation: spin 1s linear infinite;
}

.business-fields h4 {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
}

@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 16px;
    }
}

/* ===== Stock Badge (homepage + all pages) ===== */
.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.stock-badge.in-stock {
    background: #dcfce7;
    color: #166534;
}

.stock-badge.preorder {
    background: #fef3c7;
    color: #92400e;
}

.stock-badge.out-of-stock {
    background: #fee2e2;
    color: #991b1b;
}

/* Product card stock class variants */
.product-card.product-preorder .btn-add-cart {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.product-card.product-preorder .btn-add-cart:hover {
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.4);
}

.product-card.product-out-of-stock {
    opacity: 0.7;
}

.product-card.product-out-of-stock .btn-add-cart {
    background: var(--gray);
    cursor: not-allowed;
}

/* ===== Installment Mini Button (homepage + all pages) ===== */
.installment-mini {
    font-size: 12px;
    color: #5d4037;
    margin-top: 8px;
    padding: 8px;
    background: #fff8e1;
    border-radius: 6px;
    text-align: center;
}

.installment-mini tinkoff-create-button {
    width: 100%;
}

/* ===== Enhanced Mobile Responsiveness ===== */

/* Products grid - mobile */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card {
        border-radius: 12px;
    }

    .product-image {
        height: 160px;
    }

    .product-info {
        padding: 10px;
    }

    .product-title {
        font-size: 13px;
        min-height: auto;
        -webkit-line-clamp: 2;
        margin-bottom: 6px;
    }

    .product-category {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .current-price {
        font-size: 16px;
    }

    .old-price {
        font-size: 12px;
    }

    .product-price {
        gap: 6px;
        min-height: auto;
        margin-bottom: 4px;
    }

    .product-actions-row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding-top: 8px;
    }

    .btn-add-cart,
    .btn-view {
        height: 40px;
        font-size: 12px;
        padding: 0 8px;
    }

    .product-options-row {
        flex-direction: column;
        gap: 6px;
        margin: 6px 0 2px;
    }

    .size-btn {
        min-width: 30px;
        height: 28px;
        font-size: 10px;
        padding: 0 5px;
    }

    .qty-selector-catalog {
        width: 100%;
        justify-content: center;
    }

    .qty-btn-catalog {
        width: 32px;
        height: 30px;
    }

    .qty-input-catalog {
        width: 40px;
        height: 30px;
        font-size: 12px;
    }

    .installment-mini {
        padding: 6px;
        font-size: 11px;
        margin-top: 6px;
    }

    .stock-badge {
        font-size: 11px;
        padding: 3px 8px;
    }

    /* Hero section mobile */
    .hero {
        min-height: auto;
        padding-top: 80px;
    }

    .hero-content {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 24px !important;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    /* Features section mobile */
    .features {
        padding: 50px 0;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .feature-icon {
        width: 56px;
        height: 56px;
        font-size: 22px;
        margin-bottom: 16px;
    }

    .feature-item h3 {
        font-size: 15px;
    }

    .feature-item p {
        font-size: 12px;
    }

    /* About section mobile */
    .about {
        padding: 50px 0;
    }

    .about-image img {
        height: 280px;
    }

    .about-content .section-title {
        font-size: 22px;
    }

    /* Contact section mobile */
    .contact {
        padding: 50px 0;
    }

    .contact-form-wrapper {
        padding: 20px;
    }

    .contact-item i {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    /* Footer mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer {
        padding: 50px 0 0;
    }

    /* Sales banner mobile */
    .sales-banner-home {
        padding: 40px 0;
    }

    .sales-banner-text h2 {
        font-size: 24px;
    }

    .sales-banner-text p {
        font-size: 14px;
    }

    /* Section headers mobile */
    .section-header {
        margin-bottom: 32px;
    }

    .section-title {
        font-size: 24px !important;
    }

    .section-desc {
        font-size: 14px;
    }

    .products {
        padding: 50px 0;
    }

    /* Checkout modal mobile */
    .checkout-content {
        max-height: 95vh;
        margin: 10px;
        border-radius: 12px;
    }

    .checkout-body {
        padding: 16px;
    }

    /* Cart sidebar mobile */
    .cart-sidebar {
        width: 100%;
    }
}

/* Extra small screens */
@media (max-width: 380px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-image {
        height: 200px;
    }

    .product-info {
        padding: 12px;
    }

    .product-title {
        font-size: 14px;
    }

    .current-price {
        font-size: 18px;
    }

    .product-actions-row {
        grid-template-columns: 1fr 1fr;
    }

    .btn-add-cart,
    .btn-view {
        height: 42px;
        font-size: 12px;
    }

    .hero-title {
        font-size: 20px !important;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}
