/* LUN LINE — Editorial Homepage */

/* إعدادات التصميم */
body.ll-v1 {
  --ll-paper: #ffffff;
  --ll-ink: #20211f;
  --ll-olive: #6e7765;

  /* لون الكتابة والأيقونات، وليس خلفية الهيدر */
  --ll-header-ink: #ffffff;
  --ll-hero-ink: #ffffff;

  --ll-hero-position: 50% 35%;
  --ll-hero-position-mobile: 50% 30%;

  --ll-font: var(--font-main, sans-serif);
  --ll-display: "Cormorant", Georgia, "Times New Roman", serif;
}

/* ====================================
   الهيدر الشفاف فوق صورة الواجهة
   ==================================== */

body.ll-v1 .ll-header {
  position: absolute !important;
  inset: 0 0 auto !important;
  width: 100% !important;
  z-index: 50 !important;

  background: transparent !important;
  color: var(--ll-header-ink) !important;

  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body.ll-v1 .ll-header :is(
  #mainnav,
  .main-nav,
  .main-nav-container,
  .top-navbar,
  .top-bar,
  .announcement-bar
),
body.ll-v1 .ll-header #mainnav > .inner {
  background: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

/* منع تحوّل الهيدر إلى شريط ثابت */
body.ll-v1 .ll-header :is(#mainnav, .main-nav),
body.ll-v1 .ll-header #mainnav > .inner {
  position: relative !important;
  top: auto !important;
  transform: none !important;
}

/* ألوان الأيقونات والروابط الأساسية */
body.ll-v1 .ll-header :is(
  .header-btn,
  .header-btn__icon,
  .header-btn__text,
  .s-cart-summary-wrapper,
  .s-cart-summary-icon,
  .s-cart-summary-total,
  .navbar-brand
),
body.ll-v1 .ll-header .main-menu > li > a,
body.ll-v1 .ll-header .top-navbar :is(a, button) {
  color: var(--ll-header-ink) !important;
}

/* الشعار الأبيض، عند تفعيله من JavaScript */
body.ll-v1 .ll-white-logo {
  filter: brightness(0) invert(1) !important;
}

/* القوائم المنسدلة تبقى بخلفية واضحة للقراءة */
body.ll-v1 .ll-header :is(.sub-menu, .dropdown-menu) {
  background: #ffffff !important;
  color: #20211f !important;
}

body.ll-v1 .ll-header :is(.sub-menu, .dropdown-menu) a {
  color: #20211f !important;
}

/* حاوية الرئيسية */
body.ll-v1 .ll-main {
  padding-top: 0 !important;
  margin-top: 0 !important;
  width: 100% !important;
  max-width: none !important;
  padding-inline: 0 !important;
}

/* إخفاء الأقسام المستبدلة بعد نجاح تحميل البديل فقط */
body.ll-v1 .ll-replaced {
  display: none !important;
}

/* ====================================
   القواعد الخاصة بالتصميم الجديد
   ==================================== */

#ll-home {
  color: var(--ll-ink);
  background: var(--ll-paper);
  font-family: var(--ll-font);
}

#ll-home,
#ll-home * {
  box-sizing: border-box;
}

#ll-home :is(h1, h2, p, figure) {
  margin: 0;
}

#ll-home img {
  display: block;
  width: 100%;
}

#ll-home a {
  text-decoration: none;
  color: inherit;
}

#ll-home a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 6px;
}

#ll-home .ll-wrap {
  width: min(1440px, 90%);
  margin-inline: auto;
}

#ll-home .ll-eyebrow {
  font-size: 12px;
  line-height: 1.7;
}

#ll-home [lang="en"] .ll-eyebrow {
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

#ll-home .ll-heading {
  font-family: var(--ll-display);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.025em;
}

#ll-home [lang="ar"] .ll-heading {
  font-family: var(--ll-font);
  line-height: 1.4;
  letter-spacing: 0;
}

/* ====================================
   الواجهة الرئيسية
   ==================================== */

#ll-home .ll-hero {
  position: relative;
  isolation: isolate;

  min-height: 640px;
  min-height: max(640px, 88svh);

  display: flex;
  align-items: flex-end;

  padding:
    calc(var(--ll-header-height, 110px) + 60px)
    0
    70px;

  color: var(--ll-hero-ink);
  background: #242520;
}

#ll-home .ll-hero picture {
  position: absolute;
  inset: 0;
  z-index: -2;
}

#ll-home .ll-hero img {
  height: 100%;
  object-fit: cover;
  object-position: var(--ll-hero-position);
}

/* تدرّج خفيف أسفل الصورة لقراءة العنوان، وليس خلف الهيدر */
#ll-home .ll-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background:
    linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.38),
      transparent 65%
    );
}

#ll-home .ll-hero-copy {
  max-width: 640px;
  text-align: start;
}

#ll-home .ll-hero h1 {
  font-size: clamp(54px, 7.4vw, 120px);
  margin: 16px 0 24px;
}

#ll-home .ll-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;

  min-height: 48px;
  min-width: 175px;
  padding: 12px 24px;

  border: 1px solid currentColor;
  border-radius: 0;

  font-size: 14px;
  background: transparent;

  transition: background 0.2s, color 0.2s;
}

#ll-home .ll-button:hover {
  background: #ffffff;
  color: #20211f;
}

/* ====================================
   المنتجات
   ==================================== */

#ll-home .ll-products {
  padding-block: 72px;
}

#ll-home .ll-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

#ll-home .ll-section-head h2 {
  font-size: clamp(30px, 3.6vw, 58px);
}

#ll-home .ll-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 14px;
}

#ll-home .ll-link:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

#ll-home .ll-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 22px !important;
}

#ll-home .ll-grid > * {
  min-width: 0;
}

#ll-home :is(
  .s-product-card-entry,
  .s-product-card-vertical
) {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#ll-home .s-product-card-image {
  border-radius: 0 !important;
  aspect-ratio: 3 / 4;
  height: auto !important;
  max-height: none !important;
  background: #f5f5f3 !important;
}

#ll-home .s-product-card-image img {
  height: 100% !important;
  object-fit: cover !important;
  object-position: top center;
  border-radius: 0 !important;
}

#ll-home .s-product-card-content {
  padding: 14px 0 0 !important;
}

#ll-home .s-product-card-content-title {
  font-weight: 400 !important;
  font-size: 14px !important;
}

#ll-home .s-product-card-content-title a {
  line-height: 1.6;
}

#ll-home .ll-products-fallback {
  font-size: 15px;
  margin-bottom: 20px;
}

#ll-home [hidden] {
  display: none !important;
}

/* ====================================
   قسم الصور بأسلوب المجلة
   ==================================== */

#ll-home .ll-editorial {
  padding-block: 35px 85px;

  display: grid;
  grid-template-columns: 1.12fr 1fr;
  gap: 7%;
  align-items: start;
}

#ll-home .ll-editorial-large {
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

#ll-home .ll-editorial-large img {
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

#ll-home .ll-editorial-copy {
  padding-top: 28px;
}

#ll-home .ll-editorial h2 {
  font-size: clamp(40px, 5vw, 78px);
  margin: 14px 0 24px;
}

#ll-home .ll-editorial p:not(.ll-eyebrow) {
  max-width: 370px;
  line-height: 1.9;
  font-size: 16px;
  margin-bottom: 18px;
}

#ll-home .ll-editorial-detail {
  width: 70%;
  margin-top: 42px;
  margin-inline-start: auto;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

#ll-home .ll-editorial-detail img {
  height: 100%;
  object-fit: cover;
}

#ll-home .ll-closing {
  padding-block: 35px 80px;
  text-align: center;
}

#ll-home .ll-closing p {
  margin-bottom: 15px;
  font-size: 13px;
}

#ll-home .ll-closing .ll-button {
  color: var(--ll-ink);
}

#ll-home .ll-closing .ll-button:hover {
  background: var(--ll-olive);
  border-color: var(--ll-olive);
  color: white;
}

/* ====================================
   الجوال
   ==================================== */

@media (max-width: 767px) {
  #ll-home .ll-wrap {
    width: calc(100% - 32px);
  }

  #ll-home .ll-hero {
    min-height: 620px;
    min-height: max(620px, 86svh);
    padding-bottom: 44px;
  }

  #ll-home .ll-hero img {
    object-position: var(--ll-hero-position-mobile);
  }

  #ll-home .ll-hero h1 {
    font-size: clamp(48px, 12vw, 76px);
  }

  #ll-home .ll-products {
    padding-block: 42px;
  }

  #ll-home .ll-section-head {
    gap: 12px;
    margin-bottom: 22px;
  }

  #ll-home .ll-section-head h2 {
    font-size: 28px;
  }

  #ll-home .ll-section-head .ll-link {
    font-size: 12px;
    white-space: nowrap;
  }

  #ll-home .ll-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px 12px !important;
  }

  #ll-home .ll-editorial {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-block: 14px 46px;
  }

  #ll-home .ll-editorial-copy {
    padding-top: 0;
  }

  #ll-home .ll-editorial h2 {
    font-size: 46px;
  }

  #ll-home .ll-editorial-detail {
    width: 72%;
    margin-top: 25px;
  }

  #ll-home .ll-closing {
    padding-block: 12px 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #ll-home *,
  #ll-home *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* LUN LINE — PRODUCT CARDS FIX */
/* يضاف في نهاية CSS السابق */
/* لا يغيّر تنسيق الهيدر */

/* ارتفاع قائمة المنتجات حسب المحتوى */
#ll-home .ll-products salla-products-list {
  display: block;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* إلغاء ارتفاع الصفوف والمسافات المتمددة */
#ll-home .ll-products :is(
  .ll-grid,
  .s-products-list-wrapper
) {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-template-rows: none !important;
  grid-auto-rows: max-content !important;

  align-items: start !important;
  align-content: start !important;
  gap: 28px 18px !important;

  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* البطاقة تأخذ ارتفاع الصورة والمعلومات فقط */
#ll-home .ll-products :is(
  salla-product-card,
  .s-product-card-entry
) {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-self: start !important;

  width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;

  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;

  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

/* النسبة الطولية للصورة وحدها، وليس للبطاقة كاملة */
#ll-home .ll-products .s-product-card-image {
  position: relative !important;
  display: block !important;
  flex: 0 0 auto !important;

  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 3 / 4 !important;

  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

#ll-home .ll-products .s-product-card-image > a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

#ll-home .ll-products .s-product-card-image img {
  position: absolute !important;
  inset: 0 !important;

  width: 100% !important;
  height: 100% !important;

  object-fit: cover !important;
  object-position: center top !important;
  border-radius: 0 !important;
}

/* إظهار معلومات المنتج أسفل الصورة */
#ll-home .ll-products .s-product-card-content {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  flex: 0 0 auto !important;

  position: static !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  margin: 0 !important;
  padding: 12px 0 0 !important;
  gap: 6px !important;

  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;

  color: #20211f !important;
  background: transparent !important;
}

#ll-home .ll-products :is(
  .s-product-card-content-main,
  .s-product-card-content-sub
) {
  display: block !important;
  position: static !important;

  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;

  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* اسم المنتج */
#ll-home .ll-products .s-product-card-content-title,
#ll-home .ll-products .s-product-card-content-title a {
  display: block !important;
  margin: 0 !important;

  color: #20211f !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;

  opacity: 1 !important;
  visibility: visible !important;
}

/* السعر وسعر التخفيض، دون تغيير قيمتهما */
#ll-home .ll-products :is(
  .s-product-card-price,
  .s-product-card-sale-price,
  .s-product-card-starting-price
) {
  margin: 0 !important;
  color: #20211f !important;
  font-size: 13px !important;

  opacity: 1 !important;
  visibility: visible !important;
}

/* الجوال: منتجان في الصف ومسافة محددة بين الصفوف */
@media (max-width: 767px) {
  #ll-home .ll-products :is(
    .ll-grid,
    .s-products-list-wrapper
  ) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px 12px !important;
  }

  #ll-home .ll-products {
    padding-block: 32px 28px !important;
  }

  #ll-home .ll-editorial {
    padding-top: 8px !important;
  }
}

/* إخفاء الصورة الصغيرة أسفل النص */
#ll-home .ll-editorial-detail {
  display: none !important;
}

/* إخفاء اسم البراند وزر VIEW ALL أسفل الصورة */
#ll-home .ll-closing {
  display: none !important;
}

/* تقليل المسافة المتبقية أسفل القسم */
#ll-home .ll-editorial {
  padding-bottom: 24px !important;
}

/* LUN LINE — Winter & Summer Categories */

/* إبقاء الجزء القديم مخفيًا */
#ll-home .ll-editorial-detail,
#ll-home .ll-closing {
  display: none !important;
}

/* التصنيفان بجانب بعض */
#ll-home .ll-season-categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;

  width: 100%;
  margin: 28px 0 0;
  padding: 0;

  direction: ltr;
  text-align: left;
}

/* بطاقة التصنيف */
#ll-home .ll-season-card {
  display: block;
  min-width: 0;

  color: var(--ll-ink, #20211f);
  background: transparent;
  text-decoration: none;

  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* مساحة الصورة */
#ll-home .ll-season-visual {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;

  margin: 0;
  overflow: hidden;
  background: #f4f4f2;
}

#ll-home .ll-season-visual img {
  display: block;
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center top;
  border-radius: 0;

  transition: transform 0.35s ease;
}

/* اسم التصنيف */
#ll-home .ll-season-title {
  margin: 14px 0 0;

  color: var(--ll-ink, #20211f);
  font-family: var(--ll-display, Georgia, serif);
  font-size: clamp(17px, 1.7vw, 28px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
}

/* رابط الاستكشاف */
#ll-home .ll-season-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  margin-top: 8px;

  font-family: var(--ll-font, sans-serif);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.08em;
}

/* وضوح التنقل بلوحة المفاتيح */
#ll-home .ll-season-card:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

/* عند تعذر تحميل صورة يبقى رابط التصنيف ظاهرًا */
#ll-home .ll-season-visual[hidden] {
  display: none !important;
}

@media (hover: hover) and (pointer: fine) {
  #ll-home .ll-season-card:hover img {
    transform: scale(1.03);
  }
}

/* الجوال */
@media (max-width: 767px) {
  #ll-home .ll-season-categories {
    gap: 12px;
    margin-top: 24px;
  }

  #ll-home .ll-season-title {
    font-size: clamp(14px, 3.8vw, 18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  #ll-home .ll-season-visual img {
    transition: none;
  }
}