/* =====================================================
   HAYM × SALLA RAED — Minimal Fashion v2
   Palette: #8585F9 / #0A0A0A / Grays / #FFFFFF
   Fixes: product grid/card layout + hero image preservation
   ===================================================== */

:root {
  --haym-primary: #8585F9;
  --haym-black: #0A0A0A;
  --haym-gray: #747474;
  --haym-gray-2: #A3A3A3;
  --haym-light: #F5F5F5;
  --haym-line: #E9E9E9;
  --haym-white: #FFFFFF;

  --color-primary: #8585F9 !important;
  --color-primary-dark: #7474EE !important;
  --color-primary-light: #A4A4FF !important;
  --color-primary-reverse: #FFFFFF !important;
  --s-radius: 0px !important;
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  background: var(--haym-white);
}

body.theme-raed,
body.theme-raed .app-inner,
body.theme-raed #main-content {
  background: var(--haym-white) !important;
  color: var(--haym-black) !important;
}

body.theme-raed * {
  box-shadow: none;
}

body.theme-raed a {
  transition: color .2s ease, opacity .2s ease, border-color .2s ease, background-color .2s ease;
}

body.theme-raed .container {
  width: min(1400px, 92vw) !important;
  max-width: 1400px !important;
  padding-inline: 0 !important;
}

/* ---------- Header ---------- */
.theme-raed .store-header {
  background: var(--haym-white) !important;
  border: 0 !important;
}

/* Hide the extra utility/search bar for the clean fashion look */
.theme-raed .store-header .top-navbar {
  display: none !important;
}

.theme-raed .main-nav-container {
  min-height: 76px !important;
  background: rgba(255,255,255,.97) !important;
  border-bottom: 1px solid var(--haym-line) !important;
  box-shadow: none !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.theme-raed .main-nav-container .inner {
  background: transparent !important;
}

.theme-raed [data-testid="store-header-logo"] {
  padding: 0 !important;
  margin: 0 !important;
}

.theme-raed [data-testid="store-header-logo"] img {
  width: auto !important;
  height: 38px !important;
  max-width: 110px !important;
  object-fit: contain !important;
}

.theme-raed custom-main-menu {
  margin-inline-start: 32px !important;
}

.theme-raed custom-main-menu a,
.theme-raed .main-menu a {
  color: var(--haym-black) !important;
  font-size: 13px !important;
  font-weight: 400 !important;
}

.theme-raed custom-main-menu a:hover,
.theme-raed .main-menu a:hover {
  color: var(--haym-primary) !important;
}

.theme-raed .header-btn__icon,
.theme-raed [data-testid="store-header-user-menu"],
.theme-raed [data-testid="store-header-cart"] {
  color: var(--haym-black) !important;
}

/* ---------- Announcement ---------- */
.theme-raed salla-advertisement,
.theme-raed .announcement-bar,
.theme-raed [class*="announcement"] {
  background: var(--haym-black) !important;
  color: var(--haym-white) !important;
  border: 0 !important;
  font-size: 12px !important;
}

/* ---------- Home spacing ---------- */
.theme-raed #main-content > .s-block,
.theme-raed #main-content .s-block {
  margin-top: 0 !important;
}

.theme-raed .s-block:not(.s-block--hero-slider) {
  padding-top: 72px !important;
  padding-bottom: 72px !important;
}

/* =====================================================
   HERO / ENHANCED SLIDER
   IMPORTANT: Do NOT replace the uploaded image/background.
   The merchant controls the image manually from Salla.
   ===================================================== */
.theme-raed .s-block--hero-slider {
  background: transparent !important;
  border: 0 !important;
  overflow: hidden !important;
}

.theme-raed .s-block--hero-slider .swiper-slide {
  min-height: 58vh !important;
  position: relative !important;
  background-color: transparent !important;
}

/* Preserve whatever image/background is uploaded in Salla */
.theme-raed .s-block--hero-slider .swiper-slide > .absolute.inset-0,
.theme-raed .s-block--hero-slider .overlay-bg {
  opacity: initial !important;
}

.theme-raed .s-block--hero-slider img,
.theme-raed .s-block--hero-slider picture,
.theme-raed .s-block--hero-slider picture img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 0 !important;
}

/* Content stays centered over the chosen image */
.theme-raed .s-block--hero-slider .home-slider__content {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 48px 20px !important;
  text-align: center !important;
}

.theme-raed .s-block--hero-slider .home-slider__content > div {
  width: min(760px, 92vw) !important;
  max-width: 760px !important;
  text-align: center !important;
}

/* Remove the decorative purple line from v1 */
.theme-raed .s-block--hero-slider .home-slider__content > div::before {
  display: none !important;
}

.theme-raed .s-block--hero-slider h2 {
  margin: 0 !important;
  font-size: clamp(38px, 6vw, 86px) !important;
  font-weight: 300 !important;
  line-height: 1.05 !important;
  letter-spacing: -2px !important;
}

.theme-raed .s-block--hero-slider .description {
  max-width: 560px !important;
  margin: 18px auto 0 !important;
  font-size: 15px !important;
  line-height: 1.9 !important;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
}

/* Button injected by HAYM JS */
.theme-raed .haym-hero-cta {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 210px !important;
  min-height: 48px !important;
  margin-top: 28px !important;
  padding: 12px 28px !important;
  background: rgba(255,255,255,.94) !important;
  color: var(--haym-black) !important;
  border: 1px solid rgba(10,10,10,.12) !important;
  border-radius: 0 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.theme-raed .haym-hero-cta:hover {
  background: var(--haym-primary) !important;
  color: var(--haym-white) !important;
  border-color: var(--haym-primary) !important;
}

/* ---------- Section titles ---------- */
.theme-raed .s-block__title,
.theme-raed .s-slider-block__title,
.theme-raed .s-products-slider-card__title,
.theme-raed .s-block h2,
.theme-raed .s-block h3 {
  color: var(--haym-black);
}

.theme-raed .s-block__title h2,
.theme-raed .s-slider-block__title h2,
.theme-raed .s-products-slider-card__title,
.theme-raed .s-block:not(.s-block--hero-slider) h2,
.theme-raed .s-block:not(.s-block--hero-slider) h3 {
  font-weight: 400 !important;
  letter-spacing: -.3px !important;
}

.theme-raed .s-slider-block__title-right h2,
.theme-raed .s-block__title h2 {
  font-size: 27px !important;
}

.theme-raed .s-slider-block__title-nav a,
.theme-raed .s-block__title a {
  color: var(--haym-gray) !important;
  font-size: 12px !important;
  border-bottom: 1px solid var(--haym-gray) !important;
  border-radius: 0 !important;
}

/* =====================================================
   PRODUCTS — clean vertical cards
   Fixes the image/name/price/button overlap seen in v1.
   ===================================================== */
.theme-raed salla-product-card,
.theme-raed custom-salla-product-card,
.theme-raed .s-product-card-entry,
.theme-raed .s-product-card-vertical {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.theme-raed .s-product-card-entry:hover,
.theme-raed .s-product-card-vertical:hover {
  box-shadow: none !important;
  transform: none !important;
}

.theme-raed .s-product-card-image {
  position: relative !important;
  order: 1 !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  aspect-ratio: 4 / 5 !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  background: var(--haym-light) !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

.theme-raed .s-product-card-image a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

.theme-raed .s-product-card-image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 0 !important;
  transition: opacity .25s ease !important;
}

.theme-raed .s-product-card-entry:hover .s-product-card-image img,
.theme-raed .s-product-card-vertical:hover .s-product-card-image img {
  opacity: .96 !important;
  transform: none !important;
}

/* Product information must sit BELOW the image */
.theme-raed .s-product-card-content {
  position: static !important;
  order: 2 !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: auto !important;
  padding: 13px 0 0 !important;
  margin: 0 !important;
  background: transparent !important;
  text-align: start !important;
}

.theme-raed .s-product-card-content-main,
.theme-raed .s-product-card-content-sub,
.theme-raed .s-product-card-content-footer {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.theme-raed .s-product-card-content-title {
  width: 100% !important;
  margin: 0 0 5px !important;
  line-height: 1.5 !important;
}

.theme-raed .s-product-card-content-title a,
.theme-raed .s-product-card-name {
  display: block !important;
  width: 100% !important;
  color: var(--haym-black) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.theme-raed .s-product-card-content-title a:hover,
.theme-raed .s-product-card-name:hover {
  color: var(--haym-primary) !important;
}

.theme-raed .s-product-card-content-subtitle {
  color: var(--haym-gray) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
}

.theme-raed .s-product-card-content-sub {
  display: flex !important;
  align-items: baseline !important;
  flex-wrap: wrap !important;
  gap: 6px 9px !important;
  margin: 0 0 10px !important;
}

/* Price: sale price first, old price smaller + gray */
.theme-raed .s-product-card-price,
.theme-raed .s-product-card-sale-price h4,
.theme-raed .s-product-card-starting-price h4 {
  color: var(--haym-black) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  margin: 0 !important;
}

.theme-raed .s-product-card-sale-price {
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 7px !important;
  flex-wrap: wrap !important;
}

.theme-raed .s-product-card-sale-price span,
.theme-raed .s-product-card-regular-price,
.theme-raed .s-product-card-content-sub del {
  color: var(--haym-gray-2) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  text-decoration: line-through !important;
}

/* Hide ratings for the minimal card */
.theme-raed .s-product-card-rating {
  display: none !important;
}

/* Footer/buttons below the price — never beside the image */
.theme-raed .s-product-card-content-footer {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-top: 2px !important;
  padding: 0 !important;
}

.theme-raed .s-product-card-buttons {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.theme-raed .s-product-card-content-footer salla-add-product-button,
.theme-raed .s-product-card-buttons salla-add-product-button {
  flex: 1 1 auto !important;
  width: auto !important;
}

.theme-raed .s-product-card-content-footer .s-button-element,
.theme-raed .s-product-card-buttons .s-button-element,
.theme-raed .s-product-card-content-footer salla-add-product-button::part(button),
.theme-raed .s-product-card-buttons salla-add-product-button::part(button) {
  width: 100% !important;
  min-height: 42px !important;
  padding: 8px 14px !important;
  background: transparent !important;
  color: var(--haym-black) !important;
  border: 1px solid var(--haym-black) !important;
  border-radius: 0 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.theme-raed .s-product-card-content-footer .s-button-element:hover,
.theme-raed .s-product-card-buttons .s-button-element:hover,
.theme-raed .s-product-card-content-footer salla-add-product-button::part(button):hover,
.theme-raed .s-product-card-buttons salla-add-product-button::part(button):hover {
  background: var(--haym-black) !important;
  color: var(--haym-white) !important;
}

/* Wishlist remains a small secondary control */
.theme-raed .s-product-card-wishlist-btn button,
.theme-raed .s-product-card-eye-btn button {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border: 1px solid var(--haym-line) !important;
  border-radius: 0 !important;
  background: var(--haym-white) !important;
  color: var(--haym-black) !important;
}

.theme-raed .s-product-card-promotion-title,
.theme-raed .s-product-card-quantity,
.theme-raed .s-product-card-out-badge {
  border-radius: 0 !important;
  font-size: 10px !important;
  font-weight: 500 !important;
}

/* =====================================================
   THREE PRODUCTS SIDE-BY-SIDE
   3 desktop / 2 tablet+mobile.
   Applies to product listing pages and home product blocks.
   ===================================================== */
.theme-raed .s-products-list-wrapper,
.theme-raed salla-products-list .s-products-list-wrapper {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 44px 20px !important;
  align-items: start !important;
}

.theme-raed .s-products-list-wrapper > salla-product-card,
.theme-raed .s-products-list-wrapper > custom-salla-product-card {
  width: 100% !important;
  min-width: 0 !important;
}

/* Product sliders: force three visible cards on desktop where possible */
@media (min-width: 1024px) {
  .theme-raed salla-products-slider .s-products-slider-card,
  .theme-raed .s-products-slider-wrapper .s-products-slider-card,
  .theme-raed .s-products-slider-slider .swiper-slide {
    width: calc((100% - 40px) / 3) !important;
    min-width: calc((100% - 40px) / 3) !important;
    max-width: calc((100% - 40px) / 3) !important;
    flex: 0 0 calc((100% - 40px) / 3) !important;
  }
}

/* ---------- Generic buttons ---------- */
.theme-raed salla-button::part(button),
.theme-raed .s-button-element,
.theme-raed button[type="submit"],
.theme-raed .btn--primary {
  border-radius: 0 !important;
  box-shadow: none !important;
  font-weight: 500 !important;
}

/* Keep PRIMARY actions strong outside product-card outline buttons */
.theme-raed .container--product-details salla-add-product-button::part(button),
.theme-raed .container--product-details salla-button[color="primary"]::part(button) {
  background: var(--haym-black) !important;
  border-color: var(--haym-black) !important;
  color: var(--haym-white) !important;
}

.theme-raed .container--product-details salla-add-product-button::part(button):hover,
.theme-raed .container--product-details salla-button[color="primary"]::part(button):hover {
  background: var(--haym-primary) !important;
  border-color: var(--haym-primary) !important;
}

/* ---------- Collection / square images ---------- */
.theme-raed .s-block--photos-slider img,
.theme-raed .s-block--square-photos img,
.theme-raed [data-testid*="square"] img,
.theme-raed .s-block--photos-slider a,
.theme-raed .s-block--square-photos a,
.theme-raed [data-testid*="square"] a {
  border-radius: 0 !important;
}

/* ---------- Store features ---------- */
.theme-raed salla-store-features,
.theme-raed .s-block--features,
.theme-raed [data-testid*="features"] {
  background: var(--haym-white) !important;
  border-top: 1px solid var(--haym-line) !important;
  border-bottom: 1px solid var(--haym-line) !important;
}

/* ---------- Product page ---------- */
.theme-raed [data-testid="store-product-title"] {
  color: var(--haym-black) !important;
  font-size: clamp(22px, 2vw, 30px) !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  margin-bottom: 14px !important;
}

.theme-raed [data-testid="store-product-price"] {
  color: var(--haym-black) !important;
  margin-bottom: 22px !important;
}

.theme-raed [data-testid="store-product-price"] p {
  color: var(--haym-black) !important;
  font-weight: 600 !important;
}

.theme-raed [data-testid="store-product-price"] .text-red-800,
.theme-raed [data-testid="store-product-price"] .text-red-500,
.theme-raed [data-testid="store-product-price"] .text-red-400 {
  color: var(--haym-black) !important;
}

.theme-raed [data-testid="store-product-description"],
.theme-raed .product__description,
.theme-raed .product-entry__sub-title {
  color: var(--haym-gray) !important;
  line-height: 2 !important;
}

.theme-raed .product-slider img,
.theme-raed [data-testid*="product"] img {
  border-radius: 0 !important;
}

.theme-raed input,
.theme-raed select,
.theme-raed textarea,
.theme-raed .form-input,
.theme-raed .s-form-control {
  border-radius: 0 !important;
  box-shadow: none !important;
}

.theme-raed input:focus,
.theme-raed select:focus,
.theme-raed textarea:focus {
  border-color: var(--haym-primary) !important;
  box-shadow: 0 0 0 1px var(--haym-primary) !important;
}

/* ---------- Footer ---------- */
.theme-raed .store-footer {
  margin-top: 88px !important;
  background: var(--haym-black) !important;
  color: var(--haym-white) !important;
  border: 0 !important;
}

.theme-raed .store-footer__inner {
  padding-top: 68px !important;
  padding-bottom: 48px !important;
  background: var(--haym-black) !important;
  color: var(--haym-white) !important;
  border: 0 !important;
}

.theme-raed .store-footer h3,
.theme-raed .store-footer h4,
.theme-raed .store-footer b {
  color: var(--haym-white) !important;
  font-weight: 500 !important;
}

.theme-raed .store-footer p,
.theme-raed .store-footer a,
.theme-raed .store-footer li,
.theme-raed .store-footer span:not(.copyright-text) {
  color: #A6A6A6 !important;
  font-size: 12px !important;
}

.theme-raed .store-footer a:hover {
  color: var(--haym-white) !important;
}

.theme-raed .store-footer > .container,
.theme-raed .store-footer .copyright-text {
  color: #777 !important;
}

.theme-raed .store-footer > .container {
  border-top: 1px solid #2A2A2A !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  body.theme-raed .container {
    width: calc(100vw - 32px) !important;
  }

  .theme-raed .main-nav-container {
    min-height: 66px !important;
  }

  .theme-raed [data-testid="store-header-logo"] img {
    height: 32px !important;
    max-width: 92px !important;
  }

  .theme-raed .s-block--hero-slider .swiper-slide {
    min-height: 52vh !important;
  }

  .theme-raed .s-block--hero-slider h2 {
    font-size: clamp(36px, 12vw, 64px) !important;
    letter-spacing: -1.5px !important;
  }

  .theme-raed .s-block:not(.s-block--hero-slider) {
    padding-top: 52px !important;
    padding-bottom: 52px !important;
  }

  .theme-raed .s-products-list-wrapper,
  .theme-raed salla-products-list .s-products-list-wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 30px 12px !important;
  }

  .theme-raed .s-product-card-content-title a,
  .theme-raed .s-product-card-name {
    font-size: 12.5px !important;
  }

  .theme-raed .s-product-card-price,
  .theme-raed .s-product-card-sale-price h4,
  .theme-raed .s-product-card-starting-price h4 {
    font-size: 12.5px !important;
  }

  .theme-raed .s-product-card-content-footer .s-button-element,
  .theme-raed .s-product-card-buttons .s-button-element,
  .theme-raed .s-product-card-content-footer salla-add-product-button::part(button),
  .theme-raed .s-product-card-buttons salla-add-product-button::part(button) {
    min-height: 38px !important;
    font-size: 11px !important;
    padding-inline: 8px !important;
  }

  .theme-raed .s-product-card-wishlist-btn button,
  .theme-raed .s-product-card-eye-btn button {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
  }

  .theme-raed .store-footer {
    margin-top: 60px !important;
  }
}

@media (max-width: 480px) {
  .theme-raed .s-block--hero-slider .swiper-slide {
    min-height: 46vh !important;
  }

  .theme-raed .haym-hero-cta {
    min-width: 190px !important;
    min-height: 44px !important;
    font-size: 13px !important;
  }
}

/* ---------- Accessibility ---------- */
.theme-raed a:focus-visible,
.theme-raed button:focus-visible {
  outline: 2px solid var(--haym-primary) !important;
  outline-offset: 3px !important;
}
@media (max-width: 767px) {
  /* الأسعار */
  body.index .s-product-card-sale-price {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px 8px !important;
    min-width: 0 !important;
  }

  body.index .s-product-card-sale-price h4,
  body.index .s-product-card-sale-price > span {
    margin: 0 !important;
    white-space: nowrap !important;
  }

  /* صف السلة والتفضيل */
  body.index .s-product-card-content-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 34px !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body.index .s-product-card-content-footer
  > salla-add-product-button {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  /* إعادة زر التفضيل داخل الصف */
  body.index .s-product-card-content-footer
  > salla-button.s-product-card-wishlist-btn,
  body.index .s-product-card-content-footer
  > salla-button.s-product-card-wishlist-btn > button {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    translate: none !important;
    float: none !important;
    margin: 0 !important;
    width: 34px !important;
    min-width: 0 !important;
    height: 44px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  body.index .s-product-card-content-footer
  > salla-button.s-product-card-wishlist-btn {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: block !important;
    align-self: center !important;
  }

  body.index .s-product-card-content-footer
  > salla-button.s-product-card-wishlist-btn > button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* توحيد ارتفاع زر السلة */
  body.index .s-product-card-content-footer
  salla-add-product-button .s-button-btn {
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 8px 4px !important;
    font-size: 11px !important;
    box-sizing: border-box !important;
  }
}

/* End — HAYM × Raed Minimal v2 */