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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* Utility: used across pages via classList.add/remove("hidden") */
.hidden {
  display: none !important;
}

body {
  overflow-x: hidden;
  font-family: Arial, Tahoma, sans-serif;
  background: #f7f6f2;
  color: #171717;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.container {
  width: min(1180px, 92%);
  margin: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid #e6e3dc;
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.logo {
  font-size: 27px;
  font-weight: 900;
  letter-spacing: 4px;
}

/* شعار المتجر المرفوع من لوحة الإدارة (اختياري — عام لكل نمط شعار
   بالموقع: .logo هون، .store-logo بـhome.css/landing.css، .sf-logo
   بـsite-footer.css. site-settings.js هو يلي يضيف هالكلاس والصورة). */
.has-custom-logo {
  display: inline-flex !important;
  align-items: center;
}

.site-logo-img {
  height: 34px;
  width: auto;
  display: block;
}

nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
}

nav a:hover {
  opacity: .55;
}

.cart-btn {
  border: 1px solid #222;
  background: transparent;
  padding: 9px 15px;
  cursor: pointer;
}

.cart-btn #cartCount {
  background: #171717;
  color: white;
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  margin-right: 7px;
  font-size: 12px;
}

/* Language / currency switchers — reused on every page that shares
   this stylesheet's .topbar header (cart, checkout, product, ...). */
.header-switchers {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-switch-select,
.currency-switch-select {
  border: 1px solid #222;
  background: transparent;
  color: #171717;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 999px;
  cursor: pointer;
}

@media (max-width: 720px) {
  .header-switchers {
    gap: 5px;
  }

  .lang-switch-select,
  .currency-switch-select {
    font-size: 11px;
    padding: 4px 8px;
  }
}


/* ==============================
   RTL / LTR — functional mirroring. Most of this stylesheet's
   layout is flex/grid, which already mirrors with the `dir`
   attribute; these are the specific physical-direction exceptions.
============================== */

[dir="ltr"] .cart-btn #cartCount {
  margin-right: 0;
  margin-left: 7px;
}

.hero {
  min-height: 650px;
  background:
    radial-gradient(circle at 15% 25%, #ddd7ca, transparent 30%),
    linear-gradient(135deg, #f4f1e9, #d9d2c5);
  display: flex;
  align-items: center;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 70px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 4px;
}

.hero h1 {
  margin: 18px 0;
  font-size: clamp(45px, 6vw, 78px);
  line-height: 1.1;
  font-weight: 500;
}

.hero p {
  color: #5b5852;
  max-width: 530px;
  margin-bottom: 30px;
}

.primary-btn {
  display: inline-block;
  background: #171717;
  color: white;
  padding: 13px 30px;
}

.hero-card {
  height: 440px;
  background: #111;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 30px 60px rgba(0,0,0,.18);
}

.ring {
  width: 170px;
  height: 170px;
  border: 22px solid #c7c7c7;
  border-radius: 50%;
  font-size: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 35px;
}

.hero-card p {
  color: white;
  font-size: 32px;
  letter-spacing: 7px;
  margin: 0;
}

.hero-card span {
  font-size: 12px;
  letter-spacing: 4px;
  opacity: .55;
}

.features {
  background: white;
  border-bottom: 1px solid #e8e5df;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.feature-grid div {
  padding: 28px;
  text-align: center;
  border-left: 1px solid #eeeae4;
}

.feature-grid strong {
  display: block;
  font-size: 23px;
}

.feature-grid span {
  font-size: 13px;
  color: #777;
}

.products-section {
  padding: 95px 0;
}

.section-heading span {
  color: #8c877e;
  font-size: 13px;
}

.section-heading h2 {
  font-size: 38px;
  margin: 5px 0 35px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.product-card {
  background: white;
  border: 1px solid #ece9e2;
  transition: .25s;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 35px rgba(0,0,0,.08);
}

.product-image {
  height: 280px;
  background: #e7e3db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 75px;
}

.product-info {
  padding: 22px;
}

.category {
  font-size: 11px;
  color: #999;
}

.product-info h3 {
  font-size: 17px;
  margin: 5px 0 14px;
  min-height: 58px;
}

.price {
  font-weight: bold;
  margin-bottom: 14px;
}

.product-info button {
  width: 100%;
  border: 0;
  background: #171717;
  color: white;
  padding: 11px;
  cursor: pointer;
}

.about {
  padding: 110px 0;
  background: #161616;
  color: white;
  text-align: center;
}

.about-box {
  max-width: 700px;
}

.about span {
  font-size: 11px;
  letter-spacing: 5px;
  opacity: .5;
}

.about h2 {
  font-size: 43px;
  margin: 14px 0;
}

.about p {
  color: #aaa;
}

footer {
  background: #0b0b0b;
  color: white;
  padding-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.footer-grid h3 {
  font-size: 27px;
  letter-spacing: 5px;
}

.footer-grid strong,
.footer-grid a {
  display: block;
  margin-bottom: 10px;
}

.footer-grid a {
  color: #969696;
  font-size: 13px;
}

.copyright {
  border-top: 1px solid #252525;
  text-align: center;
  margin-top: 50px;
  padding: 20px;
  color: #666;
  font-size: 12px;
}

@media (max-width: 850px) {
  nav {
    display: none;
  }

  .hero {
    padding: 70px 0;
  }

  .hero-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    height: 330px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 43px;
  }
}

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-detail-image {
  background: #ebe7de;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail-image img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.no-product-image {
  font-size: 120px;
}

.product-detail-info {
  padding-top: 30px;
}

.product-detail-info h1 {
  font-size: 42px;
  line-height: 1.25;
  margin: 10px 0 20px;
}

.product-detail-price {
  font-size: 27px;
  font-weight: bold;
  margin-bottom: 25px;
}

.product-detail-description {
  color: #666;
  margin-bottom: 25px;
}

.product-stock {
  margin-bottom: 25px;
  font-size: 14px;
}

@media (max-width: 800px) {
  .product-detail {
    grid-template-columns: 1fr;
  }

  .product-detail-image,
  .product-detail-image img {
    min-height: 350px;
    height: 350px;
  }

  .product-detail-info h1 {
    font-size: 32px;
  }
}

.cart-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: start;
}

.cart-item {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid #e5e5e5;
  padding: 20px 0;
}

.cart-item-image {
  width: 130px;
  height: 130px;
  background: #ebe7de;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.cart-item-price {
  margin-bottom: 12px;
}

.cart-item-variant {
  color: #555;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 8px;
}

.cart-item-customization {
  color: #a15c00;
  background: #fff6e8;
  border: 1px solid #f0dcb3;
  padding: 6px 10px;
  margin: 0 0 12px;
  font-size: 13px;
}

.customization-field {
  margin: 16px 0;
}

.customization-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.customization-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d8d5cc;
  font-family: inherit;
  resize: vertical;
}

.customization-image-label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 600;
}

.customization-image-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.customization-image-row input[type="file"] {
  flex: 1;
  min-width: 0;
  font-size: 13px;
}

.customization-image-remove {
  background: none;
  border: 1px solid #d8d5cc;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.customization-image-hint {
  display: block;
  margin-top: 4px;
  color: #888;
  font-size: 12px;
}

.customization-image-status {
  margin: 6px 0 0;
  font-size: 13px;
}

.customization-image-status.uploading {
  color: #777;
}

.customization-image-status.uploaded {
  color: #16833b;
}

.customization-image-status.error {
  color: #c0392b;
}

.cart-item-customization-image {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 13px;
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ccc;
  margin-bottom: 10px;
}

.quantity-control button {
  width: 38px;
  height: 38px;
  border: 0;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 20px;
}

.quantity-control span {
  width: 45px;
  text-align: center;
}

.remove-btn {
  display: block;
  border: 0;
  background: transparent;
  color: #a00000;
  cursor: pointer;
  padding: 0;
}

.cart-item-total {
  font-weight: bold;
  white-space: nowrap;
}

.cart-summary {
  border: 1px solid #e0e0e0;
  padding: 25px;
  position: sticky;
  top: 100px;
}

.cart-summary h2 {
  margin-top: 0;
  margin-bottom: 25px;
}

.summary-row,
.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}

.summary-total {
  font-size: 20px;
  border-bottom: 0;
  margin-bottom: 20px;
}

.coupon-box {
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}

.coupon-box label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #555;
}

.coupon-input-row {
  display: flex;
  gap: 8px;
}

.loyalty-box {
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}

.loyalty-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.loyalty-checkbox-row input {
  width: auto;
}

.loyalty-badge {
  background: #fff6e8;
  border: 1px solid #f0dcb3;
  color: #a15c00;
  padding: 12px 16px;
  margin: 20px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.shipping-company-box {
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}

.shipping-company-box > label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: #555;
}

.shipping-company-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shipping-company-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.shipping-company-option:has(input:checked) {
  border-color: #111214;
  background: #f7f7f5;
}

.shipping-company-option-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shipping-company-option input {
  width: auto;
}

.coupon-input-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.coupon-input-row button {
  padding: 10px 16px;
  border: 1px solid #111214;
  background: #111214;
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.coupon-input-row button:disabled {
  opacity: 0.6;
  cursor: default;
}

.coupon-message {
  margin: 8px 0 0;
  font-size: 13px;
}

.coupon-message.error { color: #b00020; }
.coupon-message.success { color: #16833b; }

.checkout-btn {
  width: 100%;
  display: block;
  text-align: center;
  box-sizing: border-box;
}

.continue-shopping {
  display: block;
  text-align: center;
  margin-top: 15px;
}

.empty-cart {
  text-align: center;
  padding: 70px 20px;
}

.empty-cart p {
  margin-bottom: 30px;
}

@media (max-width: 800px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: 90px 1fr;
  }

  .cart-item-image {
    width: 90px;
    height: 90px;
  }

  .cart-item-total {
    grid-column: 2;
  }

  .cart-summary {
    position: static;
  }
}

.checkout-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 50px;
  align-items: start;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkout-form h2 {
  margin-bottom: 15px;
}

.checkout-form label {
  font-weight: 600;
  margin-top: 8px;
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ccc;
  padding: 13px;
  font: inherit;
  background: #fff;
}

.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
  outline: none;
  border-color: #222;
}

.checkout-form .primary-btn {
  margin-top: 20px;
}

.gift-wrap-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-weight: 600;
  cursor: pointer;
}

.gift-wrap-label input {
  width: auto;
}

.payment-method-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.payment-method-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #ccc;
  padding: 12px 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0;
}

.payment-method-option input {
  width: auto;
}

/* ملاحظة: تفادينا :has() هون قصداً (نفس قرار سابق بالمشروع)
   تجنباً لمخاطر دعم المتصفحات — التمييز البصري للخيار المختار
   يتم بإضافة/إزالة هالكلاس عبر JS بدل الاعتماد على :has(). */
.payment-method-option.is-selected {
  border-color: #222;
  background: #f7f6f3;
}

.payment-brand-icons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: auto;
  flex-shrink: 0;
}

.payment-brand-icons svg {
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.invoice-type-group {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.invoice-type-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #ccc;
  padding: 12px 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0;
  text-align: center;
}

.invoice-type-option input {
  width: auto;
}

.invoice-type-option.is-selected {
  border-color: #222;
  background: #f7f6f3;
}

.company-invoice-fields {
  border: 1px solid #e6e3dc;
  background: #faf9f6;
  padding: 14px 16px 4px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.company-invoice-fields.hidden {
  display: none;
}

.terms-agree-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #444;
  cursor: pointer;
}

.terms-agree-label input {
  width: auto;
  flex-shrink: 0;
  margin-top: 3px;
}

.terms-agree-label a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

.checkout-item-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #eee;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.checkout-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkout-guest-note {
  background: #f3f2ee;
  border: 1px solid #e6e3dc;
  padding: 10px 14px;
  font-size: 13px;
  color: #55585b;
  margin: 0 0 16px;
}

.guest-account-offer {
  width: min(420px, 100%);
  margin: 40px auto 0;
  background: #fff;
  border: 1px solid #e6e3dc;
  padding: 32px 30px;
  text-align: right;
}

.guest-account-offer h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.guest-account-offer p {
  color: #6f7276;
  font-size: 14px;
  margin: 0 0 18px;
}

.guest-account-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.guest-account-actions .primary-btn,
.guest-account-actions .secondary-btn {
  flex: 1;
}

.checkout-summary {
  border: 1px solid #e0e0e0;
  padding: 25px;
  position: sticky;
  top: 100px;
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid #eee;
}

#checkoutMessage {
  margin-top: 10px;
}

@media (max-width: 800px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .checkout-summary {
    position: static;
  }
}

/* =========================================================
   ISTREV CATEGORY V2
========================================================= */

.category-page {
  background: #fff;
  color: #111214;
}

/* Breadcrumb */
.category-breadcrumb {
  background: #fafaf8;
  border-bottom: 1px solid #e7e7e3;
}

.category-breadcrumb .container {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #85878a;
}

.category-breadcrumb a {
  color: #66686b;
  text-decoration: none;
}

.category-breadcrumb a:hover {
  color: #111214;
}

.category-breadcrumb strong {
  color: #111214;
  font-weight: 600;
}


/* Hero */
/* مخفي بالكامل (بدون حذف من الـHTML/JS حتى ما تنكسر أي وظيفة
   زي document.title) — بناءً على طلب صاحب المتجر: يبين المنتجات
   مباشرة بدون أي كتابة/عنوان/وصف فوقها. */
#categoryHero {
  display: none;
}

/* هيدر مضغوط بدون صورة خلفية كبيرة/سلايدر — العنوان وعدد
   المنتجات فقط، حتى تظهر شبكة المنتجات مباشرة بأسرع وقت (بناءً
   على طلب صاحب المتجر). category.js ما عاد يضبط أي صورة خلفية
   على #categoryHero إطلاقاً. */
.category-v2-hero {
  position: relative;
  background: #fff;
  border-bottom: 1px solid #e8e8e5;
}

.category-v2-overlay {
  display: none;
}

.category-v2-hero-inner {
  position: relative;
  width: 100%;
}

.category-v2-copy {
  max-width: 720px;
  padding: 34px 0;
  color: var(--black, #111);
}

.category-eyebrow,
.section-label {
  display: block;
  margin-bottom: 14px;
  font-size: 9px;
  letter-spacing: 3px;
  color: #9fa5ab;
}

.category-v2-copy h1 {
  margin: 0 0 8px;
  max-width: 700px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  font-weight: 700;
  color: inherit;
}

.category-v2-copy > p {
  margin: 0;
  max-width: 600px;
  color: #767676;
  font-size: 13px;
  line-height: 1.7;
}

.category-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  padding-top: 0;
  border-top: none;
  color: #888;
  font-size: 11px;
}

.meta-divider {
  opacity: .45;
}


/* Main store area */
.category-store {
  padding: 82px 0 100px;
}

/* Vertical sidebar filter layout — sidebar column stays fixed-width,
   main column (toolbar + grid) takes the rest. Source order puts the
   sidebar first, which in this RTL page lands it on the leading
   (right) side automatically. */
.category-store-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  gap: 50px;
}

.category-main {
  min-width: 0;
}

.category-sidebar {
  position: sticky;
  top: 90px;
}

.category-sidebar-details {
  border: 1px solid #e5e5e1;
}

.category-sidebar-summary {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.category-sidebar-summary::-webkit-details-marker {
  display: none;
}

.category-sidebar-summary-icon {
  font-size: 13px;
}

.category-sidebar-body {
  display: block;
  padding: 22px 20px 26px;
}

.category-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
}

.category-sidebar-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.category-sidebar-clear {
  border: none;
  background: none;
  padding: 0;
  color: #85878a;
  font: inherit;
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
}

.category-sidebar-clear:hover {
  color: #111214;
}

.category-sidebar-section {
  padding: 18px 0;
  border-top: 1px solid #ededeb;
}

.category-sidebar-section:first-of-type {
  padding-top: 0;
  border-top: none;
}

.category-sidebar-heading {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #111214;
  text-transform: uppercase;
}

/* Filter chips read as pill buttons on the old horizontal bars; inside
   the sidebar they become full-width checkbox-style rows instead. */
.category-sidebar .category-stock-filter,
.category-sidebar .category-rating-filter {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.category-sidebar .filter-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding: 8px 6px;
  border: none;
  background: none;
  color: #45474a;
  text-align: right;
}

[dir="ltr"] .category-sidebar .filter-chip {
  text-align: left;
}

.category-sidebar .filter-chip::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  border: 1px solid #c7c7c3;
  background: #fff;
}

.category-sidebar .filter-chip:hover {
  color: #111214;
  border-color: transparent;
}

.category-sidebar .filter-chip:hover::before {
  border-color: #111214;
}

.category-sidebar .filter-chip.active {
  background: none;
  color: #111214;
  font-weight: 700;
}

.category-sidebar .filter-chip.active::before {
  background: #111214;
  border-color: #111214;
  background-image:
    linear-gradient(45deg, transparent 40%, #fff 40%, #fff 55%, transparent 55%),
    linear-gradient(135deg, transparent 55%, #fff 55%, #fff 70%, transparent 70%);
}

.category-sidebar .category-price-filter {
  flex-wrap: nowrap;
}

.category-sidebar .category-price-filter input {
  flex: 1;
  width: auto;
  min-width: 0;
  padding: 0 8px;
}

.category-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 30px;
}

/* "SHOP PRODUCTS" + "منتجات القسم" + عدد المنتجات — كتابة مكرّرة
   فوق الشبكة مباشرة (نفس العنوان/العدد ظاهرين فوق بالفعل)، مخفية
   بناءً على طلب صاحب المتجر حتى تبين المنتجات مباشرة. الفرز
   (category-toolbar-actions) يضل ظاهر لأنه أداة تحكم فعلية. */
.category-toolbar-title {
  display: none;
}

.category-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-sort-label {
  white-space: nowrap;
  font-size: 11px;
  color: #777a7d;
}

#productSort {
  min-width: 210px;
  height: 48px;
  padding: 0 15px;
  border: 1px solid #dcdcd8;
  background: #fff;
  color: #111214;
  font: inherit;
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

#productSort:focus {
  border-color: #111214;
}


/* Search + stock filters */
.category-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 0;
  margin-bottom: 42px;
  border-top: 1px solid #e5e5e1;
  border-bottom: 1px solid #e5e5e1;
}

.category-inline-search {
  width: min(430px, 100%);
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: #f7f7f5;
  border: 1px solid #ededeb;
}

.category-inline-search span {
  color: #777a7d;
  font-size: 18px;
}

.category-inline-search input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111214;
  font: inherit;
  font-size: 12px;
}

.category-stock-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-chip {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid #dadad6;
  background: #fff;
  color: #55585b;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: .2s ease;
}

.filter-chip:hover {
  border-color: #111214;
  color: #111214;
}

.filter-chip.active {
  background: #111214;
  border-color: #111214;
  color: #fff;
}

.category-filter-bar-secondary {
  flex-wrap: wrap;
  margin-bottom: 42px;
  border-top: none;
  padding-top: 0;
}

.category-price-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-price-filter label {
  font-size: 12px;
  color: #6f7276;
  white-space: nowrap;
}

.category-price-filter input {
  width: 90px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #dadad6;
  background: #fff;
  color: #111214;
  font: inherit;
  font-size: 12px;
}

.category-price-filter input:focus {
  border-color: #111214;
  outline: 0;
}

.category-price-filter span {
  color: #9a9c9f;
}

.category-rating-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}


/* Product grid */
.category-products-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 46px 20px;
}

.category-products-grid .product-card {
  min-width: 0;
}

.category-products-grid .product-card-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.08;
  overflow: hidden;
  background: #f4f4f2;
  text-decoration: none;
}

.category-products-grid .product-card-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition:
    transform .45s ease,
    opacity .25s ease;
}

.category-products-grid .product-card:hover
.product-card-image img {
  transform: scale(1.025);
}

.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: #f0f0ed;
  color: #a3a3a0;
  font-family: Georgia, serif;
  font-size: 28px;
  letter-spacing: 4px;
}

.stock-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 7px 10px;
  background: rgba(17,18,20,.92);
  color: #fff;
  font-size: 9px;
}

.discount-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 7px 10px;
  background: #b8342c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: .3px;
}


/* Existing JS product card compatibility */
.category-products-grid .product-card-body,
.category-products-grid .product-info {
  padding-top: 15px;
}

.category-products-grid .product-category-name,
.category-products-grid .product-category {
  margin-bottom: 6px;
  color: #96989a;
  font-size: 9px;
}

.category-products-grid .product-card-title,
.category-products-grid .product-title {
  margin: 0 0 9px;
  min-height: 42px;
  color: #111214;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

.category-products-grid
.product-card-title a,
.category-products-grid
.product-title a {
  color: inherit;
  text-decoration: none;
}

.category-products-grid
.product-card-title a:hover,
.category-products-grid
.product-title a:hover {
  text-decoration: underline;
}

.category-products-grid .product-price,
.category-products-grid .product-price-row {
  color: #111214;
  font-size: 15px;
  font-weight: 700;
}

.category-products-grid .compare-price {
  margin-inline-start: 8px;
  color: #9b9d9f;
  font-size: 11px;
  font-weight: 400;
  text-decoration: line-through;
}

.category-products-grid
button,
.category-products-grid
.add-cart-button,
.category-products-grid
.product-add-btn {
  width: 100%;
  min-height: 45px;
  margin-top: 14px;
  border: 1px solid #111214;
  background: #fff;
  color: #111214;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s ease;
}

.category-products-grid
button:hover,
.category-products-grid
.add-cart-button:hover,
.category-products-grid
.product-add-btn:hover {
  background: #111214;
  color: #fff;
}

.category-products-grid button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.category-products-grid
a.product-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-decoration: none;
  cursor: pointer;
}


/* Skeleton */
.category-product-skeleton {
  aspect-ratio: 1 / 1.2;
  background:
    linear-gradient(
      90deg,
      #f3f3f1 25%,
      #fafaf9 50%,
      #f3f3f1 75%
    );
  background-size: 200% 100%;
  animation:
    categorySkeleton 1.4s infinite linear;
}

@keyframes categorySkeleton {
  from {
    background-position: 200% 0;
  }

  to {
    background-position: -200% 0;
  }
}


/* Empty state */
.category-empty {
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid #e7e7e3;
  background: #fafaf8;
}

.category-empty.hidden {
  display: none;
}

.category-empty-icon {
  margin-bottom: 16px;
  font-size: 32px;
  color: #777a7d;
}

.category-empty h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-empty p {
  margin: 0 0 22px;
  color: #7b7d80;
  font-size: 12px;
  line-height: 1.8;
}

.dark-button {
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid #111214;
  background: #111214;
  color: #fff;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}


/* Benefits */
.category-benefits {
  border-top: 1px solid #e5e5e1;
  border-bottom: 1px solid #e5e5e1;
  background: #fafaf8;
}

.category-benefits-grid {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
}

.category-benefits article {
  min-height: 105px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 28px;
  border-inline-start: 1px solid #e3e3df;
}

.category-benefits article:last-child {
  border-inline-end: 1px solid #e3e3df;
}

.category-benefits article > span {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border: 1px solid #d7d7d3;
  border-radius: 50%;
  font-size: 12px;
}

.category-benefits strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.category-benefits small {
  display: block;
  color: #85878a;
  font-size: 10px;
}


/* Toast */
.toast {
  position: fixed;
  left: 28px;
  bottom: 28px;
  z-index: 1000;
  max-width: 340px;
  padding: 14px 18px;
  background: #111214;
  color: #fff;
  box-shadow: 0 14px 40px rgba(0,0,0,.22);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: .25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}


/* Tablet */
@media (max-width: 1000px) {

  .category-store-layout {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 30px;
  }

  .category-products-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

  .category-toolbar {
    align-items: center;
  }

  .category-benefits-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}


/* Mobile */
@media (max-width: 820px) {

  .category-breadcrumb .container {
    overflow-x: auto;
    white-space: nowrap;
  }

  .category-v2-copy {
    padding: 24px 0;
  }

  .category-v2-copy h1 {
    font-size: clamp(22px, 7vw, 30px);
  }

  .category-store {
    padding: 60px 0 75px;
  }

  .category-store-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .category-sidebar {
    position: static;
  }

  .category-sidebar-summary {
    display: flex;
    justify-content: space-between;
  }

  .category-sidebar-summary::after {
    content: "+";
    font-size: 15px;
  }

  .category-sidebar-details[open] .category-sidebar-summary::after {
    content: "−";
  }

  .category-sidebar-body {
    display: revert;
    padding: 4px 16px 20px;
  }

  .category-toolbar {
    display: block;
  }

  .category-toolbar-actions {
    margin-top: 24px;
  }

  #productSort {
    width: 100%;
  }

  .category-filter-bar {
    display: block;
  }

  .category-inline-search {
    width: 100%;
  }

  .category-stock-filter {
    margin-top: 12px;
    overflow-x: auto;
  }

  .filter-chip {
    flex: 0 0 auto;
  }

  .category-filter-bar-secondary {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .category-price-filter {
    width: 100%;
  }

  .category-price-filter input {
    flex: 1;
    width: auto;
  }

  .category-rating-filter {
    overflow-x: auto;
  }

  .category-products-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    gap: 32px 10px;
  }

  .category-benefits-grid {
    grid-template-columns: 1fr 1fr;
  }

  .category-benefits article {
    min-height: 95px;
    padding: 16px 14px;
  }

  .toast {
    left: 15px;
    right: 15px;
    bottom: 15px;
    max-width: none;
  }

}


/* Small phones */
@media (max-width: 430px) {

  .category-products-grid {
    gap: 26px 8px;
  }

  .category-products-grid
  .product-card-title,
  .category-products-grid
  .product-title {
    min-height: 38px;
    font-size: 11px;
  }

  .category-products-grid
  .product-price,
  .category-products-grid
  .product-price-row {
    font-size: 13px;
  }

  .category-benefits-grid {
    grid-template-columns: 1fr;
  }

  .category-benefits article {
    border-inline-end: 1px solid #e3e3df;
    border-bottom: 1px solid #e3e3df;
  }

}

/* =====================================
   AUTH PAGES (login / register / verify)
===================================== */

.auth-page {
  padding: 60px 0 90px;
  display: flex;
  justify-content: center;
}

.auth-box {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid #e6e3dc;
  padding: 40px 36px;
}

.auth-box h1 {
  margin-bottom: 8px;
}

.auth-subtitle {
  color: #6f7276;
  margin-bottom: 24px;
  font-size: 14px;
}

.auth-message {
  min-height: 20px;
  font-size: 14px;
  margin-top: 10px;
}

.auth-message.error {
  color: #b00020;
}

.auth-message.success {
  color: #1a7a3c;
}

.auth-forgot-link {
  display: block;
  text-align: left;
  font-size: 13px;
  color: #6f7276;
  margin-top: 8px;
  text-decoration: underline;
}

.auth-switch {
  margin-top: 24px;
  text-align: center;
  font-size: 14px;
  color: #6f7276;
}

.auth-switch a {
  color: #171717;
  font-weight: 700;
  text-decoration: underline;
}

.secondary-btn {
  background: #fff;
  border: 1px solid #171717;
  color: #171717;
  padding: 11px 24px;
  cursor: pointer;
  font: inherit;
}

.secondary-btn:hover {
  background: #f3f3f1;
}

/* =====================================
   ACCOUNT PAGE
===================================== */

.account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid #e6e3dc;
  padding-bottom: 24px;
}

.account-order-card {
  border: 1px solid #e6e3dc;
  padding: 20px 22px;
  margin-bottom: 16px;
}

.account-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.account-order-date {
  color: #6f7276;
  font-size: 13px;
  margin-inline-start: 12px;
}

.order-status-pill {
  background: #f3f3f1;
  border: 1px solid #e6e6e3;
  padding: 5px 14px;
  font-size: 13px;
  border-radius: 20px;
}

.account-order-items {
  border-top: 1px solid #eee;
  padding-top: 12px;
}

.account-order-item {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 4px 0;
  color: #444;
}

.account-order-total {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid #eee;
  font-size: 16px;
}

.account-order-invoice-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: #55585b;
  text-decoration: none;
}

.account-order-invoice-link:hover {
  color: #111214;
  text-decoration: underline;
}

.account-order-links {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.account-order-links .account-order-invoice-link {
  margin-top: 0;
}

.account-order-return-toggle {
  background: none;
  border: 1px solid #d8d5cc;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  color: #55585b;
  font-family: inherit;
}

.account-order-return-toggle:hover {
  color: #111214;
  border-color: #111214;
}

.return-request-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.return-request-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 13px;
}

.return-request-form select,
.return-request-form input,
.return-request-form textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d8d5cc;
  font-family: inherit;
  font-size: 14px;
}

.return-admin-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: #f9f8f5;
  border: 1px solid #e4e1d8;
  font-size: 13px;
  color: #6f7276;
}

.affiliate-referral-box {
  background: #f3f2ee;
  border: 1px solid #e6e3dc;
  padding: 22px 24px;
  margin: 26px 0;
}

.affiliate-referral-link-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.affiliate-referral-link-row input {
  flex: 1;
  min-width: 220px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  padding: 11px 13px;
  font: inherit;
  background: #fff;
}

.affiliate-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.affiliate-stat-card {
  border: 1px solid #e6e3dc;
  padding: 18px;
  text-align: center;
}

.affiliate-stat-card span {
  display: block;
  color: #6f7276;
  font-size: 13px;
  margin-bottom: 8px;
}

.affiliate-stat-card strong {
  font-size: 20px;
}

@media (max-width: 700px) {
  .affiliate-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.vendor-status-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e6e3dc;
}

.vendor-status-actions select {
  padding: 8px 10px;
  border: 1px solid #d8d5cc;
  background: #fff;
}

.vendor-status-actions button {
  padding: 8px 16px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  cursor: pointer;
}

.vendor-status-actions button:hover {
  background: #333;
}

/* =====================================
   PRODUCT REVIEWS
===================================== */

.reviews-section {
  margin-top: 50px;
  padding-top: 40px;
  border-top: 1px solid #e6e3dc;
}

.reviews-heading {
  margin-bottom: 20px;
}

.reviews-heading h2 {
  margin: 5px 0 0;
  font-size: 27px;
}

.reviews-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.reviews-average {
  font-size: 32px;
  font-weight: 900;
}

.reviews-stars {
  color: #c9a13b;
  letter-spacing: 2px;
}

.review-card {
  border-bottom: 1px solid #eee;
  padding: 16px 0;
}

.review-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.review-card-name {
  font-weight: 700;
}

.review-card-date {
  color: #9a9c9f;
  font-size: 13px;
}

.review-verified-badge {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  color: #2f7d4f;
  background: #e7f5ec;
  border-radius: 20px;
  vertical-align: middle;
}

.rating-breakdown {
  max-width: 320px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rating-breakdown-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #6f7276;
}

.rating-breakdown-label {
  width: 34px;
  flex-shrink: 0;
}

.rating-breakdown-bar {
  flex: 1;
  height: 8px;
  background: #eeece5;
  border-radius: 20px;
  overflow: hidden;
}

.rating-breakdown-fill {
  height: 100%;
  background: #c9a13b;
  border-radius: 20px;
}

.rating-breakdown-count {
  width: 24px;
  flex-shrink: 0;
  text-align: left;
}

.reviews-sort-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}

.reviews-sort-row label {
  color: #6f7276;
}

.reviews-sort-row select {
  padding: 6px 10px;
  border: 1px solid #ccc;
  font: inherit;
  background: #fff;
}

.review-form {
  margin-top: 24px;
  padding: 22px;
  background: #f7f7f5;
  border: 1px solid #e6e3dc;
}

.review-form label {
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}

.review-stars-input {
  display: flex;
  gap: 6px;
  font-size: 26px;
  margin-bottom: 16px;
  cursor: pointer;
}

.review-stars-input span {
  color: #d8d8d3;
}

.review-stars-input span.active {
  color: #c9a13b;
}

.review-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ccc;
  padding: 12px;
  font: inherit;
  margin-bottom: 14px;
}

.review-login-note {
  color: #6f7276;
  font-size: 14px;
}

.review-login-note a {
  text-decoration: underline;
  font-weight: 700;
  color: #171717;
}

/* =========================================
   Favorites / Wishlist page
========================================= */

.favorites-page {
  padding: 50px 0 80px;
}

.favorites-page h1 {
  margin-bottom: 6px;
}

.favorites-subtitle {
  color: #6f7276;
  margin-bottom: 30px;
}

.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.favorites-loading {
  color: #888;
  padding: 40px 0;
  text-align: center;
}

.favorites-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #6f7276;
}

.favorites-empty h2 {
  margin: 10px 0 6px;
  color: #161719;
}

.favorites-empty .primary-btn {
  margin-top: 18px;
  display: inline-block;
}

@media (max-width: 560px) {
  .favorites-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

/* =========================================
   Order tracking page
========================================= */

.track-order-page {
  padding: 50px 0 80px;
}

.track-order-box {
  margin: 0 auto 30px;
}

.track-result {
  width: min(640px, 100%);
  margin: 0 auto;
}

.track-order-card {
  background: #fff;
  border: 1px solid #e6e3dc;
  padding: 30px;
}

.track-order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
  margin-bottom: 24px;
}

.track-order-number {
  display: block;
  font-weight: 800;
  font-size: 18px;
  direction: ltr;
  text-align: right;
}

.track-order-date {
  display: block;
  color: #888;
  font-size: 13px;
  margin-top: 4px;
}

.track-order-total {
  font-size: 20px;
}

.track-order-invoice-link {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 13px;
  color: #55585b;
  text-decoration: none;
}

.track-order-invoice-link:hover {
  color: #111214;
  text-decoration: underline;
}

.track-timeline {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}

.track-timeline::before {
  content: "";
  position: absolute;
  top: 7px;
  right: 5%;
  left: 5%;
  height: 2px;
  background: #eee;
  z-index: 0;
}

.track-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  text-align: center;
}

.track-step-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #eee;
  border: 2px solid #eee;
}

.track-step.active .track-step-dot {
  background: #111;
  border-color: #111;
}

.track-step-label {
  font-size: 12px;
  color: #999;
}

.track-step.active .track-step-label {
  color: #111;
  font-weight: 700;
}

.track-timeline-cancelled {
  justify-content: flex-start;
}

.track-timeline-cancelled::before {
  display: none;
}

.track-step.cancelled .track-step-dot {
  background: #b00020;
  border-color: #b00020;
}

.track-step.cancelled .track-step-label {
  color: #b00020;
  font-weight: 700;
}

.track-order-items {
  margin-bottom: 20px;
}

.track-order-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f2f2f0;
  font-size: 14px;
}

.track-order-address {
  font-size: 14px;
  color: #555;
}

.track-order-address p {
  margin: 6px 0 0;
}

@media (max-width: 560px) {
  .track-step-label {
    font-size: 10px;
  }
}

/* =========================================
   Store content pages (help/shipping/returns/terms/privacy)
========================================= */

.store-page {
  padding: 50px 0 80px;
  max-width: 760px;
}

.store-page-box {
  width: 100%;
  background: #fff;
  border: 1px solid #e6e3dc;
  padding: 40px 36px;
}

.store-page-box h1 {
  margin-bottom: 20px;
}

.store-page-content p {
  margin: 0 0 16px;
  line-height: 1.9;
  color: #3d3f42;
}

.store-page-content p:last-child {
  margin-bottom: 0;
}

@media (max-width: 560px) {
  .store-page-box {
    padding: 28px 20px;
  }
}

/* ===== CATEGORY SUBCATEGORY CHIPS (تصنيفات فرعية تحت تصنيف رئيسي) ===== */

.category-subcategories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px 0;
}

.category-subcategory-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.category-subcategory-chip:hover {
  border-color: #111;
  color: #111;
}

.category-subcategory-chip.active {
  background: #111;
  border-color: #111;
  color: #fff;
}

/* ==============================
   OFFERS PAGE — ACTIVE CAMPAIGNS SECTION
============================== */

.offers-campaigns-section {
  padding: 46px 0 0;
}

.offers-campaigns-title {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 700;
  color: #111214;
}

/* ==============================
   CAMPAIGN LANDING PAGE (/campaign/:slug)
============================== */

.campaign-hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  background: #1b1d20 center / cover no-repeat;
  color: #fff;
  overflow: hidden;
}

.campaign-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,12,.15), rgba(10,10,12,.55));
  z-index: 1;
}

.campaign-hero-inner {
  position: relative;
  z-index: 2;
  padding: 50px 0;
  max-width: 720px;
}

.campaign-hero-badge {
  display: inline-block;
  background: #c0272d;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
  letter-spacing: .3px;
}

/* نفس دفاع [hidden] فوق — احتياطاً لو discount_percent وصل صفر يوماً. */
.campaign-hero-badge[hidden] {
  display: none;
}

.campaign-hero-inner h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.25;
  font-weight: 700;
}

.campaign-hero-inner p {
  margin: 0;
  color: rgba(255,255,255,.85);
  font-size: 13.5px;
  line-height: 1.8;
  max-width: 560px;
}

.campaign-countdown {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

/* [hidden] لازم يبقى أقوى من display:flex فوق — وإلا بيبين الرقم
   "00:00:00:00" حتى لو الحملة بلا تاريخ نهاية (campaign.js ما بيشيل
   السمة hidden إلا لو campaign.ends_at موجود فعلياً). */
.campaign-countdown[hidden] {
  display: none;
}

.campaign-countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 8px 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  backdrop-filter: blur(2px);
}

.campaign-countdown-item strong {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.campaign-countdown-item span {
  font-size: 10px;
  color: rgba(255,255,255,.75);
  margin-top: 2px;
}

.campaign-store {
  padding-top: 50px;
}

@media (max-width: 560px) {
  .campaign-hero {
    min-height: 260px;
  }

  .campaign-countdown-item {
    min-width: 48px;
    padding: 6px 4px;
  }

  .campaign-countdown-item strong {
    font-size: 15px;
  }
}

@media (max-width: 560px) {
  .category-subcategories {
    padding: 14px 16px 0;
    gap: 8px;
  }

  .category-subcategory-chip {
    padding: 7px 14px;
    font-size: 12px;
  }
}
