/* ═══════════════════════════════════════════════════
   NEBRAS THEME v2.0 — nopCommerce 4.40
   RTL Arabic | Cairo Font | Complete CSS
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

/* ── Variables ─────────────────────────────────── */
:root {
  --blue:    #1a5cff;
  --blue-dk: #0040cc;
  --blue-lt: #e8f0ff;
  --red:     #ef4444;
  --green:   #10b981;
  --orange:  #f59e0b;
  --dark:    #111827;
  --text:    #374151;
  --muted:   #6b7280;
  --border:  #e5e7eb;
  --bg:      #f9fafb;
  --bg2:     #f3f4f6;
  --white:   #ffffff;
  --font:    'Cairo', sans-serif;
  --r:       12px;
  --rsm:     8px;
  --sh:      0 4px 20px rgba(0,0,0,.09);
  --sh-lg:   0 8px 40px rgba(0,0,0,.14);
  --tr:      all .2s ease;
}

/* ── Reset & Base ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
html {
  overflow-x: hidden;
  width: 100%;
}
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  direction: rtl;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font-family: var(--font); }
ul, ol { list-style: none; }

/* ── Layout Container ──────────────────────────── */
.wrap, .container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* ══════════════════════════════════════════════════
   HEADER
══════════════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  width: 100%;
  max-width: 100%;
}

/* Top Bar */
.header-topbar {
  background: var(--dark);
  padding: 7px 0;
  font-size: 12px;
  color: rgba(255,255,255,.8);
}
.header-topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
/* الجانب الأيمن: روابط حسابي + تسجيل خروج */
.topbar-right { display: flex; align-items: center; gap: 4px; }
/* الجانب الأيسر: رسالة ترحيب */
.topbar-left  { display: flex; align-items: center; gap: 8px; font-size: 11px; opacity: .8; }
/* نعيد دعم القديم */
.topbar-links { display: flex; align-items: center; gap: 4px; }
.topbar-links a { color: rgba(255,255,255,.8); font-size: 12px; transition: var(--tr); }
.topbar-links a:hover { color: #fff; }

/* ── nopCommerce HeaderLinks (تسجيل الدخول / التسجيل / الرغبات / السلة) ── */
.header-links {
  display: flex; align-items: center; gap: 2px;
  list-style: none; padding: 0; margin: 0;
}
.header-links li { display: flex; align-items: center; }
.header-links li + li { border-right: 1px solid rgba(255,255,255,.2); padding-right: 8px; margin-right: 4px; }
.header-links li a,
.header-links li span { 
  color: rgba(255,255,255,.85); font-size: 11px; font-weight: 600;
  padding: 4px 8px; border-radius: 5px; transition: var(--tr);
  white-space: nowrap; text-decoration: none; background: none; border: none;
  font-family: var(--font); cursor: pointer; display: inline-flex;
  align-items: center; gap: 4px; line-height: 1.4;
}
.header-links li a:hover { color: #fff; background: rgba(255,255,255,.12); }
/* زر تسجيل الدخول */
.header-links .ico-login a,
.header-links li:has(a[href*="login"]) a { 
  background: rgba(255,255,255,.12); color: #fff;
}
/* زر التسجيل الجديد — أكثر بروزاً */
.header-links .ico-register a,
.header-links li:has(a[href*="register"]) a { 
  background: var(--blue); color: #fff; padding: 4px 12px; border-radius: 5px;
  font-weight: 700;
}
.header-links .ico-register a:hover,
.header-links li:has(a[href*="register"]) a:hover { background: var(--blue-dk); }
/* عداد السلة والرغبات */
.header-links .cart-qty,
.header-links .wishlist-qty { 
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff; font-size: 9px; font-weight: 900;
  width: 16px; height: 16px; border-radius: 50%; margin-right: 2px;
}

/* Main Header Row */
.header-main { padding: 14px 0; border-bottom: 1px solid var(--border); background: var(--white); }
.header-main .wrap { 
  display: flex; align-items: center; gap: 16px;
  width: 100%;
  /* توازن: لوجو يمين | بحث وسط | أزرار يسار */
}

/* Logo */
.header-logo { flex-shrink: 0; }
.header-logo a, .header-logo .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.header-logo img { height: 44px; width: auto; }
.logo-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dk));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 900; color: #fff;
}
.logo-name { font-size: 20px; font-weight: 900; color: var(--dark); line-height: 1; }
.logo-sub  { font-size: 11px; color: var(--muted); }

/* Search Box */
.search-box { flex: 1 1 auto; max-width: 600px; min-width: 0; position: relative; }
.search-box form { display: flex; }
.search-box input[type=text] {
  width: 100%; padding: 11px 18px;
  border: 2px solid var(--border); border-left: none;
  border-radius: var(--rsm) 0 0 var(--rsm);
  font-size: 14px; outline: none; transition: var(--tr);
  background: var(--bg);
}
.search-box input[type=text]:focus { border-color: var(--blue); background: #fff; }
.search-box button[type=submit] {
  padding: 11px 20px;
  background: var(--blue); color: #fff; border: none;
  border-radius: 0 var(--rsm) var(--rsm) 0;
  cursor: pointer; font-size: 16px; transition: var(--tr); flex-shrink: 0;
}
.search-box button[type=submit]:hover { background: var(--blue-dk); }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 4px; margin-right: auto; }
.header-action-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 7px 12px; border-radius: var(--rsm);
  color: var(--text); transition: var(--tr); cursor: pointer; position: relative;
  text-decoration: none; border: none; background: none;
}
.header-action-item:hover { background: var(--blue-lt); color: var(--blue); }
.header-action-item .icon { font-size: 20px; line-height: 1; }
.header-action-item .bar-title { font-size: 10px; font-weight: 700; white-space: nowrap; }
.header-action-item .cart-qty {
  position: absolute; top: 4px; left: 8px;
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 900; width: 16px; height: 16px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

/* Nav Bar */
.header-nav {
  background: var(--dark); position: relative; z-index: 1001;
  overflow: visible;
}
.header-nav .wrap {
  display: flex; align-items: center;
  position: relative; overflow: visible;
  padding: 0;
}
/* القائمة الرئيسية */
.header-nav > .wrap > ul.top-menu {
  display: flex; align-items: center;
  flex-wrap: nowrap; overflow: visible;
  flex: 1; list-style: none; margin: 0; padding: 0;
}
/* عناصر المستوى الأول */
.header-nav > .wrap > ul.top-menu > li > a {
  display: flex; align-items: center; gap: 4px;
  padding: 12px 13px; font-size: 12.5px; font-weight: 700;
  color: rgba(255,255,255,.88); transition: var(--tr); white-space: nowrap;
}
.header-nav > .wrap > ul.top-menu > li > a:hover,
.header-nav > .wrap > ul.top-menu > li.active > a {
  color: #fff; background: rgba(255,255,255,.1);
}
/* ══ Dropdown / Sub-menu ══ */
.header-nav ul.top-menu > li { position: relative; list-style: none; }

/* القائمة الفرعية */
.header-nav ul.top-menu > li > .sub-menu {
    position: absolute; top: 100%; right: 0;
    background: #fff; border: 1.5px solid var(--border);
    border-radius: 0 0 var(--r) var(--r);
    box-shadow: 0 10px 40px rgba(0,0,0,.14);
    min-width: 210px; z-index: 9999; pointer-events: none;
    opacity: 0; visibility: hidden;
    transform: translateY(4px); transition: all .18s ease;
    pointer-events: none; list-style: none; padding: 5px 0; margin: 0;
}
.header-nav ul.top-menu > li:hover > .sub-menu {
    opacity: 1 !important; visibility: visible !important;
    transform: translateY(0); pointer-events: all !important;
}
.header-nav ul.top-menu > li > .sub-menu > li { list-style: none; }
.header-nav ul.top-menu > li > .sub-menu > li > a {
    display: flex; align-items: center;
    padding: 11px 20px; font-size: 13px; font-weight: 600;
    color: #1f2937 !important; border-bottom: 1px solid #f3f4f6;
    transition: var(--tr); white-space: nowrap; text-decoration: none;
    background: #fff !important;
}
.header-nav ul.top-menu > li > .sub-menu > li:last-child > a { border-bottom: none; }
.header-nav ul.top-menu > li > .sub-menu > li > a:hover {
    background: var(--blue-lt); color: var(--blue); padding-right: 26px;
}

/* سهم للعنصر الذي له قائمة فرعية */
.nav-arrow {
    font-size: 9px; opacity: .65; transition: transform .2s;
    display: inline-block; flex-shrink: 0;
}
.header-nav ul.top-menu > li:hover > a > .nav-arrow {
    transform: rotate(180deg); opacity: 1;
}

/* All Cats Button */
.all-cats-btn {
  padding: 12px 14px; background: var(--blue); color: #fff;
  border: none; font-size: 12.5px; font-weight: 800; cursor: pointer;
  font-family: var(--font); white-space: nowrap; transition: var(--tr);
  flex-shrink: 0; display: flex; align-items: center; gap: 5px;
}
.all-cats-btn:hover { background: var(--blue-dk); }

/* Mobile Toggle */
.mobile-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.mobile-toggle span { display: block; width: 24px; height: 2px; background: var(--dark); border-radius: 2px; transition: var(--tr); }

/* Flyout Cart */
.flyout-cart-wrap { position: relative; }
.mini-shopping-cart {
  position: absolute; top: calc(100% + 8px); left: 0;
  width: 320px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--sh-lg); z-index: 999;
  display: none; padding: 16px;
}
.flyout-cart-wrap:hover .mini-shopping-cart { display: block; }
.mini-shopping-cart .count { font-size: 13px; font-weight: 700; color: var(--dark); margin-bottom: 12px; }
.mini-shopping-cart .items { max-height: 280px; overflow-y: auto; }
.mini-shopping-cart .item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--bg2); }
.mini-shopping-cart .item:last-child { border-bottom: none; }
.mini-shopping-cart .item img { width: 48px; height: 48px; object-fit: contain; border-radius: 6px; border: 1px solid var(--border); }
.mini-shopping-cart .item .name { font-size: 12px; font-weight: 700; color: var(--dark); }
.mini-shopping-cart .item .price { font-size: 12px; color: var(--blue); font-weight: 800; }
.mini-shopping-cart .totals { padding: 12px 0 0; font-size: 14px; font-weight: 800; color: var(--dark); }
.mini-shopping-cart .buttons { display: flex; gap: 8px; margin-top: 12px; }
.mini-shopping-cart .button-1, .mini-shopping-cart .button-2 {
  flex: 1; padding: 10px; border-radius: var(--rsm); font-size: 12px; font-weight: 800;
  text-align: center; text-decoration: none; cursor: pointer; border: none; font-family: var(--font);
}
.mini-shopping-cart .button-1 { background: var(--blue); color: #fff; }
.mini-shopping-cart .button-2 { background: var(--bg2); color: var(--dark); }
.mini-shopping-cart .button-1:hover { background: var(--blue-dk); }
.mini-shopping-cart .button-2:hover { background: var(--border); }

/* Mobile Nav */
.mobile-nav-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 800;
}
.mobile-nav {
  position: fixed; top: 0; right: -290px; width: 280px; height: 100vh;
  background: #fff; z-index: 900; overflow-y: auto;
  transition: right .3s ease; box-shadow: var(--sh-lg);
}
.mobile-nav.open { right: 0; }
.mobile-nav-header {
  padding: 18px 20px; display: flex; justify-content: space-between;
  align-items: center; border-bottom: 1px solid var(--border);
  background: var(--dark);
}
.mobile-nav-close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: rgba(255,255,255,.8);
}
.mobile-nav ul li a {
  display: block; padding: 13px 20px; font-size: 14px; font-weight: 600;
  color: var(--text); border-bottom: 1px solid var(--bg2); transition: var(--tr);
}
.mobile-nav ul li a:hover { background: var(--blue-lt); color: var(--blue); padding-right: 26px; }

/* ══════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════ */
.newsletter-section {
  background: linear-gradient(135deg, var(--blue), var(--blue-dk));
  padding: 48px 20px; text-align: center;
}
.newsletter-section .inner { max-width: 560px; margin: 0 auto; }
.newsletter-section h2 { font-size: 24px; font-weight: 900; color: #fff; margin-bottom: 8px; }
.newsletter-section p  { font-size: 14px; color: rgba(255,255,255,.85); margin-bottom: 20px; }
.newsletter-section .newsletter-subscribe-block { display: flex; gap: 8px; }
.newsletter-section .newsletter-subscribe-block input[type=email] {
  flex: 1; padding: 13px 18px; border: none; border-radius: var(--rsm);
  font-size: 14px; font-family: var(--font); outline: none;
}
.newsletter-section .newsletter-subscribe-block button {
  padding: 13px 24px; background: rgba(255,255,255,.2); color: #fff; border: 2px solid rgba(255,255,255,.4);
  border-radius: var(--rsm); font-size: 14px; font-weight: 800; cursor: pointer; font-family: var(--font); white-space: nowrap; transition: var(--tr);
}
.newsletter-section .newsletter-subscribe-block button:hover { background: rgba(255,255,255,.3); }

.footer { background: #0f172a; color: rgba(255,255,255,.8); }
.footer-main { padding: 48px 0 32px; }
.footer-main .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-about .f-logo { font-size: 22px; font-weight: 900; color: #fff; margin-bottom: 14px; }
.footer-about p { font-size: 13px; line-height: 1.8; color: rgba(255,255,255,.6); margin-bottom: 18px; }
.social-row { display: flex; gap: 8px; }
.soc-btn {
  width: 36px; height: 36px; background: rgba(255,255,255,.1); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  transition: var(--tr); text-decoration: none;
}
.soc-btn:hover { background: var(--blue); transform: translateY(-2px); }
.footer-col h4 { font-size: 14px; font-weight: 800; color: #fff; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid rgba(255,255,255,.1); }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,.6); transition: var(--tr); }
.footer-links a:hover { color: #fff; padding-right: 4px; }
.footer-contact { display: flex; flex-direction: column; gap: 10px; }
.contact-item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,.7); }
.ci { font-size: 16px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 0;
}
.footer-bottom .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-bottom p { font-size: 12px; color: rgba(255,255,255,.5); }
.pay-icons { display: flex; gap: 6px; }
.pay-icon {
  padding: 4px 10px; background: rgba(255,255,255,.1);
  border-radius: 4px; font-size: 10px; font-weight: 700; color: rgba(255,255,255,.6);
}

/* ══════════════════════════════════════════════════
   BREADCRUMB
══════════════════════════════════════════════════ */
.breadcrumb {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.breadcrumb .wrap, .breadcrumb-list {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); flex-wrap: wrap;
}
.breadcrumb-list { padding: 0; }
.breadcrumb-list li { display: flex; align-items: center; gap: 6px; }
.breadcrumb-list li + li::before { content: '›'; }
.breadcrumb-list a { color: var(--muted); }
.breadcrumb-list a:hover { color: var(--blue); }
.breadcrumb-list .current { color: var(--dark); font-weight: 700; }

/* ══════════════════════════════════════════════════
   PAGE TITLE BAR
══════════════════════════════════════════════════ */
.page-title {
  background: var(--white); padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.page-title h1 {
  font-size: 22px; font-weight: 900; color: var(--dark);
  display: flex; align-items: center; gap: 12px;
}
.page-title h1::before {
  content: ''; display: block; width: 4px; height: 26px;
  background: var(--blue); border-radius: 2px; flex-shrink: 0;
}
.page { padding: 28px 0 48px; }

/* ══════════════════════════════════════════════════
   BUTTONS (Global)
══════════════════════════════════════════════════ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 28px; background: var(--blue); color: #fff; border: none;
  border-radius: var(--rsm); font-size: 14px; font-weight: 800;
  cursor: pointer; font-family: var(--font); transition: var(--tr); text-decoration: none;
}
.btn-primary:hover { background: var(--blue-dk); color: #fff; transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; background: var(--bg2); color: var(--text);
  border: 1.5px solid var(--border); border-radius: var(--rsm);
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--font); transition: var(--tr); text-decoration: none;
}
.btn-secondary:hover { background: var(--border); color: var(--dark); text-decoration: none; }

/* ══════════════════════════════════════════════════
   FORM ELEMENTS (Global)
══════════════════════════════════════════════════ */
.form-field { margin-bottom: 18px; }
.form-field label, label.field-title {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--dark); margin-bottom: 6px;
}
.form-field .required { color: var(--red); margin-right: 2px; }
input[type=text], input[type=email], input[type=password],
input[type=tel], input[type=number], input[type=url],
input[type=search], select, textarea {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: var(--rsm);
  font-size: 14px; font-family: var(--font); color: var(--dark);
  background: #fff; outline: none; transition: var(--tr); direction: rtl;
  -webkit-appearance: none;
}
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus,
input[type=tel]:focus, input[type=number]:focus, select:focus, textarea:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(26,92,255,.1);
}
input[readonly], input[disabled] { background: var(--bg); cursor: default; color: var(--muted); }
textarea { resize: vertical; min-height: 100px; line-height: 1.6; }
select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; padding-left: 32px; }
/* Custom checkbox */
.custom-checkbox, .nb-check {
  display: flex; align-items: flex-start; gap: 10px;
  cursor: pointer; font-size: 13px; color: var(--text); user-select: none; margin-bottom: 10px;
}
.custom-checkbox input[type=checkbox], .nb-check input[type=checkbox] { display: none; }
.custom-checkbox .check-icon, .nb-check .check-icon {
  width: 18px; height: 18px; min-width: 18px; border: 2px solid var(--border);
  border-radius: 4px; display: flex; align-items: center; justify-content: center;
  transition: var(--tr); margin-top: 2px;
}
.custom-checkbox input:checked ~ .check-icon,
.nb-check input:checked ~ .check-icon { background: var(--blue); border-color: var(--blue); }
.custom-checkbox input:checked ~ .check-icon::after,
.nb-check input:checked ~ .check-icon::after { content: '✓'; font-size: 11px; color: #fff; font-weight: 900; }
/* Radio */
.custom-radio { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; color: var(--text); margin-bottom: 8px; }
.custom-radio input[type=radio] { display: none; }
.custom-radio .radio-dot {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; transition: var(--tr); flex-shrink: 0;
}
.custom-radio input:checked ~ .radio-dot { border-color: var(--blue); }
.custom-radio input:checked ~ .radio-dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
/* Validation */
.field-validation-error, span[data-valmsg-for] { display: block; font-size: 11px; color: var(--red); margin-top: 4px; font-weight: 600; }
.message-error, .validation-summary-errors {
  background: #fef2f2; border: 1px solid #fecaca;
  border-radius: var(--rsm); padding: 12px 14px;
  margin-bottom: 16px; font-size: 13px; color: #991b1b;
}
.message-success, .result, .bar-notification.success {
  background: #ecfdf5; border: 1px solid #a7f3d0;
  border-radius: var(--rsm); padding: 12px 14px;
  font-size: 13px; color: #065f46; font-weight: 700; margin-bottom: 14px;
}
/* Form Row */
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ══════════════════════════════════════════════════
   SCROLL TOP + UTILS
══════════════════════════════════════════════════ */
.scroll-top {
  position: fixed; bottom: 24px; left: 24px;
  width: 44px; height: 44px; background: var(--blue); color: #fff;
  border: none; border-radius: 50%; cursor: pointer; font-size: 18px;
  display: none; align-items: center; justify-content: center;
  box-shadow: var(--sh); z-index: 400; transition: var(--tr);
}
.scroll-top.visible { display: flex; }
.scroll-top:hover { background: var(--blue-dk); transform: translateY(-2px); }

/* ══════════════════════════════════════════════════
   PRODUCT CARD (_ProductBox)
══════════════════════════════════════════════════ */
.product-item {
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--r);
  overflow: hidden; transition: var(--tr); position: relative;
}
.product-item:hover { box-shadow: var(--sh); border-color: var(--blue-lt); transform: translateY(-2px); }
.product-item .picture { position: relative; overflow: hidden; background: var(--bg); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.product-item .picture a { display: block; width: 100%; height: 100%; }
.product-item .picture img { width: 100%; height: 100%; object-fit: contain; padding: 10px; transition: transform .4s; }
.product-item:hover .picture img { transform: scale(1.06); }
.product-item .product-badge {
  position: absolute; top: 10px; right: 10px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 800;
  padding: 3px 8px; border-radius: 4px;
}
.product-item .product-badge.new { background: var(--green); }
.product-item .details { padding: 12px 14px; }
.product-item .product-title a {
  font-size: 13px; font-weight: 700; color: var(--dark); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-item .product-title a:hover { color: var(--blue); }
.product-item .rating { display: flex; gap: 2px; margin: 5px 0; font-size: 12px; color: var(--orange); }
.product-item .prices { display: flex; align-items: center; gap: 8px; margin: 6px 0 10px; }
.product-item .price-value, .product-item .actual-price { font-size: 16px; font-weight: 900; color: var(--blue); }
.product-item .old-price { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.product-item .add-to-cart-button, .product-item .btn-cart {
  display: block; width: 100%; padding: 9px;
  background: var(--blue); color: #fff; border: none; border-radius: var(--rsm);
  font-size: 12px; font-weight: 800; cursor: pointer; font-family: var(--font);
  text-align: center; text-decoration: none; transition: var(--tr);
}
.product-item .add-to-cart-button:hover, .product-item .btn-cart:hover { background: var(--blue-dk); }
.product-item .wishlist-button, .product-item .btn-wishlist {
  position: absolute; top: 10px; left: 10px;
  width: 32px; height: 32px; background: rgba(255,255,255,.9);
  border: 1px solid var(--border); border-radius: 50%; display: flex;
  align-items: center; justify-content: center; cursor: pointer; font-size: 14px;
  transition: var(--tr); text-decoration: none; color: var(--muted);
}
.product-item .wishlist-button:hover, .product-item .btn-wishlist:hover { background: #fef2f2; color: var(--red); border-color: var(--red); }

/* ══════════════════════════════════════════════════
   HOME PAGE
══════════════════════════════════════════════════ */
.home-section { padding: 32px 0; }
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.section-title {
  font-size: 20px; font-weight: 900; color: var(--dark);
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: ''; width: 4px; height: 24px; background: var(--blue);
  border-radius: 2px; flex-shrink: 0;
}
.section-view-all {
  font-size: 13px; color: var(--blue); font-weight: 700;
  text-decoration: none; display: flex; align-items: center; gap: 4px;
}
.section-view-all:hover { text-decoration: underline; }
.products-grid-4 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.products-grid-home { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.categories-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.category-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px; background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--r); text-decoration: none; transition: var(--tr);
  text-align: center;
}
.category-item:hover { border-color: var(--blue); background: var(--blue-lt); color: var(--blue); transform: translateY(-2px); }
.category-item img { width: 56px; height: 56px; object-fit: contain; }
.category-item span { font-size: 12px; font-weight: 700; color: inherit; line-height: 1.3; }
.features-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 20px 0; }
.feature-item { display: flex; align-items: center; gap: 14px; padding: 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--r); }
.feature-icon { font-size: 28px; flex-shrink: 0; width: 48px; height: 48px; background: var(--blue-lt); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.feature-title { font-size: 13px; font-weight: 800; color: var(--dark); }
.feature-sub   { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ══════════════════════════════════════════════════
   CATEGORY PAGE
══════════════════════════════════════════════════ */
.category-page { max-width: 1280px; margin: 0 auto; padding: 0 20px 48px; }
.cat-hero {
  background-size: cover; background-position: center;
  border-radius: var(--r); min-height: 180px;
  position: relative; display: flex; align-items: flex-end;
  margin: 20px 0; overflow: hidden;
}
.cat-hero-overlay { background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 100%); width: 100%; padding: 28px 30px; }
.cat-hero-title { font-size: 26px; font-weight: 900; color: #fff; margin-bottom: 4px; }
.cat-hero-desc  { font-size: 14px; color: rgba(255,255,255,.85); max-width: 600px; }
.cat-title-plain { padding: 20px 0 16px; }
.cat-title-plain h1 { font-size: 24px; font-weight: 900; color: var(--dark); margin-bottom: 6px; }
.cat-desc { font-size: 14px; color: var(--muted); line-height: 1.7; }

.cat-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }

/* Filter Sidebar */
.cat-sidebar {
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--r);
  position: sticky; top: 82px; overflow: hidden;
}
.sidebar-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; background: var(--bg); border-bottom: 1px solid var(--border);
}
.sidebar-head h3 { font-size: 14px; font-weight: 800; color: var(--dark); margin: 0; }
.sidebar-close-btn { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--muted); display: none; }
.filter-section { border-bottom: 1px solid var(--border); }
.filter-section:last-child { border-bottom: none; }
.filter-section-title {
  padding: 13px 18px; font-size: 13px; font-weight: 800; color: var(--dark);
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  user-select: none;
}
.filter-section-title::after { content: '▼'; font-size: 10px; color: var(--muted); transition: var(--tr); }
.filter-section-title.collapsed::after { transform: rotate(-90deg); }
.filter-section-body { padding: 10px 18px 14px; }
.filter-option {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 13px; color: var(--text); cursor: pointer;
  transition: var(--tr); border-radius: 4px;
}
.filter-option:hover { color: var(--blue); padding-right: 4px; }
.filter-option input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--blue); cursor: pointer; flex-shrink: 0; }
.filter-option .filter-count { margin-right: auto; font-size: 11px; color: var(--muted); background: var(--bg2); padding: 1px 6px; border-radius: 10px; }
.subcats-list { display: flex; flex-direction: column; gap: 4px; }
.subcat-link {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--rsm);
  font-size: 12px; font-weight: 700; color: var(--text); text-decoration: none; transition: var(--tr);
}
.subcat-link img { width: 22px; height: 22px; object-fit: contain; border-radius: 3px; }
.subcat-link:hover { background: var(--blue-lt); border-color: var(--blue); color: var(--blue); }
.filter-btn {
  display: block; width: 100%; padding: 10px;
  background: var(--blue); color: #fff; border: none; border-radius: var(--rsm);
  font-size: 13px; font-weight: 800; cursor: pointer; font-family: var(--font); margin-top: 10px;
}
.filter-clear { display: block; text-align: center; font-size: 12px; color: var(--red); margin-top: 8px; cursor: pointer; }
.filter-clear:hover { text-decoration: underline; }

/* Toolbar */
.cat-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--rsm); margin-bottom: 18px; gap: 10px; flex-wrap: wrap;
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; }
.btn-filter-toggle {
  padding: 8px 14px; background: var(--blue-lt); color: var(--blue); border: none;
  border-radius: var(--rsm); font-size: 12px; font-weight: 700; cursor: pointer;
  font-family: var(--font); display: none; align-items: center; gap: 5px;
}
.results-info { font-size: 13px; color: var(--muted); }
.sort-select {
  padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--rsm);
  font-size: 13px; font-family: var(--font); outline: none; background: #fff;
  cursor: pointer; color: var(--dark); width: auto;
}
.sort-select:focus { border-color: var(--blue); }
.view-toggle { display: flex; border: 1.5px solid var(--border); border-radius: var(--rsm); overflow: hidden; }
.view-toggle button {
  width: 34px; height: 32px; background: #fff; border: none; cursor: pointer;
  font-size: 15px; color: var(--muted); transition: var(--tr); display: flex; align-items: center; justify-content: center;
}
.view-toggle button.active { background: var(--blue); color: #fff; }

/* Products Grid in Category */
.cat-products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.cat-products-list { display: flex; flex-direction: column; gap: 12px; }
.cat-products-list .product-item { display: grid; grid-template-columns: 130px 1fr; }
.cat-products-list .product-item .picture { aspect-ratio: unset; height: 130px; }
.cat-products-list .product-item .details { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.pager-wrap { margin-top: 32px; display: flex; justify-content: center; }
.pager { display: flex; gap: 4px; align-items: center; list-style: none; padding: 0; margin: 0; }
.pager li { list-style: none; }
.pager li a, .pager li span {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 1.5px solid var(--border);
  border-radius: var(--rsm); font-size: 13px; font-weight: 700;
  color: var(--text); transition: var(--tr); text-decoration: none; background: #fff;
}
.pager li a:hover { border-color: var(--blue); color: var(--blue); }
.pager li.current-page span { background: var(--blue); border-color: var(--blue); color: #fff; }
.pager li.previous-page a::before { content: "\276F"; }
.pager li.next-page a::before { content: "\276E"; }

/* Empty State */
.empty-state {
  text-align: center; padding: 60px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-icon { font-size: 64px; }
.empty-state h3 { font-size: 20px; font-weight: 900; color: var(--dark); }
.empty-state p  { font-size: 14px; color: var(--muted); }

/* ══════════════════════════════════════════════════
   PRODUCT DETAIL PAGE
══════════════════════════════════════════════════ */
.product-page { max-width: 1280px; margin: 0 auto; padding: 28px 20px 48px; }
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 48px; }

/* Gallery */
.product-gallery { position: sticky; top: 82px; }
.gallery-main { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; position: relative; }
.gallery-main img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 16px; transition: transform .4s; }
.gallery-main:hover img { transform: scale(1.05); }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumb {
  width: 70px; height: 70px; border: 2px solid var(--border); border-radius: var(--rsm);
  overflow: hidden; cursor: pointer; flex-shrink: 0; background: var(--bg); transition: var(--tr);
  display: flex; align-items: center; justify-content: center;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.gallery-thumb:hover, .gallery-thumb.active { border-color: var(--blue); }
.gallery-badge { position: absolute; top: 14px; right: 14px; background: var(--red); color: #fff; font-size: 11px; font-weight: 900; padding: 4px 10px; border-radius: var(--rsm); }

/* Product Info */
.product-info {}
.product-breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.product-breadcrumb a { color: var(--muted); }
.product-breadcrumb a:hover { color: var(--blue); }
.product-name { font-size: 22px; font-weight: 900; color: var(--dark); line-height: 1.3; margin-bottom: 12px; }
.product-rating-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.stars { display: flex; gap: 2px; font-size: 15px; }
.star-filled { color: var(--orange); }
.star-empty  { color: var(--border); }
.rating-count { font-size: 12px; color: var(--blue); font-weight: 600; }
.product-price-block { margin-bottom: 18px; }
.product-price { font-size: 28px; font-weight: 900; color: var(--blue); }
.product-old-price { font-size: 16px; color: var(--muted); text-decoration: line-through; margin-right: 8px; }
.product-discount-pct { background: var(--red); color: #fff; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 4px; margin-right: 8px; }
.product-sku { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.product-short-desc { font-size: 14px; color: var(--text); line-height: 1.7; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
/* Attributes */
.product-attributes { margin-bottom: 20px; }
.attr-group { margin-bottom: 14px; }
.attr-label { font-size: 13px; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.attr-options { display: flex; flex-wrap: wrap; gap: 6px; }
.attr-option {
  padding: 7px 16px; border: 1.5px solid var(--border); border-radius: var(--rsm);
  font-size: 12px; font-weight: 700; color: var(--text); cursor: pointer; transition: var(--tr);
  background: #fff;
}
.attr-option:hover, .attr-option.selected { border-color: var(--blue); background: var(--blue-lt); color: var(--blue); }
.attr-option.disabled { opacity: .4; cursor: not-allowed; }
/* Qty + Add to Cart */
.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.qty-label { font-size: 13px; font-weight: 700; color: var(--dark); }
.qty-control { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--rsm); overflow: hidden; }
.qty-btn {
  width: 38px; height: 42px; background: var(--bg2); border: none; cursor: pointer;
  font-size: 20px; font-weight: 700; color: var(--dark); transition: var(--tr);
  display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: var(--blue); color: #fff; }
.qty-input {
  width: 50px; height: 42px; border: none; border-right: 1px solid var(--border); border-left: 1px solid var(--border);
  text-align: center; font-size: 16px; font-weight: 700; outline: none; font-family: var(--font); padding: 0; color: var(--dark);
}
.product-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-add-to-cart {
  flex: 1; min-width: 160px; padding: 14px 28px;
  background: var(--blue); color: #fff; border: none; border-radius: var(--rsm);
  font-size: 15px; font-weight: 900; cursor: pointer; font-family: var(--font);
  display: flex; align-items: center; justify-content: center; gap: 8px; transition: var(--tr);
}
.btn-add-to-cart:hover { background: var(--blue-dk); transform: translateY(-1px); }
.btn-wishlist-detail {
  width: 48px; height: 48px; background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--rsm); cursor: pointer; font-size: 20px; display: flex;
  align-items: center; justify-content: center; transition: var(--tr);
}
.btn-wishlist-detail:hover { border-color: var(--red); background: #fef2f2; }
.btn-compare-detail {
  width: 48px; height: 48px; background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--rsm); cursor: pointer; font-size: 20px; display: flex;
  align-items: center; justify-content: center; transition: var(--tr);
}
.btn-compare-detail:hover { border-color: var(--blue); background: var(--blue-lt); }
/* Product trust badges */
.product-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 20px; }
.trust-badge {
  display: flex; align-items: center; gap: 6px; padding: 10px; background: var(--bg);
  border-radius: var(--rsm); font-size: 11px; color: var(--text);
}
.trust-badge .ti { font-size: 18px; }

/* Tabs */
.product-tabs { border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; background: #fff; margin-bottom: 48px; }
.tab-list { display: flex; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab-btn {
  padding: 14px 24px; background: none; border: none; cursor: pointer;
  font-size: 14px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent;
  white-space: nowrap; font-family: var(--font); transition: var(--tr);
}
.tab-btn:hover { color: var(--blue); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); background: var(--blue-lt); }
.tab-panel { padding: 24px; display: none; }
.tab-panel.active { display: block; }
.tab-panel p { font-size: 14px; line-height: 1.8; color: var(--text); margin-bottom: 12px; }

/* Related Products */
.related-section { margin-top: 48px; }

/* ══════════════════════════════════════════════════
   AUTH PAGES (Login / Register)
══════════════════════════════════════════════════ */
.auth-page {
  min-height: calc(100vh - 300px); display: flex;
  align-items: center; justify-content: center;
  padding: 40px 16px; background: linear-gradient(135deg, #f0f4ff 0%, var(--bg) 100%);
}
.auth-page-wide { align-items: flex-start; }
.auth-card {
  background: #fff; border-radius: 20px; padding: 40px;
  width: 100%; max-width: 480px;
  box-shadow: 0 8px 40px rgba(26,92,255,.12);
  border: 1px solid rgba(26,92,255,.08);
}
.auth-page-wide .auth-card { max-width: 620px; }
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-icon {
  width: 66px; height: 66px; margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dk));
  border-radius: 18px; display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; color: #fff;
  box-shadow: 0 8px 24px rgba(26,92,255,.3);
}
.auth-header h1 { font-size: 22px; font-weight: 900; color: var(--dark); margin-bottom: 6px; }
.auth-header p  { font-size: 13px; color: var(--muted); }
.auth-footer    { text-align: center; margin-top: 22px; font-size: 13px; color: var(--muted); }
.auth-link      { color: var(--blue); font-weight: 700; margin-right: 4px; }
.auth-link:hover { text-decoration: underline; }
.auth-divider   { text-align: center; margin: 20px 0; position: relative; }
.auth-divider::before { content:''; position:absolute; top:50%; right:0; left:0; height:1px; background:var(--border); }
.auth-divider span { background:#fff; padding:0 12px; position:relative; font-size:12px; color:var(--muted); }
.guest-box { text-align:center; padding:18px; background:var(--bg); border-radius:var(--r); margin-bottom:22px; }
.guest-icon { font-size:36px; margin-bottom:8px; }
.guest-box h3 { font-size:15px; font-weight:800; margin-bottom:6px; }
.guest-box p  { font-size:12px; color:var(--muted); margin-bottom:12px; }
/* Password wrap */
.pass-field { position:relative; }
.pass-field input { padding-left:42px; }
.pass-eye { position:absolute; left:10px; top:50%; transform:translateY(-50%); background:none; border:none; cursor:pointer; font-size:16px; opacity:.6; padding:4px; }
.pass-eye:hover { opacity:1; }
/* Remember row */
.remember-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
.forgot-link   { font-size:12px; color:var(--blue); font-weight:600; }
.forgot-link:hover { text-decoration:underline; }
/* Buttons */
.btn-auth {
  display:flex; align-items:center; justify-content:center; gap:8px;
  width:100%; padding:13px; background:var(--blue); color:#fff; border:none;
  border-radius:var(--rsm); font-size:15px; font-weight:800; cursor:pointer;
  font-family:var(--font); transition:var(--tr); text-decoration:none; margin-top:8px;
}
.btn-auth:hover { background:var(--blue-dk); color:#fff; transform:translateY(-1px); }
.btn-auth-ghost {
  display:block; width:100%; padding:11px; border:2px solid var(--blue);
  color:var(--blue); border-radius:var(--rsm); font-weight:800; text-align:center;
  transition:var(--tr); font-size:14px; cursor:pointer; background:none; font-family:var(--font);
}
.btn-auth-ghost:hover { background:var(--blue-lt); color:var(--blue); }
/* Gender buttons */
.gender-row { display:flex; gap:10px; }
.gender-btn {
  flex:1; padding:10px; border:1.5px solid var(--border); border-radius:var(--rsm);
  cursor:pointer; text-align:center; font-size:13px; font-weight:700;
  display:flex; align-items:center; justify-content:center; gap:6px;
  transition:var(--tr); background:#fff;
}
.gender-btn input[type=radio] { display:none; }
.gender-btn:has(input:checked), .gender-btn.selected { border-color:var(--blue); background:var(--blue-lt); color:var(--blue); }

/* ══════════════════════════════════════════════════
   ACCOUNT PAGES
══════════════════════════════════════════════════ */
.account-page { max-width: 1140px; margin: 0 auto; padding: 28px 20px 48px; }
.account-wrap  { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; }

/* Sidebar Nav */
.account-nav-wrap { position: sticky; top: 82px; }
.account-user-head {
  background: linear-gradient(135deg, var(--blue), var(--blue-dk));
  border-radius: var(--r) var(--r) 0 0; padding: 18px 16px;
  display: flex; align-items: center; gap: 12px;
}
.account-avatar {
  width: 44px; height: 44px; background: rgba(255,255,255,.2);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.account-uname { font-size: 14px; font-weight: 800; color: #fff; }
.account-ulabel { font-size: 11px; color: rgba(255,255,255,.7); }
.account-nav {
  background: #fff; border: 1.5px solid var(--border); border-top: none;
  border-radius: 0 0 var(--r) var(--r); overflow: hidden;
}
.account-nav a {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px;
  font-size: 13px; font-weight: 600; color: var(--text);
  border-bottom: 1px solid var(--bg2); transition: var(--tr); text-decoration: none;
}
.account-nav a:last-child { border-bottom: none; }
.account-nav a:hover     { background: var(--blue-lt); color: var(--blue); padding-right: 20px; }
.account-nav a.active    { background: var(--blue-lt); color: var(--blue); font-weight: 800; border-right: 3px solid var(--blue); }
.account-nav .nav-ic     { font-size: 15px; }
.nav-logout { color: var(--red) !important; }
.nav-logout:hover { background: #fef2f2 !important; color: var(--red) !important; }

/* Account Content */
.account-body { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); padding: 28px; min-height: 400px; }
.account-title {
  font-size: 17px; font-weight: 900; color: var(--dark);
  margin-bottom: 22px; padding-bottom: 14px; border-bottom: 2px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.account-title-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 22px; padding-bottom: 14px; border-bottom: 2px solid var(--border);
}
.account-title-row .account-title { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.fieldset-box { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r); padding: 20px; margin-bottom: 18px; }
.fieldset-title { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 14px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.btn-save {
  padding: 11px 28px; background: var(--blue); color: #fff; border: none;
  border-radius: var(--rsm); font-size: 14px; font-weight: 800; cursor: pointer; font-family: var(--font); transition: var(--tr);
}
.btn-save:hover { background: var(--blue-dk); }
.btn-back-link {
  padding: 10px 20px; background: var(--bg2); color: var(--text);
  border: 1.5px solid var(--border); border-radius: var(--rsm); font-size: 13px;
  font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
}
.btn-back-link:hover { background: var(--border); color: var(--dark); text-decoration: none; }

/* Orders Table */
.orders-table-box { border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; }
.orders-table { width: 100%; border-collapse: collapse; }
.orders-table th {
  padding: 12px 16px; background: var(--bg); font-size: 12px; font-weight: 800;
  color: var(--dark); border-bottom: 2px solid var(--border); text-align: right; white-space: nowrap;
}
.orders-table td { padding: 14px 16px; border-bottom: 1px solid var(--bg2); font-size: 13px; vertical-align: middle; }
.orders-table tr:last-child td { border-bottom: none; }
.orders-table tr:hover td { background: #f9fafb; }
.order-num-lnk { font-weight: 800; color: var(--blue); font-size: 14px; text-decoration: none; }
.order-num-lnk:hover { text-decoration: underline; }
.order-status-badge {
  display: inline-flex; align-items: center; padding: 4px 12px;
  border-radius: 50px; font-size: 11px; font-weight: 700;
}
.order-status-badge.pending         { background: #fffbeb; color: #92400e; }
.order-status-badge.pendingpayment  { background: #fffbeb; color: #92400e; }
.order-status-badge.processing      { background: var(--blue-lt); color: var(--blue-dk); }
.order-status-badge.complete        { background: #ecfdf5; color: #065f46; }
.order-status-badge.cancelled       { background: #fef2f2; color: #991b1b; }
.btn-order-details { font-size: 12px; color: var(--blue); font-weight: 700; text-decoration: none; }
.btn-order-details:hover { text-decoration: underline; }

/* Order Details */
.order-details-page { max-width: 1100px; margin: 0 auto; padding: 28px 20px 48px; }
.od-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--border);
  flex-wrap: wrap; gap: 12px;
}
.od-title { font-size: 20px; font-weight: 900; color: var(--dark); }
.od-title .num { color: var(--blue); }
.od-status-bar {
  display: flex; gap: 20px; background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 16px 20px; margin-bottom: 20px; flex-wrap: wrap;
}
.od-stat { display: flex; flex-direction: column; gap: 4px; }
.od-stat-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.od-layout { display: grid; grid-template-columns: 1fr 300px; gap: 18px; }
.od-main, .od-side { display: flex; flex-direction: column; gap: 16px; }
.od-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; }
.od-card-head { padding: 13px 18px; background: var(--bg); border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 800; color: var(--dark); }
.od-table { width: 100%; border-collapse: collapse; }
.od-table th { padding: 10px 16px; font-size: 11px; font-weight: 800; color: var(--muted); border-bottom: 1px solid var(--border); text-align: right; }
.od-table td { padding: 14px 16px; border-bottom: 1px solid var(--bg2); font-size: 13px; vertical-align: middle; }
.od-table tr:last-child td { border-bottom: none; }
.od-prod-row { display: flex; align-items: center; gap: 12px; }
.od-prod-img  { width: 50px; height: 50px; object-fit: contain; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); padding: 4px; }
.od-prod-name { font-weight: 700; color: var(--dark); font-size: 13px; text-decoration: none; }
.od-prod-name:hover { color: var(--blue); text-decoration: underline; }
.od-total-row { display: flex; justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid var(--bg2); font-size: 13px; }
.od-total-row:last-child { border-bottom: none; }
.od-total-row.grand { background: var(--bg); font-weight: 900; font-size: 15px; padding: 14px 18px; }
.od-total-row.grand strong { color: var(--blue); font-size: 18px; }
.od-info-body { padding: 16px 18px; font-size: 13px; line-height: 1.8; color: var(--text); }
.od-info-body .name { font-weight: 800; color: var(--dark); font-size: 15px; margin-bottom: 4px; }
.od-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.btn-reorder { padding: 10px 22px; background: var(--blue); color: #fff; border: none; border-radius: var(--rsm); font-size: 13px; font-weight: 800; cursor: pointer; font-family: var(--font); transition: var(--tr); }
.btn-reorder:hover { background: var(--blue-dk); }
.btn-print { padding: 10px 22px; background: var(--bg2); color: var(--text); border: 1.5px solid var(--border); border-radius: var(--rsm); font-size: 13px; font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; }
.btn-print:hover { background: var(--border); text-decoration: none; color: var(--dark); }

/* Address Grid */
.address-grid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.address-card { background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r); padding: 18px; }
.addr-name { font-size: 15px; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.addr-line { font-size: 13px; color: var(--text); margin-bottom: 3px; line-height: 1.6; }
.addr-btns { display: flex; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.btn-addr-edit { flex: 1; padding: 8px; background: var(--blue-lt); color: var(--blue); border: none; border-radius: var(--rsm); font-size: 12px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; font-family: var(--font); transition: var(--tr); }
.btn-addr-del  { flex: 1; padding: 8px; background: #fef2f2; color: var(--red); border: none; border-radius: var(--rsm); font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--font); transition: var(--tr); }
.btn-addr-edit:hover { background: var(--blue); color: #fff; }
.btn-addr-del:hover  { background: var(--red); color: #fff; }

/* ══════════════════════════════════════════════════
   SHOPPING CART
══════════════════════════════════════════════════ */
.cart-page { max-width: 1220px; margin: 0 auto; padding: 28px 20px 48px; }
.cart-page-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.cart-page-title h1 { font-size: 22px; font-weight: 900; color: var(--dark); display: flex; align-items: center; gap: 10px; }
.cart-count { background: var(--blue-lt); color: var(--blue); font-size: 12px; font-weight: 800; padding: 4px 14px; border-radius: 50px; }
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }

.cart-table-box { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { padding: 13px 16px; background: var(--bg); font-size: 12px; font-weight: 800; color: var(--dark); border-bottom: 2px solid var(--border); text-align: right; }
.cart-table td { padding: 14px 16px; border-bottom: 1px solid var(--bg2); font-size: 13px; vertical-align: middle; }
.cart-table tr:last-child td { border-bottom: none; }
.cart-table tr:hover td { background: #fafafa; }
.cart-prod-img { width: 66px; height: 66px; object-fit: contain; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); padding: 4px; display: block; }
.cart-prod-name { font-size: 14px; font-weight: 700; color: var(--dark); text-decoration: none; display: block; line-height: 1.4; }
.cart-prod-name:hover { color: var(--blue); text-decoration: underline; }
.cart-prod-attrs { font-size: 11px; color: var(--muted); margin-top: 3px; }
.cart-price { font-size: 14px; font-weight: 700; color: var(--dark); }
.cart-total-price { font-size: 15px; font-weight: 900; color: var(--blue); }
.cart-remove {
  width: 30px; height: 30px; background: #fef2f2; color: var(--red); border: none;
  border-radius: 50%; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: var(--tr);
}
.cart-remove:hover { background: var(--red); color: #fff; }
/* Cart Qty Control */
.cart-qty { display: flex; align-items: center; border: 1.5px solid var(--border); border-radius: var(--rsm); overflow: hidden; width: 110px; }
.cart-qty-btn { width: 32px; height: 36px; background: var(--bg2); border: none; cursor: pointer; font-size: 18px; font-weight: 700; color: var(--dark); display: flex; align-items: center; justify-content: center; transition: var(--tr); flex-shrink: 0; }
.cart-qty-btn:hover { background: var(--blue); color: #fff; }
.cart-qty-inp { flex: 1; border: none; border-right: 1px solid var(--border); border-left: 1px solid var(--border); text-align: center; font-size: 14px; font-weight: 700; outline: none; font-family: var(--font); height: 36px; }
.cart-qty-inp::-webkit-outer-spin-button, .cart-qty-inp::-webkit-inner-spin-button { -webkit-appearance: none; }
/* Cart Footer */
.cart-table-footer { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--bg); border-top: 1px solid var(--border); flex-wrap: wrap; gap: 10px; }
.btn-update-cart { padding: 9px 20px; background: var(--bg2); color: var(--text); border: 1.5px solid var(--border); border-radius: var(--rsm); font-size: 13px; font-weight: 700; cursor: pointer; font-family: var(--font); transition: var(--tr); }
.btn-update-cart:hover { background: var(--border); }
.btn-continue-shopping { font-size: 13px; color: var(--blue); font-weight: 700; text-decoration: none; }
.btn-continue-shopping:hover { text-decoration: underline; }
/* Coupon / Gift Cards */
.cart-extra-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.coupon-box { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); padding: 18px; }
.coupon-box h4 { font-size: 14px; font-weight: 800; color: var(--dark); margin-bottom: 12px; }
.coupon-input-row { display: flex; gap: 8px; }
.coupon-input-row input { flex: 1; }
.btn-coupon { padding: 11px 18px; background: var(--blue); color: #fff; border: none; border-radius: var(--rsm); font-size: 13px; font-weight: 800; cursor: pointer; font-family: var(--font); white-space: nowrap; }
.coupon-result { font-size: 12px; margin-top: 8px; font-weight: 600; }
.coupon-result.ok  { color: var(--green); }
.coupon-result.err { color: var(--red); }
/* Cart Summary Sidebar */
.cart-summary-box { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); padding: 22px; position: sticky; top: 82px; }
.cart-summary-box h3 { font-size: 16px; font-weight: 900; color: var(--dark); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--border); }
.order-summary-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--bg2); font-size: 13px; }
.order-summary-row:last-child { border-bottom: none; }
.order-summary-total { display: flex; justify-content: space-between; padding: 14px 0 0; font-size: 16px; font-weight: 900; color: var(--dark); }
.order-summary-total .price { font-size: 20px; color: var(--blue); }
.btn-checkout {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px; background: var(--blue); color: #fff;
  border-radius: var(--r); font-size: 16px; font-weight: 900;
  text-decoration: none; margin-top: 16px; transition: var(--tr);
  box-shadow: 0 4px 20px rgba(26,92,255,.3); border: none; cursor: pointer; font-family: var(--font);
}
.btn-checkout:hover { background: var(--blue-dk); color: #fff; transform: translateY(-1px); }
.secure-note { text-align: center; font-size: 12px; color: var(--green); font-weight: 700; margin-top: 10px; }
.pay-badges { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.pay-badge { padding: 3px 9px; background: var(--bg); border: 1px solid var(--border); border-radius: 4px; font-size: 10px; font-weight: 700; color: var(--muted); }

/* ══════════════════════════════════════════════════
   CHECKOUT PAGE
══════════════════════════════════════════════════ */
.checkout-page { max-width: 1100px; margin: 0 auto; padding: 28px 20px 48px; }
.checkout-steps {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin-bottom: 28px; overflow: hidden; border-radius: 50px;
  border: 1.5px solid var(--border); background: #fff; width: fit-content;
  margin-left: auto; margin-right: auto; padding: 4px;
}
.checkout-step {
  display: flex; align-items: center; gap: 8px; padding: 9px 22px;
  border-radius: 50px; font-size: 13px; font-weight: 700; color: var(--muted); transition: var(--tr);
}
.checkout-step.active    { background: var(--blue); color: #fff; }
.checkout-step.completed { background: var(--green); color: #fff; }
.step-num { width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.1); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; flex-shrink: 0; }
.checkout-step.active .step-num, .checkout-step.completed .step-num { background: rgba(255,255,255,.3); }
.checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.checkout-main { display: flex; flex-direction: column; gap: 14px; }
.opc-block { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; }
.opc-block-title {
  padding: 15px 20px; background: var(--bg); border-bottom: 1px solid var(--border);
  font-size: 15px; font-weight: 800; color: var(--dark);
  display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none;
}
.opc-block-title .step-icon { width: 28px; height: 28px; background: var(--blue); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 900; flex-shrink: 0; }
.opc-block-title.locked .step-icon { background: var(--border); color: var(--muted); }
.opc-block-title.locked { cursor: default; opacity: .65; }
.opc-block-body { padding: 22px; }
.checkout-summary-sidebar { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); padding: 22px; position: sticky; top: 82px; }
.checkout-summary-sidebar h3 { font-size: 16px; font-weight: 900; color: var(--dark); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--border); }
/* Shipping / Payment Methods */
.method-option {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1.5px solid var(--border); border-radius: var(--r); cursor: pointer;
  margin-bottom: 10px; transition: var(--tr); background: #fff;
}
.method-option:has(input:checked) { border-color: var(--blue); background: var(--blue-lt); }
.method-option input[type=radio] { accent-color: var(--blue); width: 16px; height: 16px; }
.method-label { font-size: 14px; font-weight: 700; color: var(--dark); }
.method-desc  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.method-price { margin-right: auto; font-size: 14px; font-weight: 900; color: var(--blue); }
.checkout-next-btn { padding: 12px 28px; background: var(--blue); color: #fff; border: none; border-radius: var(--rsm); font-size: 14px; font-weight: 800; cursor: pointer; font-family: var(--font); display: flex; align-items: center; gap: 8px; transition: var(--tr); margin-top: 16px; }
.checkout-next-btn:hover { background: var(--blue-dk); }

/* ══════════════════════════════════════════════════
   SEARCH PAGE
══════════════════════════════════════════════════ */
.search-page { max-width: 1280px; margin: 0 auto; padding: 28px 20px 48px; }
.search-form-box { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); padding: 22px; margin-bottom: 28px; }
.search-form-box h2 { font-size: 18px; font-weight: 900; color: var(--dark); margin-bottom: 16px; }
.search-input-row { display: flex; gap: 8px; margin-bottom: 14px; }
.search-input-row input { flex: 1; padding: 13px 18px; border: 2px solid var(--border); border-radius: var(--r); font-size: 15px; outline: none; transition: var(--tr); }
.search-input-row input:focus { border-color: var(--blue); }
.btn-search { padding: 13px 28px; background: var(--blue); color: #fff; border: none; border-radius: var(--r); font-size: 15px; font-weight: 800; cursor: pointer; font-family: var(--font); white-space: nowrap; }
.btn-search:hover { background: var(--blue-dk); }
.search-filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search-filters select, .search-filters input[type=number] { width: auto; min-width: 0; }
.search-results-count { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
.search-results-count strong { color: var(--dark); }
.search-cats-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.search-cat-chip { padding: 7px 16px; background: var(--bg); border: 1.5px solid var(--border); border-radius: 50px; font-size: 13px; font-weight: 700; color: var(--text); text-decoration: none; transition: var(--tr); }
.search-cat-chip:hover { background: var(--blue-lt); border-color: var(--blue); color: var(--blue); text-decoration: none; }

/* ══════════════════════════════════════════════════
   WISHLIST
══════════════════════════════════════════════════ */
.wishlist-page { max-width: 1280px; margin: 0 auto; padding: 28px 20px 48px; }
.wishlist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin: 18px 0; }
.wishlist-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; transition: var(--tr); }
.wishlist-card:hover { box-shadow: var(--sh); border-color: var(--blue-lt); }
.wishlist-img { display: block; height: 160px; background: var(--bg); overflow: hidden; }
.wishlist-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; transition: transform .3s; }
.wishlist-img:hover img { transform: scale(1.04); }
.wishlist-info { padding: 14px; }
.wishlist-name { font-size: 13px; font-weight: 700; color: var(--dark); text-decoration: none; display: block; margin-bottom: 6px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wishlist-name:hover { color: var(--blue); text-decoration: underline; }
.wishlist-price { font-size: 15px; font-weight: 900; color: var(--blue); margin-bottom: 10px; }
.wishlist-actions { display: flex; gap: 8px; }
.btn-wl-cart { flex: 1; padding: 8px; background: var(--blue); color: #fff; border: none; border-radius: var(--rsm); font-size: 12px; font-weight: 700; cursor: pointer; font-family: var(--font); transition: var(--tr); }
.btn-wl-cart:hover { background: var(--blue-dk); }
.btn-wl-remove { width: 34px; height: 34px; background: #fef2f2; color: var(--red); border: none; border-radius: var(--rsm); cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; transition: var(--tr); }
.btn-wl-remove:hover { background: var(--red); color: #fff; }
.wishlist-footer-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }

/* ══════════════════════════════════════════════════
   ORDER TOTALS COMPONENT
══════════════════════════════════════════════════ */
.order-review-data { font-size: 13px; }
.order-review-data .order-subtotal td, .order-review-data .cart-subtotal td { padding: 8px 0; border-bottom: 1px solid var(--bg2); display: flex; justify-content: space-between; }
.total-info { display: flex; flex-direction: column; gap: 0; }
.cart-total { font-weight: 900; font-size: 15px; color: var(--dark); }
.cart-total-left { color: var(--muted); font-weight: 600; }
.cart-total-right { font-weight: 800; color: var(--dark); }
table.cart-total-box { width: 100%; }
table.cart-total-box td { padding: 8px 0; font-size: 13px; border-bottom: 1px solid var(--bg2); }
table.cart-total-box tr:last-child td { border-bottom: none; font-weight: 900; font-size: 15px; }
table.cart-total-box .value { text-align: left; font-weight: 800; }

/* ══════════════════════════════════════════════════
   TOPIC / STATIC PAGES
══════════════════════════════════════════════════ */
.topic-page, .topic-block { max-width: 860px; margin: 0 auto; padding: 32px 20px 48px; }
.topic-page .page-body, .topic-block .page-body {
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--r);
  padding: 36px; line-height: 1.9; font-size: 15px; color: var(--text);
}
.topic-page .page-body h1, .topic-page .page-body h2, .topic-page .page-body h3 { color: var(--dark); font-weight: 900; margin: 24px 0 12px; }
.topic-page .page-body p { margin-bottom: 14px; }
.topic-page .page-body ul, .topic-page .page-body ol { padding-right: 24px; margin-bottom: 14px; list-style: disc; }
.topic-page .page-body a { color: var(--blue); }
.topic-page .page-body table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.topic-page .page-body table th { background: var(--dark); color: #fff; padding: 12px 16px; text-align: right; font-size: 13px; }
.topic-page .page-body table td { padding: 11px 16px; border-bottom: 1px solid var(--border); font-size: 13px; }

/* ══════════════════════════════════════════════════
   COMPARE / RECENTLY VIEWED
══════════════════════════════════════════════════ */
.compare-products-page, .recently-viewed-products-page { max-width: 1280px; margin: 0 auto; padding: 28px 20px 48px; }
.compare-bar { position: fixed; bottom: 0; right: 0; left: 0; background: #fff; border-top: 2px solid var(--blue); box-shadow: 0 -4px 20px rgba(0,0,0,.1); padding: 12px 20px; z-index: 500; display: none; align-items: center; justify-content: center; gap: 14px; }
.compare-bar.visible { display: flex; }

/* ══════════════════════════════════════════════════
   NOTIFICATIONS / AJAX
══════════════════════════════════════════════════ */
.bar-notification {
  position: fixed; top: 0; right: 0; left: 0; z-index: 9999;
  padding: 12px 20px; text-align: center; font-size: 13px; font-weight: 700;
  display: none; animation: slideDown .3s ease;
}
@keyframes slideDown { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.bar-notification.success { background: #10b981; color: #fff; display: block; }
.bar-notification.error   { background: var(--red); color: #fff; display: block; }
.bar-notification .close { float: left; background: none; border: none; color: #fff; cursor: pointer; font-size: 18px; }
.ajax-loading-block-window { display: flex; align-items: center; justify-content: center; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 9998; }

/* ══════════════════════════════════════════════════
   RESPONSIVE — Mobile & Tablet
══════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .products-grid-4, .products-grid-home { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1024px) {
  .cat-layout { grid-template-columns: 1fr; }
  .cat-sidebar {
    position: fixed; top: 0; right: -290px; height: 100vh; width: 280px;
    z-index: 900; transition: right .3s; overflow-y: auto; border-radius: 0;
  }
  .cat-sidebar.open { right: 0; box-shadow: var(--sh-lg); }
  .cat-sidebar::before { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: -1; display: none; }
  .cat-sidebar.open::before { display: block; }
  .sidebar-close-btn { display: flex; }
  .btn-filter-toggle { display: flex; }
  .checkout-layout, .od-layout { grid-template-columns: 1fr; }
  .footer-main .wrap { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 768px) {
  .header-topbar { display: none; }
  .mobile-toggle { display: flex; }
  .search-box { order: 3; flex: none; width: 100%; max-width: 100%; }
  .header-main .wrap { flex-wrap: wrap; }
  .header-actions .bar-title { display: none; }
  .header-actions { gap: 2px; }
  .header-nav { display: none; }
  .products-grid-4, .products-grid-home { grid-template-columns: repeat(3, 1fr); }
  .categories-grid { grid-template-columns: repeat(4, 1fr); }
  .features-bar { grid-template-columns: repeat(2, 1fr); }
  .account-wrap { grid-template-columns: 1fr; }
  .account-nav-wrap { position: static; }
  .cart-layout { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .cart-extra-row { grid-template-columns: 1fr; }
  .cart-table th:nth-child(3), .cart-table td:nth-child(3) { display: none; }
  .footer-main .wrap { grid-template-columns: 1fr; gap: 24px; }
  .auth-card { padding: 28px 20px; }
}
@media (max-width: 540px) {
  .products-grid-4, .products-grid-home, .cat-products-grid { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .wishlist-grid { grid-template-columns: repeat(2, 1fr); }
  .cart-table th:nth-child(2), .cart-table td:nth-child(2) { display: none; }
  .product-layout { grid-template-columns: 1fr; }
  .checkout-steps .checkout-step span:last-child { display: none; }
}

/* ════════════════════════════════════════════════════════
   NEBRAS FIX v2.2 — Complete Header / item-box / Search
════════════════════════════════════════════════════════ */

/* ══ 1. HEADER BALANCE ══════════════════════════════════ */
.header-main .wrap {
  display: flex; align-items: center; gap: 20px;
}
.header-logo { flex-shrink: 0; }

/* Search box — يمتد ليملأ المساحة */
.search-box {
  flex: 1;
  min-width: 0;
  max-width: none;
}
/* nopCommerce renders <div class="store-search-box"> around the search form */
.store-search-box { flex: 1; min-width: 0; }
.store-search-box form,
.search-box form { display: flex; }
.store-search-box input[type=text],
.search-box input[type=text] {
  width: 100%; padding: 11px 18px;
  border: 2px solid var(--border); border-left: none;
  border-radius: var(--rsm) 0 0 var(--rsm);
  font-size: 14px; outline: none; transition: var(--tr);
  background: var(--bg);
}
.store-search-box input[type=text]:focus,
.search-box input[type=text]:focus { border-color: var(--blue); background: #fff; }
.store-search-box button[type=submit],
.search-box button[type=submit] {
  padding: 11px 22px;
  background: var(--blue); color: #fff; border: none;
  border-radius: 0 var(--rsm) var(--rsm) 0;
  cursor: pointer; font-size: 14px; font-weight: 700;
  font-family: var(--font); transition: var(--tr); flex-shrink: 0;
  white-space: nowrap;
}
.store-search-box button[type=submit]:hover,
.search-box button[type=submit]:hover { background: var(--blue-dk); }

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

/* ══ 2. TOPBAR HEADER-LINKS (nopCommerce default) ════════ */
.header-links {
  list-style: none; padding: 0; margin: 0;
  display: flex; align-items: center; gap: 0;
}
.header-links li { display: inline-flex; align-items: center; }
.header-links li + li {
  border-right: 1px solid rgba(255,255,255,.2);
  padding-right: 8px; margin-right: 4px;
}
.header-links li a {
  color: rgba(255,255,255,.85); font-size: 11px; font-weight: 600;
  padding: 3px 7px; border-radius: 5px; transition: var(--tr);
  text-decoration: none; white-space: nowrap; display: inline-flex;
  align-items: center; gap: 4px;
}
.header-links li a:hover { color: #fff; background: rgba(255,255,255,.12); }
/* زر تسجيل الدخول */
.header-links .login-button a,
.header-links li a[href*="login"] {
  border: 1px solid rgba(255,255,255,.3); padding: 3px 10px; border-radius: 5px;
}
/* زر إنشاء حساب — أزرق بارز */
.header-links .registration-button a,
.header-links li a[href*="register"] {
  background: var(--blue) !important; color: #fff !important;
  padding: 4px 12px; border-radius: 5px; font-weight: 700; border: none;
}
.header-links .registration-button a:hover,
.header-links li a[href*="register"]:hover { background: var(--blue-dk) !important; }
/* عداد */
.header-links .cart-qty,
.header-links .wishlist-qty {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff; font-size: 9px; font-weight: 900;
  width: 16px; height: 16px; border-radius: 50%; margin-right: 3px;
}

/* ══ 3. ITEM-BOX (nopCommerce category/homepage default) ═ */
/* nopCommerce renders products as .item-box by default */
.item-box {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--r); overflow: hidden; transition: var(--tr);
  display: flex; flex-direction: column;
}
.item-box:hover { box-shadow: var(--sh); border-color: var(--blue-lt); transform: translateY(-2px); }

/* صورة المنتج */
.item-box .picture {
  position: relative; overflow: hidden; background: var(--bg);
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
}
.item-box .picture a {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
}
.item-box .picture img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  padding: 10px; transition: transform .4s;
}
.item-box:hover .picture img { transform: scale(1.05); }

/* badge الخصم */
.item-box .product-badge,
.item-box .onsale {
  position: absolute; top: 8px; right: 8px;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 800; padding: 3px 9px;
  border-radius: 50px; z-index: 2;
}
.item-box .new-badge { background: var(--green); }

/* تفاصيل المنتج */
.item-box .details,
.item-box .product-item-info { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }

/* اسم المنتج */
.item-box .product-title,
.item-box h2.product-title {
  font-size: 13px; font-weight: 700; color: var(--dark);
  margin: 0; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.item-box .product-title a,
.item-box h2.product-title a { color: var(--dark); text-decoration: none; }
.item-box .product-title a:hover,
.item-box h2.product-title a:hover { color: var(--blue); }

/* الوصف المختصر — نخفيه أو نحدّ ارتفاعه */
.item-box .description {
  font-size: 11px; color: var(--muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  max-height: 2.8em;
}

/* التقييم */
.item-box .rating-box,
.item-box .product-rating-box {
  display: flex; gap: 2px; font-size: 12px; color: var(--orange);
}
.item-box .rating-box .rating { background: none; }

/* السعر */
.item-box .prices,
.item-box .actual-price {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.item-box .price.actual-price,
.item-box .prices .price-value { font-size: 16px; font-weight: 900; color: var(--blue); }
.item-box .price.old-price { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.item-box .from-label { font-size: 11px; color: var(--muted); }

/* ★ أزرار الإضافة للسلة والمقارنة والمفضلة */
.item-box .add-info { margin-top: auto; padding-top: 8px; }

/* زر الإضافة للسلة */
.item-box .product-box-add-to-cart-button,
.item-box .button-2.product-box-add-to-cart-button {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 9px 12px;
  background: var(--blue); color: #fff; border: none;
  border-radius: var(--rsm); font-size: 12px; font-weight: 800;
  cursor: pointer; font-family: var(--font); transition: var(--tr);
  text-decoration: none; margin-bottom: 6px;
}
.item-box .product-box-add-to-cart-button:hover { background: var(--blue-dk); color: #fff; }

/* صف أزرار المفضلة والمقارنة */
.item-box .buttons {
  display: flex; gap: 6px;
}
.item-box .add-to-compare-list-button,
.item-box .add-to-wishlist-button {
  flex: 1; padding: 7px 8px;
  border: 1.5px solid var(--border); background: var(--bg);
  border-radius: var(--rsm); font-size: 11px; font-weight: 700;
  cursor: pointer; font-family: var(--font); color: var(--text);
  transition: var(--tr); text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.item-box .add-to-compare-list-button:hover {
  background: #eff6ff; border-color: var(--blue); color: var(--blue);
}
.item-box .add-to-wishlist-button:hover {
  background: #fef2f2; border-color: var(--red); color: var(--red);
}

/* Hover buttons (بعض القوالب تضعها فوق الصورة) */
.item-box .buttons-hover {
  position: absolute; bottom: 8px; right: 8px; left: 8px;
  display: flex; flex-direction: column; gap: 5px;
  opacity: 0; transition: opacity .25s;
  z-index: 5; pointer-events: none;
}
.item-box:hover .buttons-hover { opacity: 1; pointer-events: all; }

/* ══ 4. PRODUCTS GRID HOME — بيت المنتجات المميزة ════════ */
.home-section { padding: 32px 0; }
.products-grid-home {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
/* إذا استخدم item-box بدل product-item في الهوم */
.products-grid-home .item-box { /* inherit */ }

/* ══ 5. CATEGORY PAGE ═══════════════════════════════════ */
.category-page { max-width: 1280px; margin: 0 auto; padding: 0 20px 56px; }

.cat-hero {
  height: 230px; border-radius: var(--r); overflow: hidden;
  background-size: cover; background-position: center;
  margin-bottom: 24px; position: relative;
  display: flex; align-items: flex-end;
}
.cat-hero-overlay {
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 100%);
  width: 100%; padding: 24px 28px;
}
.cat-hero-title { font-size: 26px; font-weight: 900; color: #fff; margin-bottom: 4px; }
.cat-hero-desc  { font-size: 13px; color: rgba(255,255,255,.85); max-width: 600px; }

.cat-title-plain {
  padding: 20px 0 16px; border-bottom: 2px solid var(--border);
  margin-bottom: 24px; display: flex; align-items: center; gap: 12px;
}
.cat-title-plain h1 {
  font-size: 24px; font-weight: 900; color: var(--dark); margin: 0;
  border-right: 4px solid var(--blue); padding-right: 14px;
}
.cat-desc { font-size: 13px; color: var(--muted); margin-top: 6px; }

.cat-layout {
  display: grid;
  grid-template-columns: 256px 1fr;
  gap: 24px; align-items: start;
}

/* Sidebar */
.cat-sidebar {
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--r);
  overflow: hidden; position: sticky; top: 90px;
}
.sidebar-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; background: var(--dark); color: #fff;
}
.sidebar-head h3 { font-size: 13px; font-weight: 800; margin: 0; }
.sidebar-close-btn {
  background: rgba(255,255,255,.15); border: none; color: #fff;
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  font-size: 13px; display: flex; align-items: center; justify-content: center;
}
.sidebar-close-btn:hover { background: rgba(255,255,255,.3); }
.filter-section { border-bottom: 1px solid var(--border); }
.filter-section:last-child { border-bottom: none; }
.filter-section-title {
  padding: 11px 16px; font-size: 12px; font-weight: 800; color: var(--dark);
  background: var(--bg); cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.filter-section-title:hover { color: var(--blue); }
.filter-section-body { padding: 12px 16px; }
.subcats-list { display: flex; flex-direction: column; gap: 4px; }
.subcat-link {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: var(--rsm); font-size: 12px;
  font-weight: 600; color: var(--text); text-decoration: none; transition: var(--tr);
}
.subcat-link:hover { background: var(--blue-lt); color: var(--blue); }
.subcat-link img { width: 28px; height: 28px; object-fit: contain; border-radius: 5px; background: var(--bg); }

/* Toolbar */
.cat-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 16px; background: #fff; border-radius: var(--r);
  border: 1.5px solid var(--border); margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 10px; }
.btn-filter-toggle {
  padding: 8px 14px; background: var(--dark); color: #fff;
  border: none; border-radius: var(--rsm); font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: var(--font); transition: var(--tr);
  display: flex; align-items: center; gap: 5px;
}
.btn-filter-toggle:hover { background: #1f2937; }
.results-info { font-size: 12px; color: var(--muted); font-weight: 600; }
.sort-select {
  padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--rsm);
  font-size: 12px; font-family: var(--font); outline: none; background: var(--bg);
  color: var(--text); cursor: pointer;
}
.sort-select:focus { border-color: var(--blue); }
.view-toggle { display: flex; gap: 4px; }
.view-toggle button {
  width: 34px; height: 34px; border: 1.5px solid var(--border);
  background: var(--bg); border-radius: var(--rsm); cursor: pointer;
  font-size: 16px; color: var(--muted); transition: var(--tr);
  display: flex; align-items: center; justify-content: center;
}
.view-toggle button:hover,
.view-toggle button.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Products grid in category */
.cat-products-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.cat-products-list { display: flex; flex-direction: column; gap: 10px; }
.cat-products-list .item-box,
.cat-products-list .product-item {
  display: grid; grid-template-columns: 130px 1fr;
}
.cat-products-list .item-box .picture,
.cat-products-list .product-item .picture { aspect-ratio: unset; height: 130px; }

/* Pager */
.pager-wrap { display: flex; justify-content: center; margin-top: 28px; }
.pager-wrap ul { display: flex; gap: 4px; list-style: none; padding: 0; margin: 0; }
.pager-wrap li a,
.pager-wrap li span {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--rsm);
  border: 1.5px solid var(--border); font-size: 13px; font-weight: 700;
  color: var(--text); text-decoration: none; transition: var(--tr); background: #fff;
}
.pager-wrap li a:hover { background: var(--blue-lt); border-color: var(--blue); color: var(--blue); }
.pager-wrap li.current-page span { background: var(--blue); border-color: var(--blue); color: #fff; }
.empty-state {
  text-align: center; padding: 60px 20px; background: #fff;
  border-radius: var(--r); border: 1.5px dashed var(--border);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; font-weight: 800; color: var(--dark); margin-bottom: 6px; }

/* ══ 6. AUTH PAGES ══════════════════════════════════════ */
.auth-page {
  min-height: calc(100vh - 200px);
  display: flex; align-items: center; justify-content: center;
  padding: 48px 20px;
  background: linear-gradient(135deg, #f0f4ff 0%, #f9fafb 100%);
}
.auth-card {
  width: 100%; max-width: 440px;
  background: #fff; border-radius: var(--r);
  padding: 36px 36px 28px;
  box-shadow: 0 8px 40px rgba(26,92,255,.12);
  border: 1px solid rgba(26,92,255,.08);
}
.auth-page-wide .auth-card { max-width: 620px; }
.auth-card .form-field { margin-bottom: 16px; }
.auth-card .form-field label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--text); margin-bottom: 5px;
}
.auth-card .form-field input[type=text],
.auth-card .form-field input[type=email],
.auth-card .form-field input[type=password],
.auth-card .form-field input[type=tel],
.auth-card .form-field select {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--border); border-radius: var(--rsm);
  font-size: 13px; font-family: var(--font); outline: none;
  transition: var(--tr); background: var(--bg); color: var(--text);
}
.auth-card .form-field input:focus,
.auth-card .form-field select:focus {
  border-color: var(--blue); background: #fff;
  box-shadow: 0 0 0 3px rgba(26,92,255,.08);
}
.auth-card .field-validation-error {
  display: block; font-size: 11px; color: var(--red); margin-top: 4px;
}
.auth-card .message-error {
  background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--rsm);
  padding: 10px 14px; font-size: 12px; color: var(--red); margin-bottom: 16px;
}

/* ══ 7. RESPONSIVE ══════════════════════════════════════ */
@media (max-width: 1200px) {
  .cat-products-grid { grid-template-columns: repeat(3, 1fr); }
  .products-grid-home { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1024px) {
  .cat-layout { grid-template-columns: 220px 1fr; }
  .cat-products-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .cat-layout { grid-template-columns: 1fr; }
  .cat-sidebar {
    position: fixed; right: -280px; top: 0; bottom: 0;
    width: 280px; z-index: 600; border-radius: 0;
    transition: right .3s ease; overflow-y: auto;
  }
  .cat-sidebar.open { right: 0; box-shadow: var(--sh-lg); }
  .cat-products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .products-grid-home { grid-template-columns: repeat(3, 1fr); }
  .search-box, .store-search-box { order: 3; flex-basis: 100%; }
  .header-main .wrap { flex-wrap: wrap; }
  .header-logo { min-width: unset; }
}
@media (max-width: 480px) {
  .cat-products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .products-grid-home { grid-template-columns: repeat(2, 1fr); }
  .auth-card { padding: 24px 18px; }
}

/* ── No Image Placeholder ──────────────────────────── */
.no-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); color: var(--muted);
  font-size: 11px; font-weight: 600;
}

/* ── Home Section spacing ──────────────────────────── */
.home-section { padding: 32px 0; }
.home-section + .home-section { padding-top: 0; }

/* ── Section Header ─────────────────────────────────── */
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px;
}
.section-title {
  font-size: 20px; font-weight: 900; color: var(--dark);
  border-right: 4px solid var(--blue); padding-right: 14px;
}
.section-view-all {
  font-size: 13px; color: var(--blue); font-weight: 700;
  text-decoration: none; transition: var(--tr);
}
.section-view-all:hover { text-decoration: underline; }

/* ── Features Bar ───────────────────────────────────── */
.features-bar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; padding: 18px 0; margin: 8px 0;
  border-bottom: 1px solid var(--border);
}
.feature-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff; padding: 14px 16px; border-radius: var(--r);
  border: 1px solid var(--border); transition: var(--tr);
}
.feature-item:hover { border-color: var(--blue-lt); box-shadow: var(--sh); }
.feature-icon { font-size: 26px; flex-shrink: 0; }
.feature-title { font-size: 13px; font-weight: 800; color: var(--dark); }
.feature-sub   { font-size: 11px; color: var(--muted); }

/* ── Store Search Box (nopCommerce default wrapper) ─── */
.store-search-box { flex: 1; min-width: 0; }
.store-search-box .search-box-button { display: none; } /* nop adds extra button */

/* ── Header search area fix ─────────────────────────── */
.header-main .wrap {
  display: flex; align-items: center; gap: 20px;
}

/* ── Categories Grid (homepage) ─────────────────────── */
.categories-grid-home {
  display: grid; grid-template-columns: repeat(8, 1fr);
  gap: 12px; padding: 0 0 8px;
}
.cat-item-home {
  background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--r); padding: 14px 8px;
  text-align: center; text-decoration: none;
  transition: var(--tr); display: flex; flex-direction: column;
  align-items: center; gap: 7px;
}
.cat-item-home:hover {
  background: var(--blue-lt); border-color: var(--blue);
  transform: translateY(-2px);
}
.cat-item-home img {
  width: 52px; height: 52px; object-fit: contain;
  border-radius: 50%; background: var(--bg);
}
.cat-item-home span {
  font-size: 11px; font-weight: 700; color: var(--dark); line-height: 1.3;
}
.cat-item-home:hover span { color: var(--blue); }


/* ── Search Box Wrapper fix ─────────────────────────── */
/* nopCommerce SearchBox renders <div class="store-search-box"> with form inside */
.search-box-wrap {
  flex: 1; min-width: 200px;
}
.search-box-wrap .store-search-box,
.search-box-wrap form {
  display: flex; width: 100%;
}
.search-box-wrap .store-search-box input[type=text],
.search-box-wrap input[type=text] {
  flex: 1; padding: 11px 18px;
  border: 2px solid var(--border); border-left: none;
  border-radius: var(--rsm) 0 0 var(--rsm);
  font-size: 14px; font-family: var(--font);
  outline: none; transition: var(--tr); background: var(--bg);
  color: var(--text); min-width: 0;
}
.search-box-wrap .store-search-box input[type=text]:focus,
.search-box-wrap input[type=text]:focus {
  border-color: var(--blue); background: #fff;
}
.search-box-wrap .store-search-box button,
.search-box-wrap button[type=submit] {
  padding: 11px 22px; flex-shrink: 0;
  background: var(--blue); color: #fff; border: none;
  border-radius: 0 var(--rsm) var(--rsm) 0;
  font-size: 14px; font-weight: 700; font-family: var(--font);
  cursor: pointer; transition: var(--tr); white-space: nowrap;
}
.search-box-wrap .store-search-box button:hover,
.search-box-wrap button[type=submit]:hover { background: var(--blue-dk); }

/* ── Category page items ─────────────────────────────── */
.category-item {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 14px 8px; background: #fff; border: 1.5px solid var(--border);
  border-radius: var(--r); text-align: center; text-decoration: none;
  color: var(--text); transition: var(--tr);
}
.category-item:hover {
  border-color: var(--blue); background: var(--blue-lt);
  color: var(--blue); transform: translateY(-2px);
}
.category-item img { width: 56px; height: 56px; object-fit: contain; }
.category-item span { font-size: 12px; font-weight: 700; line-height: 1.3; }

/* ── Responsive Search + Features ───────────────────── */
@media (max-width: 900px) {
  .features-bar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .search-box-wrap { order: 3; flex-basis: 100%; }
  .header-main .wrap { flex-wrap: wrap; }
}

/* ══ Mini Cart Dropdown ══════════════════════════════════ */
.flyout-cart-wrap { position: relative; }
.header-action-link { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 10px; text-decoration: none; color: var(--text); position: relative; }
.hdr-icon { font-size: 20px; }
.hdr-label { font-size: 10px; font-weight: 600; }
.cart-qty {
    position: absolute; top: 2px; right: 4px;
    background: #ef4444; color: #fff;
    font-size: 9px; font-weight: 800;
    min-width: 16px; height: 16px;
    border-radius: 50px; padding: 0 4px;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}
.wishlist-qty {
    position: absolute; top: 2px; right: 4px;
    background: #f97316; color: #fff;
    font-size: 9px; font-weight: 800;
    min-width: 16px; height: 16px;
    border-radius: 50px; padding: 0 4px;
    display: flex; align-items: center; justify-content: center;
}
.mini-cart-dropdown {
    display: none;
    position: absolute; top: 100%; left: 0;
    background: #fff; border: 1px solid #e5e7eb;
    border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.15);
    min-width: 300px; z-index: 1000; overflow: hidden;
    direction: rtl;
}
.flyout-cart-wrap:hover .mini-cart-dropdown { display: block; }
.mini-cart-header { padding: 12px 16px; background: #f8fafc; border-bottom: 1px solid #e5e7eb; font-size: 13px; font-weight: 800; }
.mini-cart-items { max-height: 260px; overflow-y: auto; padding: 8px; }
.mini-cart-item { display: flex; gap: 10px; padding: 8px; border-radius: 8px; transition: .15s; }
.mini-cart-item:hover { background: #f9fafb; }
.mini-cart-img { width: 52px; height: 52px; border-radius: 7px; object-fit: cover; border: 1px solid #e5e7eb; flex-shrink: 0; }
.mini-cart-info { flex: 1; min-width: 0; }
.mini-cart-name { font-size: 12px; font-weight: 700; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-cart-meta { font-size: 11px; color: #6b7280; margin-top: 3px; }
.mini-cart-total { padding: 10px 16px; border-top: 1px solid #e5e7eb; font-size: 13px; font-weight: 700; background: #f8fafc; }
.mini-cart-buttons { padding: 10px 12px; display: flex; gap: 8px; }
.mini-btn-cart { flex: 1; text-align: center; background: #f3f4f6; color: #374151; padding: 8px; border-radius: 8px; font-size: 12px; font-weight: 700; text-decoration: none; border: 1px solid #d1d5db; transition: .15s; }
.mini-btn-cart:hover { background: #374151; color: #fff; }
.mini-btn-checkout { flex: 1; text-align: center; background: #1a5cff; color: #fff; padding: 8px; border-radius: 8px; font-size: 12px; font-weight: 700; text-decoration: none; transition: .15s; }
.mini-btn-checkout:hover { background: #0040cc; }

/* ══════════════════════════════════════════════════════════
   COLUMNS LAYOUT — _ColumnsTwo / _ColumnsOne
   (side-2 = sidebar, center-2 = main content)
══════════════════════════════════════════════════════════ */
.column-wrapper {
  display: grid;
  grid-template-columns: 256px 1fr;
  gap: 24px;
  align-items: start;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.side-2 {
  position: sticky;
  top: 88px;
}
.side-2-wrapper {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}
.center-2 { min-width: 0; }

/* Sidebar blocks from nopCommerce */
.side-2-wrapper .block {
  border-bottom: 1px solid var(--border);
}
.side-2-wrapper .block:last-child { border-bottom: none; }
.side-2-wrapper .block-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 800;
  color: var(--dark);
  background: var(--bg);
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: right;
  font-family: var(--font);
}
.side-2-wrapper .block-content {
  padding: 12px 16px;
}
.side-2-wrapper ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.side-2-wrapper ul li {
  margin-bottom: 6px;
}
.side-2-wrapper ul li a {
  font-size: 12px;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 2px;
  transition: color .15s;
}
.side-2-wrapper ul li a:hover { color: var(--blue); }
.side-2-wrapper ul li.selected a,
.side-2-wrapper ul li.active a { color: var(--blue); font-weight: 700; }
.side-2-wrapper ul li label {
  font-size: 12px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.side-2-wrapper ul li label input[type=checkbox] {
  accent-color: var(--blue);
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.side-2-wrapper .price-filters input {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--rsm);
  font-size: 12px;
  font-family: var(--font);
  outline: none;
  box-sizing: border-box;
}
.side-2-wrapper .price-filters input:focus { border-color: var(--blue); }
.side-2-wrapper .price-filters button {
  margin-top: 8px;
  width: 100%;
  padding: 8px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--rsm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: .15s;
}
.side-2-wrapper .price-filters button:hover { background: var(--blue-dk); }

/* ══ Category page ── products grid inside center-2 ══ */
.center-2 .item-grid,
.center-2 .products-container,
.center-2 .product-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.center-2 .item-grid.list,
.center-2 .product-grid-container.list { grid-template-columns: 1fr; }
.center-2 .item-grid.list .item-box {
  display: grid;
  grid-template-columns: 140px 1fr;
}
.center-2 .item-grid.list .item-box .picture { aspect-ratio: unset; height: 140px; }

/* Pager inside center-2 */
.center-2 .pager {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
.center-2 .pager ul {
  display: flex;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.center-2 .pager li a,
.center-2 .pager li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--rsm);
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  transition: var(--tr);
  background: #fff;
}
.center-2 .pager li a:hover { background: var(--blue-lt); border-color: var(--blue); color: var(--blue); }
.center-2 .pager li.current-page span { background: var(--blue); border-color: var(--blue); color: #fff; }

/* product-selectors toolbar */
.product-selectors {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 16px;
  direction: rtl;
}
.product-selectors span { font-size: 12px; color: var(--muted); }
.product-selectors select {
  padding: 7px 11px;
  border: 1.5px solid var(--border);
  border-radius: var(--rsm);
  font-size: 12px;
  font-family: var(--font);
  outline: none;
  background: var(--bg);
  cursor: pointer;
  color: var(--text);
  transition: var(--tr);
}
.product-selectors select:focus { border-color: var(--blue); }
.viewmode-icon {
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--rsm);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--tr);
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.viewmode-icon.selected,
.viewmode-icon:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* center-1 (ColumnsOne - no sidebar) */
.center-1 {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 1024px) {
  .column-wrapper { grid-template-columns: 220px 1fr; gap: 18px; }
  .center-2 .item-grid,
  .center-2 .products-container,
  .center-2 .product-grid-container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .column-wrapper { grid-template-columns: 1fr; padding: 12px; }
  .side-2 {
    position: fixed !important;
    right: -100%;
    top: 0 !important;
    bottom: 0;
    width: 280px;
    z-index: 800 !important;
    transition: right .3s ease;
    overflow-y: auto;
    background: #fff;
  }
  .side-2.open { right: 0 !important; box-shadow: -4px 0 20px rgba(0,0,0,.25); }
  .side-2-wrapper { border-radius: 0; border: none; height: 100%; }
  .center-2 .item-grid,
  .center-2 .products-container,
  .center-2 .product-grid-container { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 480px) {
  .center-2 .item-grid,
  .center-2 .products-container,
  .center-2 .product-grid-container { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* Mobile filter bar */
.mobile-filter-bar {
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.mobile-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--dark);
  color: #fff;
  border: none;
  border-radius: var(--rsm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
}
.side2-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 799;
}
@media (max-width: 768px) {
  .mobile-filter-bar { display: block !important; }
  .nb-sidebar-close-bar { display: flex !important; }
  .nb-mobile-filter-toolbar-btn { display: flex !important; }
}

/* ── Category Page (nb-cat-page) ── */
.nb-cat-page { padding-bottom: 48px; }
.nb-cat-title-bar {
  padding: 20px 0 16px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.nb-cat-title-bar h1 {
  font-size: 24px;
  font-weight: 900;
  color: var(--dark);
  margin: 0;
  border-right: 4px solid var(--blue);
  padding-right: 14px;
  display: inline-block;
}
.nb-cat-desc { font-size: 13px; color: var(--muted); margin-top: 8px; }

/* Sub-categories grid (في main area) */
.nb-subcats { margin-bottom: 24px; }
.nb-subcats-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
  border-right: 3px solid var(--blue);
  padding-right: 10px;
}
.nb-subcats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.nb-subcat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 8px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  text-align: center;
  text-decoration: none;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  transition: var(--tr);
}
.nb-subcat-item:hover {
  border-color: var(--blue);
  background: var(--blue-lt);
  color: var(--blue);
  transform: translateY(-2px);
}
.nb-subcat-item img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--bg);
}
.nb-subcat-no-img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero banner للقسم */
.nb-cat-hero {
  height: 200px;
  border-radius: var(--r);
  margin-bottom: 20px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.nb-cat-hero-overlay {
  width: 100%;
  padding: 20px 24px;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, transparent 100%);
}
.nb-cat-hero-title { font-size: 24px; font-weight: 900; color: #fff; margin: 0 0 4px; }
.nb-cat-hero-desc  { font-size: 13px; color: rgba(255,255,255,.85); margin: 0; }

/* Toolbar */
.nb-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
  direction: rtl;
}
.nb-toolbar-right,
.nb-toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nb-filter-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--dark);
  color: #fff;
  border: none;
  border-radius: var(--rsm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: var(--tr);
}
.nb-filter-btn:hover { background: #1f2937; }
.nb-results-count { font-size: 12px; color: var(--muted); font-weight: 600; }
.nb-sort-label { font-size: 12px; color: var(--muted); }
.nb-sort-select {
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--rsm);
  font-size: 12px;
  font-family: var(--font);
  outline: none;
  background: var(--bg);
  cursor: pointer;
  color: var(--text);
}
.nb-sort-select:focus { border-color: var(--blue); }
.nb-vm-btn {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  border-radius: var(--rsm);
  cursor: pointer;
  color: var(--muted);
  transition: var(--tr);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nb-vm-btn:hover,
.nb-vm-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.nb-viewmode { display: flex; gap: 4px; }


/* ══════════════════════════════════════════
   MASTER LAYOUT RESET
   master-column-wrapper يجب أن لا يضيّق
   column-wrapper يتولى كل العرض والـ grid
══════════════════════════════════════════ */
.master-wrapper-content { width: 100%; }
.master-column-wrapper  { width: 100%; }

/* ══ column-wrapper (sidebar + main) ══ */
.column-wrapper {
  display: grid !important;
  grid-template-columns: 260px 1fr !important;
  gap: 24px !important;
  align-items: start;
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  box-sizing: border-box;
  direction: rtl;
}
.side-2 {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.side-2-wrapper {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.center-2 {
  min-width: 0;
  direction: rtl;
}

/* ══ Sidebar blocks ══ */
.side-2-wrapper .block         { border-bottom: 1px solid #e5e7eb; }
.side-2-wrapper .block:last-child { border-bottom: none; }

.side-2-wrapper .block-title,
.side-2-wrapper .title {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 800;
  color: #111827;
  background: #f9fafb;
  cursor: pointer;
  user-select: none;
  border: none;
  width: 100%;
  text-align: right;
  font-family: Cairo,sans-serif;
}
.side-2-wrapper .block-title strong,
.side-2-wrapper .title strong { font-weight: 800; font-size: 13px; }

.side-2-wrapper .listbox,
.side-2-wrapper .block-content { padding: 10px 16px 14px; }

.side-2-wrapper ul            { list-style: none; padding: 0; margin: 0; }
.side-2-wrapper ul li         { margin-bottom: 4px; }
.side-2-wrapper ul li a {
  font-size: 12px;
  color: #374151;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: 6px;
  transition: .15s;
}
.side-2-wrapper ul li a:hover        { color: #1a5cff; background: #eff6ff; }
.side-2-wrapper ul li.selected a,
.side-2-wrapper ul li.active a       { color: #1a5cff; font-weight: 700; }
.side-2-wrapper ul li label {
  font-size: 12px;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 3px 0;
}
.side-2-wrapper ul li label input[type=checkbox] {
  accent-color: #1a5cff;
  width: 15px; height: 15px;
}
.side-2-wrapper .price-filters input {
  width: 100%; padding: 8px 10px;
  border: 1.5px solid #e5e7eb; border-radius: 7px;
  font-size: 12px; font-family: Cairo,sans-serif;
  outline: none; box-sizing: border-box;
}
.side-2-wrapper .price-filters input:focus { border-color: #1a5cff; }
.side-2-wrapper .price-filters button {
  margin-top: 8px; width: 100%; padding: 8px;
  background: #1a5cff; color: #fff; border: none;
  border-radius: 7px; font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: Cairo,sans-serif;
}

/* ══ Products grid inside center-2 ══ */
.center-2 .item-grid,
.center-2 .products-container,
.center-2 .product-grid-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  gap: 16px !important;
}
.center-2 .item-grid.list,
.center-2 .product-grid-container.list {
  grid-template-columns: 1fr !important;
}

/* ══ center-1 (no sidebar pages) ══ */
.center-1 {
  max-width: 1300px;
  margin: 0 auto;
  padding: 24px 20px 48px;
  box-sizing: border-box;
}

/* ══ product-selectors toolbar ══ */
.product-selectors {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; background: #fff;
  border: 1.5px solid #e5e7eb; border-radius: 12px;
  margin-bottom: 16px; direction: rtl;
}
.product-selectors span { font-size: 12px; color: #6b7280; }
.product-selectors select {
  padding: 7px 11px; border: 1.5px solid #e5e7eb;
  border-radius: 7px; font-size: 12px;
  font-family: Cairo,sans-serif; outline: none;
  background: #f9fafb; cursor: pointer; color: #374151;
}
.product-selectors select:focus { border-color: #1a5cff; }
.viewmode-icon {
  padding: 7px 11px; border: 1.5px solid #e5e7eb;
  border-radius: 7px; font-size: 11px; font-weight: 700;
  cursor: pointer; color: #6b7280; text-decoration: none;
  display: inline-flex; align-items: center; transition: .15s;
}
.viewmode-icon.selected,
.viewmode-icon:hover { background: #1a5cff; border-color: #1a5cff; color: #fff; }

/* ══ Pager ══ */
.center-2 .pager, .center-1 .pager {
  display: flex; justify-content: center; margin-top: 28px;
}
.center-2 .pager ul, .center-1 .pager ul {
  display: flex; gap: 4px; list-style: none; padding: 0; margin: 0;
}
.center-2 .pager li a, .center-2 .pager li span,
.center-1 .pager li a, .center-1 .pager li span {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 7px;
  border: 1.5px solid #e5e7eb; font-size: 13px; font-weight: 700;
  color: #374151; text-decoration: none; background: #fff; transition: .15s;
}
.center-2 .pager li a:hover, .center-1 .pager li a:hover
  { background: #eff6ff; border-color: #1a5cff; color: #1a5cff; }
.center-2 .pager li.current-page span,
.center-1 .pager li.current-page span
  { background: #1a5cff; border-color: #1a5cff; color: #fff; }

/* ══ RESPONSIVE ══ */
@media (max-width: 1100px) {
  .column-wrapper { grid-template-columns: 230px 1fr !important; gap: 18px !important; }
  .center-2 .item-grid,
  .center-2 .products-container,
  .center-2 .product-grid-container { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 768px) {
  .column-wrapper { grid-template-columns: 1fr !important; padding: 12px 14px 32px !important; }
  .side-2 {
    position: fixed !important;
    right: -100% !important; top: 0 !important; bottom: 0 !important;
    width: 280px !important; z-index: 900;
    transition: right .3s ease; overflow-y: auto;
    max-height: 100vh;
  }
  .side-2.open { right: 0 !important; box-shadow: -4px 0 24px rgba(0,0,0,.25); }
  .side-2-wrapper { border-radius: 0 !important; border: none !important; }
  .center-2 .item-grid,
  .center-2 .products-container,
  .center-2 .product-grid-container { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .center-1 { padding: 12px 14px 32px !important; }
}
@media (max-width: 480px) {
  .center-2 .item-grid,
  .center-2 .products-container,
  .center-2 .product-grid-container { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
}

/* btn-checkout كـ button */
button.btn-checkout {
  width: 100%;
  border: none;
  font-family: Cairo, sans-serif;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

/* ══════════════════════════════════════════════════
   FINAL OVERRIDES — يُصحح التعارضات
══════════════════════════════════════════════════ */

/* ── Header Structure ── */
.header {
  position: sticky !important;
  top: 0 !important;
  z-index: 600 !important;
  width: 100% !important;
  overflow: visible !important;  /* ضروري للـ flyout cart */
}

/* ── Topbar ── */
.header-topbar {
  background: #111827;
  padding: 7px 0;
  position: relative;
  z-index: 601;
}
.header-topbar .wrap {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-direction: row-reverse;  /* RTL: اليمين أولاً */
}
.topbar-right, .topbar-left, .topbar-links {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}
.topbar-left { font-size: 11px; opacity: .8; color: rgba(255,255,255,.8); }

/* ── Header Links (نتائج HeaderLinks component) ── */
.header-links {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
  flex-direction: row-reverse; /* RTL */
}
.header-links li {
  display: flex !important;
  align-items: center !important;
  list-style: none !important;
}
.header-links li + li {
  border-right: 1px solid rgba(255,255,255,.2) !important;
  padding-right: 8px !important;
  margin-right: 4px !important;
}
.header-links li a,
.header-links li span,
.header-links li button {
  color: rgba(255,255,255,.85) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 4px 8px !important;
  border-radius: 5px !important;
  text-decoration: none !important;
  background: none !important;
  border: none !important;
  font-family: Cairo, sans-serif !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  transition: .15s !important;
}
.header-links li a:hover { color: #fff !important; background: rgba(255,255,255,.12) !important; }

/* ── Header Main Row ── */
.header-main {
  background: #fff !important;
  padding: 12px 0 !important;
  border-bottom: 1px solid #e5e7eb !important;
  position: relative !important;
  z-index: 600 !important;
}
.header-main .wrap {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  flex-direction: row !important; /* LTR داخل RTL page: شعار يمين + بحث وسط + أزرار يسار */
}

/* ── Search Box Wrap ── */
.search-box-wrap {
  flex: 1 !important;
  min-width: 0 !important;
  max-width: 640px !important;
}
.search-box-wrap .store-search-box,
.search-box-wrap form { display: flex !important; width: 100% !important; }
.search-box-wrap input[type=text] {
  flex: 1 !important;
  padding: 11px 16px !important;
  border: 2px solid #e5e7eb !important;
  border-left: none !important;
  border-radius: 8px 0 0 8px !important;
  font-size: 14px !important;
  font-family: Cairo, sans-serif !important;
  outline: none !important;
  background: #f9fafb !important;
  min-width: 0 !important;
}
.search-box-wrap input[type=text]:focus { border-color: #1a5cff !important; background: #fff !important; }
.search-box-wrap button[type=submit] {
  padding: 11px 20px !important;
  background: #1a5cff !important;
  color: #fff !important;
  border: none !important;
  border-radius: 0 8px 8px 0 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  font-family: Cairo, sans-serif !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}
.search-box-wrap button[type=submit]:hover { background: #0040cc !important; }

/* ── Header Actions (icons: wishlist, account, cart) ── */
.header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  flex-shrink: 0 !important;
}
.header-action-item {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 2px !important;
  padding: 7px 10px !important;
  border-radius: 9px !important;
  text-decoration: none !important;
  color: #374151 !important;
  cursor: pointer !important;
  transition: .15s !important;
  background: none !important;
  border: none !important;
  position: relative !important;
  min-width: 50px !important;
}
.header-action-item:hover { background: #f3f4f6 !important; color: #1a5cff !important; }
.action-icon, .header-action-item .icon { font-size: 22px !important; line-height: 1 !important; display: block !important; }
.action-label, .header-action-item .bar-title {
  font-size: 10px !important;
  font-weight: 700 !important;
  color: #6b7280 !important;
  line-height: 1 !important;
  display: block !important;
}
.header-action-item:hover .action-label,
.header-action-item:hover .bar-title { color: #1a5cff !important; }

/* ── Flyout Cart ── */
.flyout-cart-wrap { position: relative !important; cursor: pointer !important; }

/* ── Cart Badge ── */
.cart-qty, .wishlist-qty {
  position: absolute !important;
  top: 2px !important; right: 2px !important;
  background: #ef4444 !important;
  color: #fff !important;
  font-size: 9px !important;
  font-weight: 900 !important;
  min-width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 3px !important;
  line-height: 1 !important;
}

/* ── Cart Page: checkout button ── */
.btn-checkout,
button.btn-checkout {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  background: linear-gradient(135deg, #1a5cff, #0040cc) !important;
  color: #fff !important;
  padding: 14px 20px !important;
  border-radius: 11px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  margin-top: 16px !important;
  border: none !important;
  cursor: pointer !important;
  font-family: Cairo, sans-serif !important;
  transition: .2s !important;
  letter-spacing: .3px !important;
  box-sizing: border-box !important;
}
.btn-checkout:hover,
button.btn-checkout:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 24px rgba(26,92,255,.4) !important;
  color: #fff !important;
}

/* ── Nav Bar ── */
/* header-nav base — see above */

/* ══ CustomerNavigation (side-2 in account pages) ══ */
.neb-cust-nav-head {
    background: linear-gradient(135deg, var(--blue), var(--blue-dk));
    border-radius: var(--r) var(--r) 0 0; padding: 16px;
    text-align: center; color: #fff; font-size: 14px; font-weight: 800;
}
.neb-cust-nav {
    background: #fff; border: 1.5px solid var(--border);
    border-top: none; border-radius: 0 0 var(--r) var(--r); overflow: hidden;
}
.neb-cust-nav ul { list-style: none !important; padding: 0 !important; margin: 0 !important; }
.neb-cust-nav ul li { list-style: none !important; border-bottom: 1px solid var(--bg2); }
.neb-cust-nav ul li:last-child { border-bottom: none; }
.neb-cust-nav ul li::before, .neb-cust-nav ul li::marker { content: none !important; display: none !important; }
.neb-cust-nav ul li a {
    display: flex; align-items: center; padding: 13px 16px;
    font-size: 13px; font-weight: 600; color: var(--text);
    text-decoration: none; transition: var(--tr); font-family: var(--font);
}
.neb-cust-nav ul li a:hover { background: var(--blue-lt); color: var(--blue); padding-right: 20px; }
.neb-cust-nav ul li.active a {
    background: var(--blue-lt); color: var(--blue);
    font-weight: 800; border-right: 3px solid var(--blue);
}

/* ══ Account Pages (account-body inside center-2) ══ */
.account-body { background:#fff; border:1.5px solid var(--border); border-radius:var(--r); padding:28px; min-height:400px; }
.account-title { font-size:17px; font-weight:900; color:var(--dark); margin-bottom:20px; padding-bottom:14px; border-bottom:2px solid var(--border); display:flex; align-items:center; gap:8px; }
.account-title-row { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; margin-bottom:20px; padding-bottom:14px; border-bottom:2px solid var(--border); }
.account-title-row .account-title { margin-bottom:0; padding-bottom:0; border-bottom:none; }

/* Form fields */
.account-body .fieldset-box { background:var(--bg); border:1px solid var(--border); border-radius:var(--rsm); padding:18px; margin-bottom:16px; }
.account-body .fieldset-title { font-size:12px; font-weight:800; color:var(--text); text-transform:uppercase; letter-spacing:.5px; margin-bottom:14px; }
.account-body .form-group { margin-bottom:14px; }
.account-body .form-group label { display:block; font-size:12px; font-weight:700; color:var(--text); margin-bottom:5px; }
.account-body .form-group .req { color:#ef4444; }
.account-body .form-group input, .account-body .form-group select, .account-body .form-group textarea { width:100%; padding:10px 14px; border:1.5px solid var(--border); border-radius:var(--rsm); font-family:var(--font); font-size:13px; outline:none; transition:var(--tr); box-sizing:border-box; }
.account-body .form-group input:focus, .account-body .form-group select:focus { border-color:var(--blue); box-shadow:0 0 0 3px rgba(26,92,255,.08); }
.account-body .field-validation-error { color:#ef4444; font-size:11px; display:block; margin-top:3px; }
.account-body .form-check { display:flex; align-items:center; gap:8px; }
.account-body .form-check input { width:16px!important; height:16px!important; flex-shrink:0; accent-color:var(--blue); }
.fields-row-2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.form-value { font-weight:700; color:var(--dark); font-size:14px; }
.form-actions { display:flex; gap:10px; align-items:center; margin-top:20px; padding-top:16px; border-top:1px solid var(--border); flex-wrap:wrap; }
.btn-save { background:linear-gradient(135deg,var(--blue),var(--blue-dk)); color:#fff; border:none; border-radius:var(--rsm); padding:12px 28px; font-size:14px; font-weight:800; cursor:pointer; font-family:var(--font); display:inline-flex; align-items:center; gap:6px; transition:var(--tr); }
.btn-save:hover { transform:translateY(-1px); box-shadow:0 6px 20px rgba(26,92,255,.3); color:#fff; text-decoration:none; }
.btn-back { color:var(--muted); font-size:13px; font-weight:600; text-decoration:none; background:var(--bg2); padding:11px 20px; border-radius:var(--rsm); border:1px solid var(--border); transition:var(--tr); }
.btn-back:hover { background:var(--dark); color:#fff; }
.gender-row { display:flex; gap:10px; flex-wrap:wrap; }
.gender-btn { display:flex; align-items:center; gap:6px; padding:9px 18px; border:1.5px solid var(--border); border-radius:var(--rsm); cursor:pointer; font-size:13px; font-weight:600; transition:var(--tr); }
.gender-btn.selected { border-color:var(--blue); background:var(--blue-lt); color:var(--blue); }
.gender-btn input { display:none; }
.no-data { text-align:center; padding:40px; color:var(--muted); font-size:14px; }
.message-error { background:#fef2f2; border:1px solid #fca5a5; border-radius:var(--rsm); padding:12px; font-size:12px; color:#991b1b; margin-bottom:16px; }
.message-error ul { margin:0; padding-right:18px; }

/* Order list */
.order-list { display:flex; flex-direction:column; gap:14px; }
.order-item { border:1.5px solid var(--border); border-radius:var(--rsm); padding:18px; transition:var(--tr); }
.order-item:hover { border-color:#93c5fd; }
.order-item-header { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; margin-bottom:12px; padding-bottom:10px; border-bottom:1px solid var(--bg2); }
.order-number { font-size:14px; font-weight:800; color:var(--blue); }
.order-status { display:inline-flex; padding:3px 12px; border-radius:50px; font-size:11px; font-weight:700; }
.order-status.pending,.order-status.pendingpayment { background:#fffbeb; color:#92400e; }
.order-status.processing { background:var(--blue-lt); color:var(--blue-dk); }
.order-status.complete { background:#ecfdf5; color:#065f46; }
.order-status.cancelled { background:#fef2f2; color:#991b1b; }
.order-total { font-weight:800; color:var(--blue); }
.order-info-list { list-style:none!important; padding:0!important; margin:0 0 12px!important; font-size:13px; color:var(--text); }
.order-info-list li { padding:4px 0; }
.order-info-list span { font-weight:600; color:var(--dark); }
.order-item-actions { display:flex; gap:8px; flex-wrap:wrap; }
.order-details-link { color:var(--blue); font-weight:600; text-decoration:none; }
.order-details-link:hover { text-decoration:underline; }

/* Address cards */
.address-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px; }
.address-card { border:1.5px solid var(--border); border-radius:var(--rsm); padding:16px; transition:var(--tr); }
.address-card:hover { border-color:#93c5fd; }
.addr-name { font-size:14px; font-weight:800; color:var(--dark); margin-bottom:8px; }
.addr-line { font-size:12px; color:var(--muted); padding:2px 0; line-height:1.6; }
.addr-actions { display:flex; gap:8px; margin-top:14px; padding-top:12px; border-top:1px solid var(--bg2); }
.btn-addr-edit { flex:1; background:var(--blue-lt); color:var(--blue); padding:8px; border-radius:7px; font-size:12px; font-weight:700; text-decoration:none; text-align:center; transition:var(--tr); }
.btn-addr-edit:hover { background:var(--blue); color:#fff; }
.btn-addr-del { flex:1; background:#fef2f2; color:#991b1b; padding:8px; border-radius:7px; font-size:12px; font-weight:700; border:none; cursor:pointer; font-family:var(--font); transition:var(--tr); }
.btn-addr-del:hover { background:#991b1b; color:#fff; }

/* Data table */
.data-table-box { border:1.5px solid var(--border); border-radius:var(--rsm); overflow:hidden; margin-bottom:16px; }
.data-table { width:100%; border-collapse:collapse; font-size:13px; }
.data-table th { background:var(--bg); padding:11px 14px; font-weight:800; color:var(--text); border-bottom:2px solid var(--border); text-align:right; }
.data-table td { padding:11px 14px; border-bottom:1px solid var(--bg2); vertical-align:middle; }
.data-table tr:last-child td { border-bottom:none; }

@media(max-width:768px) { .fields-row-2 { grid-template-columns:1fr; } .address-grid { grid-template-columns:1fr; } }

/* ══ Account Navigation block (in side-2-wrapper) ══ */
.side-2-wrapper .block-account-navigation .block-title {
    background: linear-gradient(135deg, var(--blue), var(--blue-dk));
    color: #fff !important;
    font-size: 14px;
    font-weight: 800;
    padding: 14px 16px;
    border-radius: 0;
}
.side-2-wrapper .block-account-navigation .block-content {
    padding: 0;
}
.side-2-wrapper .block-account-navigation ul li {
    margin-bottom: 0;
    border-bottom: 1px solid var(--bg2);
}
.side-2-wrapper .block-account-navigation ul li:last-child {
    border-bottom: none;
}
.side-2-wrapper .block-account-navigation ul li a {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text) !important;
    padding: 13px 16px !important;
    display: flex !important;
    transition: var(--tr) !important;
    border-right: 3px solid transparent;
}
.side-2-wrapper .block-account-navigation ul li a:hover {
    background: var(--blue-lt) !important;
    color: var(--blue) !important;
    padding-right: 20px !important;
    border-right-color: var(--blue);
}
.side-2-wrapper .block-account-navigation ul li.active a {
    background: var(--blue-lt) !important;
    color: var(--blue) !important;
    font-weight: 800 !important;
    border-right: 3px solid var(--blue) !important;
}
.side-2-wrapper .block-account-navigation ul li.inactive a {
    color: var(--text) !important;
}

/* ══════════════════════════════════════════════════
   HEADER LINKS (hl-*)
══════════════════════════════════════════════════ */
.hl-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 6px;
    font-size: 12px; font-weight: 700; font-family: var(--font);
    text-decoration: none; transition: var(--tr); white-space: nowrap;
    color: #fff;
}
.hl-btn:hover { color: #fff; opacity: .85; }

/* تسجيل دخول / تسجيل */
.hl-login  { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); }
.hl-login:hover  { background: rgba(255,255,255,.25); }
.hl-register { background: var(--blue); }
.hl-register:hover { background: var(--blue-dk); }

/* السلة والرغبات */
.hl-wish, .hl-cart {
    position: relative; background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    padding: 7px 12px;
}
.hl-wish:hover, .hl-cart:hover { background: rgba(255,255,255,.22); }

/* عداد صغير */
.hl-count {
    position: absolute; top: -5px; left: -5px;
    background: #ef4444; color: #fff;
    font-size: 10px; font-weight: 900; min-width: 18px; height: 18px;
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; padding: 0 2px;
}

/* ══ Dropdown حسابي ══ */
.hl-account-wrap { position: relative; }
.hl-account { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25); }
.hl-account:hover { background: rgba(255,255,255,.25); }

.hl-dropdown {
    display: none; position: absolute; top: calc(100% + 8px);
    left: 0; min-width: 190px; background: #fff;
    border: 1.5px solid var(--border); border-radius: var(--r);
    box-shadow: 0 8px 30px rgba(0,0,0,.12); z-index: 9999;
    padding: 6px 0; animation: hlFadeIn .15s ease;
}
.hl-account-wrap:hover .hl-dropdown,
.hl-account-wrap:focus-within .hl-dropdown { display: block; }

.hl-dropdown a {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 16px; font-size: 13px; font-weight: 600;
    color: var(--text); text-decoration: none; transition: var(--tr);
    white-space: nowrap;
}
.hl-dropdown a:hover { background: var(--blue-lt); color: var(--blue); }

.hl-sep { height: 1px; background: var(--border); margin: 4px 0; }
.hl-logout { color: #dc2626 !important; }
.hl-logout:hover { background: #fef2f2 !important; color: #991b1b !important; }

.hl-badge {
    background: var(--blue); color: #fff;
    font-size: 10px; font-weight: 900;
    padding: 2px 6px; border-radius: 50px; margin-right: auto;
}

@keyframes hlFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* header-topbar layout */
.header-topbar .topbar-right {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.header-topbar .topbar-left {
    display: flex; align-items: center; gap: 10px;
    font-size: 12px; color: rgba(255,255,255,.8);
}
.topbar-welcome { font-size: 12px; color: rgba(255,255,255,.75); }

/* ══ Custom _CatalogProducts Grid ══ */
.catalog-toolbar {
    display:flex; align-items:center; gap:12px; flex-wrap:wrap;
    margin-bottom:16px; padding:12px 16px;
    background:#fff; border:1.5px solid var(--border);
    border-radius:var(--r); direction:rtl;
}
.catalog-toolbar .sort-label { font-size:12px; font-weight:700; color:var(--muted); }
.catalog-toolbar .sort-select {
    padding:6px 10px; border:1.5px solid var(--border);
    border-radius:var(--rsm); font-family:var(--font); font-size:12px;
    outline:none; background:#fff; cursor:pointer;
}
.catalog-toolbar .sort-select:focus { border-color:var(--blue); }
.catalog-toolbar .results-count {
    margin-right:auto; font-size:12px; color:var(--muted); font-weight:600;
}
.catalog-toolbar .viewmode { display:flex; gap:4px; }
.catalog-toolbar .viewmode-icon {
    width:32px; height:32px; display:flex; align-items:center; justify-content:center;
    border:1.5px solid var(--border); border-radius:var(--rsm);
    color:var(--muted); text-decoration:none; transition:var(--tr);
}
.catalog-toolbar .viewmode-icon.selected,
.catalog-toolbar .viewmode-icon:hover {
    border-color:var(--blue); color:var(--blue); background:var(--blue-lt);
}

/* الشبكة الرئيسية */
.products-grid-wrapper.grid {
    display:grid !important;
    grid-template-columns:repeat(auto-fill, minmax(195px, 1fr)) !important;
    gap:16px !important;
}
.products-grid-wrapper.grid .product-grid-item { display:flex; flex-direction:column; min-width:0; }

/* وضع القائمة */
.products-grid-wrapper.list {
    display:flex !important;
    flex-direction:column !important;
    gap:12px !important;
}
.products-grid-wrapper.list .product-grid-item { width:100%; }
.products-grid-wrapper.list .item-box {
    display:grid !important;
    grid-template-columns:160px 1fr !important;
}
.products-grid-wrapper.list .item-box .picture {
    aspect-ratio:unset !important; height:160px !important;
}

/* Pager */
.catalog-pager { margin-top:24px; display:flex; justify-content:center; }
.catalog-pager ul { list-style:none !important; padding:0; margin:0; display:flex; gap:4px; }
.catalog-pager ul li { list-style:none !important; }
.catalog-pager ul li a,
.catalog-pager ul li span {
    display:flex; align-items:center; justify-content:center;
    width:36px; height:36px; border-radius:var(--rsm);
    border:1.5px solid var(--border); font-size:13px;
    font-weight:700; text-decoration:none; color:var(--text); transition:var(--tr);
}
.catalog-pager ul li.active span,
.catalog-pager ul li a:hover {
    background:var(--blue); color:#fff; border-color:var(--blue);
}

/* لا توجد منتجات */
.no-result {
    text-align:center; padding:40px; color:var(--muted);
    font-size:14px; background:#fff;
    border:1.5px solid var(--border); border-radius:var(--r);
}
.nb-empty-products {
    text-align: center; padding: 60px 24px; background: #fff;
    border: 1.5px solid #e5e7eb; border-radius: 16px; margin: 8px 0;
}
.nb-empty-icon { font-size: 48px; margin-bottom: 14px; opacity: .6; }
.nb-empty-products h3 { font-size: 16px; font-weight: 800; color: #111827; margin: 0 0 6px; }
.nb-empty-products p { font-size: 13px; color: #6b7280; margin: 0 0 20px; }
.nb-empty-btn {
    display: inline-flex; align-items: center; gap: 6px; background: #1a5cff; color: #fff;
    padding: 11px 26px; border-radius: 10px; text-decoration: none; font-weight: 700;
    font-size: 13px; transition: .15s;
}
.nb-empty-btn:hover { background: #0040cc; color: #fff; }

/* ══ إصلاح أزرار بطاقة المنتج ══ */
/* نضمن أن كل item-box يملأ ارتفاع الخلية */
.products-grid-wrapper.grid .product-grid-item .item-box { 
    height:100%; flex:1;
}

/* زر السلة */
.item-box .add-info .product-box-add-to-cart-button {
    display:flex !important; align-items:center !important;
    justify-content:center !important; gap:6px !important;
    width:100% !important; padding:10px 12px !important;
    background:var(--blue) !important; color:#fff !important;
    border:none !important; border-radius:var(--rsm) !important;
    font-size:12px !important; font-weight:800 !important;
    cursor:pointer !important; font-family:var(--font) !important;
    transition:var(--tr) !important; margin-bottom:6px !important;
    text-decoration:none !important; line-height:1.2 !important;
    box-sizing:border-box !important;
}
.item-box .add-info .product-box-add-to-cart-button:hover {
    background:var(--blue-dk) !important; color:#fff !important;
}

/* صف أزرار المفضلة والمقارنة */
.item-box .add-info .buttons {
    display:flex !important; gap:6px !important;
}
.item-box .add-info .add-to-wishlist-button,
.item-box .add-info .add-to-compare-list-button {
    flex:1 !important; padding:8px 6px !important;
    border:1.5px solid var(--border) !important;
    background:var(--bg) !important;
    border-radius:var(--rsm) !important;
    font-size:11px !important; font-weight:700 !important;
    cursor:pointer !important; font-family:var(--font) !important;
    color:var(--text) !important; transition:var(--tr) !important;
    display:flex !important; align-items:center !important;
    justify-content:center !important; gap:3px !important;
    white-space:nowrap !important; line-height:1.2 !important;
    box-sizing:border-box !important;
}
.item-box .add-info .add-to-wishlist-button:hover {
    background:#fef2f2 !important; border-color:var(--red) !important;
    color:var(--red) !important;
}
.item-box .add-info .add-to-compare-list-button:hover {
    background:#eff6ff !important; border-color:var(--blue) !important;
    color:var(--blue) !important;
}

/* ══ Z-Index Hierarchy Fix ══ */
.header           { z-index: 1000 !important; }
.header-nav       { z-index: 1001 !important; overflow: visible !important; }
.header-nav .wrap { overflow: visible !important; }
.header-nav ul.top-menu { overflow: visible !important; }
.header-nav ul.top-menu > li { overflow: visible !important; }

/* الـ Dropdown يجب أن يظهر فوق كل شيء */
.header-nav ul.top-menu > li > .sub-menu {
    z-index: 9999 !important;
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
}

/* السلايدر والمحتوى تحت الـ header */
.nh-wrap, .nh-container, .master-wrapper-content,
.master-column-wrapper { position: relative; z-index: 1; }

/* ══ تأكيد pointer-events للقائمة الفرعية ══ */
.header-nav ul.top-menu > li > .sub-menu {
    pointer-events: none !important;
}
.header-nav ul.top-menu > li:hover > .sub-menu {
    pointer-events: all !important;
    z-index: 9999 !important;
}
/* ضمان النقر على عناصر القائمة الرئيسية */
.header-nav ul.top-menu > li > a {
    position: relative;
    z-index: 2;
    cursor: pointer !important;
}
/* منع السلايدر من تغطية القائمة */
.nh-wrap, .nh-container, .nh-grid {
    position: relative;
    z-index: 1 !important;
}
header.header {
    position: relative;
    z-index: 800 !important;
}

/* ============================================================
   كتل الصفحة الرئيسية الجديدة — بلاطات وبطاقات وأيقونات المزايا
   ============================================================ */

/* -- أيقونات المزايا: بديل للرموز التعبيرية التي تختلف بين الأنظمة -- */
.feature-icon .ni {
  display: block;
  width: 26px;
  height: 26px;
  background-color: var(--blue);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
.ni-truck   { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='3' width='15' height='13'/%3E%3Cpolygon points='16 8 20 8 23 11 23 16 16 16 16 8'/%3E%3Ccircle cx='5.5' cy='18.5' r='2.5'/%3E%3Ccircle cx='18.5' cy='18.5' r='2.5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='3' width='15' height='13'/%3E%3Cpolygon points='16 8 20 8 23 11 23 16 16 16 16 8'/%3E%3Ccircle cx='5.5' cy='18.5' r='2.5'/%3E%3Ccircle cx='18.5' cy='18.5' r='2.5'/%3E%3C/svg%3E"); }
.ni-refresh { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 4 1 10 7 10'/%3E%3Cpolyline points='23 20 23 14 17 14'/%3E%3Cpath d='M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='1 4 1 10 7 10'/%3E%3Cpolyline points='23 20 23 14 17 14'/%3E%3Cpath d='M20.49 9A9 9 0 0 0 5.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 0 1 3.51 15'/%3E%3C/svg%3E"); }
.ni-lock    { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
.ni-support { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z'/%3E%3C/svg%3E"); }

/* -- بانر عريض -- */
.nebras-banner-wide {
  display: block;
  margin: 32px 0;
  border-radius: var(--r);
  overflow: hidden;
  line-height: 0;
}
.nebras-banner-wide img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.nebras-banner-wide:hover img { transform: scale(1.02); }

/* -- ثلاث بلاطات ملوّنة -- */
.nebras-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 32px 0;
}
.nebras-tile {
  position: relative;
  min-height: 150px;
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 24px 28px;
  color: #fff;
  transition: var(--tr);
}
.nebras-tile:hover { transform: translateY(-3px); box-shadow: var(--sh); }
.nebras-tile b { display: block; font-size: 19px; font-weight: 800; margin-bottom: 5px; }
.nebras-tile span { font-size: 13px; opacity: .9; }

/* -- ثلاث بطاقات مميزة (خلفيات فاتحة) -- */
.nebras-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0;
}
.nebras-card {
  border-radius: var(--r);
  padding: 28px 24px;
  text-align: center;
  transition: var(--tr);
}
.nebras-card:hover { transform: translateY(-4px); box-shadow: var(--sh); }
.nebras-card img { max-height: 150px; width: auto; margin: 0 auto 18px; display: block; }
.nebras-card b { display: block; font-size: 17px; font-weight: 800; color: var(--dark); margin-bottom: 7px; }
.nebras-card p { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 14px; }
.nebras-card a {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  border-bottom: 2px solid var(--blue);
  padding-bottom: 2px;
}

@media (max-width: 860px) {
  .nebras-tiles, .nebras-cards { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════
   فلاتر المنتجات — بأسلوب Codeora
════════════════════════════════════════════════════════════ */
.nb-filters-wrap { display: flex; flex-direction: column; }
.nb-filter-box { border-bottom: 1px solid #e5e7eb; padding: 16px; }
.nb-filter-box:last-of-type { border-bottom: none; }
.nb-filter-title { font-size: 13px; font-weight: 800; color: #111827; margin-bottom: 12px; font-family: Cairo, sans-serif; }
.nb-filter-content { display: flex; flex-direction: column; gap: 9px; max-height: 220px; overflow-y: auto; }

/* صف عنصر (راديو/شكباكس بصري) */
.nb-filter-item { display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 12.5px; color: #374151; font-family: Cairo, sans-serif; }
.nb-filter-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.nb-filter-check { width: 17px; height: 17px; border: 1.5px solid #d1d5db; border-radius: 5px; flex-shrink: 0; position: relative; transition: .15s; }
.nb-filter-item input:checked ~ .nb-filter-check { background: #1a5cff; border-color: #1a5cff; }
.nb-filter-item input:checked ~ .nb-filter-check::after {
  content: ''; position: absolute; right: 5px; top: 2px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.nb-filter-item:hover .nb-filter-label { color: #1a5cff; }

/* دوائر الألوان */
.nb-color-content { flex-direction: row; flex-wrap: wrap; gap: 10px; max-height: none; }
.nb-color-item { position: relative; cursor: pointer; }
.nb-color-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.nb-color-circle { display: block; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px #e5e7eb; transition: .15s; }
.nb-color-item input:checked ~ .nb-color-circle { box-shadow: 0 0 0 2px #1a5cff; transform: scale(1.08); }

/* السعر */
.nb-price-content { gap: 18px; }
.nb-price-range-labels { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; color: #111827; font-family: Cairo, sans-serif; }
.nb-price-sep { color: #9ca3af; font-weight: 400; }
#nb-price-slider { margin: 4px 6px 0; }
#nb-price-slider.ui-slider { height: 5px; background: #e5e7eb; border: none; border-radius: 4px; }
#nb-price-slider .ui-slider-range { background: #1a5cff; border-radius: 4px; }
#nb-price-slider .ui-slider-handle {
  width: 16px; height: 16px; top: -6px; margin-right: -8px; background: #fff; border: 3px solid #1a5cff;
  border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.2); cursor: pointer; outline: none;
}

/* زر إعادة الضبط */
.nb-filter-reset {
  margin: 14px 16px 16px; padding: 10px; background: #f3f4f6; color: #374151; border: none;
  border-radius: 8px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: Cairo, sans-serif; transition: .15s;
}
.nb-filter-reset:hover { background: #e5e7eb; }

/* ══════════════════════════════════════════════════════════
   جدول مواصفات المنتج — بأسلوب Codeora
════════════════════════════════════════════════════════════ */
.nb-specs-box { direction: rtl; }
.nb-specs-group-title { font-size: 13px; font-weight: 800; color: #111827; margin: 18px 0 8px; }
.nb-specs-group-title:first-child { margin-top: 0; }
.nb-specs-table { width: 100%; border-collapse: collapse; margin-bottom: 6px; }
.nb-specs-table tr { border-bottom: 1px solid #f1f3f5; }
.nb-specs-table tr:last-child { border-bottom: none; }
.nb-specs-name { padding: 12px 14px 12px 0; font-size: 12.5px; color: #6b7280; font-weight: 600; width: 38%; white-space: nowrap; }
.nb-specs-value { padding: 12px 0; font-size: 12.5px; color: #111827; font-weight: 700; }
.nb-specs-color-sq { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #e5e7eb; vertical-align: middle; margin-left: 4px; }
@@media (max-width: 500px) {
  .nb-specs-name { width: 44%; padding-left: 8px; }
}

/* ══════════════════════════════════════════════════════════
   أيقونات مفضلة/مقارنة مصغّرة فوق صورة المنتج — بأسلوب Codeora
   (بدل زرين نصيّين كاملين تحت البطاقة)
════════════════════════════════════════════════════════════ */
.item-box .picture { position: relative; }
.nb-box-icons { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.nb-box-icon-btn {
  width: 30px; height: 30px; border-radius: 50%; background: #fff; border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.12); cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center; transition: .15s;
}
.nb-box-icon-btn:hover { background: #1a5cff; color: #fff; transform: scale(1.08); }

/* ══════════════════════════════════════════════════════════
   منتجات ذات صلة (صفحة تفاصيل المنتج) — تصميم بطاقة مخصّص
   بأسلوب Codeora: شارة + اسم + سعر أسود بارز + قلب مفرّغ وزر
   "أضف للسلة" مفرّغ الحدود جنب بعض (بدل زر أزرق معبّى).
   مستقل عن بطاقة المتجر العادية (_ProductBox) عمداً.
════════════════════════════════════════════════════════════ */
.nb-related-grid { margin-top: 32px; direction: rtl; }
.nb-related-title { font-size: 17px; font-weight: 900; color: #111827; margin-bottom: 16px; padding-right: 12px; border-right: 4px solid #1a5cff; }
.nb-related-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@@media (max-width: 900px) { .nb-related-cards { grid-template-columns: repeat(3, 1fr); } }
@@media (max-width: 640px) { .nb-related-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.nb-related-card { background: #fff; border: 1.5px solid #e5e7eb; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.nb-related-card-imgwrap { position: relative; display: block; aspect-ratio: 1; background: #f9fafb; }
.nb-related-card-imgwrap img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.nb-related-badge { position: absolute; top: 8px; right: 8px; background: #1a5cff; color: #fff; font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: 50px; z-index: 2; }
.nb-related-card-body { padding: 10px 12px 12px; }
.nb-related-card-name { display: block; font-size: 12.5px; font-weight: 700; color: #111827; text-decoration: none; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nb-related-card-price { font-size: 15px; font-weight: 900; color: #111827; margin-bottom: 10px; }
.nb-related-card-oldprice { font-size: 11px; color: #9ca3af; text-decoration: line-through; margin-left: 6px; font-weight: 500; }
.nb-related-card-actions { display: flex; gap: 8px; }
.nb-related-card-heart { width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px; background: #fff; border: 1.5px solid #e5e7eb; cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; transition: .15s; }
.nb-related-card-heart:hover { border-color: #ef4444; background: #fef2f2; }
.nb-related-card-addbtn { flex: 1; border: 1.5px solid #1a5cff; background: #fff; color: #1a5cff; border-radius: 8px; font-size: 11.5px; font-weight: 800; cursor: pointer; font-family: Cairo, sans-serif; text-decoration: none; display: flex; align-items: center; justify-content: center; transition: .15s; }
.nb-related-card-addbtn:hover { background: #1a5cff; color: #fff; }

/* ══════════════════════════════════════════════════════════
   شارة حالة طلب الإرجاع — الألوان تُطبَّق بجافاسكربت (بالأسفل)
   حسب نص الحالة نفسه، لأن CSS ما يقدر يقرأ نص العنصر مباشرة.
════════════════════════════════════════════════════════════ */
.order-item-header { justify-content: space-between !important; }
.nb-return-status-badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 4px 12px; border-radius: 50px; background: #f3f4f6; color: #374151; white-space: nowrap; }
.nb-return-status-badge.nb-status-ok { background: #dcfce7; color: #15803d; }
.nb-return-status-badge.nb-status-pending { background: #fef3c7; color: #92400e; }
.nb-return-status-badge.nb-status-bad { background: #fee2e2; color: #b91c1c; }

/* ══════════════════════════════════════════════════════════
   صندوق "شروط الاسترجاع" + زر الإرجاع — صفحة طلبات العميل
════════════════════════════════════════════════════════════ */
.nb-return-terms-box { background: #f9fafb; border: 1.5px solid #e5e7eb; border-radius: 12px; padding: 18px 20px; margin-bottom: 20px; }
.nb-return-terms-title { font-size: 13.5px; font-weight: 800; color: #111827; margin-bottom: 8px; }
.nb-return-terms-link { font-size: 12.5px; color: #1a5cff; text-decoration: none; font-weight: 700; }
.nb-return-terms-link:hover { text-decoration: underline; }
.nb-return-btn { display: inline-flex; align-items: center; gap: 5px; background: #1a5cff; color: #fff !important; border: none; padding: 9px 18px; border-radius: 8px; font-size: 12.5px; font-weight: 700; text-decoration: none; transition: .15s; }
.nb-return-btn:hover { background: #0040cc; }

/* ══════════════════════════════════════════════════════════
   ترقيم صفحات قائمة الطلبات — تقسيم من جهة المتصفح (١٠ لكل صفحة)
════════════════════════════════════════════════════════════ */
.nb-orders-pager { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.nb-orders-pager button { min-width: 34px; height: 34px; border: 1.5px solid #e5e7eb; background: #fff; color: #374151; border-radius: 8px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: Cairo, sans-serif; transition: .15s; }
.nb-orders-pager button:hover { border-color: #1a5cff; color: #1a5cff; }
.nb-orders-pager button.active { background: #1a5cff; border-color: #1a5cff; color: #fff; }

/* ══════════════════════════════════════════════════════════
   خصائص المنتج (لون/مقاس/إلخ) — CSS فقط، بدون لمس منطق الملف
   الأصلي (_ProductAttributes.cshtml) لأنه معقّد وحسّاس (AJAX
   يحدّث السعر/الصورة/المخزون تلقائياً حسب الاختيار).
════════════════════════════════════════════════════════════ */
.attributes { direction: rtl; margin: 6px 0 14px; }
.attributes dl { margin: 0; }
.attributes dt { margin: 14px 0 8px; }
.attributes dt:first-child { margin-top: 0; }
.attributes dt .text-prompt { font-size: 13px; font-weight: 800; color: #111827; }
.attributes dt .required { color: #ef4444; margin-right: 3px; }
.attributes dt .attribute-description { font-size: 11.5px; color: #6b7280; margin-top: 4px; }
.attributes dd { margin: 0 0 4px; }

/* قوائم منسدلة */
.attributes select { padding: 9px 12px; border: 1.5px solid #e5e7eb; border-radius: 8px; font-size: 13px; font-family: Cairo, sans-serif; outline: none; background: #f9fafb; min-width: 160px; cursor: pointer; }
.attributes select:focus { border-color: #1a5cff; }

/* راديو/شكباكس نصية (مقاسات مثلاً) */
.attributes ul.option-list { list-style: none !important; padding: 0 !important; margin: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; }
.attributes ul.option-list:not(.attribute-squares) li {
  border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 8px 14px; background: #fff;
  cursor: pointer; transition: .15s; position: relative;
}
.attributes ul.option-list:not(.attribute-squares) li:hover { border-color: #93c5fd; background: #f8faff; }
.attributes ul.option-list:not(.attribute-squares) li:has(input:checked) { border-color: #1a5cff; background: #eff6ff; }
.attributes ul.option-list:not(.attribute-squares) input[type="radio"],
.attributes ul.option-list:not(.attribute-squares) input[type="checkbox"] { accent-color: #1a5cff; margin-left: 6px; cursor: pointer; }
.attributes ul.option-list:not(.attribute-squares) label { font-size: 12.5px; font-weight: 700; color: #374151; cursor: pointer; }

/* دوائر الألوان ومربعات الصور */
.attributes .attribute-squares { gap: 10px !important; }
.attributes .attribute-square-container { display: block; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; border: 2px solid #fff; box-shadow: 0 0 0 1.5px #e5e7eb; cursor: pointer; transition: .15s; }
.attributes .color-squares .attribute-square-container { border-radius: 50%; }
.attributes .image-squares .attribute-square-container { border-radius: 8px; width: 48px; height: 48px; }
.attributes .attribute-square { width: 100%; height: 100%; display: block; }
.attributes li.selected-value .attribute-square-container,
.attributes li:has(input:checked) .attribute-square-container { box-shadow: 0 0 0 2px #1a5cff; transform: scale(1.08); }
.attributes .attribute-squares input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.attributes .attribute-squares li { position: relative; list-style: none !important; }
.attributes .tooltip-container { display: none; }
.attributes .not-available-text { font-size: 10px; color: #ef4444; }

/* صندوق الكمية المرتبط بقيمة خاصية (CustomerEntersQty) */
.attributes .qty-box { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; background: #f9fafb; border-radius: 8px; padding: 6px 10px; }
.attributes .qty-box label { font-size: 11px; color: #6b7280; }
.attributes .qty-box input[type="text"] { width: 50px; border: 1.5px solid #e5e7eb; border-radius: 6px; padding: 5px 8px; font-size: 12px; text-align: center; }

/* نص حر / ملاحظات */
.attributes .textbox,
.attributes textarea { width: 100%; max-width: 420px; border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 9px 12px; font-size: 13px; font-family: Cairo, sans-serif; outline: none; box-sizing: border-box; }
.attributes textarea { min-height: 70px; resize: vertical; }
.attributes .textbox:focus, .attributes textarea:focus { border-color: #1a5cff; }
