/**
 * Dirah Markets — overrides (لا تعدّل index.min.js)
 */

/* ─── 0) أداء: LCP + CLS ─── */
neoxero-main-slider {
  display: block;
  min-height: 45vh;
}

@media (min-width: 768px) {
  neoxero-main-slider {
    min-height: 55vh;
  }
}

.dirah-slider-lcp-wrap {
  position: relative;
  display: block;
  min-height: 45vh;
  overflow: hidden;
}

@media (min-width: 768px) {
  .dirah-slider-lcp-wrap {
    min-height: 55vh;
  }
}

.dirah-slider-lcp-shell {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.dirah-slider-lcp-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dirah-slider-lcp-wrap neoxero-main-slider {
  position: relative;
  z-index: 1;
}

.dirah-slider-lcp-wrap:has(neoxero-main-slider section) .dirah-slider-lcp-shell {
  opacity: 0;
  visibility: hidden;
}

neoxero-brands {
  display: block;
  min-height: 420px;
}

neoxero-products-grid {
  display: block;
  min-height: 520px;
}

neoxero-news {
  display: block;
  min-height: 56px;
}

footer-section {
  display: block;
  min-height: 520px;
}

/* ─── 1) سلايدر التصنيفات: 3 موبايل / 5 تابلت / 7 ديسكتوب ─── */
neoxero-categories .popular-categories .swiper-slide {
  width: 33.333333% !important;
}

@media (min-width: 768px) {
  neoxero-categories .popular-categories .swiper-slide {
    width: 20% !important;
  }
}

@media (min-width: 1024px) {
  neoxero-categories .popular-categories .swiper-slide {
    width: 14.285714% !important;
  }
}

neoxero-categories .category-card-content .logo-sm {
  display: none;
}

/* ─── 2) بانر الرئيسية: رابط يغطي الشريحة ─── */
.home-slider .swiper-slide .relative,
.wide-slider .swiper-slide .relative {
  position: relative;
}

.home-slider a.item-link,
.wide-slider a.item-link {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: block;
}

/* المحتوى فوق الرابط يبقى للبحث/أزرار التفاعل */
.home-slider .container.pointer-events-none,
.wide-slider .container.pointer-events-none {
  pointer-events: none;
}

.home-slider .pointer-events-auto,
.wide-slider .pointer-events-auto {
  pointer-events: auto;
}


/* صفحة المنتج: قائمة منسدلة بدل radio عند type=select في products_variables */
.dirah-option-select {
  display: block;
  width: 100%;
  height: 2.5rem;
  margin-top: 0.75rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #111;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  box-shadow: 0 0 0 1px rgb(229 231 235);
  outline: none;
}

.dirah-option-select:focus {
  border-color: hsl(var(--primary-600, 220 70% 45%));
  box-shadow: 0 0 0 2px hsl(var(--primary-600, 220 70% 45%) / 0.25);
}

.dirah-option-radios-hidden {
  display: none !important;
}

/* بطاقة المنتج: إخفاء صورة/أيقونة الـ placeholder قبل تحميل صورة المنتج */
.product-card-wrapper .product-img-action-wrap figure > .absolute.inset-0.z-10 {
  display: none !important;
}

/* بطاقة المنتج: إخفاء معاينة الألوان/الخيارات على البطاقة */
.product-card-wrapper .product-content-wrap > .product-options {
  display: none !important;
}

/* عنوان بطاقة المنتج: ارتفاع أدنى ثابت */
.product-card-wrapper h2.min-w-0.mb-2,
.product-card-wrapper h2.min-w-0 {
  min-height: 48px;
  display: flex;
  align-items: flex-start;
}

.product-card-wrapper h2.min-w-0 > a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.product-card-wrapper .product-price ins svg {
  width: 15px;
  height: 15px;
}

.product-card-wrapper .product-price del svg {
  width: 9px;
  height: 9px;
}

neoxero-categories .popular-categories .swiper-slide,
.featured-products-section .swiper-slide,
.testimonials-section .swiper-slide {
  height: auto;
}

neoxero-categories .popular-categories .swiper-slide a {
  height: 100%;
}

/* ─── 4) السلة الجانبية: ترتيب الأزرار ─── */
.mini-cart-drawer .shopping-cart-button {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-cart-drawer .shopping-cart-button .dirah-cart-actions-row {
  display: flex;
  gap: 8px;
  width: 100%;
}

.mini-cart-drawer .shopping-cart-button .dirah-cart-actions-row > button,
.mini-cart-drawer .shopping-cart-button .dirah-cart-actions-row > a {
  flex: 1 1 0;
  width: auto !important;
  min-width: 0;
  margin-top: 0 !important;
}

.mini-cart-drawer .shopping-cart-button > a[data-dirah-checkout] {
  text-decoration: none;
  transition: none;
  color: hsl(var(--primary-foreground));
}


.shopping-cart-footer .text-black.text-xl {
  font-size: 1rem;
  line-height: 1.5rem;
}

/* السلة الجانبية: تعطيل زر + عند الحد الأقصى */
.mini-cart-drawer .shopping-cart-quantity button[data-dirah-at-max="1"],
.mini-cart-drawer .shopping-cart-quantity button.dirah-plus-blocked {
  pointer-events: none !important;
  cursor: not-allowed !important;
  opacity: 0.3 !important;
}

.cart-dropdown-wrap .shopping-cart-quantity input {
  padding: 0;
}

.flex.flex-col.mb-6.section-title-wrap.justify-between.items-center {
  flex-direction: row;
}