:root{
  --sfms-cream:#f7f0e5;--sfms-cream-2:#fffaf3;--sfms-card:#fffdf9;--sfms-ink:#2d2218;
  --sfms-muted:#786b5d;--sfms-line:#eadcc9;--sfms-gold:#d89b1d;--sfms-gold-dark:#b87a08;
  --sfms-green:#0f6a4d;--sfms-green-dark:#084e38;--sfms-maroon:#a32035;--sfms-shadow:0 16px 42px rgba(74,51,26,.10)
}
body.sfms-cream-theme{background:linear-gradient(180deg,#f5ecde 0,#fff 310px)!important;color:var(--sfms-ink)}
body.sfms-cream-theme .site-header,body.sfms-cream-theme header.wp-block-template-part{
  background:linear-gradient(100deg,#eadbc6,#fff8ef 52%,#e8d7bd)!important;border-bottom:1px solid rgba(184,122,8,.16);box-shadow:0 4px 18px rgba(74,51,26,.08)
}
body.sfms-cream-theme .site-title,body.sfms-cream-theme .wp-block-site-title a{color:#4b3522!important;font-weight:850;letter-spacing:-.02em}
.single-product .site-main,.single-product main{max-width:1180px;margin-inline:auto}
.single-product div.product{background:var(--sfms-card);border:1px solid var(--sfms-line);border-radius:28px;padding:28px;box-shadow:var(--sfms-shadow);overflow:visible}
.single-product div.product .woocommerce-product-gallery{border-radius:22px;overflow:hidden;background:#fbf6ee}
.single-product div.product .woocommerce-product-gallery img{border-radius:18px}
.single-product div.product .summary{position:relative}
.single-product div.product .product_title{color:var(--sfms-ink);font-weight:850;line-height:1.38;letter-spacing:-.018em;margin-bottom:12px}
.sfms-lang-ar.single-product div.product .product_title{font-family:"Noto Naskh Arabic","Traditional Arabic","Geeza Pro",Tahoma,Arial,sans-serif;font-size:clamp(31px,4vw,48px);line-height:1.45;text-align:right;direction:rtl}
.sfms-product-badges{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 14px}
.sfms-lang-ar .sfms-product-badges{direction:rtl;justify-content:flex-start}
.sfms-badge{display:inline-flex;align-items:center;min-height:35px;padding:7px 16px;border-radius:999px;font-size:14px;font-weight:800;color:#fff;box-shadow:0 7px 16px rgba(74,51,26,.12)}
.sfms-badge-new{background:linear-gradient(135deg,var(--sfms-maroon),#c2384f)}
.sfms-badge-best{background:linear-gradient(135deg,#e1a52b,var(--sfms-gold-dark))}
.single-product div.product p.price,.single-product div.product span.price{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:linear-gradient(135deg,#fff9ef,#f7ead7);border:1px solid #ecd8b9;border-radius:18px;padding:16px 18px;color:var(--sfms-maroon)!important;font-size:27px!important;font-weight:900;box-shadow:0 8px 22px rgba(146,91,21,.08)}
.sfms-lang-ar.single-product div.product p.price,.sfms-lang-ar.single-product div.product span.price{direction:rtl;justify-content:flex-start}
.single-product div.product p.price del,.single-product div.product span.price del{color:#8d857c!important;font-size:.66em;opacity:1;font-weight:650}
.single-product div.product p.price ins,.single-product div.product span.price ins{text-decoration:none;color:var(--sfms-maroon)!important}
.single-product .woocommerce-product-rating{display:flex;align-items:center;gap:9px;margin:10px 0 15px;color:#8b6a30}
.sfms-lang-ar .woocommerce-product-rating{direction:rtl;justify-content:flex-start}
.sfms-trust-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0 18px;padding:14px 4px;border-block:1px solid var(--sfms-line)}
.sfms-trust-row span{display:flex;align-items:center;justify-content:center;gap:7px;text-align:center;color:#604b36;font-size:13px;font-weight:750;padding:7px}
.sfms-trust-row b{color:var(--sfms-gold-dark);font-size:17px}
.sfms-lang-ar .sfms-trust-row{direction:rtl}
.sfms-variation-title{display:flex;align-items:center;gap:10px;margin:0 0 15px;color:var(--sfms-ink);font-size:18px}
.sfms-lang-ar .sfms-variation-title{direction:rtl;justify-content:flex-start;font-family:"Noto Naskh Arabic","Traditional Arabic",Tahoma,sans-serif}
.sfms-variation-icon{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--sfms-green);color:#fff;box-shadow:0 7px 16px rgba(15,106,77,.22)}
.single-product form.variations_form{background:linear-gradient(145deg,#fffdf9,#fbf2e6)!important;border:1px solid var(--sfms-line)!important;border-radius:24px!important;padding:22px!important;box-shadow:var(--sfms-shadow)!important}
.single-product table.variations tr{border-color:#eadfce!important}
.single-product table.variations th.label label{color:var(--sfms-ink)!important;font-size:19px!important;font-weight:900!important}
.single-product table.variations th.label label:after{background:linear-gradient(90deg,var(--sfms-gold),var(--sfms-green))!important;height:4px!important;width:48px!important}
.sfms-lang-ar.single-product table.variations th.label label{font-family:"Noto Naskh Arabic","Traditional Arabic",Tahoma,sans-serif;font-size:22px!important}
.sfm-option-chips{gap:12px!important}
.sfm-option-chip{min-height:56px!important;border:1.5px solid #dfd1bd!important;border-radius:16px!important;background:linear-gradient(180deg,#fff,#fffaf3)!important;color:var(--sfms-ink)!important;font-weight:850!important;box-shadow:0 5px 13px rgba(74,51,26,.06)!important;position:relative;overflow:visible}
.sfm-option-chip:hover{border-color:var(--sfms-gold)!important;box-shadow:0 8px 19px rgba(216,155,29,.16)!important}
.sfm-option-chip.is-selected{background:linear-gradient(135deg,var(--sfms-green),var(--sfms-green-dark))!important;border-color:var(--sfms-green)!important;color:#fff!important;box-shadow:0 10px 24px rgba(15,106,77,.28)!important;transform:translateY(-1px)}
.sfm-option-chip.is-selected:after{content:'✓';position:absolute;top:5px;inset-inline-end:7px;width:20px;height:20px;border-radius:50%;background:#fff;color:var(--sfms-green);display:grid;place-items:center;font-size:13px;font-weight:900;box-shadow:0 2px 7px rgba(0,0,0,.12)}
.sfm-option-chip.sfm-color-chip{flex-direction:column!important;justify-content:center!important;text-align:center!important;gap:7px!important;padding:11px 7px!important;min-height:88px!important}
.sfm-color-dot{width:34px!important;height:34px!important;border:2px solid rgba(55,39,23,.15)!important;box-shadow:inset 0 0 0 3px rgba(255,255,255,.55),0 4px 10px rgba(66,48,27,.12)!important}
.sfm-option-chip.is-selected .sfm-color-dot{border-color:#fff!important;box-shadow:0 0 0 3px rgba(255,255,255,.28),0 4px 12px rgba(0,0,0,.18)!important}
.single-product .single_variation_wrap{border-color:var(--sfms-line)!important}
.single-product .quantity .qty{border-color:#dcccb6!important;background:#fffdf9!important;color:var(--sfms-ink)!important;font-weight:800}
.single-product .single_add_to_cart_button,.single-product .sfm-buy-now-button{min-height:58px!important;border-radius:16px!important;font-size:16px!important;font-weight:900!important;box-shadow:0 9px 22px rgba(74,51,26,.16)!important;transition:transform .16s ease,filter .16s ease!important}
.single-product .single_add_to_cart_button{background:linear-gradient(135deg,var(--sfms-green),var(--sfms-green-dark))!important;color:#fff!important}
.single-product .sfm-buy-now-button{background:linear-gradient(135deg,#e6ad35,var(--sfms-gold-dark))!important;color:#fff!important}
.single-product .single_add_to_cart_button:hover,.single-product .sfm-buy-now-button:hover{filter:brightness(1.05);transform:translateY(-1px)}
.single-product .woocommerce-tabs{margin-top:28px}
.single-product .woocommerce-tabs ul.tabs{display:flex;gap:8px;flex-wrap:wrap;padding:0!important;margin:0 0 12px!important}
.single-product .woocommerce-tabs ul.tabs:before{display:none!important}
.single-product .woocommerce-tabs ul.tabs li{border:1px solid var(--sfms-line)!important;background:#fff8ef!important;border-radius:14px!important;margin:0!important;padding:0!important}
.single-product .woocommerce-tabs ul.tabs li a{padding:12px 17px!important;color:#654f38!important;font-weight:850!important}
.single-product .woocommerce-tabs ul.tabs li.active{background:var(--sfms-green)!important;border-color:var(--sfms-green)!important}
.single-product .woocommerce-tabs ul.tabs li.active a{color:#fff!important}
.single-product .woocommerce-Tabs-panel{background:var(--sfms-card)!important;border:1px solid var(--sfms-line)!important;border-radius:20px!important;box-shadow:0 10px 27px rgba(74,51,26,.07)!important;color:var(--sfms-ink)!important}
.sfms-lang-ar.single-product .woocommerce-product-details__short-description,.sfms-lang-ar.single-product .woocommerce-tabs{font-family:"Noto Naskh Arabic","Traditional Arabic","Geeza Pro",Tahoma,Arial,sans-serif;text-align:right;direction:rtl;line-height:2}
.sfms-lang-ar.single-product table.variations th,.sfms-lang-ar.single-product table.variations td{text-align:right!important;direction:rtl}
.sfms-lang-ar.single-product .sfm-option-chips{direction:rtl}
.sfms-lang-ar.single-product .woocommerce-variation-add-to-cart{direction:rtl}
@media(max-width:768px){
 body.sfms-cream-theme{background:#f7f0e5!important}
 .single-product div.product{border-radius:0;padding:14px;border-inline:0;box-shadow:none}
 .single-product div.product .summary{padding:4px 2px 92px}
 .sfms-trust-row{gap:2px}.sfms-trust-row span{font-size:11px;padding:5px 2px;flex-direction:column}
 .single-product form.variations_form{padding:16px!important;border-radius:21px!important}
 .sfm-option-chips{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:9px!important}
 .sfm-option-chip{min-height:52px!important;border-radius:14px!important}
 .sfm-option-chip.sfm-color-chip{min-height:91px!important}
 .single-product .woocommerce-variation-add-to-cart{position:fixed;z-index:9999;left:0;right:0;bottom:0;background:rgba(255,253,249,.96);backdrop-filter:blur(12px);padding:10px 12px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--sfms-line);box-shadow:0 -9px 28px rgba(74,51,26,.13);gap:9px!important}
 .single-product .woocommerce-variation-add-to-cart .quantity{display:none}
 .single-product .single_add_to_cart_button,.single-product .sfm-buy-now-button{flex:1 1 calc(50% - 5px)!important;min-height:56px!important;font-size:14px!important;padding:0 9px!important}
}
@media(max-width:380px){.sfm-option-chips{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* v1.0.1 — gallery image visibility and mobile fallback */
.single-product .woocommerce-product-gallery{
  min-height:320px;
  position:relative;
}
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper{
  min-height:320px;
  margin:0!important;
}
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image{
  min-height:320px;
  display:block!important;
}
.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img,
.single-product .woocommerce-product-gallery .wp-post-image{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:none!important;
  opacity:1!important;
  visibility:visible!important;
  position:relative!important;
  z-index:2!important;
  object-fit:contain!important;
  background:#fbf6ee;
}
.single-product .woocommerce-product-gallery.sfms-gallery-fallback .woocommerce-product-gallery__image{
  display:none!important;
}
.single-product .woocommerce-product-gallery.sfms-gallery-fallback .woocommerce-product-gallery__image.sfms-active-image{
  display:block!important;
}
.single-product .woocommerce-product-gallery .flex-viewport{
  min-height:320px!important;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
  margin-top:10px!important;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs li{
  width:auto!important;
  float:none!important;
  margin:0!important;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs img{
  width:100%!important;
  aspect-ratio:1/1;
  object-fit:cover!important;
  border-radius:14px!important;
  border:2px solid transparent;
  opacity:.72!important;
}
.single-product .woocommerce-product-gallery .flex-control-thumbs img.flex-active,
.single-product .woocommerce-product-gallery .flex-control-thumbs img.sfms-thumb-active{
  opacity:1!important;
  border-color:var(--sfms-gold)!important;
  box-shadow:0 5px 14px rgba(216,155,29,.22)!important;
}
@media(max-width:768px){
  .single-product .woocommerce-product-gallery,
  .single-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper,
  .single-product .woocommerce-product-gallery .woocommerce-product-gallery__image,
  .single-product .woocommerce-product-gallery .flex-viewport{min-height:420px!important}
  .single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img,
  .single-product .woocommerce-product-gallery .wp-post-image{
    min-height:420px!important;
    max-height:72vh!important;
    object-fit:contain!important;
  }
}

/* v1.0.2 — stable gallery: main image is always above thumbnails */
.single-product .woocommerce-product-gallery.sfms-stable-gallery{
  min-height:0!important;
  overflow:visible!important;
  background:transparent!important;
}
.single-product .woocommerce-product-gallery.sfms-stable-gallery > .flex-viewport,
.single-product .woocommerce-product-gallery.sfms-stable-gallery > .woocommerce-product-gallery__wrapper,
.single-product .woocommerce-product-gallery.sfms-stable-gallery > .flex-control-nav,
.single-product .woocommerce-product-gallery.sfms-stable-gallery > .woocommerce-product-gallery__trigger{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden!important;
  clip:rect(0 0 0 0)!important;
  clip-path:inset(50%)!important;
  white-space:nowrap!important;
  margin:-1px!important;
  padding:0!important;
  border:0!important;
}
.sfms-stable-main{
  position:relative;
  width:100%;
  aspect-ratio:4/5;
  min-height:360px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid var(--sfms-line);
  border-radius:24px;
  background:linear-gradient(145deg,#fffdf9,#f7efe3);
  box-shadow:0 12px 30px rgba(74,51,26,.08);
}
.sfms-stable-main img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  object-fit:contain!important;
  opacity:1!important;
  visibility:visible!important;
  position:static!important;
  transform:none!important;
  background:transparent!important;
}
.sfms-stable-main.is-loading:after{
  content:'';position:absolute;width:34px;height:34px;border-radius:50%;
  border:3px solid rgba(184,122,8,.18);border-top-color:var(--sfms-gold);
  animation:sfms-spin .7s linear infinite;
}
@keyframes sfms-spin{to{transform:rotate(360deg)}}
.sfms-gallery-zoom{
  position:absolute;z-index:3;top:14px;inset-inline-end:14px;
  width:48px;height:48px;border:0;border-radius:50%;background:rgba(255,255,255,.94);
  color:var(--sfms-ink);font-size:28px;display:grid;place-items:center;
  box-shadow:0 8px 18px rgba(74,51,26,.14);cursor:pointer;
}
.sfms-stable-thumbs{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;
  margin-top:12px;padding:0 2px;
}
.sfms-stable-thumb{
  padding:0;border:2px solid transparent;border-radius:16px;overflow:hidden;
  background:#fff;aspect-ratio:1/1;cursor:pointer;box-shadow:0 5px 12px rgba(74,51,26,.07);
}
.sfms-stable-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.sfms-stable-thumb.is-active{border-color:var(--sfms-gold);box-shadow:0 7px 18px rgba(216,155,29,.24)}
.sfms-lightbox{position:fixed;z-index:999999;inset:0;background:rgba(20,15,10,.92);display:grid;place-items:center;padding:24px}
.sfms-lightbox img{max-width:96vw;max-height:90vh;object-fit:contain;border-radius:14px}
.sfms-lightbox button{position:absolute;top:18px;inset-inline-end:18px;width:48px;height:48px;border:0;border-radius:50%;font-size:32px;background:#fff;color:#222}
body.sfms-lightbox-open{overflow:hidden}
@media(max-width:768px){
 .sfms-stable-main{min-height:0;aspect-ratio:4/5;border-radius:20px}
 .sfms-stable-thumbs{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
 .sfms-gallery-zoom{width:44px;height:44px;top:12px;inset-inline-end:12px}
}


/* v1.0.3 — swipe slider, navigation arrows, and image counter */
.sfms-gallery-arrow{
  position:absolute;z-index:4;top:50%;transform:translateY(-50%);
  width:46px;height:46px;border:0;border-radius:50%;
  background:rgba(255,255,255,.94);color:var(--sfms-ink);
  font-size:34px;line-height:1;display:grid;place-items:center;
  box-shadow:0 8px 18px rgba(74,51,26,.16);cursor:pointer;
}
.sfms-gallery-prev{inset-inline-start:14px}
.sfms-gallery-next{inset-inline-end:14px}
.sfms-gallery-counter{
  position:absolute;z-index:4;bottom:14px;inset-inline-end:14px;
  min-width:54px;padding:7px 11px;border-radius:999px;
  background:rgba(45,34,24,.78);color:#fff;font-size:13px;font-weight:800;
  text-align:center;backdrop-filter:blur(8px)
}
.sfms-stable-main img{transition:opacity .18s ease,transform .18s ease}
.sfms-stable-main.is-loading img{opacity:.35!important;transform:scale(.99)!important}
@media(max-width:768px){
 .sfms-gallery-arrow{width:42px;height:42px;font-size:31px}
 .sfms-gallery-prev{inset-inline-start:10px}.sfms-gallery-next{inset-inline-end:10px}
 .sfms-gallery-counter{bottom:10px;inset-inline-end:10px}
}


/* v1.1.0 — exclusive Safwa footer and stronger product-page finish */
.single-product footer.wp-block-template-part,
.single-product .site-footer,
.single-product #colophon,
.single-product .wp-site-blocks > footer,
.single-product .footer-widgets,
.single-product [class*="theme-footer"],
.single-product [class*="site-footer"]{display:none!important}

.single-product .sfms-exclusive-footer{
  display:block!important;position:relative;overflow:hidden;
  margin:42px auto 96px;max-width:1180px;border-radius:28px;
  background:linear-gradient(145deg,#2f241b 0%,#453120 55%,#261d17 100%);
  color:#fff8ed;border:1px solid rgba(216,155,29,.32);
  box-shadow:0 24px 60px rgba(49,32,17,.22)
}
.sfms-footer-glow{position:absolute;inset:-40% auto auto -10%;width:420px;height:420px;border-radius:50%;background:radial-gradient(circle,rgba(226,168,48,.22),transparent 68%);pointer-events:none}
.sfms-footer-inner{position:relative;padding:34px 34px 24px}
.sfms-footer-brand{display:flex;align-items:center;gap:14px;padding-bottom:24px;border-bottom:1px solid rgba(255,255,255,.12)}
.sfms-footer-logo{width:52px;height:52px;border-radius:18px;display:grid;place-items:center;font:900 27px/1 Georgia,serif;color:#2d2218;background:linear-gradient(145deg,#f5cf70,#c98b13);box-shadow:0 10px 24px rgba(216,155,29,.24)}
.sfms-footer-brand strong{display:block;font-size:25px;letter-spacing:-.02em}.sfms-footer-brand span{display:block;margin-top:3px;color:#decdb7;font-size:14px}
.sfms-footer-links{display:flex;flex-wrap:wrap;gap:10px 22px;padding:23px 0 18px}.sfms-footer-links a{color:#fff8ed!important;text-decoration:none!important;font-weight:750;font-size:14px}.sfms-footer-links a:hover{color:#efbe4e!important}
.sfms-footer-trust{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.sfms-footer-trust span{padding:12px 10px;text-align:center;border-radius:14px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.1);font-size:13px;font-weight:750;color:#f7ead9}
.sfms-footer-bottom{margin-top:20px;padding-top:18px;border-top:1px solid rgba(255,255,255,.1);color:#bfae9c;font-size:12px;text-align:center}
.sfms-lang-ar .sfms-exclusive-footer{direction:rtl;text-align:right}.sfms-lang-ar .sfms-footer-brand{flex-direction:row}.sfms-lang-ar .sfms-footer-links{justify-content:flex-start}

@media(max-width:768px){
 .single-product .sfms-exclusive-footer{margin:26px 12px 118px;border-radius:24px}
 .sfms-footer-inner{padding:25px 20px 20px}
 .sfms-footer-brand strong{font-size:22px}.sfms-footer-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px}
 .sfms-footer-trust{grid-template-columns:1fr}.sfms-footer-trust span{text-align:start;padding-inline:14px}
}


/* v1.1.1 — susunan ukuran rapi, berurutan, dan simetris */
.single-product .sfm-option-chips.sfms-size-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
  width:100%!important;
  align-items:stretch!important;
  direction:rtl!important;
}
.single-product .sfm-option-chips.sfms-size-grid .sfm-option-chip{
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  justify-content:center!important;
  text-align:center!important;
  padding-inline:8px!important;
}
.single-product .sfm-option-chips.sfms-size-grid.sfms-remainder-1 .sfm-option-chip:last-child{
  grid-column:2!important;
}
.single-product .sfm-option-chips.sfms-size-grid.sfms-remainder-2 .sfm-option-chip:nth-last-child(2){
  grid-column:1!important;
}
.single-product .sfm-option-chips.sfms-size-grid.sfms-remainder-2 .sfm-option-chip:last-child{
  grid-column:2!important;
}
@media(max-width:390px){
  .single-product .sfm-option-chips.sfms-size-grid{gap:9px!important}
  .single-product .sfm-option-chips.sfms-size-grid .sfm-option-chip{min-height:54px!important;font-size:15px!important}
}
