/* ===== SHARJAH ELECTRONICS — Clean Design System v3 ===== */
/* Professional Oman Electronics Store | White + Gold + Dark Charcoal */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&display=swap');

/* ===========================
   CSS CUSTOM PROPERTIES
   =========================== */
:root {
    /* Gold Palette */
    --gold-100: #FDF6E3;
    --gold-200: #F5E0A0;
    --gold-300: #E8C97A;
    --gold-400: #D4A843;
    --gold-500: #C9A84C;
    --gold-600: #B8922A;
    --gold-700: #A07830;
    --gold-800: #8B6914;

    /* Neutrals */
    --white:     #FFFFFF;
    --off-white: #FAFAFA;
    --cream:     #F7F5F2;
    --stone:     #E8E5E0;
    --warm-grey: #D4CEC4;

    /* Dark Palette */
    --dark-50:   #3D3028;
    --dark-100:  #2C2218;
    --dark-200:  #1E1810;
    --dark-300:  #150F08;

    /* Semantic */
    --primary:        var(--gold-500);
    --primary-light:  var(--gold-300);
    --primary-dark:   var(--gold-700);
    --primary-glow:   rgba(201, 168, 76, 0.15);
    --text-dark:      #1a1a1a;
    --text-body:      #333333;
    --text-muted:     #777777;
    --text-light:     #999999;
    --border:         #e5e5e5;
    --border-strong:  #d0d0d0;
    --bg-page:        var(--off-white);
    --bg-card:        var(--white);
    --bg-section:     #f5f5f5;
    --success-color:  #38a169;

    /* Shadows — subtle and clean */
    --shadow-xs:  0 1px 3px rgba(0,0,0,0.04);
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.06);
    --shadow-md:  0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg:  0 8px 32px rgba(0,0,0,0.10);
    --shadow-xl:  0 16px 48px rgba(0,0,0,0.12);

    /* Spacing — consistent scale */
    --sp-xs: 8px;   --sp-sm: 16px;  --sp-md: 24px;
    --sp-lg: 32px;  --sp-xl: 48px;  --sp-2xl: 64px;
    --sp-section: 80px;
    --sp-gap: 24px;

    /* Radius */
    --r-xs: 4px;  --r-sm: 8px;   --r-md: 12px;
    --r-lg: 16px; --r-xl: 24px;  --r-pill: 999px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --t-fast: 0.15s var(--ease);
    --t: 0.25s var(--ease);
    --t-slow: 0.4s var(--ease);
}

/* ===========================
   RESET & BASE
   =========================== */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
}
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    color: var(--text-body);
    background: var(--bg-page);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f0f0f0; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* Container */
.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--sp-md); }

/* ===========================
   TOP BAR
   =========================== */
.navbar-top {
    background: var(--dark-200);
    padding: var(--sp-xs) var(--sp-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.2px;
}
.navbar-top a {
    color: var(--gold-300);
    transition: var(--t-fast);
    font-weight: 500;
}
.navbar-top a:hover { color: var(--white); }
.navbar-top span { display: flex; align-items: center; gap: 14px; }

/* ===========================
   NAVBAR
   =========================== */
.navbar {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--t);
}
.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--sp-md);
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    min-height: 64px;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo-icon {
    width: 42px; height: 42px;
    background: var(--gold-500);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: var(--t);
}
.logo:hover .logo-icon { transform: scale(1.05); }
.logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--dark-100);
    white-space: nowrap;
    line-height: 1.1;
}
.logo h1 span {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Search */
.nav-search {
    flex: 1;
    max-width: 440px;
    display: flex;
    position: relative;
}
.search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm) 0 0 var(--r-sm);
    background: var(--off-white);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: var(--text-body);
    outline: none;
    transition: var(--t);
}
.search-input::placeholder { color: var(--text-light); }
.search-input:focus {
    border-color: var(--gold-500);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.search-btn {
    padding: 10px 20px;
    background: var(--dark-200);
    color: var(--white);
    border: 1px solid var(--dark-200);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--t);
    white-space: nowrap;
}
.search-btn:hover {
    background: var(--dark-100);
}

/* Nav Menu */
.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}
.nav-menu li a {
    display: flex; align-items: center; gap: 5px;
    padding: 8px 14px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--r-sm);
    transition: var(--t-fast);
    position: relative;
    white-space: nowrap;
}
.nav-menu li a:hover { color: var(--text-dark); }
.nav-menu li a.active { color: var(--dark-200); font-weight: 600; }
.nav-menu li a.active::after {
    content: '';
    position: absolute;
    bottom: 2px; left: 50%;
    transform: translateX(-50%);
    width: 20px; height: 2px;
    background: var(--gold-500);
    border-radius: 1px;
}

/* Cart Badge */
.cart-link { position: relative; }
.cart-count {
    position: absolute;
    top: 1px; right: 5px;
    background: var(--gold-500);
    color: var(--white);
    border-radius: var(--r-pill);
    min-width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px;
    font-weight: 700;
    border: 2px solid var(--white);
    line-height: 1;
}

/* Language Toggle */
.language-toggle {
    background: transparent !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border) !important;
    padding: 6px 14px !important;
    border-radius: var(--r-sm) !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 13px !important;
    transition: var(--t) !important;
}
.language-toggle:hover {
    border-color: var(--gold-500) !important;
    color: var(--gold-600) !important;
}

/* ===========================
   BUTTONS
   =========================== */
.btn-primary {
    display: inline-flex; align-items: center;
    justify-content: center; gap: 8px;
    padding: 12px 28px;
    background: var(--dark-200);
    color: var(--white);
    border: none;
    border-radius: var(--r-sm);
    font-family: 'Outfit', sans-serif;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: var(--t);
    text-decoration: none;
    letter-spacing: 0.2px;
}
.btn-primary:hover {
    background: var(--dark-100);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    display: inline-flex; align-items: center;
    justify-content: center; gap: 8px;
    padding: 11px 26px;
    background: transparent;
    color: var(--dark-200);
    border: 1.5px solid var(--dark-200);
    border-radius: var(--r-sm);
    font-family: 'Outfit', sans-serif;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: var(--t);
    text-decoration: none;
}
.btn-secondary:hover {
    background: var(--dark-200);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-dark {
    display: inline-flex; align-items: center;
    justify-content: center; gap: 8px;
    padding: 12px 28px;
    background: transparent;
    color: var(--white);
    border: 1.5px solid rgba(255,255,255,0.4);
    border-radius: var(--r-sm);
    font-family: 'Outfit', sans-serif;
    font-size: 14px; font-weight: 500;
    cursor: pointer;
    transition: var(--t);
    text-decoration: none;
}
.btn-dark:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.7);
}

/* ===========================
   SECTION HEADERS
   =========================== */
.section-label {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 600;
    color: var(--gold-600);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}
.section-label::before {
    content: '';
    width: 20px; height: 1.5px;
    background: var(--gold-500);
    border-radius: 1px;
}
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}
.section-title em { font-style: italic; color: var(--gold-600); }
.section-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 8px;
    line-height: 1.6;
    max-width: 520px;
}
.section-header-center { text-align: center; }
.section-header-center .section-label { justify-content: center; }
.section-header-center .section-subtitle { margin: 8px auto 0; }

.gold-divider {
    display: flex; align-items: center; gap: 10px;
    margin: 12px 0;
    justify-content: center;
}
.gold-divider::before, .gold-divider::after {
    content: '';
    flex: 1; max-width: 40px;
    height: 1px;
    background: var(--gold-400);
    opacity: 0.4;
}
.gold-divider-dot {
    width: 5px; height: 5px;
    background: var(--gold-500);
    border-radius: 50%;
}

/* ===========================
   MODAL
   =========================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 20px;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--white);
    border-radius: var(--r-lg);
    max-width: 640px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: modalIn 0.3s var(--ease);
    overflow: hidden;
}
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-content .close {
    position: absolute;
    top: 16px; right: 16px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--off-white);
    border: 1px solid var(--border);
    font-size: 18px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    transition: var(--t-fast);
    font-weight: 600;
    line-height: 1;
}
.modal-content .close:hover { background: #eee; color: var(--text-dark); }

/* ===========================
   FORMS
   =========================== */
form input, form textarea, form select {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    color: var(--text-body);
    background: var(--white);
    transition: var(--t);
    outline: none;
}
form input:focus, form textarea:focus, form select:focus {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row input { margin-bottom: 0; }
.checkbox {
    display: flex; align-items: flex-start; gap: 10px;
    margin-bottom: 14px;
    cursor: pointer; font-size: 13px; color: var(--text-muted);
}
.checkbox input { width: auto; margin: 0; margin-top: 2px; accent-color: var(--gold-500); }

/* ===========================
   PRODUCT CARDS
   =========================== */
.game-card {
    background: var(--white);
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform var(--t), box-shadow var(--t), border-color var(--t);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
}
.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #d0d0d0;
}

/* Card image */
.game-card-image {
    width: 100%;
    height: 210px;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.game-card-content {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.game-card-category {
    font-size: 11px;
    font-weight: 600;
    color: var(--gold-600);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 6px;
    display: flex; align-items: center; gap: 6px;
}
.game-card-category::before {
    content: '';
    width: 14px; height: 1.5px;
    background: var(--gold-500);
    border-radius: 1px;
    flex-shrink: 0;
}
.game-card-title {
    font-size: 16px; font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    line-height: 1.3;
}
.game-card-description {
    font-size: 13px;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 10px;
    line-height: 1.5;
}
.game-card-rating {
    display: flex; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 500;
    color: var(--gold-600);
    margin-bottom: 12px;
}
.game-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: auto;
    gap: 10px;
}
.game-card-price {
    font-size: 20px; font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}
.game-card-price span {
    font-size: 11px; font-weight: 500;
    color: var(--text-muted); margin-left: 2px;
}
.game-card-btn {
    padding: 8px 16px;
    background: var(--dark-200);
    color: var(--white);
    border: none;
    border-radius: var(--r-sm);
    cursor: pointer;
    font-size: 12px; font-weight: 600;
    font-family: 'Outfit', sans-serif;
    transition: var(--t);
    white-space: nowrap;
}
.game-card-btn:hover {
    background: var(--dark-100);
    transform: translateY(-1px);
}

/* NEW Badge */
.badge-new {
    position: absolute;
    top: 12px; right: 12px;
    z-index: 2;
    background: var(--dark-200);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--r-xs);
    letter-spacing: 1px;
}

/* Review Stars */
.review-stars {
    color: var(--gold-500);
    font-size: 14px;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    background: var(--dark-200);
    color: rgba(255,255,255,0.6);
    padding: 60px 0 0;
    position: relative;
    margin-top: 0;
}
.footer-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1.2fr;
    gap: var(--sp-xl);
    margin-bottom: var(--sp-xl);
}
.footer-brand h3 {
    font-family: 'Playfair Display', serif;
    font-size: 20px; font-weight: 700;
    color: var(--gold-300);
    margin-bottom: 12px;
}
.footer-brand p {
    font-size: 14px; line-height: 1.7;
    color: rgba(255,255,255,0.4);
    margin-bottom: 20px;
}
.footer-socials { display: flex; gap: 8px; }
.footer-social-btn {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--t);
    text-decoration: none;
}
.footer-social-btn:hover {
    background: var(--gold-500);
    border-color: var(--gold-500);
    transform: translateY(-2px);
}
.footer-section h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 14px; font-weight: 600;
    color: rgba(255,255,255,0.8);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 8px; }
.footer-section a {
    font-size: 13px; color: rgba(255,255,255,0.4);
    transition: var(--t-fast);
    display: flex; align-items: center; gap: 6px;
}
.footer-section a:hover { color: var(--gold-300); }
.footer-contact p {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    margin-bottom: 8px;
    display: flex; align-items: flex-start; gap: 8px;
    line-height: 1.5;
}
.footer-contact span { color: var(--gold-300); flex-shrink: 0; }
.footer-bottom {
    position: relative; z-index: 1;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: rgba(255,255,255,0.3);
}
.footer-bottom a {
    color: var(--gold-400); font-weight: 500;
    transition: var(--t-fast);
}
.footer-bottom a:hover { color: var(--gold-300); }

/* ===========================
   UTILITY
   =========================== */
.hidden { display: none !important; }
.text-gold { color: var(--gold-500); }
.fw-bold { font-weight: 700; }

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
.animate-fadeUp { animation: fadeUp 0.5s var(--ease) both; }

/* ===========================
   RTL ARABIC
   =========================== */
html[dir="rtl"] { direction: rtl; text-align: right; }
html[dir="rtl"] .navbar-container { flex-direction: row-reverse; }
html[dir="rtl"] .nav-menu { flex-direction: row-reverse; }
html[dir="rtl"] .search-input { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
html[dir="rtl"] .search-btn { border-radius: var(--r-sm) 0 0 var(--r-sm); }
html[dir="rtl"] body { font-family: 'Outfit','Tahoma','Arabic Typesetting',sans-serif; }

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
    .footer-content { grid-template-columns: 1fr 1fr; gap: var(--sp-lg); }
}
@media (max-width: 768px) {
    :root {
        --sp-section: 48px;
        --sp-md: 16px;
        --sp-gap: 16px;
    }
    .navbar-top { padding: var(--sp-xs) var(--sp-sm); font-size: 11px; }
    .navbar-top span { gap: 8px; }
    .navbar-container { flex-wrap: wrap; gap: var(--sp-xs); padding: 10px var(--sp-sm); min-height: auto; }
    .nav-search { order: 3; max-width: 100%; width: 100%; }
    .nav-menu { gap: 0; flex-wrap: wrap; justify-content: center; }
    .nav-menu li a { padding: 6px 10px; font-size: 13px; }
    .form-row { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr; gap: var(--sp-md); }
    .footer-bottom { flex-direction: column; gap: var(--sp-xs); text-align: center; }
    .footer { padding: var(--sp-xl) 0 0; }
    .game-card-content { padding: var(--sp-sm); }
    .game-card-price { font-size: 17px; }
    .game-card-btn { padding: 7px 12px; font-size: 11px; }
}
@media (max-width: 480px) {
    :root {
        --sp-section: 40px;
    }
    .navbar-top { display: none; }
    .logo h1 { font-size: 16px; }
    .logo-icon { width: 36px; height: 36px; }
    .btn-primary, .btn-secondary { padding: 10px 18px; font-size: 13px; }
    .section-title { font-size: 24px; }
    .section-subtitle { font-size: 13px; }
}
