/* Dermo Saudia — Luxury Commerce Layer v1.0
   Built for Salla / Raed theme. Paste into Advanced Customization > CSS. */

:root {
  --dermo-ink: #071d2c;
  --dermo-navy: #0a3554;
  --dermo-blue: #0b78d1;
  --dermo-sky: #eaf6ff;
  --dermo-ice: #f6f9fb;
  --dermo-white: #ffffff;
  --dermo-muted: #607181;
  --dermo-line: rgba(7, 29, 44, .09);
  --dermo-shadow: 0 18px 50px rgba(7, 29, 44, .09);
  --dermo-shadow-soft: 0 8px 28px rgba(7, 29, 44, .065);
  --dermo-radius: 22px;
  --dermo-radius-sm: 14px;
  --color-primary: #0a3554;
  --color-primary-dark: #071d2c;
  --color-primary-light: #0b78d1;
}

html { scroll-behavior: smooth; }

body.theme-raed {
  color: var(--dermo-ink);
  background:
    radial-gradient(circle at 90% 8%, rgba(11,120,209,.055), transparent 28rem),
    var(--dermo-ice);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.theme-raed ::selection { background: rgba(11,120,209,.18); color: var(--dermo-ink); }

/* Luxury announcement bar (created by JS) */
.dermo-luxury-bar {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 18px;
  color: #fff;
  background: linear-gradient(100deg, #061923, #0a3554 55%, #0b78d1);
  font-size: 13px;
  letter-spacing: .01em;
}
.dermo-luxury-bar__dot { width: 6px; height: 6px; border-radius: 50%; background: #69d5ff; box-shadow: 0 0 0 5px rgba(105,213,255,.12); }

/* Header */
.store-header {
  position: relative;
  z-index: 50;
  background: rgba(255,255,255,.92) !important;
  border-bottom: 1px solid var(--dermo-line);
  box-shadow: 0 8px 30px rgba(7,29,44,.035);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.store-header img[alt*="logo"] { max-height: 58px; width: auto; transition: transform .25s ease; }
.store-header img[alt*="logo"]:hover { transform: scale(1.025); }
.store-header nav a {
  position: relative;
  color: var(--dermo-ink) !important;
  font-weight: 650;
  transition: color .2s ease;
}
.store-header nav a::after {
  content: "";
  position: absolute;
  right: 14%; bottom: -8px;
  width: 72%; height: 2px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--dermo-blue), var(--dermo-navy));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .22s ease;
}
.store-header nav a:hover { color: var(--dermo-blue) !important; }
.store-header nav a:hover::after { transform: scaleX(1); }
.store-header input[type="search"], .store-header [role="searchbox"] {
  background: #f4f7f9 !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.store-header input[type="search"]:focus, .store-header [role="searchbox"]:focus {
  background: #fff !important;
  border-color: rgba(11,120,209,.22) !important;
  box-shadow: 0 0 0 4px rgba(11,120,209,.08) !important;
}

/* Global rhythm */
main > .s-block, .s-blocks-wrapper > .s-block { margin-top: clamp(38px, 5vw, 76px) !important; }
.container { max-width: 1240px; }
.s-slider-block__title h2, .s-block__title h2, main h2 {
  color: var(--dermo-ink);
  font-weight: 800;
  letter-spacing: -.02em;
}
.s-slider-block__title { margin-bottom: 22px !important; }
.s-slider-block__title-right { gap: 8px; }

/* Hero */
.s-block--photos-slider:first-of-type { margin-top: 26px !important; }
.home-slider .swiper, .photos-slider .swiper { overflow: visible !important; }
.home-slider .swiper-slide, .photos-slider .swiper-slide {
  border-radius: clamp(16px, 2vw, 28px);
  overflow: hidden;
  box-shadow: var(--dermo-shadow);
  border: 1px solid rgba(255,255,255,.75);
}
.home-slider img, .photos-slider img { transition: transform .8s cubic-bezier(.2,.7,.2,1), filter .4s ease; }
.home-slider .swiper-slide:hover img, .photos-slider .swiper-slide:hover img { transform: scale(1.012); filter: saturate(1.04); }
.s-slider-nav-arrow {
  width: 44px !important; height: 44px !important;
  color: var(--dermo-navy) !important;
  background: rgba(255,255,255,.94) !important;
  border: 1px solid var(--dermo-line) !important;
  box-shadow: var(--dermo-shadow-soft) !important;
  transition: transform .2s ease, background .2s ease !important;
}
.s-slider-nav-arrow:hover { transform: translateY(-2px); background: #fff !important; }
.s-slider-pagination-bullet-active { background: var(--dermo-blue) !important; width: 24px !important; border-radius: 99px !important; }

/* Product cards */
.s-products-slider-card { height: auto !important; }
custom-salla-product-card.s-product-card-entry {
  height: 100%;
  background: rgba(255,255,255,.96) !important;
  border: 1px solid var(--dermo-line) !important;
  border-radius: var(--dermo-radius) !important;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(7,29,44,.035) !important;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease, border-color .3s ease;
}
custom-salla-product-card.s-product-card-entry:hover {
  transform: translateY(-7px);
  border-color: rgba(11,120,209,.16) !important;
  box-shadow: var(--dermo-shadow) !important;
}
.s-product-card-image {
  aspect-ratio: 1 / 1;
  margin: 10px;
  border-radius: 16px !important;
  overflow: hidden;
  background: linear-gradient(145deg, #fff 20%, #f1f7fb) !important;
}
.s-product-card-image-cover {
  width: 100% !important; height: 100% !important;
  object-fit: contain !important;
  padding: 18px;
  transition: transform .38s cubic-bezier(.2,.7,.2,1) !important;
}
.s-product-card-entry:hover .s-product-card-image-cover { transform: scale(1.045); }
.s-product-card-wishlist-btn .s-button-element {
  background: rgba(255,255,255,.9) !important;
  border-color: rgba(7,29,44,.08) !important;
  box-shadow: 0 5px 18px rgba(7,29,44,.08);
}
.s-product-card-content { padding: 10px 18px 18px !important; }
.s-product-card-content-title { min-height: 50px; line-height: 1.55 !important; font-size: 15px !important; font-weight: 720 !important; }
.s-product-card-content-title a { color: var(--dermo-ink) !important; }
.s-product-card-content-sub { margin-top: 10px; }
.s-product-card-price { color: var(--dermo-navy) !important; font-size: 17px !important; font-weight: 850 !important; }
.s-product-card-content-footer { margin-top: 14px !important; }
.s-product-card-content-footer .s-button-element:not(.s-button-disabled) {
  min-height: 44px;
  color: #fff !important;
  background: linear-gradient(100deg, var(--dermo-navy), var(--dermo-blue)) !important;
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 9px 20px rgba(10,53,84,.15);
  transition: transform .2s ease, box-shadow .2s ease !important;
}
.s-product-card-content-footer .s-button-element:not(.s-button-disabled):hover { transform: translateY(-2px); box-shadow: 0 13px 25px rgba(10,53,84,.22); }
.s-product-card-content-footer .s-button-disabled { border-radius: 12px !important; background: #f4f5f6 !important; border-color: transparent !important; }

/* Feature and review blocks */
.s-block--features .grid > *, .s-block--features .feature-item {
  background: #fff !important;
  border: 1px solid var(--dermo-line);
  border-radius: var(--dermo-radius);
  box-shadow: var(--dermo-shadow-soft);
}
.s-block--features i, .s-block--features [class*="icon"] {
  background: linear-gradient(145deg, var(--dermo-navy), var(--dermo-blue)) !important;
  color: #fff !important;
  box-shadow: 0 10px 25px rgba(10,53,84,.16);
}
.s-block--testimonials .swiper-slide > * {
  background: #fff !important;
  border: 1px solid var(--dermo-line);
  border-radius: var(--dermo-radius) !important;
  box-shadow: var(--dermo-shadow-soft);
}

/* Product detail */
body.product-single main { background: transparent; }
.container--breadcrumbs { opacity: .72; }
.container--product-details { gap: clamp(20px, 4vw, 52px); align-items: flex-start; }
.product-single .sidebar {
  background: #fff;
  border: 1px solid var(--dermo-line);
  border-radius: 26px;
  padding: 16px;
  box-shadow: var(--dermo-shadow-soft);
}
.product-single .homeslider__slide { border-radius: 18px; overflow: hidden; background: linear-gradient(145deg,#fff,#f2f8fc); }
.product-single .homeslider__slide img { object-fit: contain !important; }
.product-single .main-content { padding: clamp(4px, 1vw, 12px); }
.product-single .main-content h1 {
  max-width: 680px;
  color: var(--dermo-ink);
  font-size: clamp(24px, 2.15vw, 32px) !important;
  line-height: 1.42;
  letter-spacing: -.025em;
  font-weight: 820;
}
.product-single .product-brand { display: none !important; }
.product__description {
  margin-top: 22px !important;
  padding: 20px !important;
  color: #324554;
  background: rgba(255,255,255,.76);
  border: 1px solid var(--dermo-line);
  border-radius: 16px;
  line-height: 1.95 !important;
}
.dermo-trust-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin: 14px 0 16px; }
.dermo-trust-chip { display:flex; align-items:center; justify-content:center; gap:6px; min-height:38px; padding:7px 8px; color:var(--dermo-navy); background:rgba(234,246,255,.72); border:1px solid rgba(11,120,209,.1); border-radius:10px; font-size:11px; font-weight:750; text-align:center; }
.dermo-trust-chip svg { width:17px; height:17px; flex:0 0 auto; }
.sticky-product-bar {
  border: 1px solid var(--dermo-line);
  border-radius: 18px !important;
  box-shadow: var(--dermo-shadow-soft);
}
.sticky-product-bar .s-button-element:not(.s-button-disabled), .product-form .s-button-primary {
  min-height: 52px;
  color: #fff !important;
  background: linear-gradient(100deg,var(--dermo-navy),var(--dermo-blue)) !important;
  border: 0 !important;
  border-radius: 14px !important;
  box-shadow: 0 12px 28px rgba(10,53,84,.2);
}
.s-comments { margin-top: 36px; padding: clamp(18px,3vw,32px); background:#fff; border:1px solid var(--dermo-line); border-radius:24px; box-shadow:var(--dermo-shadow-soft); }
.s-comments-item-wrapper { padding: 18px !important; margin-bottom: 12px; background: var(--dermo-ice); border: 1px solid var(--dermo-line); border-radius: 15px; }
.s-comment-form-input, .s-form-control { border-radius: 13px !important; border-color: var(--dermo-line) !important; }

/* Footer */
.store-footer { margin-top: clamp(64px,8vw,110px); color: rgba(255,255,255,.78) !important; background: linear-gradient(135deg,#061923,#0a3554) !important; border-top: 0 !important; }
.store-footer__inner { background: transparent !important; }
.store-footer h3, .store-footer a:hover { color: #fff !important; }
.store-footer a { color: rgba(255,255,255,.72) !important; transition: color .2s ease, transform .2s ease; }
.store-footer a:hover { transform: translateX(-3px); }
.store-footer .social-link, .store-footer [class*="social"] a { border-color: rgba(255,255,255,.13) !important; background: rgba(255,255,255,.06) !important; }

/* Gentle reveal; JS adds the active class */
.dermo-reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.dermo-reveal.dermo-visible { opacity: 1; transform: none; }

@media (max-width: 767px) {
  .dermo-luxury-bar { min-height: 34px; padding: 7px 10px; font-size: 11px; }
  .store-header img[alt*="logo"] { max-height: 48px; }
  main > .s-block, .s-blocks-wrapper > .s-block { margin-top: 34px !important; }
  .s-block--photos-slider:first-of-type { margin-top: 14px !important; }
  .home-slider .swiper-slide, .photos-slider .swiper-slide { border-radius: 14px; }
  .s-product-card-image { margin: 7px; border-radius: 13px !important; }
  .s-product-card-image-cover { padding: 10px; }
  .s-product-card-content { padding: 8px 11px 13px !important; }
  .s-product-card-content-title { min-height: 62px; font-size: 13px !important; }
  .s-product-card-price { font-size: 15px !important; }
  .s-product-card-content-footer .s-button-element { font-size: 12px !important; }
  .container--product-details { display: flex; flex-direction: column; }
  .product-single .sidebar { width: 100% !important; padding: 9px; border-radius: 18px; }
  .product-single .main-content { width: 100% !important; }
  .product-single .main-content h1 { font-size: 25px !important; }
  .dermo-trust-row { grid-template-columns: 1fr; }
  .dermo-trust-chip { justify-content: flex-start; padding-inline: 14px; }
  .product__description { padding: 16px !important; font-size: 14px; }
  .store-footer { margin-top: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .dermo-reveal { opacity: 1; transform: none; }
}
.s-product-card-image {
  padding: 0 !important;
}

.s-product-card-image a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.s-product-card-image-cover {
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  object-fit: contain !important;
}
/* إزالة الخلفية المزدوجة حول صور المنتجات */
.s-product-card-image {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
  border-radius: 0 !important;
  overflow: hidden !important;
}

.s-product-card-image > a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.s-product-card-image-cover {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
  object-fit: contain !important;
}
/* الإصلاح النهائي لخلفية صور بطاقات المنتجات */
body.theme-raed custom-salla-product-card .s-product-card-image {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
  background-image: none !important;
  border-radius: 0 !important;
}

body.theme-raed custom-salla-product-card .s-product-card-image > a {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #ffffff !important;
}

body.theme-raed custom-salla-product-card .s-product-card-image-cover {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain !important;
  background: #ffffff !important;
}
/* الصورة تغطي مساحة كارد المنتج كاملة */
.s-product-card-image {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  overflow: hidden !important;
}

.s-product-card-image-cover {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover !important;
}
/* إلغاء ثبات معرض صور المنتج أثناء النزول */
body.product-single .sidebar,
body.product-single .product-entry--media,
body.product-single [class*="product-gallery"],
body.product-single [class*="product-images"] {
  position: static !important;
  top: auto !important;
  align-self: flex-start !important;
}
/* توحيد صندوق السعر والشراء في صفحة المنتج */
body.product-single .product-form {
  margin-top: 18px !important;
  padding: 22px !important;
  background: #ffffff !important;
  border: 1px solid rgba(10, 53, 84, 0.10) !important;
  border-radius: 20px !important;
  box-shadow: 0 12px 35px rgba(10, 53, 84, 0.07) !important;
  overflow: hidden !important;
}

/* إزالة المربعات الداخلية المتداخلة */
body.product-single .product-form > div,
body.product-single .product-form [class*="price-wrapper"],
body.product-single .product-form [class*="quantity-wrapper"],
body.product-single .sticky-product-bar {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* ترتيب السعر */
body.product-single .product-form [class*="price"] {
  margin-bottom: 16px !important;
}

/* زر الشراء أو نفاد الكمية */
body.product-single .product-form .s-button-element {
  width: 100% !important;
  min-height: 54px !important;
  margin: 0 !important;
  border-radius: 14px !important;
}

/* شكل نفدت الكمية */
body.product-single .product-form .s-button-disabled {
  color: #8c98a3 !important;
  background: #f2f5f7 !important;
  border: 1px solid #e4e9ed !important;
  box-shadow: none !important;
  opacity: 1 !important;
}