/* =============================================
   WiFi Shop — Clean Modern Design
   Mobile-first, refined typography
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #1a56db;
    --primary-dark: #1344b8;
    --primary-light: #eff4ff;
    --primary-mid: #c7d7fd;
    --accent: #0ea5e9;
    --success: #059669;
    --success-light: #ecfdf5;
    --warning: #d97706;
    --danger: #dc2626;
    --danger-light: #fef2f2;

    --dark: #0f172a;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50:  #f9fafb;
    --white: #ffffff;

    --bg: #f4f7fb;
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --border-light: #f0f2f5;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
    --shadow:    0 1px 4px rgba(0,0,0,0.07), 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.10);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.12);

    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius:    14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --font: 'Inter', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: ui-monospace, 'SF Mono', monospace;
    --transition: 0.18s ease;

    --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--gray-800);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: var(--font); }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.25rem;
}
@media (min-width: 640px) { .container { padding: 0 2rem; } }

/* =============================================
   HEADER
   ============================================= */
.header {
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--header-h);
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}
.header .container {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    color: var(--dark);
    line-height: 1;
}
.logo-img {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: block;
}
.logo-icon { display: none; } /* хуучин — нуух */
.logo-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Desktop nav */
.nav {
    display: none;
    align-items: center;
    gap: 0.1rem;
    flex: 1;
}
@media (min-width: 900px) { .nav { display: flex; } }
.nav-link {
    padding: 0.4rem 0.7rem;
    border-radius: var(--radius-xs);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: var(--transition);
    white-space: nowrap;
}
.nav-link:hover { background: var(--gray-100); color: var(--gray-900); }
.nav-link.active { color: var(--primary); background: var(--primary-light); }

/* Header right */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

/* Header search bar */
.header-search {
    display: none;
    align-items: center;
    background: var(--gray-100);
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    padding: 0 0.75rem;
    transition: var(--transition);
    height: 38px;
}
@media (min-width: 680px) { .header-search { display: flex; } }
.header-search:focus-within {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.header-search input {
    border: none;
    background: transparent;
    font-size: 0.875rem;
    width: 180px;
    outline: none;
    color: var(--gray-800);
}
.header-search button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    font-size: 0.95rem;
    padding: 0;
    line-height: 1;
}

.header-phone-img {
    display: none;
    height: 42px;
    width: auto;
    flex-shrink: 0;
    border-radius: 8px;
}
@media (min-width: 640px) { .header-phone-img { display: block; } }

/* Keep old classes for backwards compat */
.phone-img-link { display: none; }
.phone-btn { display: none; }

.cart-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.875rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.875rem;
    transition: var(--transition);
    white-space: nowrap;
}
.cart-btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(26,86,219,0.3); }
.cart-count {
    background: #ff3b30;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0 3px;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--gray-700);
    transition: var(--transition);
    flex-shrink: 0;
}
.mobile-menu-btn:hover { background: var(--gray-200); }
@media (min-width: 900px) { .mobile-menu-btn { display: none; } }

/* Mobile menu panel */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0; bottom: 0;
    background: white;
    z-index: 199;
    overflow-y: auto;
    padding: 1rem;
    flex-direction: column;
    gap: 0.25rem;
    border-top: 1px solid var(--border);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--gray-700);
    transition: var(--transition);
}
.mobile-menu a:hover { background: var(--gray-100); color: var(--primary); }
.mobile-menu a:active { background: var(--primary-light); }

/* Mobile search in menu */
.mobile-search-form {
    display: flex;
    align-items: center;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
    height: 44px;
    border: 1.5px solid transparent;
}
.mobile-search-form:focus-within { border-color: var(--primary); background: white; }
.mobile-search-form input { flex: 1; border: none; background: transparent; outline: none; font-size: 0.9rem; }
.mobile-search-form button { background: none; border: none; cursor: pointer; font-size: 1rem; }
.mobile-menu-divider { height: 1px; background: var(--border); margin: 0.5rem 0; }

/* =============================================
   HERO
   ============================================= */
.hero {
    background: linear-gradient(145deg, #0d1b3e 0%, #0f2460 40%, #0a1a3a 100%);
    padding: 3rem 0 3.5rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 80% at 10% 50%, rgba(26,86,219,0.18) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 90% 10%, rgba(14,165,233,0.12) 0%, transparent 60%);
    pointer-events: none;
}
/* subtle grid lines */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
@media (min-width: 768px) {
    .hero { padding: 4rem 0 4.5rem; }
    .hero-inner { flex-direction: row; align-items: center; gap: 3rem; }
}
.hero-text { flex: 1; }
.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(26,86,219,0.25);
    border: 1px solid rgba(26,86,219,0.4);
    color: #93c5fd;
    padding: 0.3rem 0.875rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}
.hero-title {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 800;
    color: white;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}
.hero-title .hl {
    background: linear-gradient(90deg, #60a5fa, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    color: rgba(255,255,255,0.6);
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 2rem;
    max-width: 480px;
}
.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.hero-badges {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-badge-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.6);
    font-size: 0.82rem;
    font-weight: 500;
}
.hero-badge-item span:first-child { font-size: 1rem; }

/* Hero right side — featured product card */
.hero-card {
    flex-shrink: 0;
    width: 280px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(8px);
    display: none;
}
@media (min-width: 900px) { .hero-card { display: block; } }
.hero-card-img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: contain;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    margin-bottom: 1rem;
}
.hero-card-name { color: white; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; }
.hero-card-price { color: #60a5fa; font-weight: 800; font-size: 1.25rem; font-family: var(--font-mono); }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    line-height: 1.2;
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: 0 4px 14px rgba(26,86,219,0.35); }
.btn-white { background: white; color: var(--primary); border-color: white; }
.btn-white:hover { background: var(--primary-light); }
.btn-outline { background: transparent; color: var(--gray-700); border-color: var(--border); }
.btn-outline:hover { background: var(--gray-100); border-color: var(--gray-300); }
.btn-outline-white { background: transparent; color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.3); }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.82rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 0.95rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* =============================================
   SECTIONS
   ============================================= */
.section { padding: 3rem 0; }
@media (min-width: 768px) { .section { padding: 4rem 0; } }
.section-alt { background: var(--white); }
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    gap: 1rem;
}
.section-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.025em;
}
@media (min-width: 768px) { .section-title { font-size: 1.6rem; } }
.see-all {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    padding: 0.3rem 0.625rem;
    border-radius: var(--radius-xs);
    transition: var(--transition);
}
.see-all:hover { background: var(--primary-light); }

/* =============================================
   PRODUCT CARDS
   ============================================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.25rem;
}
@media (min-width: 560px)  { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .products-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
@media (min-width: 1280px) { .products-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.product-card:hover {
    border-color: var(--primary-mid);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.product-img-wrap {
    position: relative;
    background: var(--gray-50);
    aspect-ratio: 16/9;
    overflow: hidden;
    display: block;
}
.product-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.875rem;
    transition: transform 0.35s ease;
}
.product-card:hover .product-img { transform: scale(1.05); }

/* overlay on hover */
.product-img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}
.product-card:hover .product-img-overlay { opacity: 1; }
.quick-view-btn {
    background: white;
    color: var(--gray-900);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-xs);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
}

/* badges */
.badge-sale, .badge-out {
    position: absolute;
    top: 0.5rem; left: 0.5rem;
    padding: 0.18rem 0.5rem;
    border-radius: var(--radius-xs);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-sale { background: var(--danger); color: white; }
.badge-out  { background: var(--gray-500); color: white; }

.product-info {
    padding: 1.1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
}
.product-cat {
    font-size: 0.7rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.product-name {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.45;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-name a:hover { color: var(--primary); }
.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.product-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}
.product-price.negotiable { color: var(--gray-500); font-size: 0.85rem; font-family: var(--font); font-weight: 600; }
.product-old-price {
    font-size: 0.78rem;
    color: var(--gray-400);
    text-decoration: line-through;
    font-family: var(--font-mono);
}
.add-to-cart-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.65rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-xs);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
}
.add-to-cart-btn:hover:not(.disabled) { background: var(--primary-dark); }
.add-to-cart-btn:active:not(.disabled) { transform: scale(0.97); }
.add-to-cart-btn.disabled { background: var(--gray-200); color: var(--gray-500); cursor: not-allowed; }

/* =============================================
   WHY US / FEATURES
   ============================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(4, 1fr); } }
.feature-card {
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.25rem;
    text-align: center;
    transition: var(--transition);
}
.feature-card:hover { border-color: var(--primary-mid); box-shadow: var(--shadow-md); }
.feature-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.feature-card h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.375rem; color: var(--gray-800); }
.feature-card p { font-size: 0.8rem; color: var(--gray-500); line-height: 1.6; }

/* Why-us dark hero background */
.why-us-section {
    background: linear-gradient(145deg, #0d1b3e 0%, #0f2460 50%, #0a1a3a 100%) !important;
    position: relative;
    overflow: hidden;
}
.why-us-section::before {
    content:''; position:absolute; inset:0; pointer-events:none;
    background:
        radial-gradient(ellipse 60% 80% at 10% 50%, rgba(26,86,219,0.18) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 90% 20%, rgba(14,165,233,0.12) 0%, transparent 60%);
}
.why-us-section::after {
    content:''; position:absolute; inset:0; pointer-events:none;
    background-image: linear-gradient(rgba(255,255,255,0.04) 1px,transparent 1px), linear-gradient(90deg,rgba(255,255,255,0.04) 1px,transparent 1px);
    background-size: 40px 40px;
}
.why-us-section .container { position:relative; z-index:1; }
.why-us-section .section-title { color:white !important; }
.why-us-section .section-title::after { background:linear-gradient(90deg,#60a5fa,#38bdf8); }
.why-card {
    background: rgba(255,255,255,0.07) !important;
    border-color: rgba(255,255,255,0.12) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.why-card:hover { background:rgba(255,255,255,0.13) !important; border-color:rgba(255,255,255,0.25) !important; box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important; }
.why-card h3 { color:white !important; }
.why-card p  { color:rgba(255,255,255,0.6) !important; }

/* =============================================
   PAGE HEADER (inner pages)
   ============================================= */
.page-header {
    background: linear-gradient(135deg, #0d1b3e 0%, #0f2460 100%);
    padding: 1.75rem 0 2rem;
    color: white;
}
.page-header h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.025em; margin-bottom: 0.3rem; }
.page-header p { color: rgba(255,255,255,0.55); font-size: 0.875rem; }
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,0.55); transition: var(--transition); }
.breadcrumb a:hover { color: white; }

/* =============================================
   SHOP LAYOUT (products page)
   ============================================= */
.shop-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}
@media (min-width: 900px) {
    .shop-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 2rem;
    }
}
.sidebar {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
@media (min-width: 900px) {
    .sidebar { width: 240px; flex-shrink: 0; position: sticky; top: calc(var(--header-h) + 1rem); }
}
.sidebar-widget {
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.sidebar-widget-head {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-500);
    background: var(--gray-50);
}
.cat-list { list-style: none; }
.cat-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    transition: var(--transition);
    border-bottom: 1px solid var(--border-light);
}
.cat-list li:last-child a { border-bottom: none; }
.cat-list li a:hover { background: var(--gray-50); color: var(--primary); }
.cat-list li a.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.cat-list li a span {
    background: var(--gray-100);
    color: var(--gray-500);
    padding: 0.1rem 0.45rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
}
.cat-list li a.active span { background: var(--primary-mid); color: var(--primary); }

/* Mobile sidebar toggle */
.sidebar-toggle-btn { display: none; }
.sidebar-content { display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 900px) { .sidebar-content { display: flex !important; flex-direction: column; gap: 0.75rem; } }

.search-form { display: flex; gap: 0; }
.search-input {
    flex: 1;
    padding: 0.6rem 0.875rem;
    border: 1.5px solid var(--border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition);
}
.search-input:focus { border-color: var(--primary); }
.search-btn {
    padding: 0.6rem 0.875rem;
    background: var(--primary);
    color: white;
    border: 1.5px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
}
.search-btn:hover { background: var(--primary-dark); }

/* Shop main */
.shop-main { flex: 1; min-width: 0; }

.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.result-count { font-size: 0.82rem; color: var(--gray-500); font-weight: 500; }
.sort-wrap { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--gray-500); }
.sort-select {
    padding: 0.35rem 0.625rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 0.82rem;
    background: white;
    color: var(--gray-700);
    cursor: pointer;
    outline: none;
    font-weight: 500;
}

/* =============================================
   PRODUCT DETAIL PAGE
   ============================================= */
.product-detail-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1.5rem 0 3rem;
}
@media (min-width: 768px) {
    .product-detail-layout { flex-direction: row; gap: 3rem; align-items: flex-start; }
}
.product-gallery {
    width: 100%;
}
@media (min-width: 768px) { .product-gallery { width: 45%; flex-shrink: 0; position: sticky; top: calc(var(--header-h) + 1rem); } }

.main-image-wrap {
    background: var(--gray-50);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16/9;
    cursor: zoom-in;
    margin-bottom: 0.75rem;
    position: relative;
}
.main-product-img {
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.4s ease;
}
.main-image-wrap:hover .main-product-img { transform: scale(1.05); }
.zoom-hint {
    position: absolute;
    bottom: 0.75rem; right: 0.75rem;
    background: rgba(0,0,0,0.55);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-xs);
    font-size: 0.7rem;
    opacity: 0;
    transition: var(--transition);
}
.main-image-wrap:hover .zoom-hint { opacity: 1; }
.thumb-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}
.thumb-img {
    width: 100%; aspect-ratio: 1/1;
    object-fit: cover;
    border: 2px solid var(--border);
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: var(--transition);
}
.thumb-img:hover, .thumb-img.active { border-color: var(--primary); }

.product-detail-info { flex: 1; min-width: 0; }
.product-cat-badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.875rem;
}
.product-detail-name {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}
.product-detail-price {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-light), #f0f4ff);
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--primary-mid);
    margin-bottom: 1.25rem;
}
.price-main {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-mono);
    letter-spacing: -0.03em;
}
.price-main.negotiable { color: var(--gray-600); font-size: 1.1rem; font-family: var(--font); }
.price-old { font-size: 1rem; color: var(--gray-400); text-decoration: line-through; font-family: var(--font-mono); }

.product-meta { margin-bottom: 1.25rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.meta-row {
    display: flex;
    align-items: center;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-light);
}
.meta-row:last-child { border-bottom: none; }
.meta-label { color: var(--gray-500); font-weight: 500; width: 100px; flex-shrink: 0; }
.meta-val { font-weight: 600; color: var(--gray-800); }
.in-stock { color: var(--success) !important; }
.out-stock { color: var(--danger) !important; }

/* Condition badge */
.condition-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.875rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.condition-new          { background: #ecfdf5; color: #065f46; border: 1.5px solid #6ee7b7; }
.condition-refurbished  { background: #eff6ff; color: #1e40af; border: 1.5px solid #93c5fd; }
.condition-used         { background: #fffbeb; color: #92400e; border: 1.5px solid #fcd34d; }

/* Condition description box */
.condition-desc {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 1rem 1.125rem;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    line-height: 1.7;
    font-weight: 500;
}
.condition-desc::before {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1.2;
}
.condition-desc-new {
    background: #f0fdf4;
    color: #065f46;
    border: 1.5px solid #6ee7b7;
    border-left: 4px solid #10b981;
}
.condition-desc-new::before { content: '✨'; }

.condition-desc-refurbished {
    background: #eff6ff;
    color: #1e40af;
    border: 1.5px solid #93c5fd;
    border-left: 4px solid #3b82f6;
}
.condition-desc-refurbished::before { content: '🔧'; }

.condition-desc-used {
    background: #fffbeb;
    color: #92400e;
    border: 1.5px solid #fcd34d;
    border-left: 4px solid #f59e0b;
}
.condition-desc-used::before { content: '📦'; }

.add-to-cart-section { display: flex; gap: 0.75rem; margin-bottom: 0.875rem; align-items: center; flex-wrap: wrap; }
.qty-control {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 44px;
}
.qty-control button {
    width: 40px; height: 100%;
    background: var(--gray-100);
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--gray-700);
    transition: var(--transition);
}
.qty-control button:hover { background: var(--gray-200); }
.qty-input {
    width: 52px; height: 100%;
    border: none;
    border-left: 1.5px solid var(--border);
    border-right: 1.5px solid var(--border);
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    outline: none;
}
.contact-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.product-short-desc {
    background: var(--gray-50);
    border-left: 3px solid var(--primary);
    padding: 0.875rem 1rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.75;
}
.product-tabs {
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    margin: 0 0 2rem;
}
.product-tabs h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.description-body { line-height: 1.85; color: var(--gray-700); font-size: 0.9rem; }

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.93);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.lightbox.active { display: flex; }
.lightbox img {
    max-width: min(90vw, 900px);
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius);
    transition: opacity 0.2s ease;
}
.lightbox-close {
    position: absolute; top: 1rem; right: 1rem;
    background: rgba(255,255,255,0.12);
    border: none; color: white;
    width: 42px; height: 42px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }
.lightbox-nav {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: none; color: white;
    width: 48px; height: 48px;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
    z-index: 1;
    line-height: 1;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.28); transform: translateY(-50%) scale(1.1); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-counter {
    position: absolute; bottom: 1.25rem; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.5);
    color: rgba(255,255,255,0.8);
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* =============================================
   CART
   ============================================= */
.cart-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 0 3rem;
}
@media (min-width: 768px) {
    .cart-layout { flex-direction: row; align-items: flex-start; }
    .cart-items-wrap { flex: 1; }
    .cart-summary { width: 340px; flex-shrink: 0; position: sticky; top: calc(var(--header-h) + 1rem); }
}
.cart-items-wrap { display: flex; flex-direction: column; gap: 0.75rem; }
.cart-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: var(--transition);
}
.cart-item:hover { border-color: var(--primary-mid); }
.cart-item-img {
    width: 90px;
    height: 70px;
    object-fit: contain;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 0.4rem;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 0.925rem; margin-bottom: 0.25rem; }
.cart-item-price { color: var(--primary); font-weight: 700; font-family: var(--font-mono); font-size: 0.95rem; }
.cart-item-controls { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.cart-summary {
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.cart-summary h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.summary-row { display: flex; justify-content: space-between; font-size: 0.875rem; padding: 0.4rem 0; color: var(--gray-600); }
.summary-total {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.875rem 0 1rem;
    border-top: 2px solid var(--primary);
    margin-top: 0.5rem;
    font-weight: 800;
    font-size: 1.1rem;
}
.summary-total span:last-child { color: var(--primary); font-family: var(--font-mono); }

/* =============================================
   CHECKOUT
   ============================================= */
.checkout-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem 0 3rem;
}
@media (min-width: 768px) {
    .checkout-layout { flex-direction: row; align-items: flex-start; }
    .checkout-form-wrap { flex: 1; }
    .checkout-summary { width: 360px; flex-shrink: 0; position: sticky; top: calc(var(--header-h) + 1rem); }
}
.checkout-form-wrap, .checkout-summary {
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.checkout-form-wrap h2, .checkout-summary h2 {
    font-size: 1rem; font-weight: 700; margin-bottom: 1.25rem;
    padding-bottom: 0.75rem; border-bottom: 1px solid var(--border);
}
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--gray-600); margin-bottom: 0.35rem; }
.form-control {
    width: 100%;
    padding: 0.6rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 0.875rem;
    background: white;
    outline: none;
    transition: var(--transition);
    color: var(--gray-800);
    -webkit-appearance: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,86,219,0.1); }
.checkout-total-wrap { border-top: 2px solid var(--primary); margin: 1rem 0; padding-top: 0.875rem; }
.total-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.05rem; }
.total-row span:last-child { color: var(--primary); font-family: var(--font-mono); }

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
    display: flex; gap: 0.4rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.page-btn {
    min-width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    font-weight: 600; font-size: 0.875rem;
    color: var(--gray-600);
    transition: var(--transition);
    padding: 0 0.5rem;
}
.page-btn:hover, .page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.empty-state p { color: var(--gray-500); margin-bottom: 1.5rem; font-size: 0.875rem; }

/* =============================================
   FOOTER
   ============================================= */
.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.65);
    padding: 3rem 0 0;
    margin-top: 2rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand .logo { margin-bottom: 0.875rem; }
.footer-brand p { font-size: 0.83rem; line-height: 1.75; opacity: 0.55; max-width: 240px; }
.social-links { display: flex; gap: 0.5rem; margin-top: 1rem; }
.social-btn {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(255,255,255,0.07);
    border-radius: var(--radius-xs);
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    transition: var(--transition);
}
.social-btn:hover { background: var(--primary); color: white; }
.footer-col h4 {
    color: white; font-weight: 700; margin-bottom: 0.875rem;
    font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em;
}
.footer-col a, .footer-col p {
    display: block; color: rgba(255,255,255,0.5);
    font-size: 0.83rem; margin-bottom: 0.45rem;
    transition: var(--transition);
}
.footer-col a:hover { color: rgba(255,255,255,0.85); padding-left: 3px; }
.footer-phone-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.83rem;
    margin-bottom: 0.45rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    width: fit-content;
}
.footer-phone-wrap:hover { color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.4); }
.footer-bottom {
    padding: 1.25rem 0;
    text-align: center;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.3);
}

/* =============================================
   TOAST
   ============================================= */
.toast-container {
    position: fixed;
    bottom: 1.25rem; right: 1.25rem;
    z-index: 9999;
    display: flex; flex-direction: column; gap: 0.5rem;
}
@media (max-width: 480px) {
    .toast-container { left: 1rem; right: 1rem; bottom: 1rem; }
}
.toast {
    background: var(--gray-900);
    color: white;
    padding: 0.8rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: var(--shadow-xl);
    display: flex; align-items: center; gap: 0.5rem;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    border-left: 4px solid var(--success);
}
.toast.error { border-left-color: var(--danger); }
@keyframes toastIn {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
@keyframes toastOut {
    to { opacity: 0; transform: translateY(8px); }
}


/* ══ SERVER CONFIGURATOR ══ */
.server-config {
    margin-bottom: 1.25rem;
    border: 1.5px solid var(--primary-mid);
    border-radius: var(--radius);
    overflow: hidden;
}
.server-config-title {
    background: linear-gradient(135deg, #0f2460, #1a56db);
    color: white;
    padding: 0.75rem 1.25rem;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.config-group {
    border-bottom: 1px solid var(--border-light);
    padding: 0.875rem 1.25rem;
    background: var(--card-bg);
}
.config-group:last-of-type { border-bottom: none; }
.config-group-label {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-600);
    margin-bottom: 0.625rem;
}
.config-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.config-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.5rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    min-width: 100px;
    text-align: center;
    background: var(--gray-50);
}
.config-option:hover { border-color: var(--primary); background: var(--primary-light); }
.config-option.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.12);
}
.config-option input[type=radio] { display: none; }
.opt-label { font-size: 0.82rem; font-weight: 600; color: var(--gray-800); line-height: 1.3; }
.opt-delta { font-size: 0.72rem; font-weight: 700; margin-top: 2px; font-family: var(--font-mono); }
.opt-delta.pos  { color: #dc2626; }
.opt-delta.neg  { color: #059669; }
.opt-delta.zero { color: var(--gray-400); font-weight: 500; }

/* Price + cart row */
.server-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--gray-50);
    border-top: 2px solid var(--primary-mid);
    gap: 1rem;
}
.server-total-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    font-family: var(--font-mono);
    letter-spacing: -0.03em;
}


/* ═══════════════════════════════
   SERVER UNIFIED SPEC TABLE
   ═══════════════════════════════ */
.srv-unified-box {
    margin-bottom: 1.5rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.srv-unified-title {
    background: var(--gray-50);
    padding: 0.7rem 1rem;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--gray-600);
    border-bottom: 1.5px solid var(--border);
}
.srv-unified-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
}
.srv-unified-table tr {
    border-bottom: 1px solid var(--border-light);
}
.srv-unified-table tr:last-child {
    border-bottom: none;
}
.srv-label {
    padding: 0.575rem 1rem;
    color: var(--gray-500);
    width: 110px;
    font-weight: 600;
    vertical-align: middle;
}
.srv-value {
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: var(--gray-800);
    vertical-align: middle;
}
.srv-row-select .srv-value {
    padding: 0.3rem 1rem;
}
.srv-select {
    width: 100%;
    max-width: 360px;
    padding: 0.45rem 0.75rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    font-family: var(--font);
    color: var(--gray-800);
    background: var(--card-bg);
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}
.srv-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
/* Cart row */
.srv-cart-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem;
    background: var(--gray-50);
    border-top: 2px solid var(--border);
    gap: 1rem;
}
.srv-price-label {
    font-size: 0.72rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}
.srv-price-val {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    font-family: var(--font-mono);
    letter-spacing: -0.03em;
}
