/* Saudi Perfumes — Phase 2.7.6 premium storefront refinement
   Geometry inspired by the user's RAJ Perfumes reference, recoloured and rebuilt
   for the Saudi Perfumes retail identity. */

:root{
  --sp-premium-ink:#17220f;
  --sp-premium-ink-2:#263719;
  --sp-premium-gold:#b88938;
  --sp-premium-gold-soft:#e7cf96;
  --sp-premium-cream:#f7f3ea;
  --sp-premium-cream-2:#fbf8f1;
  --sp-premium-paper:#fffdf9;
  --sp-premium-line:#ddd5c8;
  --sp-premium-muted:#746b60;
  --sp-premium-shadow:0 14px 34px rgba(34,29,20,.08);
  --sp-premium-shadow-hover:0 24px 54px rgba(34,29,20,.14);
}

/* ------------------------------
   Premium product cards
   ------------------------------ */
.sp-premium-product-card.af-product-card{
  min-width:0;
  display:flex;
  flex-direction:column;
  overflow:hidden!important;
  border:1px solid var(--sp-premium-line)!important;
  border-radius:24px!important;
  background:var(--sp-premium-paper)!important;
  box-shadow:var(--sp-premium-shadow)!important;
  transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease!important;
}
.sp-premium-product-card.af-product-card:hover{
  transform:translateY(-4px)!important;
  border-color:#cdb98f!important;
  box-shadow:var(--sp-premium-shadow-hover)!important;
}
.sp-premium-card-image.af-product-image{
  width:100%;
  height:auto!important;
  aspect-ratio:1/1.04!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:20px!important;
  overflow:hidden;
  border-radius:23px 23px 0 0!important;
  background:
    radial-gradient(circle at 50% 38%,#fffdf8 0,#fbf7ee 46%,#f1eadc 100%)!important;
  border-bottom:1px solid rgba(221,213,200,.72);
}
.sp-premium-card-image.af-product-image::after{
  content:"";
  position:absolute;
  left:22%;right:22%;bottom:14px;
  height:16px;
  border-radius:50%;
  background:rgba(49,39,26,.08);
  filter:blur(8px);
}
.sp-premium-card-image.af-product-image img{
  width:100%!important;
  height:100%!important;
  max-width:92%!important;
  max-height:92%!important;
  object-fit:contain!important;
  padding:0!important;
  position:relative;
  z-index:1;
  filter:drop-shadow(0 16px 18px rgba(44,33,20,.14));
  transition:transform .24s ease!important;
}
.sp-premium-product-card:hover .sp-premium-card-image img{transform:scale(1.035)}
.sp-premium-product-card .sp-lux-card-wishlist.af-wishlist{
  top:10px!important;right:10px!important;
  width:38px!important;height:38px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  border:1px solid rgba(231,207,150,.45)!important;
  border-radius:50%!important;
  background:var(--sp-premium-ink)!important;
  color:#f2ce68!important;
  box-shadow:0 8px 18px rgba(23,34,15,.16)!important;
}
.sp-premium-product-card .sp-lux-card-wishlist.af-wishlist.active{background:#b88938!important;color:#fff!important}
.sp-premium-product-card .sp-lux-card-badges{top:11px!important;left:11px!important;z-index:3}
.sp-premium-product-card .sp-lux-card-badges .af-badge{
  border-radius:999px!important;
  padding:5px 8px!important;
  background:rgba(255,253,249,.94)!important;
  border:1px solid rgba(184,137,56,.30)!important;
  color:#9a6f2f!important;
  font-size:7px!important;
  font-weight:900!important;
  letter-spacing:.09em!important;
}
.sp-premium-card-body.af-product-body{
  display:flex!important;
  flex:1!important;
  flex-direction:column!important;
  min-width:0;
  padding:16px 14px 14px!important;
  background:linear-gradient(180deg,#fff,#fffdf9)!important;
}
.sp-premium-product-card .sp-lux-card-brand{
  margin:0 0 7px!important;
  color:var(--sp-premium-gold)!important;
  font-size:9px!important;
  font-weight:900!important;
  letter-spacing:.085em!important;
  line-height:1.35;
  text-transform:uppercase;
}
.sp-premium-product-card .sp-lux-card-title.af-product-title{
  min-height:0!important;
  margin:0!important;
  color:#121a0d!important;
  font-family:"DM Sans","Cairo",sans-serif!important;
  font-size:15px!important;
  font-weight:700!important;
  line-height:1.34!important;
  text-decoration:none!important;
}
.sp-premium-product-card .sp-lux-card-title-ar{
  min-height:19px;
  margin:7px 0 0!important;
  color:#8b7f71!important;
  font-family:"Cairo",sans-serif!important;
  font-size:12px!important;
  font-weight:500!important;
  line-height:1.45!important;
  text-align:right!important;
}
.sp-premium-card-meta{
  min-height:34px!important;
  display:block!important;
  margin:8px 0 0!important;
  color:#8c8277!important;
  font-size:9px!important;
  font-weight:500!important;
  line-height:1.5!important;
  letter-spacing:0!important;
  text-transform:none!important;
  overflow:hidden;
}
.sp-premium-card-footer{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  margin-top:auto;
  padding-top:12px;
}
.sp-premium-product-card .sp-lux-card-price.af-price-row{margin:0!important;display:flex;align-items:baseline;gap:6px;min-width:0}
.sp-premium-product-card .sp-lux-card-price.af-price-row strong{
  color:var(--sp-premium-ink)!important;
  font-size:15px!important;
  font-weight:900!important;
  white-space:nowrap;
}
.sp-premium-product-card .sp-lux-card-price.af-price-row span{color:#9a9085!important;font-size:9px!important;white-space:nowrap}
.sp-premium-product-card .sp-lux-card-actions{margin:0!important;padding:0!important;flex:0 0 auto}
.sp-premium-card-add.af-add-btn{
  width:auto!important;
  min-width:58px!important;
  min-height:42px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:5px!important;
  padding:0 13px!important;
  border:0!important;
  border-radius:999px!important;
  background:var(--sp-premium-ink-2)!important;
  color:#fff!important;
  box-shadow:none!important;
  font-size:10px!important;
  font-weight:900!important;
  letter-spacing:0!important;
  text-transform:none!important;
}
.sp-premium-card-add.af-add-btn:hover{background:var(--sp-premium-gold)!important;color:#fff!important;transform:translateY(-1px)}
.sp-premium-card-add i{font-size:12px}
.sp-premium-card-sold{display:inline-flex!important;min-height:38px;align-items:center;padding:0 10px!important;border-radius:999px!important;font-size:9px!important}

/* Store/product grids */
.sp-lux-product-grid,
.af-catalog-page .af-catalog-product-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:24px 16px!important;
}

/* ------------------------------
   Homepage: RAJ-style mobile product rails
   ------------------------------ */
.sp-premium-value-section{background:linear-gradient(180deg,rgba(255,255,255,.0),rgba(244,239,229,.55))}

/* ------------------------------
   Product detail page
   ------------------------------ */
.sp-premium-pdp.af-pdp-page{
  padding:34px 0 74px!important;
  background:
    radial-gradient(circle at 96% 0%,rgba(231,207,150,.13),transparent 22%),
    var(--sp-premium-cream)!important;
}
.sp-premium-pdp .product-page-container{max-width:1460px!important}
.sp-premium-pdp .af-pdp-breadcrumbs{
  margin-bottom:22px!important;
  color:#8b6f46!important;
  font-size:11px!important;
  font-weight:800!important;
  letter-spacing:.08em!important;
  text-transform:uppercase;
}
.sp-premium-pdp .af-pdp-breadcrumbs a{color:#8b6f46!important}
.sp-premium-pdp .af-pdp-shell{
  display:grid!important;
  grid-template-columns:minmax(0,1.08fr) minmax(420px,.92fr)!important;
  gap:34px!important;
  align-items:start!important;
}
.sp-premium-pdp .af-pdp-gallery-card,
.sp-premium-pdp .af-pdp-info-card,
.sp-premium-pdp .af-pdp-description-card,
.sp-premium-pdp .af-pdp-spec-card{
  border:1px solid var(--sp-premium-line)!important;
  border-radius:26px!important;
  background:#fff!important;
  box-shadow:0 14px 38px rgba(34,29,20,.055)!important;
}
.sp-premium-pdp .af-pdp-gallery-card{padding:26px!important;overflow:hidden}
.sp-premium-pdp .af-pdp-main-image{
  min-height:620px!important;
  height:620px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:20px!important;
  background:linear-gradient(145deg,#fff,#fbf7ee)!important;
}
.sp-premium-pdp .af-pdp-main-image img{
  width:100%!important;height:100%!important;object-fit:contain!important;
  padding:40px!important;
  filter:drop-shadow(0 24px 24px rgba(0,0,0,.11));
}
.sp-premium-pdp .af-pdp-thumbnails{gap:10px!important;margin-top:14px!important}
.sp-premium-pdp .af-pdp-thumbnails button{width:72px!important;height:72px!important;border-radius:14px!important;border:1px solid var(--sp-premium-line)!important;background:#fffdf9!important}
.sp-premium-pdp .af-pdp-thumbnails button.active{border-color:var(--sp-premium-gold)!important;box-shadow:0 0 0 2px rgba(184,137,56,.12)!important}
.sp-premium-pdp .af-pdp-info-card{
  position:sticky!important;
  top:132px!important;
  padding:34px!important;
}
.sp-premium-pdp .af-pdp-brand{color:#a87a36!important;font-size:11px!important;font-weight:900!important;letter-spacing:.1em!important;text-transform:uppercase}
.sp-premium-pdp .af-pdp-info-card h1{margin:8px 0 0!important;color:#11190c!important;font-family:"DM Sans","Cairo",sans-serif!important;font-size:38px!important;font-weight:700!important;line-height:1.13!important;letter-spacing:-.025em}
.sp-premium-pdp .af-pdp-title-ar{margin-top:8px!important;color:#817667!important;font-size:21px!important;line-height:1.5!important;text-align:left!important}
.sp-premium-pdp .sp-retail-chip{border:1px solid #e1d7ca!important;border-radius:999px!important;background:#fbf8f1!important;color:#716555!important;padding:7px 10px!important;font-size:10px!important}
.sp-premium-pdp .af-pdp-price{margin:20px 0 0!important}
.sp-premium-pdp .af-pdp-price strong{color:#10180b!important;font-size:28px!important;font-weight:900!important}
.sp-premium-pdp .af-pdp-price span{font-size:14px!important;color:#9b9185!important}
.sp-premium-pdp-intro{margin:16px 0 0;color:#554d44;font-size:14px;line-height:1.8}
.sp-premium-pdp .af-pdp-stock{
  margin-top:18px!important;
  padding:12px 14px!important;
  border:1px solid #dbe3d4!important;
  border-radius:16px!important;
  background:#f8fbf6!important;
}
.sp-premium-pdp .af-pdp-stock.low{border-color:#ead8aa!important;background:#fffaf0!important}
.sp-premium-pdp .af-pdp-stock.out{border-color:#efd2cf!important;background:#fff7f6!important}
.sp-premium-pdp .af-pdp-stock strong{font-size:12px!important}.sp-premium-pdp .af-pdp-stock span{font-size:10px!important}
.sp-premium-pdp .sp-variant-picker{margin-top:22px!important;border-top:1px solid #ece4d9;padding-top:20px}
.sp-premium-pdp .sp-variant-picker legend{font-size:10px!important;font-weight:900!important;letter-spacing:.09em!important;text-transform:uppercase!important;color:#685b4c}
.sp-premium-pdp .sp-variant-options{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
.sp-premium-pdp .sp-variant-option{
  min-height:62px!important;
  border:1px solid #dfd6ca!important;
  border-radius:14px!important;
  background:#fff!important;
  padding:10px 12px!important;
  text-align:left!important;
}
.sp-premium-pdp .sp-variant-option.selected{border-color:var(--sp-premium-ink)!important;box-shadow:0 0 0 1px var(--sp-premium-ink)!important;background:#fbf8f1!important}
.sp-premium-pdp .sp-variant-option span{font-size:13px!important;font-weight:800!important}.sp-premium-pdp .sp-variant-option small{font-size:10px!important;color:#857b70!important}
.sp-premium-pdp .af-pdp-purchase{border-top:1px solid #ece4d9!important;padding-top:20px!important}
.sp-premium-pdp .af-pdp-qty-label{font-size:10px!important;text-transform:uppercase!important;letter-spacing:.08em!important;font-weight:900!important;color:#6d6255!important}
.sp-premium-pdp .af-pdp-buy-row{grid-template-columns:104px 1fr!important;gap:10px!important;align-items:stretch!important}
.sp-premium-pdp .af-pdp-qty{border-radius:16px!important;border:1px solid #ddd5c8!important;overflow:hidden!important;min-height:52px}
.sp-premium-pdp .sp-pdp-action-buttons{display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px!important}
.sp-premium-pdp .af-pdp-add,.sp-premium-pdp .sp-pdp-buy-now{min-height:52px!important;border-radius:16px!important;font-size:11px!important;font-weight:900!important}
.sp-premium-pdp .af-pdp-add{background:var(--sp-premium-ink)!important;border-color:var(--sp-premium-ink)!important;color:#fff!important}
.sp-premium-pdp .af-pdp-add:hover{background:var(--sp-premium-gold)!important;border-color:var(--sp-premium-gold)!important}
.sp-premium-pdp .sp-pdp-buy-now{background:#fff!important;border-color:#d9cfbf!important;color:#1d2717!important}
.sp-premium-pdp-benefits{
  margin-top:22px!important;
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:9px!important;
  border-top:1px solid #ece4d9!important;
  padding-top:18px!important;
}
.sp-premium-pdp-benefits span{
  min-width:0!important;
  display:grid!important;
  grid-template-columns:24px 1fr!important;
  grid-template-rows:auto auto!important;
  column-gap:8px!important;
  align-items:center!important;
  padding:11px!important;
  border:1px solid #e8dfd2!important;
  border-radius:14px!important;
  background:#fbf8f1!important;
  color:#2a3522!important;
  text-align:left!important;
}
.sp-premium-pdp-benefits i{grid-row:1/3;font-size:18px;color:#a77734}.sp-premium-pdp-benefits b{font-size:10px}.sp-premium-pdp-benefits small{font-size:9px;color:#82786d;line-height:1.35}
.sp-premium-pdp .af-pdp-detail-grid{grid-template-columns:1.08fr .92fr!important;gap:20px!important;margin-top:26px!important}
.sp-premium-pdp .af-pdp-description-card,.sp-premium-pdp .af-pdp-spec-card{padding:27px!important}
.sp-premium-pdp .af-pdp-section-title span{color:#a77734!important;font-size:9px!important;letter-spacing:.1em!important;text-transform:uppercase!important;font-weight:900!important}
.sp-premium-pdp .af-pdp-section-title h2,.sp-premium-pdp .af-pdp-spec-card h2{font-family:"DM Sans","Cairo",sans-serif!important;font-size:23px!important;font-weight:750!important;color:#17200f!important}
.sp-premium-pdp .af-pdp-description-text{color:#514a42!important;font-size:14px!important;line-height:1.9!important}
.sp-premium-pdp .sp-pdp-note{border-radius:14px!important;border-color:#e6ddd0!important;background:#fbf8f1!important}
.sp-premium-pdp .af-pdp-spec-card dl div{padding:13px 0!important;border-bottom:1px solid #eee6dc!important}
.sp-premium-pdp .af-pdp-spec-card dt{color:#8a8074!important;font-size:11px!important}.sp-premium-pdp .af-pdp-spec-card dd{font-size:12px!important;color:#1a2414!important;font-weight:800!important}
.sp-premium-pdp .af-pdp-related{margin-top:42px!important}
.sp-premium-pdp .af-related-scroller{gap:14px!important}
.sp-premium-pdp .af-related-item{min-width:260px!important;max-width:300px!important}

/* Floating mobile bag bar, inspired by the reference but rebuilt for Saudi Perfumes. */
.sp-mobile-bag-bar{
  display:none;
  position:fixed;
  left:14px;right:14px;
  bottom:84px;
  z-index:1090;
  min-height:58px;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 9px 8px 16px;
  border:1px solid rgba(231,207,150,.20);
  border-radius:999px;
  background:#263719;
  color:#fff;
  box-shadow:0 18px 42px rgba(26,36,18,.28);
  transform:translateY(18px);
  opacity:0;
  pointer-events:none;
  transition:.22s ease;
}
.sp-mobile-bag-bar.is-visible{transform:translateY(0);opacity:1;pointer-events:auto}
.sp-mobile-bag-bar strong{font-size:12px;font-weight:800}.sp-mobile-bag-bar a{min-height:42px;display:inline-flex;align-items:center;justify-content:center;padding:0 18px;border-radius:999px;background:#ecd28f;color:#233117;text-decoration:none;font-size:11px;font-weight:900}

@media(max-width:1180px){
  .sp-lux-product-grid,.af-catalog-page .af-catalog-product-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .sp-premium-pdp .af-pdp-shell{grid-template-columns:1fr!important}
  .sp-premium-pdp .af-pdp-info-card{position:static!important}
}

@media(max-width:760px){
  /* Shop/brand/catalog always stays two cards per row. */
  .af-catalog-page .af-catalog-product-grid,
  body:not(.sp-homepage) .sp-lux-product-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:12px 8px!important;
  }

  /* Homepage product sections become touch-friendly horizontal rails. */
  .sp-homepage .sp-premium-mobile-rail{
    display:grid!important;
    grid-template-columns:none!important;
    grid-auto-flow:column!important;
    grid-auto-columns:minmax(168px,43vw)!important;
    gap:10px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    margin-left:-14px!important;
    margin-right:-14px!important;
    padding:2px 14px 16px!important;
    scroll-snap-type:x proximity;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .sp-homepage .sp-premium-mobile-rail::-webkit-scrollbar{display:none}
  .sp-homepage .sp-premium-mobile-rail>.sp-premium-product-card{scroll-snap-align:start}

  .sp-premium-product-card.af-product-card{border-radius:20px!important;box-shadow:0 9px 24px rgba(34,29,20,.07)!important}
  .sp-premium-card-image.af-product-image{aspect-ratio:1/1.06!important;padding:12px!important;border-radius:19px 19px 0 0!important}
  .sp-premium-product-card .sp-lux-card-wishlist.af-wishlist{width:32px!important;height:32px!important;top:7px!important;right:7px!important;font-size:12px!important}
  .sp-premium-card-body.af-product-body{padding:11px 9px 10px!important}
  .sp-premium-product-card .sp-lux-card-brand{font-size:7px!important;margin-bottom:5px!important;min-height:19px}
  .sp-premium-product-card .sp-lux-card-title.af-product-title{font-size:11px!important;line-height:1.35!important;min-height:30px!important}
  .sp-premium-product-card .sp-lux-card-title-ar{font-size:9.5px!important;min-height:26px;margin-top:5px!important;line-height:1.35!important}
  .sp-premium-card-meta{font-size:7.4px!important;min-height:31px!important;margin-top:6px!important;line-height:1.45!important}
  .sp-premium-card-footer{padding-top:8px;gap:5px;align-items:center}
  .sp-premium-product-card .sp-lux-card-price.af-price-row strong{font-size:12.5px!important}
  .sp-premium-product-card .sp-lux-card-price.af-price-row span{font-size:8px!important}
  .sp-premium-card-add.af-add-btn{min-width:47px!important;min-height:34px!important;padding:0 9px!important;font-size:8.5px!important}
  .sp-premium-card-add i{display:none}

  .sp-premium-pdp.af-pdp-page{padding:20px 0 48px!important}
  .sp-premium-pdp .product-page-container{padding-left:13px!important;padding-right:13px!important}
  .sp-premium-pdp .af-pdp-breadcrumbs{font-size:9px!important;margin-bottom:12px!important;flex-wrap:wrap}
  .sp-premium-pdp .af-pdp-shell{gap:14px!important}
  .sp-premium-pdp .af-pdp-gallery-card{padding:12px!important;border-radius:22px!important}
  .sp-premium-pdp .af-pdp-main-image{height:390px!important;min-height:390px!important;border-radius:16px!important}
  .sp-premium-pdp .af-pdp-main-image img{padding:24px!important}
  .sp-premium-pdp .af-pdp-info-card{padding:20px 17px!important;border-radius:22px!important}
  .sp-premium-pdp .af-pdp-info-card h1{font-size:28px!important}
  .sp-premium-pdp .af-pdp-title-ar{font-size:18px!important}
  .sp-premium-pdp .af-pdp-price strong{font-size:23px!important}
  .sp-premium-pdp-intro{font-size:12.5px;line-height:1.7}
  .sp-premium-pdp .sp-variant-options{grid-template-columns:1fr!important}
  .sp-premium-pdp .af-pdp-buy-row{grid-template-columns:80px 1fr!important}
  .sp-premium-pdp .sp-pdp-action-buttons{grid-template-columns:1fr!important}
  .sp-premium-pdp .sp-pdp-buy-now{display:none!important}
  .sp-premium-pdp-benefits{grid-template-columns:1fr 1fr!important;gap:7px!important}
  .sp-premium-pdp-benefits span{padding:9px!important;grid-template-columns:20px 1fr!important}.sp-premium-pdp-benefits i{font-size:15px}.sp-premium-pdp-benefits b{font-size:8.5px}.sp-premium-pdp-benefits small{font-size:7.5px}
  .sp-premium-pdp .af-pdp-detail-grid{grid-template-columns:1fr!important;gap:12px!important;margin-top:14px!important}
  .sp-premium-pdp .af-pdp-description-card,.sp-premium-pdp .af-pdp-spec-card{padding:19px!important;border-radius:20px!important}
  .sp-premium-pdp .af-related-item{min-width:172px!important;max-width:172px!important}

  .sp-mobile-bag-bar{display:flex}
  body:has(.af-cart-page) .sp-mobile-bag-bar,
  body:has(.af-checkout-page) .sp-mobile-bag-bar{display:none!important}
}

@media(max-width:390px){
  .sp-homepage .sp-premium-mobile-rail{grid-auto-columns:minmax(154px,44vw)!important}
  .sp-premium-product-card .sp-lux-card-title.af-product-title{font-size:10.5px!important}
  .sp-premium-card-add.af-add-btn{min-width:43px!important;padding:0 8px!important}
}

@media(max-width:760px){
  body:has(.sp-premium-pdp) .sp-mobile-bag-bar{display:none!important}
  .sp-premium-pdp + .af-pdp-mobile-sticky,
  .af-pdp-mobile-sticky{
    border-top:1px solid #ddd5c8!important;
    background:rgba(255,253,249,.97)!important;
    box-shadow:0 -14px 34px rgba(34,29,20,.12)!important;
  }
  .af-pdp-mobile-sticky .btn.sp-btn-gold{border-radius:999px!important;background:#263719!important;border-color:#263719!important;color:#fff!important}
  .af-pdp-mobile-sticky-info strong{color:#263719!important}
}
