﻿/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
:root {
    --primary: #D32F2F;
    --primary-dark: #B71C1C;
    --primary-light: #E53935;
    --text-dark: #1a1a1a;
    --text-gray: #666;
    --text-light: #999;
    --bg-white: #fff;
    --bg-gray: #f8f8f8;
    --bg-light: #fafafa;
    --border: #e5e5e5;
    --success: #16a34a;
    --font-main: 'Cairo', 'Tahoma', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
}
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
    direction: rtl;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
.container { max-width: 100%; margin: 0 auto; padding: 0 20px; }
@media (min-width: 1200px) {
    html, body { min-width: 1200px; }
    .container { max-width: 1600px; padding: 0 32px; }
}

/* Splash Screen */
.splash {
    display: none;
}

/* Top Bar */
.top-bar {
    background: #D32F2F;
    color: #fff;
    text-align: center;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Header */
.header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    max-width: 1600px;
    margin: 0 auto;
}
.header-right {
    display: flex;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo-img {
    max-height: 42px;
    width: auto;
}
.logo-text {
    font-size: 22px;
    font-weight: 800;
    color: #D32F2F;
}

/* Desktop only: enlarge logo image without enlarging the header */
@media (min-width: 1200px) {
    .logo-img {
        transform: scale(2.7) translateY(9px);
        transform-origin: left center;
    }
}

/* Nest Hub Max (1280x800): shrink search box so the logo stays clear */
@media (min-width: 1201px) and (max-width: 1280px) {
    .search-bar-wrapper {
        max-width: 860px;
    }
    .logo-img {
        transform: scale(2.2) translateY(8px);
        transform-origin: left center;
    }
}

/* Desktop only: cart icon sits beside the search box */
.cart-search { display: none; }
@media (min-width: 1200px) {
    .cart-top { display: none; }
    .cart-search {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: center;
    }
    .search-bar-wrapper {
        display: flex;
        align-items: center;
        gap: 16px;
    }
    .search-bar-wrapper .search-suggest-box {
        flex: 1;
    }
    .search-bar-wrapper .search-form input {
        padding: 12px 14px;
    }
}
.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.header-icon {
    font-size: 22px;
    padding: 6px;
    position: relative;
    color: #000;
    transition: opacity 0.2s;
}
.header-icon i {
    color: transparent;
    -webkit-text-stroke: 2.5px #002D4C;
}
.header-icon:hover { opacity: 0.7; }
.cart-icon .cart-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: #D32F2F;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Search Bar */
.search-bar-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 12px;
}
.search-form {
    display: flex;
    align-items: stretch;
    border-radius: 8px;
    border: 1.5px solid #e0e0e0;
    overflow: hidden;
    transition: all 0.2s;
}
.search-form:focus-within {
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211,47,47,0.12);
}
.search-form input {
    flex: 1;
    padding: 11px 14px;
    border: none;
    background: #f2f2f2;
    font-size: 14px;
    font-family: var(--font-main);
    outline: none;
    text-align: right;
}
.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    min-width: 46px;
    padding: 0;
    border: none;
    background: #d32f2f;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}
.search-btn:hover {
    background: #b71c1c;
}
.search-btn svg {
    display: block;
}

/* Live Search Suggestions */
.search-suggest-box {
    position: relative;
}
.search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
    overflow: hidden;
    z-index: 1000;
    max-height: 420px;
    overflow-y: auto;
    animation: suggestIn 0.14s ease;
}
@keyframes suggestIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.suggest-item:hover,
.suggest-item.active {
    background: #f7f7f9;
}
.suggest-item + .suggest-item {
    border-top: 1px solid #f0f0f2;
}
.s-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: #f2f2f2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23ccc'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3C/svg%3E") center/24px no-repeat;
    background-size: 24px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid #eee;
}
.s-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.s-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.s-prices {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.s-price {
    font-size: 13px;
    font-weight: 800;
}
.s-price.s-new { color: #d32f2f; }
.s-price.s-old {
    color: #999;
    text-decoration: line-through;
    font-weight: 600;
    font-size: 12px;
}
.s-go {
    color: #bbb;
    font-size: 22px;
    flex-shrink: 0;
}
.suggest-footer {
    display: block;
    padding: 11px 14px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #d32f2f;
    text-decoration: none;
    background: #fafafa;
    border-top: 1px solid #eee;
}
.suggest-footer:hover { background: #f4f4f6; }
.suggest-empty {
    padding: 18px 14px;
    text-align: center;
    color: #999;
    font-size: 13px;
    border-bottom: 1px solid #eee;
}

/* Hamburger Menu */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    box-sizing: border-box;
    width: auto;
    height: auto;
}
.mobile-toggle .bar {
    display: none;
}
.mobile-toggle::before {
    content: "";
    display: block;
    width: 24px;
    height: 20px;
    background-image: linear-gradient(#002D4C, #002D4C),
                      linear-gradient(#002D4C, #002D4C),
                      linear-gradient(#002D4C, #002D4C);
    background-size: 24px 4px;
    background-position: 0 0, 0 8px, 0 16px;
    background-repeat: no-repeat;
}

/* Nav */
.nav {
    border-top: 1px solid var(--border);
    background: var(--bg-white);
}
.nav-inner {
    display: flex;
    gap: 30px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}
.nav-inner a {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    transition: color 0.2s;
    position: relative;
    white-space: nowrap;
}
.nav-inner a:hover, .nav-inner a.active { color: var(--primary); }
.nav-inner a::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}
.nav-inner a:hover::after, .nav-inner a.active::after { width: 100%; }

/* Category dropdown (desktop) */
.nav-link-group { position: relative; }
.nav-main-link { display: inline-flex; align-items: center; gap: 6px; }
.nav-caret {
    font-size: 9px;
    color: #999;
    transition: transform 0.25s;
    margin-top: 2px;
}
.nav-link-group.open .nav-caret { transform: rotate(180deg); color: var(--primary); }
.nav-submenu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.13);
    padding: 8px;
    min-width: 220px;
    flex-direction: column;
    z-index: 60;
}
.nav-link-group.open .nav-submenu { display: flex; animation: navDropIn 0.18s ease; }
@keyframes navDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.nav-submenu .nav-sub-link {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    transition: background 0.2s, color 0.2s;
}
.nav-submenu .nav-sub-link:hover { background: #faf5f5; color: var(--primary); }
.nav-submenu .nav-sub-all {
    color: var(--primary);
    font-weight: 800;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
    border-radius: 8px 8px 0 0;
}

/* ===== Promo Hero Banner ===== */
.hero {
    position: relative;
    background: #fff;
    padding: 24px 0;
}
.hero-simple .hero-banner {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 1;
    overflow: hidden;
    border-radius: 0;
    box-shadow: none;
}
.hero-simple .hero-banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
/* Hero banner: rectangle only */
.hero-simple .container {
    padding: 0 20px;
}
@media (max-width: 900px) {
    .hero-simple .hero-banner { aspect-ratio: 16 / 6; }
}
/* Mobile: white edges around banner (keep site-white margins), shorter height, smaller trust icons */
@media (max-width: 640px) {
    .hero.hero-simple { padding: 0; }
    .hero-simple .container { padding: 0 16px; max-width: 100%; }
    .hero-simple .hero-banner { border-radius: 0; aspect-ratio: 21 / 9; }
    .hero-simple .hero-banner-img { border-radius: 0; }
}
/* Fallback content (only when no banner image is set) */
.hero-text {
    max-width: 100%;
    margin: 0;
    padding: 60px 0;
    text-align: right;
}
.hero-text h1 {
    font-size: 46px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
    color: #0f2a5c;
}
.hero-text p {
    font-size: 18px;
    color: #546b8a;
    margin-bottom: 34px;
    line-height: 1.9;
    max-width: 560px;
}
.hero .btn.shop-now {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #e53935;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 18px;
    box-shadow: 0 12px 26px rgba(229,57,53,0.35);
}
.hero .btn.shop-now:hover {
    background: #c62828;
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(229,57,53,0.4);
}
.hero .btn.shop-now svg { width: 20px; height: 20px; }
/* Trust badges bar */
.hero-trust {
    position: relative;
    z-index: 3;
    background: #B71C1C;
    border-radius: 18px 18px 0 0;
    padding: 16px 24px;
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
}
.trust-item .trust-ico {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: none;
    box-shadow: none;
}
.trust-item .trust-ico i { font-size: 32px; }
.trust-item strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
}
.trust-item span {
    font-size: 12px;
    color: rgba(255,255,255,0.75);
}
@media (max-width: 900px) and (min-width: 641px) {
    .hero-trust { grid-template-columns: repeat(2, 1fr); margin-top: 24px; }
}
@media (max-width: 480px) {
    .hero-text h1 { font-size: 32px; }
}

/* Mobile (<=640px): clean, readable trust bar */
@media (max-width: 640px) {
    .hero-trust {
        width: 100%;
        border-radius: 0;
        margin-top: 16px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px 6px;
        padding: 8px 8px;
    }
    .trust-item {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 4px;
        text-align: center;
        min-width: 0;
    }
    .trust-item .trust-ico {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
    }
    .trust-item .trust-ico i { font-size: 18px; }
    .trust-item strong {
        font-size: 10px;
        line-height: 1.1;
        white-space: normal;
        max-width: 100%;
    }
    .trust-item span {
        font-size: 8px;
        line-height: 1.1;
        max-width: 100%;
    }
    .trust-item > div:last-child {
        min-width: 0;
        overflow-wrap: break-word;
        word-break: break-word;
    }
}
@media (max-width: 480px) {
    .hero-trust { gap: 8px 6px; padding: 8px 6px; }
    .trust-item .trust-ico { width: 26px; height: 26px; }
    .trust-item .trust-ico i { font-size: 16px; }
    .trust-item strong { font-size: 10px; }
    .trust-item span { font-size: 8px; }
}
@media (max-width: 360px) {
    .hero-trust { gap: 8px 4px; padding: 8px 5px; }
    .trust-item .trust-ico { width: 24px; height: 24px; }
    .trust-item .trust-ico i { font-size: 15px; }
    .trust-item { gap: 4px; }
    .trust-item strong { font-size: 10px; }
    .trust-item span { font-size: 8px; }
}

/* Categories Scroll - Large Cards */
.categories-scroll-section {
    padding: 24px 0 10px;
    background: var(--bg-white);
}
.categories-scroll-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.categories-scroll {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    flex: 1;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }
.category-scroll-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-width: 140px;
    aspect-ratio: 1 / 1;
    text-decoration: none;
    border-radius: 16px;
    background: var(--bg-gray);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
}
.category-scroll-item:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(211,47,47,0.2);
}
.category-scroll-img-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}
.category-scroll-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.category-scroll-icon {
    font-size: 36px;
}
.category-scroll-item span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 10px 9px;
    text-align: center;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.3px;
    white-space: nowrap;
    background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0.32) 55%, transparent);
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
}
.category-scroll-item:hover span {
    color: #fff;
}
.scroll-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-dark);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.scroll-arrow:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Desktop only: categories show 4 per row */
@media (min-width: 641px) {
    .scroll-arrow { display: none; }
    .categories-scroll {
        overflow: visible;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        padding: 10px 0;
    }
    .category-scroll-item {
        min-width: 0;
        width: 100%;
        aspect-ratio: 1 / 1;
    }
    .category-scroll-item span {
        font-size: 14px;
        white-space: normal;
        line-height: 1.4;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 36px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-main);
}
.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-sm { padding: 10px 20px; font-size: 14px; }

.hero-image { display: flex; justify-content: center; }
.hero-image img {
    max-height: 400px;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
}

/* Sections */
.section-header { text-align: center; margin-bottom: 35px; }
.section-header h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}
.section-header p { color: var(--text-gray); font-size: 15px; }
.section { padding: 55px 0; }
.section:nth-child(even) { background: var(--bg-gray); }

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 22px;
}
/* Product slider (latest & featured) */
.product-slider { position: relative; }
.product-slider-viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.product-slider-viewport::-webkit-scrollbar { display: none; }
.product-slider-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 66px) / 4);
    gap: 22px;
    align-items: stretch;
}
@media (min-width: 1200px) and (max-width: 1599px) {
    .product-slider-track { grid-auto-columns: calc((100% - 88px) / 5); }
}
@media (min-width: 1600px) {
    .product-slider-track { grid-auto-columns: calc((100% - 110px) / 6); }
}
.product-slider-track .product-card {
    scroll-snap-align: start;
    min-width: 0;
}
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    color: var(--text-dark);
    font-size: 18px;
    cursor: pointer;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    -webkit-tap-highlight-color: transparent;
}
.slider-arrow:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.slider-arrow:disabled { opacity: .35; cursor: not-allowed; }
.slider-arrow-prev { right: -16px; }
.slider-arrow-next { left: -16px; }
@media (max-width: 768px) {
    .product-slider-track { grid-auto-columns: calc((100% - 22px) / 1.25); gap: 22px; }
    .slider-arrow { width: 34px; height: 34px; font-size: 14px; }
    .slider-arrow-prev { right: 4px; }
    .slider-arrow-next { left: 4px; }
}
/* Subcategory boxes */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary); font-weight: 600; }
.breadcrumb .current { color: var(--text-dark); font-weight: 700; }
.subcategory-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}
.subcategory-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 14px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    text-align: center;
}
.subcategory-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.subcategory-box-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}
.subcategory-box-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fdecec;
    color: var(--primary);
    font-size: 40px;
}
.subcategory-box-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Desktop only: bigger subcategory boxes */
@media (min-width: 641px) {
    .subcategory-boxes {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 26px;
    }
    .subcategory-box {
        padding: 24px 18px;
        gap: 16px;
    }
    .subcategory-box-img {
        height: 200px;
        border-radius: var(--radius);
    }
    .subcategory-box-name {
        font-size: 18px;
    }
}
.product-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    border: 1px solid var(--border);
    position: relative;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.product-card .badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    z-index: 2;
}
.product-card .badge.featured { right: auto; left: 12px; }
.product-card .image-wrap {
    aspect-ratio: 16 / 10;
    height: auto;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-card .image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.product-card:hover .image-wrap img { transform: scale(1.05); }
.product-card .image-wrap .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray, #999);
    font-weight: 600;
    font-size: 13px;
    padding: 15px;
    text-align: center;
}
.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 8px;
    font-size: 14px;
    line-height: 1;
}
.product-rating .stars-display { margin: 0; font-size: 14px; }
.product-rating .rating-num { font-weight: 800; color: var(--text-dark); }
.product-rating .rating-count { color: var(--text-gray); font-size: 12px; }
.product-card .info { padding: 20px; }
.product-card .info h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}
.product-card .info .price-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}
.product-card .info .price-wrap .old {
    font-size: 14px;
    color: var(--text-light);
    text-decoration: line-through;
}
.product-card .info .price-wrap .current {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
}
.product-card .info .price-wrap .current.no-discount { color: var(--text-dark); }
.product-card .info .btn { width: 100%; text-align: center; padding: 12px; font-size: 14px; }

/* Product Detail */
.product-detail { padding: 40px 0; }
.product-detail .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}
.product-detail .gallery {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-light);
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.product-detail .gallery-main { width: 100%; display: flex; justify-content: center; position: relative; }
.gallery-main-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    transition: opacity 0.2s ease;
}
.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--text-gray, #999);
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    padding: 12px;
}
.gallery-main-img.no-image {
    aspect-ratio: 16 / 10;
    border-radius: 12px;
}
.cart-item-img.no-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    overflow: hidden;
}
.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    padding: 4px 2px 8px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    touch-action: pan-x;
}
.gallery-thumbs::-webkit-scrollbar { height: 4px; }
.gallery-thumbs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.gallery-thumb {
    width: 96px;
    aspect-ratio: 16 / 10;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid var(--border);
    scroll-snap-align: start;
    transition: border-color 0.2s, opacity 0.2s;
    opacity: 0.75;
}
.gallery-thumb:hover { opacity: 1; }
.gallery-thumb.active {
    border-color: var(--primary);
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(211,47,47,0.15);
}

/* ===== Product image circular magnifier ===== */
.magnifier-lens {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-repeat: no-repeat;
    background-color: #fff;
    background-clip: padding-box;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.14), 0 8px 28px rgba(0,0,0,0.28);
    pointer-events: none;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transform: translateZ(0);
    will-change: left, top, background-position;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}
.magnifier-lens.visible { opacity: 1; visibility: visible; }
.magnifier-lens::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 12px rgba(0,0,0,0.08);
    pointer-events: none;
}
@media (max-width: 768px) {
    .magnifier-lens { width: 120px; height: 120px; }
}

/* ===== Animated popups (SweetAlert2) ===== */
.animated-popup {
    border-radius: 20px !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25) !important;
}
.animated-popup-icon {
    animation: iconPop 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes iconPop {
    0% { transform: scale(0) rotate(-30deg); opacity: 0; }
    60% { transform: scale(1.25) rotate(8deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ===== Policy page ===== */
.policy-content {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 34px;
    box-shadow: var(--shadow-sm);
    font-size: 15px;
    line-height: 2;
    color: var(--text);
    white-space: pre-line;
}

/* ===== Reviews ===== */
.reviews-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    margin-bottom: 40px;
}
.reviews-summary {
    text-align: center;
    padding: 30px 20px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    align-self: start;
}
.rating-big {
    font-size: 52px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}
.stars-display {
    display: inline-flex;
    gap: 2px;
    margin: 10px 0 6px;
    font-size: 18px;
    line-height: 1;
}
.stars-display .star { color: #d1d5db; }
.stars-display .star.on { color: #f59e0b; }
.stars-display .star.half {
    background: linear-gradient(90deg, #f59e0b 50%, #d1d5db 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.reviews-summary p { color: var(--text-gray); font-size: 13px; }
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.review-item {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
}
.review-item.review-hidden { display: none; }
.review-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.review-head strong { font-size: 15px; color: var(--text-dark); }
.review-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #fff;
    background: var(--bg-light);
    box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.review-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.review-head .stars-display { margin: 0; font-size: 14px; }
.review-date { color: var(--text-gray); font-size: 12px; margin-inline-start: auto; }
.review-item p { font-size: 14px; color: var(--text); line-height: 1.7; }
.review-form-wrap {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    max-width: 640px;
}
.review-form-wrap h3 { margin-bottom: 18px; font-size: 20px; font-weight: 800; }
.review-form .form-group { margin-bottom: 14px; }
.review-form label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 14px; }
.review-form input[type="text"],
.review-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 14px;
    background: var(--bg-light);
}
.review-form input[type="text"]:focus,
.review-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
}
.star-input {
    display: inline-flex;
    gap: 4px;
    direction: ltr;
}
.star-btn {
    background: none;
    border: none;
    font-size: 30px;
    color: #d1d5db;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.15s, transform 0.15s;
}
.star-btn:hover { transform: scale(1.15); }
.star-btn.on { color: #f59e0b; }
@media (max-width: 768px) {
    .reviews-layout { grid-template-columns: 1fr; }
}
.product-detail .info h1 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 10px;
}
.product-detail .info .price-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.product-detail .info .price-row .current {
    font-size: 30px;
    font-weight: 800;
    color: var(--primary);
}
.product-detail .info .price-row .old {
    font-size: 20px;
    color: var(--text-light);
    text-decoration: line-through;
}
.product-detail .info .price-row .discount-badge {
    background: #fef2f2;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}
.product-detail .info .description {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 25px;
}
.product-detail .info .variants {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}
.product-detail .info .variants label {
    padding: 10px 18px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    display: block;
}
.product-detail .info .variants input { display: none; }
.product-detail .info .variants input:checked + label {
    border-color: var(--primary);
    background: #fef2f2;
    color: var(--primary);
}
.qty-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}
.qty-wrap label { font-weight: 700; }
.qty-wrap input {
    width: 70px;
    padding: 8px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 16px;
    text-align: center;
    font-family: var(--font-main);
}

/* Checkout */
.checkout-section { padding: 40px 0; }
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}
.checkout-grid > .checkout-form { order: 1; }
.checkout-grid > .order-summary { order: 2; }
.checkout-form .form-group { margin-bottom: 20px; }
.checkout-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 14px;
}
.checkout-form input,
.checkout-form textarea,
.checkout-form select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: border-color 0.2s;
    font-family: var(--font-main);
}
.checkout-form input:focus,
.checkout-form textarea:focus,
.checkout-form select:focus {
    outline: none;
    border-color: var(--primary);
}
.checkout-form textarea { min-height: 100px; resize: vertical; }

/* Cart items */
.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 16px;
    align-items: center;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: var(--bg-light);
}
.cart-item-info h4 { font-size: 15px; margin-bottom: 4px; }
.cart-item-info h4 a { color: var(--text-dark); }
.cart-item-info h4 a:hover { color: var(--primary); }
.cart-item-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 4px;
}
.cart-item-meta .cm-size {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 12px;
}
.cart-item-meta .cm-line { font-size: 12px; }
.cart-item-price { font-size: 15px; font-weight: 700; color: var(--primary); }
.cart-item-actions { display: flex; flex-direction: row; gap: 10px; align-items: center; }
.cart-item-actions .qty-form { display: flex; gap: 6px; align-items: center; }
.qty-selector {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-white);
}
.qty-btn {
    position: relative;
    width: 36px;
    height: 40px;
    border: none;
    background: linear-gradient(180deg, #fff 0%, var(--bg-light) 100%);
    color: var(--text-dark);
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background .2s ease, color .2s ease, transform .12s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .2s ease;
}
.qty-btn:hover { background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark, #B71C1C) 100%); color: #fff; }
@media (hover: none) {
    .qty-btn:hover { background: linear-gradient(180deg, #fff 0%, var(--bg-light) 100%); color: var(--text-dark); }
}
#qtyPlus, #qtyMinus, .qty-btn[data-dir="1"], .qty-btn[data-dir="-1"] {
    background: linear-gradient(180deg, #e53935 0%, #c62828 100%);
    color: #fff;
}
#qtyPlus:hover, #qtyMinus:hover, .qty-btn[data-dir="1"]:hover, .qty-btn[data-dir="-1"]:hover {
    background: linear-gradient(180deg, #ef5350 0%, #d32f2f 100%);
    color: #fff;
}
#qtyPlus:active, #qtyMinus:active, .qty-btn[data-dir="1"]:active, .qty-btn[data-dir="-1"]:active {
    background: linear-gradient(180deg, #e53935 0%, #c62828 100%);
    color: #fff;
}
@media (hover: none) {
    #qtyPlus:hover, #qtyMinus:hover,
    .qty-btn[data-dir="1"]:hover, .qty-btn[data-dir="-1"]:hover {
        color: #fff;
    }
}
.qty-btn:active {
    transform: scale(0.82);
    color: #fff;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.28);
}
.qty-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 10%, transparent 60%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.qty-btn:active::after { animation: qty-flash 0.3s ease forwards; }
#qtyPlus .qb-h,
#qtyPlus .qb-v {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    font-weight: 800;
    font-size: 20px;
}
#qtyPlus .qb-v { transform: rotate(90deg); }
@keyframes qty-flash {
    0% { opacity: 0.9; transform: scale(0.4); }
    100% { opacity: 0; transform: scale(1.3); }
}
.qty-wrap .qty-selector input {
    width: 46px;
    height: 40px;
    padding: 0 6px;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    outline: none;
    background: var(--bg-white);
}
.qty-selector input::-webkit-outer-spin-button,
.qty-selector input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-selector input[type=number] { -moz-appearance: textfield; }
.qty-selector .qty-pop { animation: qty-pop .28s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes qty-pop {
    0% { transform: scale(1); color: var(--text-dark); }
    45% { transform: scale(1.28); color: var(--primary); }
    100% { transform: scale(1); color: var(--text-dark); }
}
.qty-input {
    width: 46px;
    height: 40px;
    padding: 0 6px;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    outline: none;
    background: var(--bg-white);
}
.qty-selector .qty-input.qty-pop { animation: qty-pop .28s cubic-bezier(0.34, 1.56, 0.64, 1); }
.qty-selector .qty-btn { height: 40px; width: 36px; font-size: 20px; }
.cart-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fdecec;
    color: var(--primary);
    border: 1px solid #f5c6c6;
    cursor: pointer;
    font-size: 16px;
    transition: all .2s;
}
.cart-remove-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.cart-item-actions .btn-remove {
    background: #fdecec;
    color: var(--primary);
    border: 1px solid #f5c6c6;
}
.cart-item-actions .btn-remove:hover { background: var(--primary); color: #fff; }
.cart-item-line-total {
    font-weight: 800;
    font-size: 15px;
    color: var(--text-dark);
    text-align: left;
    grid-column: 1 / -1;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

.order-summary {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 30px;
    position: sticky;
    top: 100px;
}
.order-summary h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
}
.order-summary .item {
    display: flex;
    gap: 20px;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}
.order-summary .summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-gray);
    padding: 7px 0;
    border-bottom: 1px dashed var(--border);
}
.order-summary .item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 8px;
}
.order-summary .item-no-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-gray);
    text-align: center;
    padding: 6px;
    flex-shrink: 0;
}
.order-summary .item .details h4 { font-size: 15px; margin-bottom: 4px; }
.order-summary .item .details .price { font-weight: 700; color: var(--primary); }
.order-summary .total-row {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}
.order-summary .total-row .amount { color: var(--primary); font-size: 24px; }

/* ===== Payment methods (checkout) ===== */
#paymentMethodsList { display: flex; flex-direction: column; gap: 10px; }
.pay-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    background: #fff;
    position: relative;
}
.pay-method:hover { border-color: var(--primary-light); }
.pay-method:has(input:checked) {
    border-color: var(--primary);
    background: rgba(211,47,47,0.04);
    box-shadow: 0 0 0 3px rgba(211,47,47,0.12);
}
.pay-method input { position: absolute; opacity: 0; pointer-events: none; }
.pay-method-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    background: #f5f5f5;
    padding: 5px;
    border: 1px solid var(--border);
}
.pay-method-ico { font-size: 26px; }
.pay-method-name { font-weight: 800; font-size: 15px; flex: 1; }
.pay-method-hint { font-size: 12px; color: var(--text-gray); }
.pay-transfer-box {
    margin-top: 14px;
    padding: 16px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: #fff;
}
.pay-amount-box {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid #f3c9c9;
    border-radius: 12px;
    background: #fdf2f2;
}
.pay-amount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-dark);
    padding: 4px 0;
}
.pay-amount-row.due {
    border-top: 1px dashed #e0b3b3;
    margin-top: 6px;
    padding-top: 10px;
    font-weight: 800;
}
.pay-amount-val {
    font-weight: 800;
    color: var(--primary);
}
.pay-amount-row.due .pay-amount-val { font-size: 18px; }
.pay-amount-row.discount { color: #16a34a; }
.pay-amount-row.discount .pay-amount-val { font-weight: 700; }
.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-inline-start: 6px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    vertical-align: middle;
    transition: all .2s;
}
.copy-btn:hover { border-color: var(--primary); background: #fdf2f2; }
.copy-btn.copied { border-color: #16a34a; background: #f0fdf4; }
.coupon-applied {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
}
.pay-transfer-info {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 2;
}
.pay-transfer-info .lbl { color: var(--text-gray); font-size: 13px; }
.pay-transfer-info strong { font-size: 15px; }
.pay-transfer-box .proof-input { width: 100%; }

/* Warranty */
.warranty-section { padding: 40px 0; }
.search-box {
    max-width: 500px;
    margin: 0 auto 40px;
    display: flex;
    gap: 10px;
}
.search-box input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font-main);
}
.search-box input:focus { outline: none; border-color: var(--primary); }
.warranty-card {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}
.warranty-card h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
}
.warranty-card .info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.warranty-card .info-grid .item { font-size: 14px; }
.warranty-card .info-grid .item strong {
    display: block;
    color: var(--text-gray);
    font-size: 12px;
}
.warranty-card.success {
    border-color: #86efac;
    background: #f0fdf4;
    box-shadow: 0 4px 20px rgba(22, 163, 74, 0.12);
}
.warranty-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.warranty-action { grid-column: 1 / -1; text-align: center; margin-top: 8px; }
.btn-warranty {
    display: block;
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-main);
    color: #fff;
}
.btn-warranty.replacement {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}
.btn-warranty.replacement:hover:not(:disabled) {
    background: linear-gradient(135deg, #4338ca, #4f46e5);
    transform: translateY(-2px);
}
.btn-warranty.maintenance {
    background: linear-gradient(135deg, #16a34a, #22c55e);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}
.btn-warranty.maintenance:hover:not(:disabled) {
    background: linear-gradient(135deg, #15803d, #16a34a);
    transform: translateY(-2px);
}
.btn-warranty:disabled {
    background: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 1;
}
.warranty-expired-msg {
    margin-top: 10px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 700;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 8px 12px;
}
.warranty-msg-box {
    max-width: 620px;
    margin: 0 auto 20px;
    padding: 16px 20px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 15px;
}
.warranty-msg-box.ok {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
.warranty-msg-box strong { font-size: 16px; }
.serial-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}
.serial-row input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font-main);
}
.serial-row input:focus { outline: none; border-color: var(--primary); }
.qr-scan-btn {
    width: 100%;
    padding: 12px;
    background: #eff6ff;
    border: 2px dashed #93c5fd;
    border-radius: 10px;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 14px;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all .2s;
}
.qr-scan-btn:hover { background: #dbeafe; }

/* Footer */
/* ===== Floating WhatsApp button ===== */
.whatsapp-float {
    position: fixed;
    bottom: 22px;
    left: 22px;
    z-index: 999;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-decoration: none;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 26px rgba(37, 211, 102, 0.6);
}
.whatsapp-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.55);
    animation: whatsappPulse 2s infinite;
}
@keyframes whatsappPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.7); opacity: 0; }
}
@media (max-width: 640px) {
    .whatsapp-float {
        width: 54px;
        height: 54px;
        bottom: 16px;
        left: 16px;
    }
}

.footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 45px 0 25px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 700;
}
.footer p { font-size: 14px; line-height: 1.8; color: #999; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul li a {
    color: #999;
    font-size: 14px;
    transition: color 0.2s;
}
.footer ul li a:hover { color: #fff; }
.footer-phones { margin-top: 16px; }
.footer-phones li a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 600;
}
.footer-phones li a i {
    color: #fff;
    font-size: 15px;
}
.footer .payment-methods {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}
.footer .payment-methods .method {
    background: #333;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.footer-social {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.foot-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    font-size: 16px;
    transition: all 0.25s;
}
.foot-social:hover { transform: translateY(-3px); color: #fff; }
.fs-facebook:hover { background: #1877f2; }
.fs-instagram:hover { background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.fs-tiktok:hover { background: #000; color: #25f4ee; }
.fs-twitter:hover { background: #000; color: #fff; }
.fs-youtube:hover { background: #ff0000; }
.fs-whatsapp:hover { background: #25d366; }
.fs-snapchat:hover { background: #fffc00; color: #000; }
.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* Messages */
.messages { max-width: 600px; margin: 20px auto; }
.message {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    font-weight: 600;
    text-align: center;
}
.message.success { background: #dcfce7; color: #166534; }
.message.info { background: #dbeafe; color: #1e40af; }
.message.error { background: #fef2f2; color: var(--primary); }

/* Success page */
.success-section { padding: 60px 0; text-align: center; }
.success-icon {
    width: 80px;
    height: 80px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--success);
    margin: 0 auto 20px;
}
.success-section h1 { font-size: 32px; margin-bottom: 10px; }
.success-section p { color: var(--text-gray); }
.success-section .order-details {
    max-width: 400px;
    margin: 30px auto;
    text-align: right;
}
.success-section .order-details .row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

/* Subcategory block */
.subcategory-block {
    margin-bottom: 50px;
}
.subcategory-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

/* Empty state */
.empty-state { text-align: center; padding: 40px 0; color: var(--text-gray); }
.empty-state .icon { font-size: 48px; margin-bottom: 15px; }

/* Responsive */
html, body { width: 100%; max-width: 100%; overflow-x: hidden; touch-action: manipulation; }
.nav-close { display: none; }
.nav-overlay { display: none; }
.nav-head { display: none; }
.nav-foot { display: none; }
@media (max-width: 768px) {
    .mobile-toggle { display: flex; }
    .nav-head { display: flex; }
    .nav-foot { display: flex; }
    .nav-overlay { display: block; }
    .nav {
        border-top: none;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        background: var(--bg-white);
        box-shadow: -6px 0 30px rgba(0,0,0,0.18);
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
        z-index: 1001;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }
    .nav.open {
        transform: translateX(0);
    }
    .nav-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 20px;
        background: linear-gradient(135deg, #D32F2F, #B71C1C);
        color: #fff;
        position: sticky;
        top: 0;
        z-index: 2;
    }
    .nav-head .logo-text {
        font-size: 20px;
        font-weight: 800;
        color: #fff;
    }
    .nav-close-btn {
        background: rgba(255,255,255,0.15);
        border: none;
        cursor: pointer;
        font-size: 15px;
        color: #fff;
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 0.2s, transform 0.2s;
    }
    .nav-close-btn:hover { background: rgba(255,255,255,0.3); transform: rotate(90deg); }
    .nav .nav-inner {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 14px 16px;
        flex: 1;
    }
    .nav-inner a {
        padding: 13px 14px;
        width: 100%;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 600;
        color: var(--text-dark);
        display: flex;
        align-items: center;
        gap: 12px;
        transition: background 0.2s, color 0.2s, padding-inline-start 0.2s;
    }
    .nav-inner a i {
        width: 20px;
        text-align: center;
        color: #9e9e9e;
        transition: color 0.2s;
    }
    .nav-inner a:hover {
        background: #faf5f5;
        color: var(--primary);
        padding-inline-start: 18px;
    }
    .nav-inner a:hover i { color: var(--primary); }
    .nav-inner a.active {
        color: var(--primary);
        background: #fdecec;
        font-weight: 800;
    }
    .nav-inner a.active i { color: var(--primary); }
    .nav-inner a::after { display: none; }
    .nav-link-group { position: static; }
    .nav-caret {
        display: inline-block;
        font-size: 9px;
        color: #999;
        margin-top: 2px;
        transition: transform 0.25s;
    }
    .nav-link-group.open .nav-caret { transform: rotate(180deg); color: var(--primary); }
    .nav-submenu {
        display: none;
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        min-width: 0;
    }
    .nav-link-group.open .nav-submenu { display: block; }
    .nav-inner .nav-sub-link {
        font-size: 13px;
        font-weight: 500;
        color: #666;
        margin-inline-start: 20px;
        padding: 8px 14px;
        border-radius: 8px;
    }
    .nav-inner .nav-sub-link::before {
        content: "— ";
        color: #ccc;
    }
    .nav-foot {
        padding: 14px 20px;
        border-top: 1px solid var(--border);
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    .nav-foot span {
        font-size: 11px;
        color: #777;
        display: flex;
        align-items: center;
        gap: 5px;
        background: #f7f7f7;
        padding: 6px 10px;
        border-radius: 20px;
    }
    .nav-foot span i { color: var(--primary); }
    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(2px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
        z-index: 1000;
    }
    .nav-overlay.show {
        opacity: 1;
        visibility: visible;
    }
    .header-inner {
        padding: 10px 16px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        direction: rtl;
    }
    .header-inner .mobile-toggle { order: 1; }
    .header-inner .header-right { order: 2; }
    .header-inner .header-left { order: 3; }
    .header-left { gap: 10px; }
    .logo-img { max-height: 80px; width: auto; }
    .logo-text { font-size: 26px; }
    .search-bar-wrapper { padding: 0 16px 10px; }
    .logo-text { font-size: 18px; }
    .hero-text h1 { font-size: 32px; }
    .hero-image-bg { height: 250px; }
    .product-detail .grid { grid-template-columns: 1fr; gap: 24px; }
    .product-detail .gallery { padding: 12px; width: 100%; }
    .product-detail .gallery .gallery-main-img { width: 100%; }
    .gallery-thumbs { justify-content: flex-start; }
    .gallery-thumb { width: 56px; aspect-ratio: 16 / 10; }
    .checkout-grid { grid-template-columns: 1fr; }
    .checkout-grid.checkout-grid-top > .order-summary { order: -1; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; }
    .product-card .image-wrap { aspect-ratio: 16 / 10; height: auto; }
    .warranty-card .info-grid { grid-template-columns: 1fr; }
    .warranty-split { grid-template-columns: 1fr; }

    .splash {
        display: flex;
        position: fixed;
        inset: 0;
        background: #fff;
        z-index: 2000;
        align-items: center;
        justify-content: center;
        transition: opacity 0.6s ease, visibility 0.6s ease;
    }
    .splash.hide {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    .splash-inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        animation: splashPop 0.5s ease;
    }
    .splash-logo {
        max-height: 100px;
        width: auto;
        will-change: transform, opacity;
    }
    .splash-title {
        font-size: 28px;
        font-weight: 800;
        color: var(--primary);
        will-change: transform, opacity;
    }
    .splash-text {
        font-size: 14px;
        color: #888;
        font-weight: 600;
        letter-spacing: 0.3px;
        transition: opacity 0.35s ease;
    }
    .splash-text::after {
        content: "";
        display: inline-block;
        width: 1em;
        text-align: left;
        animation: splashDots 1.2s steps(3, end) infinite;
    }
    .splash.fly .splash-logo,
    .splash.fly .splash-title {
        animation: none;
        transition: transform 0.8s cubic-bezier(0.22, 1.2, 0.36, 1);
        will-change: transform;
    }
    .splash.fly .splash-text {
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    @keyframes splashPop {
        0% { transform: scale(0.7); opacity: 0; }
        100% { transform: scale(1); opacity: 1; }
    }
    @keyframes splashDots {
        0% { content: ""; }
        25% { content: "."; }
        50% { content: ".."; }
        75% { content: "..."; }
        100% { content: ""; }
    }
}

@media (max-width: 640px) {
    /* General containers: flexible width with proper padding, no horizontal scroll */
    .container { padding: 0 16px; max-width: 100%; }
    .section { padding: 40px 0; }
    .section-header h2 { font-size: 22px; }
    .section-header p { font-size: 13px; }

    /* Categories scroll: smooth snap horizontal scroll, hide arrows */
    .scroll-arrow { display: none; }
    .categories-scroll {
        gap: 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
    }
    .category-scroll-item {
        min-width: 140px;
        padding: 0;
        scroll-snap-align: center;
        border-radius: 14px;
    }
    .category-scroll-item span { font-size: 12px; white-space: normal; line-height: 1.4; }

    /* Product grid: clean 2 columns */
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .product-card .image-wrap { aspect-ratio: 16 / 10; height: auto; }
    .product-card .info { padding: 14px; }
    .product-card .info h3 { font-size: 15px; }
    .product-card .info .price-wrap .current { font-size: 16px; }
    .product-card .info .price-wrap .old { font-size: 12px; }
    .product-card .info .btn { padding: 10px; font-size: 13px; }

    /* Cart items: compact on mobile */
    .cart-item { grid-template-columns: 64px 1fr auto; gap: 10px; padding: 12px; }
    .cart-item-img { width: 64px; height: 64px; }
    .cart-item-info h4 { font-size: 13px; }
    .cart-item-meta { font-size: 11px; gap: 1px; }
    .cart-item-meta .cm-size { font-size: 11px; }
    .cart-item-meta .cm-line { font-size: 11px; }
    .cart-item-price { font-size: 13px; }
    .cart-item-actions { gap: 6px; }
    .order-summary { padding: 20px; }
}
