/* Fussa Store · product page enhancements (paste in Salla: Theme > Custom CSS)
   Every rule is scoped to the product page (body.product-single) and to the fx- blocks
   that fussa-product.js inserts. Nothing here changes the price, options or checkout. */

.product-single.fx-ready .warning-msg { display: none; }

.product-single .fx-box {
  margin-block: 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.7;
}

/* Return policy line (replaces the red warning) */
.product-single .fx-policy { background: #eef8f2; border: 1px solid #cfe9da; color: #1d5c3a; }
.product-single .fx-policy summary {
  list-style: none; cursor: pointer; padding: 10px 14px;
  display: flex; align-items: center; gap: 8px; font-weight: 600;
}
.product-single .fx-policy summary::-webkit-details-marker { display: none; }
.product-single .fx-policy summary .fx-more { margin-inline-start: auto; font-weight: 500; text-decoration: underline; font-size: 13px; }
.product-single .fx-policy ul { margin: 0; padding: 0 14px 12px; padding-inline-start: 32px; list-style: disc; }

.product-single .fx-policy .fx-policy-link { display: inline-block; margin: 0 14px 12px; font-size: 13px; text-decoration: underline; color: inherit; }

/* Delivery line */
.product-single .fx-delivery { background: #f5f6fa; border: 1px solid #e3e6ef; color: #1f2437; padding: 10px 14px; display: flex; flex-direction: column; gap: 4px; }
.product-single .fx-delivery .fx-row { display: flex; align-items: center; gap: 8px; }

/* Installment hint above the Tabby / Tamara widget */
.product-single .fx-inst-hint { margin-block: 4px 8px; font-size: 13px; font-weight: 600; color: #1f2437; }
.product-single .fx-inst-hint span { color: #5b6178; font-weight: 500; }

/* Trust strip under the add-to-cart button */
.product-single .fx-trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.product-single .fx-cr { margin: 8px 0 0; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; color: #1d5c3a; }
.product-single .fx-trust-grid > div {
  background: #f5f6fa; border: 1px solid #e3e6ef; border-radius: 10px;
  padding: 10px 6px; text-align: center; font-size: 12px; line-height: 1.5; color: #1f2437;
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0;
}
.product-single .fx-trust b { font-size: 13px; }

/* Quick specs (read from the description) */
.product-single .fx-specs { border: 1px solid #e3e6ef; background: #fafbfd; padding: 4px 14px; }
.product-single .fx-specs dl { margin: 0; }
.product-single .fx-specs dl > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px dashed #e3e6ef; }
.product-single .fx-specs dl > div:last-child { border-bottom: 0; }
.product-single .fx-specs dt { color: #5b6178; font-size: 13px; }
.product-single .fx-specs dd { margin: 0; font-weight: 600; color: #1f2437; overflow-wrap: anywhere; }

/* Used-item notice */
.product-single .fx-used { background: #eef3ff; border: 1px solid #cfdaf7; color: #22346e; padding: 12px 14px; }
.product-single .fx-used b { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.product-single .fx-used ul { margin: 0; padding-inline-start: 18px; list-style: disc; }

/* Pre-order box */
.product-single .fx-preorder { background: #fff7e6; border: 1px solid #f3d9a4; color: #5a3b00; padding: 12px 14px; }
.product-single .fx-preorder b { display: block; margin-bottom: 4px; }
.product-single .fx-preorder ul { margin: 0; padding-inline-start: 18px; list-style: disc; }

/* FAQ */
.product-single .fx-faq { border: 1px solid #e3e6ef; overflow: hidden; }
.product-single .fx-faq h3 { margin: 0; padding: 12px 14px; font-size: 15px; font-weight: 700; background: #f5f6fa; }
.product-single .fx-faq details { border-top: 1px solid #e3e6ef; }
.product-single .fx-faq summary { cursor: pointer; padding: 11px 14px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 8px; }
.product-single .fx-faq summary::-webkit-details-marker { display: none; }
.product-single .fx-faq summary::after { content: "+"; font-weight: 700; }
.product-single .fx-faq details[open] summary::after { content: "−"; }
.product-single .fx-faq p { margin: 0; padding: 0 14px 12px; color: #3d4256; }

.product-single .fx-ico { width: 18px; height: 18px; flex: none; }

/* Sticky add-to-cart bar (mobile only) */
.fx-sticky { display: none; }
@media (max-width: 767px) {
  .product-single .fx-sticky {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
    display: flex; align-items: center; gap: 12px;
    padding: 10px max(14px, env(safe-area-inset-left, 0px)) calc(10px + env(safe-area-inset-bottom, 0px));
    background: #ffffff; border-top: 1px solid #e3e6ef; box-shadow: 0 -4px 16px rgba(20, 24, 40, .08);
    transform: translateY(110%); transition: transform .25s ease;
  }
  .product-single .fx-sticky.fx-show { transform: translateY(0); }
  .product-single .fx-sticky .fx-sticky-price { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
  .product-single .fx-sticky .fx-sticky-price b { font-size: 17px; }
  .product-single .fx-sticky .fx-sticky-price span { font-size: 11px; color: #5b6178; }
  .product-single .fx-sticky { gap: 10px; }
  .product-single .fx-sticky .fx-sticky-price { flex: none; }
  .product-single .fx-sticky .fx-sticky-btns { flex: 1; min-width: 0; display: flex; gap: 8px; }
  .product-single .fx-sticky button {
    flex: 1; min-width: 0; border-radius: 12px; padding: 8px 10px; min-height: 52px;
    font: inherit; font-weight: 700; font-size: 15px; line-height: 1.25; cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
  }
  .product-single .fx-sticky button small { font-size: 10.5px; font-weight: 500; opacity: .85; }
  .product-single .fx-sticky .fx-add {
    background: #fff; color: var(--color-primary, #180810); border: 1.5px solid var(--color-primary, #180810);
  }
  .product-single .fx-sticky .fx-buy {
    background: var(--color-primary, #180810); color: var(--color-primary-reverse, #fff); border: 1.5px solid var(--color-primary, #180810);
  }
  .product-single .fx-sticky.fx-no-fast .fx-buy { display: none; }
  .product-single .fx-sticky.fx-no-fast .fx-add {
    background: var(--color-primary, #180810); color: var(--color-primary-reverse, #fff); padding-inline: 22px;
  }
  .product-single .fx-sticky button:focus-visible { outline: 2px solid #2b44c9; outline-offset: 2px; }
  /* keep the floating WhatsApp button above the bar */
  .product-single.fx-bar-on .fx-wa-lift,
  .product-single.fx-bar-on #cartat-livechat-root { transform: translateY(-72px); transition: transform .25s ease; }
}
@media (prefers-reduced-motion: reduce) {
  .product-single .fx-sticky, .product-single.fx-bar-on .fx-wa-lift, .product-single.fx-bar-on #cartat-livechat-root { transition: none; }
}

/* ================================ Cart page ================================ */

/* Reassurance box above the totals */
.cart .fx-cart-assure {
  background: #ffffff; border: 1px solid #e3e6ef; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 12px; font-size: 13.5px; line-height: 1.6; color: #1f2437;
}
.cart .fx-cart-assure h3 { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.cart .fx-cart-assure ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.cart .fx-cart-assure li { display: flex; align-items: flex-start; gap: 8px; }
.cart .fx-cart-assure li .fx-ico { margin-top: 2px; color: #1d5c3a; }
.cart .fx-cart-assure a { color: inherit; text-decoration: underline; }
.cart .fx-ico { width: 18px; height: 18px; flex: none; }

/* Installment line under the total in Salla's summary bar */
.cart .fx-cart-inst { display: block; font-size: 11.5px; color: #5b6178; line-height: 1.4; margin-top: 2px; }

/* Link under the "add one more product" offer */
.cart .fx-offer-link {
  display: block; margin: 8px 0 4px; text-align: center; font-weight: 700; font-size: 14px;
  color: var(--color-primary, #180810); text-decoration: underline;
}

/* Keep the floating WhatsApp button above Salla's fixed summary bar on mobile */
@media (max-width: 767px) {
  .cart.fx-cart-bar .fixed-btm { bottom: calc(var(--fx-cart-bar-h, 140px) + 16px) !important; }
}

/* Message when Salla rejects a quantity change (not enough stock) */
.cart .fx-cart-err {
  margin: 6px 0 0; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.5;
  background: #fdecea; color: #a1281e;
}

/* ================================ Motion ================================ */
/* Only transform and opacity move, so nothing pushes the page around. All of it is off for
   customers who turned on "reduce motion". */

/* Add to cart: product photo flies to the cart icon */
.fx-fly {
  position: fixed; z-index: 9999; pointer-events: none;
  border-radius: 50%; object-fit: cover; box-shadow: 0 6px 18px rgba(20, 24, 40, .25);
}

/* Cart icon and its count bump once when something is added */
@keyframes fx-bump {
  0% { transform: scale(1); }
  30% { transform: scale(1.35); }
  55% { transform: scale(.9); }
  100% { transform: scale(1); }
}
.product-single .fx-bump { animation: fx-bump .5s ease-out; }

/* Add button text while it says "added" */
.product-single .fx-added { color: inherit; font-weight: 700; }

/* Cart: total and installment line flash when the total changes */
@keyframes fx-flash {
  0% { background-color: rgba(31, 122, 77, 0); }
  25% { background-color: rgba(31, 122, 77, .18); }
  100% { background-color: rgba(31, 122, 77, 0); }
}
.cart .fx-flash { animation: fx-flash 1s ease-out; border-radius: 6px; }

/* Cart: rejected quantity, the message shakes and the box flashes red once */
@keyframes fx-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.cart .fx-shake { animation: fx-shake .45s ease-in-out; }
@keyframes fx-flash-bad {
  0% { box-shadow: 0 0 0 0 rgba(161, 40, 30, 0); }
  30% { box-shadow: 0 0 0 3px rgba(161, 40, 30, .35); }
  100% { box-shadow: 0 0 0 0 rgba(161, 40, 30, 0); }
}
.cart .fx-flash-bad { animation: fx-flash-bad .9s ease-out; border-radius: 8px; }

/* Cart: "إتمام الطلب" while it is sending the customer to checkout */
@keyframes fx-spin { to { transform: rotate(360deg); } }
.cart #s-cart-summary-card-submit.fx-loading button { opacity: .85; cursor: progress; }
.cart #s-cart-summary-card-submit.fx-loading .s-button-text::before {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-inline-end: 8px; vertical-align: -2px;
  border: 2px solid currentColor; border-inline-end-color: transparent; border-radius: 50%;
  animation: fx-spin .7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .fx-fly { display: none; }
  .product-single .fx-bump, .cart .fx-flash, .cart .fx-shake, .cart .fx-flash-bad { animation: none; }
  .cart #s-cart-summary-card-submit.fx-loading .s-button-text::before { animation-duration: 2s; }
}

/* Cart: note above Salla's login window pointing to "الشراء كضيف" */
.cart .fx-guest-hint {
  position: relative; margin: 0 0 10px; padding: 10px 14px; padding-inline-end: 40px; border-radius: 10px;
  background: #eef8f2; border: 1px solid #cfe9da; color: #1d5c3a;
  font-size: 13.5px; line-height: 1.6; display: flex; flex-direction: column; gap: 2px;
}
.cart .fx-guest-hint b { font-size: 14.5px; }
.cart .fx-guest-hint strong { font-weight: 700; }
.cart .fx-guest-hint .fx-guest-arrow {
  position: absolute; inset-inline-end: 14px; bottom: 10px; font-style: normal; font-weight: 700; font-size: 18px;
  animation: fx-nudge 1.2s ease-in-out 3;
}
@keyframes fx-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .cart .fx-guest-hint .fx-guest-arrow { animation: none; } }