/* Rakentaja Outlet — Valaistus- ja sähkötarvikkeet */
:root {
    --primary: #1a2744;
    --primary-light: #2c3e6b;
    --accent: #e8735a;
    --bg: #f5f6fa;
    --card-bg: #ffffff;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --border: #dcdde1;
    --success: #27ae60;
    --accent-dark: #d4604a;
    --danger: #e74c3c;
    --danger-dark: #c0392b;
    --bg-hover: #f0f3f7;
    --bg-light: #f8f9fa;
    --bg-primary-light: #eaf2f8;
    --warning: #f39c12;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* ── USP Bar ── */
.usp-bar {
    background: var(--primary);
    color: white;
    font-size: 0.78rem;
    padding: 6px 0;
    letter-spacing: 0.01em;
}
.usp-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}
.usp-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.usp-item svg { opacity: 0.85; flex-shrink: 0; }
.usp-item a { color: white; text-decoration: none; font-weight: 600; }
.usp-item a:hover { text-decoration: underline; }
.usp-phone { font-weight: 600; }

/* ── Header ── */
.header {
    background: #ffffff;
    color: var(--text);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.logo {
    font-size: 1.5rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}
.logo-link {
    text-decoration: none;
    color: var(--accent);
    font-weight: 700;
    font-size: 1.5rem;
}
.logo-link span { color: var(--primary); }

.header-phone {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.header-phone:hover { color: var(--primary-light); }

.search-box {
    flex: 1;
    max-width: 600px;
    position: relative;
}
.search-box .search-form {
    display: flex;
}
.search-box input {
    width: 100%;
    padding: 10px 48px 10px 40px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background: #f5f6fa;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.search-box input::placeholder { color: var(--text-light); }
.search-box input:focus { background: #fff; border-color: var(--primary-light); }
.search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    pointer-events: none;
}
.search-submit {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    transition: background 0.15s;
}
.search-submit:hover { background: var(--accent-dark); }

/* ── Search Dropdown (autocomplete) ── */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border: 1px solid var(--border);
    border-top: none;
    z-index: 200;
    display: none;
    max-height: 420px;
    overflow-y: auto;
}
.search-dropdown.open { display: block; }
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.1s;
}
.search-result-item:hover,
.search-result-item.highlighted { background: #f5f6fa; }
.search-result-img { flex-shrink: 0; width: 48px; height: 36px; display: flex; align-items: center; justify-content: center; }
.search-result-img img { width: 48px; height: 36px; object-fit: contain; border-radius: 4px; }
.search-result-noimg { color: var(--text-light); }
.search-result-info { flex: 1; min-width: 0; }
.search-result-name { font-size: 0.9rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-meta { font-size: 0.78rem; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-price { font-weight: 700; color: var(--primary); white-space: nowrap; font-size: 0.9rem; }
.search-no-results { padding: 16px; text-align: center; color: var(--text-light); font-size: 0.9rem; }
.search-show-all {
    display: block;
    padding: 12px 14px;
    text-align: center;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
    transition: background 0.1s;
}
.search-show-all:hover { background: #f5f6fa; }

.cart-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: var(--radius);
    transition: background 0.15s;
    position: relative;
}
.cart-link:hover { background: var(--bg-hover); }
.cart-total-display {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--text);
    flex-shrink: 0;
}

/* ── Category Navigation Bar ── */
.cat-nav {
    background: white;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 68px;
    z-index: 99;
}
.cat-nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 0;
    white-space: nowrap;
    align-items: stretch;
}
.cat-nav-link {
    padding: 10px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.cat-nav-link:hover { color: var(--primary); border-bottom-color: var(--primary-light); }
.cat-nav-link.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ── Category Mega Menu ── */
.cat-nav-dropdown {
    position: relative;
    flex-shrink: 0;
}
.cat-nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: transparent;
    color: var(--text);
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.cat-nav-toggle:hover { color: var(--primary); border-bottom-color: var(--primary-light); }
.cat-nav-chevron { transition: transform 0.2s; }
.cat-nav-dropdown.open .cat-nav-chevron { transform: rotate(180deg); }
.cat-mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 700px;
    background: white;
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    z-index: 200;
    padding: 20px;
}
.cat-nav-dropdown.open .cat-mega-menu { display: block; }
.cat-mega-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}
.cat-mega-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 14px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.85rem;
    border-radius: 4px;
    transition: background 0.1s, color 0.1s;
    white-space: nowrap;
}
.cat-mega-item:hover { background: var(--bg-hover); color: var(--primary); }
.cat-mega-item.active { color: var(--primary); font-weight: 600; background: var(--bg-primary-light); }
.cat-mega-count {
    font-size: 0.72rem;
    color: var(--text-light);
    background: #f0f1f3;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}
.cat-mega-item.active .cat-mega-count { background: rgba(26,82,118,0.1); color: var(--primary); }

/* ── Mobile Menu ── */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}
.mobile-menu-overlay.open { display: block; }
.mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: white;
    z-index: 1000;
    overflow-y: auto;
    transition: left 0.25s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}
.mobile-menu.open { left: 0; }
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--primary);
    color: white;
}
.mobile-menu-title { font-weight: 600; font-size: 1rem; }
.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}
.mobile-menu-body { padding: 0; }
.mobile-menu-section {
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
}
.mobile-menu-link {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    transition: background 0.1s;
}
.mobile-menu-link:hover { background: var(--bg-hover); }
.mobile-menu-account { background: #f9fafb; }
.mobile-menu-info { background: var(--bg-hover); }

/* ── Toast Notifications ── */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    padding: 12px 20px;
    border-radius: var(--radius);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    pointer-events: auto;
}
.toast-show { transform: translateX(0); }
.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }

/* ── Homepage ── */
.homepage {
}

.hero-section {
    background-color: var(--primary);
    background-size: cover;
    background-position: center top;
    max-width: 1352px;
    margin: 0 auto;
    padding: 0;
    height: 0;
    padding-top: 26%;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0.02) 70%);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding: 0 180px 0 0;
    color: white;
}
.hero-title {
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 16px;
    max-width: 550px;
    text-align: right;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.hero-subtitle {
    font-size: 1.1rem;
    margin: 0 0 28px;
    opacity: 0.95;
    max-width: 450px;
    text-align: right;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.hero-cta {
    display: inline-block;
    background: var(--success);
    color: white;
    padding: 14px 32px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.hero-cta:hover { background: #1b8a3e; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.hero-cta-outline {
    background: rgba(255,255,255,0.15);
    border: 2px solid white;
    backdrop-filter: blur(4px);
}
.hero-cta-outline:hover { background: rgba(255,255,255,0.3); }

.home-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}
.home-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}
.home-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0;
}

/* Category Cards */
.category-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 24px 16px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.08);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s;
}
.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.category-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: background 0.2s;
}
.category-card:hover .category-card-icon {
    background: var(--accent);
    color: white;
}
.category-card-name {
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}
.category-card-count {
    font-size: 0.78rem;
    color: var(--text-light);
}

/* Banner grid */
.banner-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.banner-card {
    position: relative;
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: white;
    aspect-ratio: 2 / 1;
    background: var(--primary);
    box-shadow: var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s;
}
.banner-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.banner-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.banner-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #1a6fa0 100%);
}
.banner-card-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    padding: 14px 18px;
    background: rgba(26, 82, 118, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 6px;
}
.banner-card-overlay h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.3;
}
.banner-card-overlay p {
    font-size: 0.85rem;
    margin: 0;
    opacity: 0.9;
}

/* Product grid — homepage variant (4 fixed cols) */
.product-grid-home {
    grid-template-columns: repeat(4, 1fr);
}

/* Trust section */
.trust-section {
    background: white;
    padding: 48px 0;
    margin-top: 8px;
}
.trust-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 24px 16px;
    border-radius: 10px;
    background: var(--bg);
    transition: transform 0.2s;
}
.trust-item:hover { transform: translateY(-2px); }
.trust-item svg { color: white; }
.trust-item .trust-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}
.trust-item strong { font-size: 0.95rem; color: var(--text); }
.trust-item span { font-size: 0.82rem; color: var(--text-light); line-height: 1.4; }

/* ── Product Card (shared partial) ── */
.product-card {
    position: relative;
}
.product-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}
.card-add-to-cart {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.15s, transform 0.15s, background 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.product-card:hover .card-add-to-cart { opacity: 1; transform: scale(1); }
.card-add-to-cart:hover { background: var(--accent-dark); }

/* Layout */
.main-layout {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    padding: 24px;
}

/* Sidebar */
.sidebar {
    width: 260px;
    flex-shrink: 0;
}
.sidebar-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    padding: 0 0 8px 0;
    letter-spacing: 0.5px;
}
.category-list {
    list-style: none;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}
.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.category-list li a:hover { background: var(--bg-hover); }
.category-list li a.active {
    background: var(--primary);
    color: white;
}
.category-list li a.active .cat-count { background: rgba(255,255,255,0.2); color: white; }
.cat-count {
    font-size: 0.75rem;
    background: #ecf0f1;
    padding: 2px 8px;
    border-radius: 12px;
    color: var(--text-light);
}

/* ── Breadcrumbs ── */
.breadcrumbs {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 24px 0;
}
.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--text-light);
}
.breadcrumbs li::after { content: "/"; margin-left: 6px; opacity: 0.5; }
.breadcrumbs li:last-child::after { content: ""; margin: 0; }
.breadcrumbs li:last-child { color: var(--text); font-weight: 500; }
.breadcrumbs a { color: var(--text-light); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); text-decoration: underline; }

/* Content area */
.content { flex: 1; min-width: 0; }

/* Mobile sidebar toggle (hidden on desktop) */
.sidebar-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--text);
    cursor: pointer;
    font-weight: 500;
}
.sidebar-toggle.active { background: var(--primary); color: white; border-color: var(--primary); }
.sidebar-toggle.active svg { stroke: white; }

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.toolbar-info {
    font-size: 0.9rem;
    color: var(--text-light);
}
.toolbar select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.12);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}
.product-image {
    height: 200px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-light);
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.product-info {
    padding: 12px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-category {
    font-size: 0.72rem;
    color: var(--primary-light);
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}
.product-name {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 4px;
}
.star-rating-xs svg { width: 12px; height: 12px; }
.card-rating-count {
    font-size: 0.7rem;
    color: var(--text-light);
}
.product-bottom {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
}
/* Stock rows — product card */
.stock-rows {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 4px;
}
.stock-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    line-height: 1.3;
}
.stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.stock-value {
    font-weight: 600;
}
.stock-row.stock-in .stock-dot { background: var(--success); }
.stock-row.stock-in .stock-value { color: var(--success); }
.stock-row.stock-supplier .stock-dot { background: #b36b00; }
.stock-row.stock-supplier .stock-value { color: #b36b00; }
.stock-row.stock-out .stock-dot { background: #ccc; }
.stock-row.stock-out .stock-value { color: var(--text-light); }

/* Search form */
.search-form { display: flex; width: 100%; }

/* Sort form */
.sort-form { display: inline; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 24px;
    padding: 16px 0;
}
.page-link, .page-ellipsis {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.15s;
    text-decoration: none;
    color: var(--text);
    display: inline-block;
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.page-ellipsis { border-color: transparent; cursor: default; background: none; }

/* Product detail page */
.product-detail {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    max-width: 900px;
    margin: 24px auto;
}
.product-detail .breadcrumb {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 20px;
}
.product-detail .breadcrumb a { color: var(--primary-light); text-decoration: none; }
.product-detail .breadcrumb a:hover { text-decoration: underline; }
.detail-layout {
    display: flex;
    gap: 32px;
}
.detail-image {
    width: 350px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}
.detail-main-img {
    width: 100%;
    height: 350px;
    object-fit: contain;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform 0.2s ease;
}
.detail-main-img:hover {
    transform: scale(1.03);
}
.detail-image::after {
    content: '';
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3Cline x1='11' y1='8' x2='11' y2='14'/%3E%3Cline x1='8' y1='11' x2='14' y2='11'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.detail-image:hover::after {
    opacity: 1;
}
.detail-info { flex: 1; }
.detail-info h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}
.detail-info .detail-code {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
}
.detail-rating-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    margin-bottom: 12px;
}
.detail-rating-link:hover { opacity: 0.8; }
.detail-rating-count {
    font-size: 0.85rem;
    color: var(--text-light);
}
.detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}
.detail-vat {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 16px;
}
/* Availability inline styles (inside detail-specs) */
.avail-inline {
    display: flex; align-items: center; gap: 6px; line-height: 1.6;
}
.avail-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block;
}
.avail-ok .avail-dot { background: var(--success); }
.avail-supplier .avail-dot { background: #b36b00; }
.avail-none .avail-dot { background: #ccc; }
.price-unit { font-size: 0.6em; font-weight: 400; color: var(--text-light); }
.detail-description-short {
    margin: 12px 0 0;
    font-size: 0.93rem;
    line-height: 1.5;
    color: var(--text);
}
.detail-description {
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--text-light);
}
.detail-description p {
    margin: 0 0 10px;
}
.detail-description p:last-child {
    margin-bottom: 0;
}
.specs-toggle-btn {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.specs-toggle-btn:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}
.specs-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.specs-modal {
    background: #fff;
    color: #2c3e50;
    border-radius: var(--radius-lg, 12px);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.specs-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}
.specs-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
}
.specs-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0 4px;
    line-height: 1;
}
.specs-modal-close:hover {
    color: var(--text);
}
.specs-modal-body {
    padding: 16px 20px;
    overflow-y: auto;
}
.specs-modal-body h3 {
    display: none;
}
.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.spec-table tr {
    border-bottom: 1px solid #e0e0e0;
}
.spec-table td {
    padding: 6px 8px;
    vertical-align: top;
}
.spec-table td:first-child {
    width: 45%;
    color: #7f8c8d;
}
.detail-specs {
    margin-top: 16px;
    font-size: 0.9rem;
}
.detail-specs dt { font-weight: 600; float: left; width: 140px; clear: left; color: var(--text-light); padding: 4px 0; }
.detail-specs dd { margin-left: 150px; padding: 4px 0; }

/* Related products */
.related-products { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }
.related-products h2 { font-size: 1.15rem; margin-bottom: 16px; text-align: center; }
.related-scroll {
    display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    justify-content: center; flex-wrap: wrap;
}
.related-scroll::-webkit-scrollbar { height: 4px; }
.related-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.related-card {
    flex: 0 0 160px; scroll-snap-align: start;
    text-decoration: none; color: inherit;
    border: 1px solid var(--border); border-radius: 10px;
    overflow: hidden; background: #fff; transition: box-shadow 0.2s, transform 0.2s;
}
.related-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); transform: translateY(-2px); }
.related-img {
    height: 130px; display: flex; align-items: center; justify-content: center;
    background: #f8f8f8; overflow: hidden;
}
.related-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.related-img svg { color: var(--text-light); }
.related-info { padding: 10px; }
.related-name {
    font-size: 0.75rem; line-height: 1.35; font-weight: 500;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 2.1em;
}
.related-price { font-size: 0.85rem; font-weight: 700; color: var(--accent); margin-top: 6px; }
@media (max-width: 600px) {
    .related-card { flex: 0 0 140px; }
    .related-img { height: 110px; }
}
.variant-list {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.variant-list h3 { font-size: 1rem; margin-bottom: 8px; }
.variant-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.variant-table th {
    text-align: left;
    padding: 8px 12px;
    background: var(--bg-hover);
    border-bottom: 2px solid var(--border);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-light);
}
.variant-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}
.variant-table tr:hover { background: var(--bg-light); }
.variant-table .in-stock { color: var(--success); font-weight: 600; }
.variant-table .out-of-stock { color: var(--danger); }

/* Loading */
.loading {
    text-align: center;
    padding: 48px;
    color: var(--text-light);
}
.spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Back link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.back-link:hover { text-decoration: underline; }

/* Cart link in header */
.cart-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text);
    text-decoration: none;
    position: relative;
    padding: 6px;
    border-radius: var(--radius);
    transition: background 0.15s;
}
.cart-link:hover { background: var(--bg-hover); }
.cart-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: var(--accent);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
@keyframes badge-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}
.cart-badge-pulse { animation: badge-pulse 0.4s ease; }

/* Cart page */
.cart-page {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 24px;
}
.cart-page h1 {
    font-size: 1.5rem;
    margin-bottom: 24px;
}
.cart-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}
.cart-items { flex: 1; min-width: 0; }
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.cart-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    background: var(--bg-light);
    border-bottom: 2px solid var(--border);
}
.cart-row td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.cart-product-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cart-thumb {
    border-radius: 4px;
    object-fit: cover;
}
.cart-product-name {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}
.cart-product-name:hover { color: var(--primary); }
.cart-product-code {
    font-size: 0.78rem;
    color: var(--text-light);
}
.cart-price, .cart-line-total {
    font-weight: 600;
    white-space: nowrap;
}
.qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    width: fit-content;
}
.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-light);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.qty-btn:hover { background: #e8e8e8; }
.qty-input {
    width: 42px;
    height: 32px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 0.9rem;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.remove-btn:hover { color: var(--danger); background: #fef0f0 /* danger-bg */; }

/* Cart summary */
.cart-summary {
    width: 320px;
    flex-shrink: 0;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    position: sticky;
    top: 80px;
}
.cart-summary h2 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 8px 0;
    color: var(--text-light);
}
.summary-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    border-top: 2px solid var(--border);
    margin-top: 8px;
    padding-top: 12px;
}
.checkout-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    background: var(--accent);
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}
.checkout-btn:hover { background: var(--accent-dark); }
.continue-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--primary);
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: background 0.15s;
}
.continue-btn:hover { background: var(--bg-hover); }

/* Empty cart */
.cart-empty {
    text-align: center;
    padding: 64px 24px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.cart-empty svg { color: var(--text-light); margin-bottom: 16px; }
.cart-empty p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 20px;
}
.cart-empty .continue-btn {
    display: inline-block;
    width: auto;
    padding: 12px 32px;
}

/* Add to cart button (product pages) */
.add-to-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    margin-top: 16px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.add-to-cart-btn:hover { background: var(--accent-dark); }
.add-to-cart-btn:disabled { background: #bdc3c7; cursor: not-allowed; }
.add-to-cart-btn svg { flex-shrink: 0; }

/* Header user area */
.header-user {
    display: flex;
    align-items: center;
    gap: 4px;
}
.user-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    transition: background 0.15s;
}
.user-link:hover { background: var(--bg-hover); }
.user-name { white-space: nowrap; }
.logout-link {
    display: flex;
    align-items: center;
    color: var(--text);
    opacity: 0.6;
    padding: 6px;
    border-radius: var(--radius);
    transition: opacity 0.15s, background 0.15s;
}
.logout-link:hover { opacity: 1; background: var(--bg-hover); }

/* Auth pages */
.auth-page {
    display: flex;
    justify-content: center;
    padding: 40px 24px;
}
.auth-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    max-width: 520px;
    width: 100%;
}
.auth-card h1 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--primary);
}
.auth-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 24px;
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}
.form-group label small {
    font-weight: 400;
    color: var(--text-light);
}
.form-input,
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
    height: 42px;
}
.form-group textarea,
textarea.form-input {
    height: auto;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
}
.form-group.has-error input { border-color: var(--danger); }
.form-error {
    font-size: 0.8rem;
    color: var(--danger);
}
.form-row {
    display: flex;
    gap: 12px;
}
.form-row-between {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
}
.forgot-link {
    font-size: 0.85rem;
    color: var(--primary-light);
    text-decoration: none;
}
.forgot-link:hover { text-decoration: underline; }
.auth-btn {
    padding: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 4px;
}
.auth-btn:hover { background: var(--accent-dark); }
.auth-link {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 20px;
    color: var(--text-light);
}
.auth-link a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
}
.auth-link a:hover { text-decoration: underline; }
.auth-link-block {
    display: block;
    text-align: center;
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.9rem;
}
.auth-link-block:hover { text-decoration: underline; }

/* Flash messages */
.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.flash-success { background: #e8f8f0; color: #27ae60; border: 1px solid #27ae60; }
.flash-error { background: #fef0f0 /* danger-bg */; color: var(--danger); border: 1px solid var(--danger); }
.flash-info { background: var(--bg-primary-light); color: #1a5276; border: 1px solid #2980b9; }

/* Checkout */
.checkout-page {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 24px;
}
.checkout-steps {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 16px;
}
.checkout-steps .step {
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
    position: relative;
    padding-bottom: 12px;
}
.checkout-steps .step.active {
    color: var(--primary);
}
.checkout-steps .step.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}
.checkout-steps .step.done { color: var(--success); }
.checkout-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}
.checkout-main { flex: 1; min-width: 0; }
.checkout-main h1 {
    font-size: 1.3rem;
    margin-bottom: 24px;
}
.checkout-section-title {
    font-size: 1rem;
    margin: 24px 0 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--primary);
}
.checkout-sidebar {
    width: 320px;
    flex-shrink: 0;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    position: sticky;
    top: 80px;
}
.checkout-sidebar h2 {
    font-size: 1rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.checkout-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.85rem;
}
.checkout-item-name { color: var(--text); }
.checkout-item-name small { color: var(--text-light); }
.checkout-item-price { font-weight: 600; white-space: nowrap; }
.checkout-sidebar-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.85rem;
    color: var(--text-light);
}
.checkout-sidebar-total {
    display: flex;
    justify-content: space-between;
    padding: 12px 0 0;
    margin-top: 8px;
    border-top: 2px solid var(--border);
    font-size: 1.1rem;
    font-weight: 700;
}
.checkout-next-btn, .checkout-pay-btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}
.checkout-next-btn:hover, .checkout-pay-btn:hover { background: var(--accent-dark); }
.checkout-back-btn {
    display: inline-block;
    padding: 14px 24px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: background 0.15s;
}
.checkout-back-btn:hover { background: var(--bg-hover); }
.checkout-nav {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
}

/* Shipping methods */
.shipping-methods { display: flex; flex-direction: column; gap: 8px; }
.shipping-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s;
}
.shipping-option:hover { border-color: var(--primary-light); }
.shipping-option.selected, .shipping-option:has(input:checked) { border-color: var(--primary); background: var(--bg-primary-light); }
.shipping-option input[type="radio"] { flex-shrink: 0; }
.shipping-option-info { flex: 1; }
.shipping-option-info strong { display: block; font-size: 0.95rem; }
.shipping-desc { font-size: 0.82rem; color: var(--text-light); }
.shipping-option-price { font-weight: 700; font-size: 1rem; white-space: nowrap; }
.free-shipping { color: var(--success); }

/* Payment methods */
.payment-methods { display: flex; flex-direction: column; gap: 8px; }
.payment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s;
}
.payment-option:hover { border-color: var(--primary-light); }
.payment-option.selected, .payment-option:has(input:checked) { border-color: var(--primary); background: var(--bg-primary-light); }
.payment-option input[type="radio"] { flex-shrink: 0; }
.payment-option-info strong { display: block; font-size: 0.95rem; }
.payment-option-info span { font-size: 0.82rem; color: var(--text-light); }

/* Checkout review */
.checkout-review {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.review-section {
    background: var(--bg-light);
    padding: 16px;
    border-radius: var(--radius);
    position: relative;
}
.review-section h3 {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 8px;
}
.review-section p { font-size: 0.9rem; margin: 2px 0; }
.review-edit {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.8rem;
    color: var(--primary-light);
    text-decoration: none;
}
.review-edit:hover { text-decoration: underline; }
.review-price { font-weight: 600; }

/* Confirmation */
.confirmation-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 48px 40px;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}
.confirmation-icon { margin-bottom: 16px; }
.confirmation-card h1 {
    font-size: 1.5rem;
    color: #27ae60;
    margin-bottom: 8px;
}
.confirmation-number { font-size: 1.1rem; margin-bottom: 4px; }
.confirmation-email { font-size: 0.9rem; color: var(--text-light); margin-bottom: 32px; }
.confirmation-details { text-align: left; }
.confirmation-section { margin-bottom: 20px; }
.confirmation-section h3 {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 8px;
}
.confirmation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.confirmation-table th {
    text-align: left;
    padding: 8px;
    background: var(--bg-light);
    border-bottom: 2px solid var(--border);
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-light);
}
.confirmation-table td { padding: 8px; border-bottom: 1px solid var(--border); }
.confirmation-table tfoot td { border-bottom: none; font-size: 0.85rem; color: var(--text-light); }
.confirmation-total td { font-size: 1.05rem !important; font-weight: 700; color: var(--text) !important; border-top: 2px solid var(--border); }
.confirmation-addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.confirmation-actions { text-align: center; margin-top: 32px; }
.order-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}
.order-status-paid { background: #e8f8f0; color: var(--success); }
.order-status-processing { background: var(--bg-primary-light); color: var(--primary); }
.order-status-shipped { background: #fef9e7; color: var(--warning); }
.order-status-delivered { background: #e8f8f0; color: var(--success); }
.order-status-pending { background: #fef0f0 /* danger-bg */; color: var(--danger); }

/* Footer */
.site-footer {
    background: var(--primary);
    color: #bdc3c7;
    margin-top: 48px;
    border-top: 4px solid var(--accent);
}
.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
}
.footer-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}
.footer-logo-accent { color: var(--accent); }
.footer-col p {
    font-size: 0.85rem;
    line-height: 1.6;
}
.footer-col h4 {
    color: white;
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.footer-col ul {
    list-style: none;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s;
}
.footer-col ul li a:hover { color: white; }
.footer-address { margin-top: 12px; font-size: 0.85rem; }
.footer-hours { font-size: 0.8rem; color: #95a5a6; margin-top: 4px; }
.footer-col ul li a svg { vertical-align: -2px; margin-right: 4px; }
.footer-payment-methods { font-size: 0.85rem; }
.footer-payment-row { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.footer-payment-text { font-size: 0.8rem; margin-bottom: 4px; }
.footer-payment-provider { font-size: 0.75rem; color: #95a5a6; }
.footer-payments {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-payments-label {
    font-size: 0.8rem;
    color: #95a5a6;
    white-space: nowrap;
}
.footer-payments-logos {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.payment-logo {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    letter-spacing: 0.3px;
}
.footer-bottom {
    background: var(--primary);
    display: flex;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8rem;
    max-width: 1400px;
    margin: 0 auto;
}
.footer-company {
    color: #95a5a6;
}

/* Static pages */
.static-page {
    max-width: 800px;
    margin: 32px auto;
    padding: 40px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.static-page h1 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent);
}
.static-page h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 32px 0 12px;
    padding-bottom: 6px;
    color: var(--primary);
    border-bottom: 1px solid var(--border);
}
.static-page h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 24px 0 8px;
    color: var(--text);
}
.static-page p {
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 16px;
    color: var(--text-muted);
}
.static-page ul, .static-page ol {
    margin: 12px 0 20px 24px;
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-muted);
}
.static-page li {
    margin-bottom: 6px;
}
.static-page a {
    color: var(--accent);
    text-decoration: underline;
}
.static-page hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 16px 0;
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: white;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
.cookie-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.cookie-inner p {
    font-size: 0.9rem;
    margin: 0;
}
.cookie-inner p a {
    color: var(--accent);
    text-decoration: underline;
}
.cookie-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.cookie-accept {
    background: var(--accent);
    color: white;
}
.cookie-accept:hover { background: var(--accent-dark); }
.cookie-decline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255,255,255,0.5);
}
.cookie-decline:hover { background: rgba(255,255,255,0.1); border-color: white; }

/* Orders page */
.orders-page {
    max-width: 900px;
    margin: 24px auto;
    padding: 0 24px;
}
.orders-page h1 {
    font-size: 1.5rem;
    margin-bottom: 24px;
}
.orders-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.orders-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    background: var(--bg-light);
    border-bottom: 2px solid var(--border);
}
.orders-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.orders-table tbody tr:hover { background: var(--bg-light); }
.orders-view-link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}
.orders-view-link:hover { text-decoration: underline; }

/* Order detail card */
.order-detail-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
}
.order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.order-detail-header h1 { font-size: 1.3rem; }
.order-date { color: var(--text-light); font-size: 0.85rem; }
.tracking-info {
    padding: 12px 16px;
    background: var(--bg-primary-light);
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.status-timeline { display: flex; flex-direction: column; gap: 8px; }
.timeline-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
}
.timeline-date { color: var(--text-light); min-width: 120px; }
.timeline-note { color: var(--text-light); font-style: italic; }
.order-status-cancelled { background: #fef0f0 /* danger-bg */; color: var(--danger); }

/* PO (purchase order) status badges */
.po-status-draft { background: #f0f0f0; color: var(--text-light); }
.po-status-ordered { background: var(--bg-primary-light); color: var(--primary); }
.po-status-confirmed { background: #e8f0fe; color: #1a73e8; }
.po-status-shipped { background: #fef9e7; color: var(--warning); }
.po-status-partial { background: #fff3e0; color: #e65100; }
.po-status-received { background: #e8f8f0; color: var(--success); }
.po-status-cancelled { background: #fef0f0; color: var(--danger); }

/* PO create form — search autocomplete */
.po-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}
.po-search-result-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
}
.po-search-result-item:last-child { border-bottom: none; }
.po-search-result-item:hover { background: var(--bg-light); }

/* PO loading overlay */
.po-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.po-loading-content {
    background: white;
    border-radius: 12px;
    padding: 40px 48px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.po-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto;
    animation: po-spin 0.8s linear infinite;
}
@keyframes po-spin {
    to { transform: rotate(360deg); }
}
.margin-btn {
    width: 24px; height: 24px; border-radius: 4px; border: 1px solid var(--border);
    background: var(--bg-light); cursor: pointer; font-size: 1rem; line-height: 1;
    display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.margin-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Admin panel */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 64px);
}
.admin-sidebar {
    width: 240px;
    background: #2c3e50;
    color: white;
    flex-shrink: 0;
    padding: 24px 0;
}
.admin-sidebar h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.5);
    padding: 0 20px;
    margin-bottom: 12px;
}
.admin-nav { list-style: none; }
.admin-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.15s;
}
.admin-nav li a:hover { background: rgba(255,255,255,0.1); color: white; }
.admin-nav li a.active { background: rgba(255,255,255,0.15); color: white; font-weight: 600; }
.admin-content {
    flex: 1;
    padding: 24px 32px;
    min-width: 0;
    background: var(--bg);
}
.admin-content h1 {
    font-size: 1.4rem;
    margin-bottom: 24px;
}

/* Admin dashboard cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.dashboard-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
}
.dashboard-card-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.dashboard-card-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}
.dashboard-card-sub {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* Admin tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.admin-table thead th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    background: var(--bg-light);
    border-bottom: 2px solid var(--border);
}
.admin-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.admin-table tbody tr:hover { background: var(--bg-light); }

/* Admin toolbar */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.admin-search {
    display: flex;
    gap: 8px;
}
.admin-search input {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    min-width: 250px;
}
.admin-search button, .admin-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}
.admin-search button:hover, .admin-btn:hover { background: var(--primary-light); }
.admin-btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}
.admin-btn-success { background: var(--success); }
.admin-btn-success:hover { background: #219a52; }
.admin-btn-danger { background: var(--danger); }
.admin-btn-danger:hover { background: var(--danger-dark); }
.admin-btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--border);
}
.admin-btn-secondary:hover { background: var(--bg-hover); }
.btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.15s, box-shadow 0.15s;
    line-height: 1.4;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { background: var(--primary-light); }
.btn-secondary {
    background: var(--bg-light);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-hover); }
.btn-danger {
    background: var(--danger);
    color: white;
    border: 1px solid var(--danger);
}
.btn-danger:hover { opacity: 0.85; }
.btn-small {
    padding: 4px 10px;
    font-size: 0.8rem;
}
.admin-filter select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.85rem;
}

/* Admin order detail */
.admin-order-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}
.admin-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
}
.admin-card h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.admin-card p { font-size: 0.9rem; margin: 4px 0; }
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}
.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.admin-form-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}
.admin-form-inline select, .admin-form-inline input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

/* Lightbox */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.lightbox-overlay.active { display: flex; }
.lightbox-popup {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    cursor: default;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox-popup img {
    max-width: 85vw;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}
.lightbox-close {
    position: absolute;
    top: -12px; right: -12px;
    background: var(--primary);
    border: 2px solid #fff;
    color: #fff;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.lightbox-close:hover { background: var(--primary-dark); }
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.lightbox-nav:hover { background: var(--primary-dark); }
.lightbox-prev { left: -18px; }
.lightbox-next { right: -18px; }
.lightbox-counter {
    margin-top: 8px;
    color: var(--text-light);
    font-size: 0.8rem;
    display: none;
}

/* Thumbnail gallery */
.detail-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.detail-thumbnails img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.15s;
}
.detail-thumbnails img.active,
.detail-thumbnails img:hover {
    border-color: var(--primary);
}

/* Product edit form */
.product-edit-form { max-width: 700px; }
.product-edit-form .form-group { margin-bottom: 16px; }
.product-edit-form textarea { min-height: 120px; resize: vertical; }

/* Responsive */
/* ── Responsive: Tablet ── */
@media (max-width: 1024px) {
    .header-phone { display: none; }
    .usp-inner { gap: 16px; font-size: 0.72rem; }
    .cat-nav-link { padding: 8px 10px; font-size: 0.78rem; }
    .cat-mega-menu { min-width: 500px; }
    .cat-mega-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
    .hero-section { height: auto; padding-top: 42%; }
    .hero-title { font-size: 1.8rem; }
    .product-grid-home { grid-template-columns: repeat(3, 1fr); }
    .trust-inner { grid-template-columns: repeat(2, 1fr); }
    .category-cards { grid-template-columns: repeat(3, 1fr); }
}

/* ── Responsive: Mobile ── */
@media (max-width: 768px) {
    .usp-bar { font-size: 0.7rem; padding: 5px 0; }
    .usp-inner { gap: 10px; }
    .usp-item:nth-child(2),
    .usp-item:nth-child(3) { display: none; }
    .mobile-menu-toggle { display: flex; }
    .header-inner { flex-wrap: wrap; gap: 10px; padding: 8px 12px; }
    .header-phone { display: none; }
    .header-user { display: none; }
    .search-box { order: 10; width: 100%; max-width: none; flex-basis: 100%; }
    .cat-nav { display: none; }
    .cart-total-display { display: none !important; }
    .logo img { height: 36px !important; }
    .main-layout { flex-direction: column; padding: 12px; }
    .sidebar { width: 100%; display: none; }
    .sidebar.open { display: block; }
    .sidebar-toggle { display: inline-flex; }
    .category-list { max-height: none; }
    .breadcrumbs { padding: 8px 12px 0; }
    .breadcrumbs ol { font-size: 0.78rem; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    .detail-layout { flex-direction: column; }
    .detail-image { width: 100%; }
    .detail-main-img { height: 250px; }
    .product-detail { margin: 12px; padding: 20px; }
    .cart-layout { flex-direction: column; }
    .cart-summary { width: 100%; position: static; }
    .cart-th-price, .cart-th-total { display: none; }
    .cart-price, .cart-line-total { display: none; }
    .footer-inner { grid-template-columns: 1fr; gap: 24px; }
    .cookie-inner { flex-direction: column; text-align: center; }
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; padding: 12px 0; }
    .admin-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px; }
    .admin-nav li a { padding: 8px 12px; font-size: 0.8rem; }
    .admin-content { padding: 16px; }
    .admin-order-grid { grid-template-columns: 1fr; }
    .orders-page { padding: 0 12px; }
    .order-detail-card { padding: 16px; }
    .order-detail-header { flex-direction: column; gap: 8px; }
    .confirmation-addresses { grid-template-columns: 1fr; }
    .review-list { gap: 12px; }
    .review-card { padding: 16px; }
    .toast-container { right: 12px; left: 12px; top: 60px; }
    .toast { font-size: 0.85rem; }
    .hero-section { height: auto; padding-top: 50%; }
    .hero-overlay { padding: 20px 16px; justify-content: center; align-items: center; }
    .hero-title { font-size: 1.5rem; }
    .hero-subtitle { font-size: 0.9rem; }
    .hero-buttons { flex-direction: column; gap: 8px; }
    .hero-cta { padding: 12px 24px; font-size: 0.9rem; width: 100%; text-align: center; }
    .home-section { padding: 24px 12px; }
    .banner-grid { grid-template-columns: 1fr; }
    .product-grid-home { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .trust-inner { grid-template-columns: 1fr 1fr; gap: 16px; }
    .trust-item svg { width: 24px; height: 24px; }
    .trust-item .trust-icon { width: 48px; height: 48px; }
    .category-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .category-card { padding: 16px 12px; }
    .category-card-icon { width: 48px; height: 48px; }
    .card-add-to-cart { opacity: 1; transform: scale(1); }
}

/* ── Reviews ────────────────────────────────────────── */

.reviews-section {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.review-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.review-summary h2 { font-size: 1.2rem; margin: 0; }
.review-summary-stars {
    display: flex;
    align-items: center;
    gap: 8px;
}
.review-avg {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

/* Star display */
.star-rating {
    display: inline-flex;
    gap: 2px;
}
.star-rating .star {
    fill: #dcdde1;
    stroke: none;
}
.star-rating .star.filled {
    fill: var(--warning);
}
.star-rating .star.half {
    fill: url(#half-star-grad);
}
.star-rating-sm .star { width: 16px; height: 16px; }

/* Star input (form) */
.star-input {
    display: inline-flex;
    gap: 4px;
}
.star-input .star-btn {
    fill: #dcdde1;
    stroke: none;
    cursor: pointer;
    transition: fill 0.1s;
}
.star-input .star-btn:hover,
.star-input .star-btn.filled {
    fill: var(--warning);
}

/* Review write button */
.review-write-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
    margin-bottom: 20px;
}
.review-write-btn:hover { background: var(--accent-dark); }

.review-note {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 20px;
}
.review-note a { color: var(--primary-light); }
.review-empty {
    font-size: 0.9rem;
    color: var(--text-light);
    padding: 24px 0;
}

/* Review list */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.review-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.review-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success);
    background: #e8f8f0;
    padding: 3px 8px;
    border-radius: 12px;
}
.review-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 6px 0;
}
.review-content {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.6;
    margin: 0 0 8px 0;
}
.review-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Review form page */
.review-form-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px;
}

/* Admin action buttons */
.admin-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    color: var(--text-light);
    transition: background 0.15s, color 0.15s;
}
.admin-action-btn:hover { background: #f5f6fa; color: var(--text); }

/* ── Admin Image Search Popup ─────────────────────── */

.img-search-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.img-search-overlay.active { display: flex; }

.img-search-popup {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
    max-width: 1100px;
    width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.img-search-close {
    position: absolute;
    top: -10px; right: -10px;
    background: var(--primary);
    border: 2px solid #fff;
    color: #fff;
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.img-search-close:hover { background: var(--danger); }

.img-search-header {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.img-search-header input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
}
.img-search-header input:focus {
    outline: none;
    border-color: var(--primary);
}
.img-search-header button {
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.img-search-header button:hover { background: var(--primary-light); }

#img-search-results {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.img-search-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 4px;
}

.img-search-item {
    position: relative;
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #f5f6fa;
    aspect-ratio: 1;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.img-search-item:hover {
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.img-search-item.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26,82,118,0.3);
}
.img-search-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #fff;
}
.img-search-check {
    display: none;
    position: absolute;
    top: 6px; right: 6px;
    width: 24px; height: 24px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}
.img-search-item.selected .img-search-check { display: flex; }

.img-search-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    justify-content: flex-end;
    align-items: center;
}
.img-search-actions .status-text {
    margin-right: auto;
    font-size: 0.85rem;
    color: var(--text-light);
}

.img-search-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 0.9rem;
    gap: 8px;
}
.img-search-spinner::before {
    content: "";
    width: 20px; height: 20px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.img-search-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ── Drop Zone ────────────────────────────────────── */

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    color: var(--text-light);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.drop-zone:hover {
    border-color: var(--primary-light);
    background: rgba(26,82,118,0.03);
}
.drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(26,82,118,0.06);
    color: var(--primary);
}
.drop-zone-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.5;
}
.drop-zone-text {
    font-size: 0.85rem;
}
.drop-zone input[type="file"] {
    display: none;
}

@media (max-width: 768px) {
    .img-search-grid { grid-template-columns: repeat(2, 1fr); }
    .img-search-popup { padding: 16px; }
}
