/* ===== TITAN-8888 BRAND: RED + WHITE ===== */
:root {
    --red:        #D0021B;
    --red-dark:   #9B0013;
    --red-light:  #E8334A;
    --red-pale:   #FFF0F2;
    --white:      #ffffff;
    --gray-50:    #FAFAFA;
    --gray-100:   #F5F5F5;
    --gray-200:   #E8E8E8;
    --gray-400:   #AAAAAA;
    --gray-600:   #666666;
    --gray-800:   #1A1A1A;
    --text:       #1A1A1A;
    --text-muted: #777777;
    --shadow:     0 4px 20px rgba(208,2,27,0.10);
    --shadow-lg:  0 8px 40px rgba(208,2,27,0.16);
    --radius:     12px;
    --radius-sm:  8px;
    --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'Nunito', sans-serif;

    /* Alias: code still uses --green vars, map them to red */
    --green:       var(--red);
    --green-dark:  var(--red-dark);
    --green-light: var(--red-light);
    --green-pale:  var(--red-pale);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text); background: var(--white); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ===== HEADER ===== */
.site-header { position: sticky; top: 0; z-index: 1000; background: var(--white); box-shadow: 0 2px 14px rgba(0,0,0,0.09); border-bottom: 3px solid var(--red); }
.header-top { background: var(--white); padding: 14px 0; }
.header-top-inner { display: flex; align-items: center; gap: 24px; }

.logo a { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; color: var(--red-dark); }
.logo-icon { font-size: 1.9rem; }
.logo-text { background: linear-gradient(135deg, var(--red-dark) 0%, var(--red-light) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: 4px; }
.main-nav a { padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 600; color: var(--gray-600); transition: var(--transition); font-size: 0.88rem; }
.main-nav a:hover { color: var(--red); background: var(--red-pale); }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.balance-badge { display: flex; align-items: center; gap: 6px; background: var(--red-pale); color: var(--red-dark); padding: 6px 12px; border-radius: 20px; font-size: 0.82rem; font-weight: 700; border: 1.5px solid var(--red-light); }

.icon-btn { position: relative; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--gray-600); transition: var(--transition); font-size: 1.1rem; }
.icon-btn:hover { color: var(--red); background: var(--red-pale); }
.badge { position: absolute; top: -4px; right: -4px; background: var(--red); color: white; font-size: 0.65rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

.btn-login { display: flex; align-items: center; gap: 6px; padding: 9px 18px; background: var(--red); color: white; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.85rem; transition: var(--transition); }
.btn-login:hover { background: var(--red-dark); transform: translateY(-1px); }

.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--gray-200); font-size: 0.85rem; font-weight: 600; color: var(--gray-800); transition: var(--transition); }
.user-btn:hover { border-color: var(--red); color: var(--red); }
.user-btn .fa-chevron-down { font-size: 0.7rem; transition: var(--transition); }
.user-menu:hover .fa-chevron-down { transform: rotate(180deg); }
.user-dropdown { position: absolute; right: 0; top: calc(100% + 8px); background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); min-width: 200px; overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: var(--transition); border: 1px solid var(--gray-100); }
.user-menu:hover .user-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown a { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-size: 0.88rem; color: var(--gray-800); transition: var(--transition); }
.user-dropdown a:hover { background: var(--red-pale); color: var(--red); }
.user-dropdown a i { width: 16px; color: var(--gray-400); }

.burger-btn { display: none; flex-direction: column; gap: 5px; padding: 6px; }
.burger-btn span { display: block; width: 24px; height: 2px; background: var(--gray-800); border-radius: 2px; transition: var(--transition); }

/* ===== CATALOG BAR ===== */
.catalog-bar { background: var(--gray-50); border-bottom: 2px solid var(--red-pale); padding: 10px 0; }
.catalog-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.catalog-toggle-wrap { position: relative; }
.catalog-btn { display: flex; align-items: center; gap: 8px; padding: 10px 18px; background: var(--red); color: white; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.9rem; transition: var(--transition); }
.catalog-btn:hover { background: var(--red-dark); }
.catalog-dropdown { position: absolute; left: 0; top: calc(100% + 8px); background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 280px; max-height: 70vh; overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: var(--transition); z-index: 500; border: 1px solid var(--gray-100); }
.catalog-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.cat-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; transition: var(--transition); border-bottom: 1px solid var(--gray-100); }
.cat-item:last-child { border-bottom: none; }
.cat-item:hover { background: var(--red-pale); }
.cat-icon { font-size: 1.4rem; width: 30px; text-align: center; }
.cat-count { margin-left: auto; background: var(--red-pale); color: var(--red); font-size: 0.75rem; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.quick-links { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-links a { padding: 7px 14px; border-radius: 20px; font-size: 0.84rem; font-weight: 600; color: var(--gray-600); border: 1.5px solid var(--gray-200); transition: var(--transition); }
.quick-links a:hover { color: var(--red); border-color: var(--red); background: var(--red-pale); }
.partner-cta { margin-left: auto; }
.btn-partner { display: flex; align-items: center; gap: 8px; padding: 10px 20px; background: linear-gradient(135deg, var(--red), var(--red-light)); color: white; border-radius: 25px; font-weight: 700; font-size: 0.88rem; transition: var(--transition); box-shadow: 0 4px 15px rgba(208,2,27,0.35); animation: pulse-red 2.5s infinite; }
.btn-partner:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(208,2,27,0.45); }
@keyframes pulse-red { 0%,100% { box-shadow: 0 4px 15px rgba(208,2,27,0.3); } 50% { box-shadow: 0 4px 28px rgba(208,2,27,0.55); } }

/* ===== MOBILE NAV ===== */
.mobile-nav { position: fixed; top: 0; left: -100%; width: 280px; height: 100%; background: white; z-index: 2000; padding: 60px 24px 24px; transition: 0.3s ease; box-shadow: var(--shadow-lg); border-right: 3px solid var(--red); }
.mobile-nav.open { left: 0; }
.mobile-nav ul { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav a { display: block; padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 600; color: var(--gray-800); font-size: 1rem; transition: var(--transition); }
.mobile-nav a:hover { background: var(--red-pale); color: var(--red); }
.close-mobile { position: absolute; top: 16px; right: 16px; font-size: 1.2rem; color: var(--gray-600); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: var(--transition); }
.close-mobile:hover { background: var(--gray-100); color: var(--red); }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1999; opacity: 0; visibility: hidden; transition: 0.3s; }
.overlay.show { opacity: 1; visibility: visible; }

/* ===== CART SIDEBAR ===== */
.cart-sidebar { position: fixed; right: -420px; top: 0; width: 400px; max-width: 100vw; height: 100%; background: white; z-index: 2000; box-shadow: -4px 0 30px rgba(0,0,0,0.15); transition: 0.35s cubic-bezier(0.4,0,0.2,1); display: flex; flex-direction: column; }
.cart-sidebar.open { right: 0; }
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 2px solid var(--gray-100); background: linear-gradient(135deg, var(--red-dark), var(--red)); color: white; }
.cart-header h3 { font-family: var(--font-display); font-size: 1.3rem; }
.close-cart { color: white; font-size: 1.2rem; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: var(--transition); }
.close-cart:hover { background: rgba(255,255,255,0.2); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px; }
.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--gray-100); }
.cart-item img { width: 70px; height: 70px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 4px; }
.cart-item-price { color: var(--red); font-weight: 700; font-size: 0.95rem; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-btn { width: 28px; height: 28px; border-radius: 6px; background: var(--gray-100); color: var(--gray-800); font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.qty-btn:hover { background: var(--red); color: white; }
.qty-val { font-weight: 700; min-width: 24px; text-align: center; }
.remove-item { margin-left: auto; color: var(--gray-400); transition: var(--transition); font-size: 0.85rem; }
.remove-item:hover { color: var(--red); }
.cart-footer { padding: 20px 24px; border-top: 2px solid var(--gray-100); background: var(--gray-50); }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 1.1rem; }
.cart-total strong { color: var(--red); font-size: 1.3rem; }
.btn-checkout { display: block; text-align: center; padding: 14px; background: linear-gradient(135deg, var(--red), var(--red-light)); color: white; border-radius: var(--radius-sm); font-weight: 700; font-size: 1rem; transition: var(--transition); }
.btn-checkout:hover { background: linear-gradient(135deg, var(--red-dark), var(--red)); transform: translateY(-1px); }

/* ===== MAIN ===== */
.main-content { min-height: 60vh; }

/* ===== HERO (legacy - used by some pages) ===== */
.hero { background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 60%, var(--red-light) 100%); color: white; padding: 80px 0; overflow: hidden; position: relative; }
.hero::before { content: ''; position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-subtitle { font-size: 0.9rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,0.7); margin-bottom: 16px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(2rem,4vw,3.2rem); font-weight: 700; line-height: 1.2; margin-bottom: 20px; }
.hero p { font-size: 1.05rem; color: rgba(255,255,255,0.85); margin-bottom: 32px; line-height: 1.7; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-btn { padding: 14px 28px; border-radius: var(--radius-sm); font-weight: 700; font-size: 1rem; transition: var(--transition); }
.hero-btn.primary { background: white; color: var(--red-dark); }
.hero-btn.primary:hover { background: var(--red-pale); transform: translateY(-2px); }
.hero-btn.secondary { border: 2px solid rgba(255,255,255,0.5); color: white; }
.hero-btn.secondary:hover { border-color: white; background: rgba(255,255,255,0.1); }
.hero-image { text-align: center; font-size: 10rem; filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3)); animation: float 4s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

/* ===== SECTION ===== */
.section { padding: 64px 0; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-title { font-family: var(--font-display); font-size: clamp(1.8rem,3vw,2.5rem); color: var(--red-dark); margin-bottom: 10px; }
.section-sub { color: var(--text-muted); font-size: 1rem; }

/* ===== PRODUCTS GRID ===== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.product-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 14px rgba(0,0,0,0.07); transition: var(--transition); border: 1.5px solid var(--gray-100); position: relative; }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--red-pale); }
.product-img-wrap { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--gray-50); }
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-img-wrap img { transform: scale(1.06); }

.btn-fav { position: absolute; top: 12px; right: 12px; z-index: 2; width: 36px; height: 36px; background: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--gray-400); transition: var(--transition); box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.btn-fav:hover, .btn-fav.active { color: var(--red); transform: scale(1.1); }
.btn-fav.active { background: var(--red-pale); }

.add-to-cart-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.7)); padding: 40px 16px 16px; opacity: 0; transition: var(--transition); display: flex; justify-content: center; }
.product-card:hover .add-to-cart-overlay { opacity: 1; }
.btn-add-cart { display: flex; align-items: center; gap: 8px; padding: 10px 20px; background: var(--red); color: white; border-radius: 25px; font-weight: 700; font-size: 0.88rem; transition: var(--transition); width: 100%; justify-content: center; }
.btn-add-cart:hover { background: var(--red-dark); }

.product-badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; }
.badge-new { background: var(--red); color: white; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-sale { background: #CC0000; color: white; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }

.product-body { padding: 16px; }
.product-category { font-size: 0.75rem; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.product-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--gray-800); margin-bottom: 8px; line-height: 1.3; }
.product-desc { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-footer { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-size: 1.15rem; font-weight: 700; color: var(--red-dark); }
.product-price-old { text-decoration: line-through; color: var(--gray-400); font-size: 0.85rem; margin-left: 6px; }
.partner-price { font-size: 0.78rem; color: var(--red); font-weight: 600; }

.btn-add-cart-mobile { width: 100%; display: none; align-items: center; justify-content: center; gap: 8px; padding: 12px; background: var(--red); color: white; border-radius: 0 0 var(--radius) var(--radius); font-weight: 700; font-size: 0.9rem; transition: var(--transition); margin-top: 12px; }
.btn-add-cart-mobile:hover { background: var(--red-dark); }

/* ===== SKELETON ===== */
.skeleton { animation: shimmer 1.5s infinite; background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%); background-size: 200% 100%; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.skeleton-card { background: white; border-radius: var(--radius); overflow: hidden; border: 1.5px solid var(--gray-100); }
.skeleton-img { height: 240px; }
.skeleton-body { padding: 16px; }
.skeleton-line { height: 14px; margin-bottom: 10px; border-radius: 7px; }
.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }
.skeleton-line.tall { height: 20px; margin-bottom: 12px; }
.skeleton-price { height: 22px; width: 40%; margin-top: 14px; border-radius: 7px; }

/* ===== FILTERS ===== */
.catalog-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding: 48px 0; }
.filters-card { background: white; border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); position: sticky; top: 120px; border: 1.5px solid var(--gray-100); }
.filter-title { font-family: var(--font-display); font-size: 1.1rem; color: var(--red-dark); margin-bottom: 20px; font-weight: 700; }
.filter-group { margin-bottom: 24px; border-bottom: 1px solid var(--gray-100); padding-bottom: 20px; }
.filter-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.filter-group-title { font-weight: 700; font-size: 0.88rem; color: var(--gray-800); margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.filter-checkbox { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; font-size: 0.9rem; color: var(--gray-600); transition: var(--transition); }
.filter-checkbox:hover { color: var(--red); }
.filter-checkbox input[type=checkbox] { accent-color: var(--red); width: 16px; height: 16px; }
.range-inputs { display: flex; gap: 10px; align-items: center; }
.range-inputs input { width: 100%; padding: 8px 12px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); font-size: 0.88rem; transition: var(--transition); }
.range-inputs input:focus { outline: none; border-color: var(--red); }
.btn-apply-filter { width: 100%; padding: 12px; background: var(--red); color: white; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.9rem; transition: var(--transition); margin-top: 12px; }
.btn-apply-filter:hover { background: var(--red-dark); }

/* ===== TABS ===== */
.tabs { display: flex; gap: 6px; margin-bottom: 24px; flex-wrap: wrap; }
.tab-btn { padding: 9px 18px; border-radius: 25px; font-weight: 600; font-size: 0.86rem; color: var(--gray-600); border: 1.5px solid var(--gray-200); transition: var(--transition); }
.tab-btn:hover, .tab-btn.active { background: var(--red); color: white; border-color: var(--red); }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.page-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9rem; border: 1.5px solid var(--gray-200); color: var(--gray-600); transition: var(--transition); }
.page-btn:hover, .page-btn.active { background: var(--red); color: white; border-color: var(--red); }

/* ===== FORMS ===== */
.auth-page { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: var(--gray-50); }
.auth-card { background: white; border-radius: var(--radius); padding: 48px; width: 100%; max-width: 440px; box-shadow: var(--shadow-lg); border-top: 4px solid var(--red); }
.auth-title { font-family: var(--font-display); font-size: 1.8rem; color: var(--red-dark); margin-bottom: 8px; text-align: center; }
.auth-sub { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-bottom: 32px; }
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 700; font-size: 0.85rem; color: var(--gray-800); margin-bottom: 8px; }
.form-control { width: 100%; padding: 12px 16px; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 0.95rem; color: var(--text); transition: var(--transition); background: var(--white); }
.form-control:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(208,2,27,0.10); }
.form-control.is-invalid { border-color: var(--red); }
.invalid-feedback { color: var(--red); font-size: 0.8rem; margin-top: 4px; }
.btn-primary { display: block; width: 100%; padding: 14px; background: linear-gradient(135deg, var(--red), var(--red-light)); color: white; border-radius: var(--radius-sm); font-weight: 700; font-size: 1rem; transition: var(--transition); text-align: center; border: none; cursor: pointer; }
.btn-primary:hover { background: linear-gradient(135deg, var(--red-dark), var(--red)); transform: translateY(-1px); }
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 0.9rem; }
.alert-success { background: #FFF0F2; color: var(--red-dark); border: 1px solid var(--red-light); }
.alert-error { background: #fff0f0; color: #c62828; border: 1px solid #ef9a9a; }

/* ===== ORDER STATUS ===== */
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 20px; font-size: 0.8rem; font-weight: 700; }
.status-pending { background: #fff8e1; color: #f57f17; }
.status-processing { background: #e8f4fd; color: #1565c0; }
.status-shipped { background: #f3e5f5; color: #6a1b9a; }
.status-delivered { background: var(--red-pale); color: var(--red-dark); }
.status-cancelled { background: #ffebee; color: #c62828; }
.order-timeline { display: flex; gap: 0; margin: 24px 0; }
.timeline-step { flex: 1; text-align: center; position: relative; }
.timeline-step::before { content: ''; position: absolute; top: 15px; left: 50%; right: -50%; height: 2px; background: var(--gray-200); z-index: 0; }
.timeline-step:last-child::before { display: none; }
.timeline-step.done::before { background: var(--red); }
.step-circle { width: 32px; height: 32px; border-radius: 50%; background: var(--gray-200); display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; color: white; font-size: 0.85rem; position: relative; z-index: 1; transition: var(--transition); }
.timeline-step.done .step-circle { background: var(--red); }
.timeline-step.active .step-circle { background: var(--red); box-shadow: 0 0 0 4px rgba(208,2,27,0.18); }
.step-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }

/* ===== HISTORY PAGE ===== */
.history-hero { background: linear-gradient(135deg, var(--red-dark), var(--red)); color: white; padding: 80px 0; text-align: center; }
.history-hero h1 { font-family: var(--font-display); font-size: 3rem; margin-bottom: 16px; }
.timeline-section { padding: 80px 0; }
.timeline { position: relative; max-width: 800px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--red-light); transform: translateX(-50%); }
.timeline-item { display: flex; gap: 40px; margin-bottom: 50px; align-items: center; }
.timeline-item:nth-child(even) { flex-direction: row-reverse; }
.timeline-content { flex: 1; background: white; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); border: 1.5px solid var(--gray-100); }
.timeline-year { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--red); margin-bottom: 8px; }
.timeline-dot { width: 20px; height: 20px; border-radius: 50%; background: var(--red); flex-shrink: 0; box-shadow: 0 0 0 6px var(--red-pale); z-index: 1; }

/* ===== VIDEO PAGE ===== */
.videos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; padding: 48px 0; }
.video-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); }
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.video-thumb { position: relative; aspect-ratio: 16/9; background: var(--gray-800); cursor: pointer; overflow: hidden; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.play-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.4); transition: var(--transition); }
.play-btn i { font-size: 3rem; color: white; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4)); transition: var(--transition); }
.video-card:hover .play-btn i { transform: scale(1.15); color: var(--red-light); }

/* ===== COOKING ===== */
.cooking-steps { counter-reset: step; }
.cooking-step { display: grid; grid-template-columns: 80px 1fr; gap: 24px; margin-bottom: 48px; align-items: start; }
.step-number { font-family: var(--font-display); font-size: 3.5rem; font-weight: 700; color: var(--red-pale); line-height: 1; text-align: center; }
.step-content h3 { font-family: var(--font-display); font-size: 1.4rem; color: var(--red-dark); margin-bottom: 10px; }

/* ===== PARTNER ===== */
.partner-form-page { padding: 60px 0; background: var(--gray-50); min-height: 70vh; }
.partner-card { max-width: 700px; margin: 0 auto; background: white; border-radius: var(--radius); padding: 48px; box-shadow: var(--shadow-lg); border-top: 4px solid var(--red); }
.partner-title { font-family: var(--font-display); font-size: 2rem; color: var(--red-dark); margin-bottom: 8px; }
.partner-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 32px 0; }
.benefit-item { text-align: center; padding: 20px; background: var(--red-pale); border-radius: var(--radius-sm); }
.benefit-icon { font-size: 2rem; margin-bottom: 10px; }
.benefit-title { font-weight: 700; color: var(--red-dark); font-size: 0.9rem; }

/* ===== FOOTER ===== */
.site-footer { background: #111111; color: #CCCCCC; padding: 64px 0 0; border-top: 3px solid var(--red); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 48px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: white; margin-bottom: 16px; }
.footer-logo .logo-icon { font-size: 1.8rem; }
.site-footer p { color: #999999; font-size: 0.88rem; line-height: 1.7; }
.social-links { display: flex; gap: 12px; margin-top: 20px; }
.social-links a { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.08); border-radius: var(--radius-sm); color: #999; font-size: 1.1rem; transition: var(--transition); }
.social-links a:hover { background: var(--red); color: white; }
.footer-col h4 { color: white; font-weight: 700; font-size: 0.95rem; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: #999; font-size: 0.88rem; transition: var(--transition); }
.footer-col ul a:hover { color: var(--red-light); }
.footer-col p { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.footer-col p i { color: var(--red-light); flex-shrink: 0; margin-top: 3px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 0; text-align: center; font-size: 0.82rem; color: #666; }

/* ===== ORDERS TABLE ===== */
.orders-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.orders-table th { background: linear-gradient(135deg, var(--red-dark), var(--red)); color: white; padding: 14px 16px; text-align: left; font-size: 0.85rem; font-weight: 700; }
.orders-table td { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); font-size: 0.9rem; color: var(--gray-800); }
.orders-table tr:last-child td { border-bottom: none; }
.orders-table tr:hover td { background: var(--gray-50); }

/* ===== SPINNER ===== */
.spinner { width: 40px; height: 40px; border: 4px solid var(--gray-100); border-top-color: var(--red); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== TOAST ===== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: white; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); border-left: 4px solid var(--red); font-size: 0.9rem; font-weight: 600; max-width: 320px; animation: slideInRight 0.3s ease; }
.toast.success { border-color: var(--red); }
.toast.error { border-color: #c62828; }
.toast.info { border-color: #1565c0; }
.toast i { font-size: 1.1rem; }
.toast.success i { color: var(--red); }
.toast.error i { color: #c62828; }
@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .catalog-layout { grid-template-columns: 1fr; }
    .filters-sidebar { order: -1; }
    .filters-card { position: static; display: flex; flex-wrap: wrap; gap: 16px; }
    .filter-group { border-bottom: none; margin-bottom: 0; padding-bottom: 0; flex: 1; min-width: 200px; }
    .hero-inner { grid-template-columns: 1fr; }
    .hero-image { font-size: 6rem; }
}
@media (max-width: 768px) {
    .main-nav { display: none; }
    .burger-btn { display: flex; }
    .header-actions .balance-badge { display: none; }
    .catalog-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .partner-cta { margin-left: 0; }
    .add-to-cart-overlay { display: none !important; }
    .btn-add-cart-mobile { display: flex !important; }
    .hero { padding: 50px 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .partner-benefits { grid-template-columns: 1fr; }
    .timeline::before { left: 20px; }
    .timeline-item, .timeline-item:nth-child(even) { flex-direction: column; gap: 20px; padding-left: 50px; }
    .timeline-dot { position: absolute; left: 10px; }
    .timeline-item { position: relative; }

    /* ── МОБИЛЬНЫЙ ХЕДЕР ── */
    .header-top { padding: 10px 0; }
    .header-top-inner { gap: 8px; }

    /* Полностью скрыть логотип */
    .logo { display: none; }

    /* Полностью скрыть catalog-bar */
    .catalog-bar { display: none; }

    /* Скрыть кнопку входа (текст), оставить иконку */
    .btn-login span { display: none; }
    .btn-login { padding: 7px 10px; min-width: 0; }

    /* Скрыть имя пользователя в user-btn */
    .user-btn span { display: none; }
    .user-btn { gap: 0; padding: 7px 10px; }

    /* Компактные иконки-кнопки */
    .icon-btn { width: 34px; height: 34px; font-size: 0.9rem; }

    /* header-actions — убрать gap */
    .header-actions { gap: 4px; margin-left: auto; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
    .hero h1 { font-size: 1.7rem; }
    .cart-sidebar { width: 100%; }
    .auth-card { padding: 28px 20px; }

    /* Совсем маленькие — ещё компактнее */
    .header-top-inner { gap: 4px; }
    .header-actions { gap: 2px; }
    .icon-btn { width: 30px; height: 30px; font-size: 0.82rem; }
    .badge { width: 14px; height: 14px; font-size: 0.55rem; top: -4px; right: -4px; }
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
    --white:      #111111;
    --gray-50:    #1A1A1A;
    --gray-100:   #222222;
    --gray-200:   #2E2E2E;
    --gray-400:   #666666;
    --gray-600:   #999999;
    --gray-800:   #E8E8E8;
    --text:       #E8E8E8;
    --text-muted: #AAAAAA;
    --shadow:     0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg:  0 8px 40px rgba(0,0,0,0.5);
    --red-pale:   rgba(208,2,27,0.15);
}
[data-theme="dark"] body { background: #111111; color: #E8E8E8; }
[data-theme="dark"] .site-header { background: #1A1A1A; box-shadow: 0 2px 14px rgba(0,0,0,0.5); }
[data-theme="dark"] .header-top { background: #1A1A1A; }
[data-theme="dark"] .catalog-bar { background: #1A1A1A; border-bottom-color: #2E2E2E; }
[data-theme="dark"] .product-card { background: #1A1A1A; border-color: #2E2E2E; }
[data-theme="dark"] .product-card:hover { border-color: var(--red); }
[data-theme="dark"] .product-name a { color: #E8E8E8; }
[data-theme="dark"] .product-img-wrap { background: #222222; }
[data-theme="dark"] .filters-card { background: #1A1A1A; border-color: #2E2E2E; }
[data-theme="dark"] .auth-card { background: #1A1A1A; }
[data-theme="dark"] .form-control { background: #222222; border-color: #333333; color: #E8E8E8; }
[data-theme="dark"] .cart-sidebar { background: #1A1A1A; }
[data-theme="dark"] .cart-item { border-bottom-color: #2E2E2E; }
[data-theme="dark"] .cart-footer { background: #1A1A1A; border-top-color: #2E2E2E; }
[data-theme="dark"] .user-dropdown { background: #1A1A1A; border-color: #2E2E2E; }
[data-theme="dark"] .user-dropdown a:hover { background: rgba(208,2,27,0.15); }
[data-theme="dark"] .catalog-dropdown { background: #1A1A1A; border-color: #2E2E2E; }
[data-theme="dark"] .cat-item:hover { background: rgba(208,2,27,0.12); }
[data-theme="dark"] .mobile-nav { background: #1A1A1A; }
[data-theme="dark"] .quick-links a { border-color: #333333; color: #AAAAAA; }
[data-theme="dark"] .toast { background: #1A1A1A; }
[data-theme="dark"] .btn-fav { background: #222222; }
[data-theme="dark"] .skeleton { background: linear-gradient(90deg, #222 25%, #2a2a2a 50%, #222 75%); background-size: 200% 100%; }
[data-theme="dark"] .skeleton-card { background: #1A1A1A; border-color: #2E2E2E; }
[data-theme="dark"] #themeIcon::before { content: "\f185"; } /* fa-sun */
[data-theme="dark"] .user-btn { border-color: #333333; color: #E8E8E8; }
[data-theme="dark"] .balance-badge { background: rgba(208,2,27,0.15); }

/* ===== DARK MODE ICON FIX ===== */
#themeIcon::before { content: "\f186"; font-family: "Font Awesome 6 Free"; font-weight: 900; }
[data-theme="dark"] #themeIcon::before { content: "\f185"; }

/* transition for smooth theme switch */
body, .site-header, .product-card, .cart-sidebar, .auth-card, .filters-card,
.catalog-dropdown, .user-dropdown, .mobile-nav {
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
