/* ==========================================================================
   FCM local overrides
   ========================================================================== */

/* --- Cookie / privacy banner ------------------------------------------ */
#shopify-pc__banner,
.shopify-pc__banner,
#shopify-pc__prefs,
.shopify-pc__prefs,
[id^="shopify-pc__"],
[class*="shopify-pc__banner"],
[class*="privacy-banner"],
[data-name="privacy_banner"],
#shopify-buyer-consent {
  display: none !important;
}

/* --- Hide PayPal & "More payment methods" ----------------------------- */
shopify-accelerated-checkout,
shopify-accelerated-checkout-cart,
[data-shopify="payment-button"],
.shopify-payment-button,
.shopify-payment-button__more-options,
.shopify-payment-button__skeleton,
.wallet-cart-button__skeleton,
[data-testid="paypal-button"],
.shopify-payment-button__button--paypal,
[class*="paypal-button"] {
  display: none !important;
}

/* --- Hide "X personnes regardent ce produit" ------------------------- */
.fcm-live-viewers,
[class*="live-viewer"],
[class*="live_viewer"],
[data-fcm-live] {
  display: none !important;
}

/* --- Layout: tighten whitespace -------------------------------------- */
html, body { overflow-x: hidden; }
:root {
  --fcm-container-x: clamp(12px, 2.4vw, 28px);
  --fcm-card-radius: 14px;
  --fcm-shadow-hover: 0 14px 40px rgba(0, 0, 0, .14);
}
.page-width, .page-width-desktop, .container,
main .shopify-section > .section,
main .shopify-section > section {
  padding-left: var(--fcm-container-x) !important;
  padding-right: var(--fcm-container-x) !important;
}
main .shopify-section + .shopify-section { margin-top: clamp(8px, 1.5vw, 20px) !important; }
main .shopify-section { padding-top: clamp(4px, 0.6vw, 10px) !important; padding-bottom: clamp(4px, 0.6vw, 10px) !important; }
.section-padding,
.section--padding { padding-top: clamp(8px, 1.5vw, 20px) !important; padding-bottom: clamp(8px, 1.5vw, 20px) !important; }
.product__info-container,
.product__info-wrapper { padding-top: 0 !important; padding-bottom: 0 !important; }
.product__info-container > * + *,
.product__info-wrapper > * + * { margin-top: clamp(8px, 1.2vw, 14px) !important; }

h1, .h1 { line-height: 1.1; letter-spacing: -.01em; margin: 0 0 .35em; }
h2, .h2 { line-height: 1.15; letter-spacing: -.005em; margin: 0 0 .3em; }
h3, .h3 { line-height: 1.25; margin: 0 0 .25em; }
p { line-height: 1.5; margin: 0 0 .6em; }

.grid, .product-grid, .collection .grid, ul.grid {
  gap: clamp(10px, 1.5vw, 20px) !important;
}

.button, button.button, .btn, a.button, input[type="submit"].button {
  padding: 12px 22px !important;
  border-radius: 999px !important;
  letter-spacing: .02em;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.button:hover, button.button:hover, .btn:hover, a.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}

.header, header.header, site-header, .site-header {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}
.footer, footer.footer, .site-footer {
  padding-top: clamp(20px, 3vw, 40px) !important;
  padding-bottom: clamp(12px, 2vw, 24px) !important;
}

img, video, svg { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 4px; }

/* --- Big bold price (only the top product price, NOT the ATC button) - */
product-price .price,
product-price .price-item--regular,
product-price [data-ref="price"] {
  font-size: clamp(26px, 2.8vw, 34px) !important;
  font-weight: 800 !important;
  letter-spacing: -.01em !important;
  line-height: 1.05 !important;
}
product-price .compare-at-price,
product-price [data-ref="compare-at-price"] {
  font-size: clamp(14px, 1.3vw, 17px) !important;
  font-weight: 500 !important;
  opacity: .5;
  margin-left: .5em;
}
/* Make sure prices INSIDE buttons keep their original button size */
.button .price,
.button .compare-at-price,
button .price,
button .compare-at-price,
[class*="add-to-cart"] .price,
[class*="add-to-cart"] .compare-at-price {
  font-size: inherit !important;
  font-weight: inherit !important;
  letter-spacing: normal !important;
  line-height: inherit !important;
  margin-left: 0 !important;
  opacity: 1 !important;
}
.price-container,
.price__container,
.product-price,
.product__price {
  display: flex !important;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-block: 4px !important;
}

/* --- Variant / size selector ----------------------------------------- */
.variant-picker__option-values {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 6px 0 !important;
}
.variant-picker__option-value {
  display: inline-block;
  position: relative;
  margin: 0 !important;
  cursor: pointer;
}
/* Hide the native radio entirely — JS drives selection */
.variant-picker__option-value input[type="radio"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.variant-picker__option-value label {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 42px;
  padding: 8px 16px;
  border: 1.5px solid currentColor;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .02em;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  pointer-events: none;
  transition: background-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.variant-picker__option-value:hover label,
.variant-picker__option-value input[type="radio"]:hover + label {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.variant-picker__option-value input[type="radio"]:checked + label,
.variant-picker__option-value.is-selected label {
  background: #000 !important;
  color: #fff !important;
  border-color: #000 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.variant-picker__option-value input[type="radio"]:checked + label *,
.variant-picker__option-value.is-selected label * {
  color: #fff !important;
  fill: #fff !important;
}
/* Force-enable any size that the theme might have flagged as unavailable */
.variant-picker__option-value input[type="radio"]:disabled + label,
.variant-picker__option-value.is-unavailable label {
  opacity: 1 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* --- Inline emoji-replacement icons --------------------------------- */
.fcm-ico {
  display: inline-block;
  vertical-align: -.18em;
  width: 1.05em;
  height: 1.05em;
  margin-right: .15em;
  flex-shrink: 0;
}
.fcm-flag-dz {
  display: inline-flex;
  vertical-align: -.18em;
  width: 1.4em;
  height: 1em;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.1);
}
.fcm-flag-dz i {
  flex: 1;
  display: block;
  position: relative;
}
.fcm-flag-dz i:nth-child(1) { background: #006233; }
.fcm-flag-dz i:nth-child(2) { background: #fff; }
.fcm-flag-dz i:nth-child(2)::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: .55em; height: .55em;
  background: radial-gradient(circle at 65% 50%, transparent 38%, #d21f3c 38% 50%, transparent 50%);
  border-radius: 50%;
}
.fcm-flag-ma {
  display: inline-block;
  vertical-align: -.18em;
  width: 1.4em;
  height: 1em;
  border-radius: 2px;
  background: #c1272d;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.1);
}
.fcm-flag-ma::before {
  content: "★";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #006233;
  font-size: .8em;
  line-height: 1;
}

/* --- Fake cart drawer items ----------------------------------------- */
/* Make sure the empty state hides when we have items */
cart-drawer:not(.cart-drawer--empty) .cart-drawer__inner-empty { display: none !important; }
cart-drawer.cart-drawer--empty .cart-drawer__items { display: none; }

.fcm-cart-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.fcm-cart-item:last-child { border-bottom: 0; }
.fcm-cart-item__media {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  background: rgba(0, 0, 0, .04);
}
.fcm-cart-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fcm-cart-item__placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,0,0,.05), rgba(0,0,0,.12));
}
.fcm-cart-item__body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.fcm-cart-item__title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  color: inherit;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fcm-cart-item__title:hover { text-decoration: underline; }
.fcm-cart-item__variant {
  font-size: 12px;
  opacity: .7;
}
.fcm-cart-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}
.fcm-cart-item__qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid rgba(0, 0, 0, .15);
  border-radius: 999px;
  overflow: hidden;
}
.fcm-cart-item__qty button {
  background: transparent;
  border: 0;
  width: 30px;
  height: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  color: inherit;
  padding: 0;
  line-height: 1;
}
.fcm-cart-item__qty button:hover { background: rgba(0, 0, 0, .06); }
.fcm-cart-item__qty span {
  min-width: 28px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
}
.fcm-cart-item__price {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}
.fcm-cart-item__remove {
  background: transparent;
  border: 0;
  padding: 0;
  font-size: 12px;
  color: inherit;
  opacity: .6;
  text-decoration: underline;
  cursor: pointer;
  align-self: flex-start;
  margin-top: 2px;
}
.fcm-cart-item__remove:hover { opacity: 1; }

/* --- Story viewer: true fullscreen + visible arrow nav -------------- */
.fcm-viewer__container {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #000 !important;
  z-index: 99999 !important;
}
.fcm-viewer__image,
.fcm-viewer__container > img:not(.fcm-viewer__header-avatar),
.fcm-viewer__container video {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: block !important;
}
/* Bring back visible arrow buttons inside the original click zones */
.fcm-viewer__nav {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 50% !important;
  z-index: 3 !important;
  background: transparent !important;
  border: 0 !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  padding: 0 16px !important;
}
.fcm-viewer__nav--prev {
  left: 0 !important;
  justify-content: flex-start !important;
}
.fcm-viewer__nav--next {
  right: 0 !important;
  justify-content: flex-end !important;
}
.fcm-viewer__nav::before {
  content: "";
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55) no-repeat center / 22px 22px;
  backdrop-filter: blur(6px);
  opacity: .85;
  transition: opacity .15s, transform .15s;
}
.fcm-viewer__nav:hover::before { opacity: 1; transform: scale(1.05); }
.fcm-viewer__nav--prev::before {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E");
}
.fcm-viewer__nav--next::before {
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18l6-6-6-6'/%3E%3C/svg%3E");
}
/* Header bar above the image */
.fcm-viewer__header {
  position: absolute !important;
  top: 0 !important; left: 0 !important; right: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 14px 16px !important;
  background: linear-gradient(180deg, rgba(0,0,0,.55), transparent) !important;
  z-index: 4 !important;
}
.fcm-viewer__progress {
  position: absolute !important;
  top: 6px !important; left: 8px !important; right: 8px !important;
  display: flex !important;
  gap: 4px !important;
  z-index: 5 !important;
}
.fcm-viewer__progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,.3);
  border-radius: 2px;
  overflow: hidden;
}
.fcm-viewer__progress-fill { background: #fff; height: 100%; }
.fcm-viewer__close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  z-index: 6 !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: rgba(0,0,0,.45) !important;
  color: #fff !important;
  border: 0 !important;
  font-size: 22px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  display: grid !important;
  place-items: center !important;
}

/* --- Cart drawer total: bigger + bold ------------------------------ */
.cart__totals {
  display: flex !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 12px 0 !important;
  border-top: 1px solid rgba(0,0,0,.1);
  margin-top: 8px;
}
.cart__totals p,
.cart__totals__label {
  font-size: 16px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 !important;
}
.cart__totals .price,
.cart__totals [data-ref="price"],
.cart__totals-value {
  font-size: clamp(24px, 3vw, 32px) !important;
  font-weight: 900 !important;
  letter-spacing: -.01em !important;
  line-height: 1 !important;
}
.cart__totals .compare-at-price,
.cart__totals [data-ref="compare-at-price"] { display: none !important; }

/* --- Make sure the "Commander" button is always clickable ---------- */
cart-drawer:not(.cart-drawer--empty) [data-ref="checkout-button"],
cart-drawer:not(.cart-drawer--empty) [name="checkout"] {
  pointer-events: auto !important;
  opacity: 1 !important;
  cursor: pointer !important;
}
cart-drawer:not(.cart-drawer--empty) [data-ref="checkout-button"][disabled],
cart-drawer:not(.cart-drawer--empty) [name="checkout"][disabled] {
  /* Visual override only — JS removes the actual disabled attr too */
  pointer-events: auto !important;
  opacity: 1 !important;
}

/* --- Hide collection filters/sort UI -------------------------------- */
.filters,
.filters-side-panel,
.filters-sidebar,
.filter-and-sort__inline,
.filter-and-sort__mobile,
.filter-and-sort__sidebar,
.filter-list,
.filter-dropdown-toggle,
.sorting-dropdown-toggle,
[class*="ac__btn-filter"],
[class*="ac__filter-popup"],
[class*="filter-and-sort"],
.facets,
.facet-filters {
  display: none !important;
}

/* --- Size guide button + modal --------------------------------------- */
.fcm-size-guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 12px;
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: inherit;
  opacity: .75;
  cursor: pointer;
}
.fcm-size-guide-btn:hover { opacity: 1; }
.fcm-size-guide-btn::before {
  content: "";
  width: 14px; height: 14px;
  background: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 6H3v12h18z'/%3E%3Cpath d='M3 10h2M3 14h2M21 10h-2M21 14h-2M9 6v3M15 6v3M9 15v3M15 15v3'/%3E%3C/svg%3E") center/contain no-repeat;
}

.fcm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.fcm-modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.fcm-modal {
  background: #fff;
  color: #111;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 88vh;
  overflow: auto;
  padding: 24px 24px 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
  transform: translateY(8px);
  transition: transform .2s ease;
}
.fcm-modal-overlay.is-open .fcm-modal { transform: translateY(0); }
.fcm-modal h3 { font-size: 20px; margin: 0 0 16px; font-weight: 800; }
.fcm-modal table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fcm-modal th, .fcm-modal td { padding: 8px 6px; text-align: center; border-bottom: 1px solid #eee; }
.fcm-modal th { font-weight: 700; background: #f5f5f5; }
.fcm-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f0f0;
  border: 0;
  cursor: pointer;
  font-size: 18px;
  display: grid;
  place-items: center;
}
.fcm-modal { position: relative; }
.fcm-modal__intro { font-size: 13px; opacity: .75; margin-bottom: 14px; }
.fcm-modal__note { font-size: 12px; opacity: .65; margin-top: 14px; }

/* --- Cart limit toast ----------------------------------------------- */
.fcm-cart-limit-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 12px);
  background: #111;
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 14px 40px rgba(0,0,0,.4);
  opacity: 0;
  pointer-events: none;
  z-index: 99999;
  transition: opacity .25s ease, transform .25s ease;
}
.fcm-cart-limit-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
