:root {
  --loop-ink: oklch(0.22 0.015 145);
  --loop-deep: oklch(0.31 0.045 145);
  --loop-deep-hover: oklch(0.26 0.04 145);
  --loop-olive: oklch(0.47 0.055 118);
  --loop-success: oklch(0.59 0.12 145);
  --loop-surface: oklch(0.975 0.006 110);
  --loop-soft: oklch(0.955 0.009 115);
  --loop-line: oklch(0.9 0.012 115);
  --loop-muted: oklch(0.52 0.018 125);
  --loop-white: oklch(1 0 0);
  --loop-focus: oklch(0.6 0.09 140 / 28%);
  --loop-shadow: 0 18px 45px oklch(0.2 0.02 140 / 9%);
}

/* Conversion-focused product section */
.product.wrap {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr);
  gap: 0;
  max-width: 1180px;
  margin-bottom: 68px;
  padding: 0;
  border: 1px solid var(--loop-line);
  border-radius: 8px;
  background: var(--loop-white);
  box-shadow: var(--loop-shadow);
  overflow: visible;
}

.product .gallery {
  align-self: start;
  padding: 42px;
  background: var(--loop-surface);
}

@media (min-width: 901px) {
  .product .gallery {
    position: sticky;
    top: 82px;
    z-index: 1;
    border-radius: 8px 0 0 8px;
  }



  .product .main-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
  }
}

.product .main-photo {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--loop-line);
  border-radius: 8px;
  background: var(--loop-white);
  box-shadow: 0 1px 2px oklch(0.2 0.02 140 / 5%);
}

.product .photo-button {
  padding: 58px 18px 72px;
}

.product .photo-button > img {
  max-width: 100%;
}

.product .main-photo.is-lifestyle .photo-button > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product .photo-label,
.product .photo-bottom > span {
  color: var(--loop-muted);
  letter-spacing: 1.4px;
  font-weight: 600;
}

.product .zoom-button {
  border: 1px solid var(--loop-line);
  box-shadow: 0 2px 8px oklch(0.2 0.02 140 / 6%);
  transition: transform .2s ease, box-shadow .2s ease;
}

.product .zoom-button:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 14px oklch(0.2 0.02 140 / 10%);
}

.product .thumbnails {
  gap: 12px;
  margin-top: 18px;
}

.product .thumbnails > button {
  width: 72px;
  height: 72px;
  border-radius: 7px;
  background: var(--loop-white);
}

.product .thumbnails > button.selected {
  border-color: var(--loop-deep);
  box-shadow: inset 0 0 0 1px var(--loop-deep);
}


.product-info {
  padding: 46px 48px 40px;
}

.product-info .collection-pill {
  margin: 0 0 12px;
  color: var(--loop-deep);
  background: var(--loop-soft);
  border: 1px solid var(--loop-line);
  border-radius: 999px;
  padding: 7px 11px;
  font-weight: 700;
}

.product-info .config-title {
  max-width: 390px;
  margin: 22px 0 8px;
  color: var(--loop-ink);
  font-size: clamp(34px, 3.1vw, 48px);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.08;
}

.product-info .product-name {
  margin: 0;
  color: var(--loop-muted);
  font-size: 16px;
}

.product-info .price {
  margin-top: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--loop-line);
  color: var(--loop-ink);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0;
}

.product-info .price > span {
  color: var(--loop-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.product-info .description {
  max-width: none;
  margin-top: 19px;
  color: var(--loop-muted);
  font-size: 14px;
  line-height: 1.65;
}

.product-info .quick-benefits {
  gap: 24px;
  margin: 17px 0 25px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--loop-line);
  color: var(--loop-deep);
  font-weight: 500;
}

.product-info .selection {
  margin-top: 22px;
}

.product-info .field-title {
  margin-bottom: 14px;
  color: var(--loop-ink);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
}

.product-info .field-title strong {
  color: var(--loop-muted);
  font-weight: 500;
}

.product-info .color-options {
  gap: 12px;
}

.product-info .color-options label {
  position: relative;
  display: block;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 4px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--loop-white);
  font-size: 0;
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: pointer;
}

.product-info .color-options label > [role="radio"] {
  pointer-events: none;
}

.product-info .color-options label:hover {
  transform: scale(1.06);
}

.product-info .color-options label.selected {
  border-color: var(--loop-ink);
  background: var(--loop-white);
  box-shadow: 0 0 0 2px var(--loop-white), 0 0 0 4px var(--loop-ink);
}

.product-info .color-options .color-dot {
  position: absolute;
  inset: 4px;
  display: grid;
  width: auto;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
}

.product-info .color-options .color-dot > svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.product-info .color-options .color-dot + span {
  pointer-events: none;
}

.product-info #dog-selector {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--loop-line);
  border-radius: 8px;
  background: var(--loop-surface);
}

.product-info .dog-fields {
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.product-info .dog-fields label {
  margin-bottom: 9px;
  color: var(--loop-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-info .profile-select {
  min-height: 50px;
  border-color: var(--loop-line);
  border-radius: 7px;
  color: var(--loop-ink);
  background: var(--loop-white);
  box-shadow: none;
}

.product-info .profile-select:focus-visible {
  border-color: var(--loop-success);
  box-shadow: 0 0 0 3px var(--loop-focus);
}

.product-info .fit-note {
  grid-column: 1 / -1;
  margin-top: 1px;
  color: var(--loop-muted);
  font-size: 11px;
}

.product-info .text-button {
  grid-column: 1 / -1;
  justify-self: start;
  color: var(--loop-deep);
  font-weight: 600;
}

.product-info > .size-hint {
  position: relative;
  margin: 18px 0 -6px;
  padding: 16px 18px 16px 48px;
  border: 1px solid var(--loop-line);
  border-radius: 7px;
  color: var(--loop-muted);
  background: var(--loop-soft);
  font-size: 14px;
  line-height: 1.35;
}

.product-info > .size-hint::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 20px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--loop-success);
  transform: translateY(-50%);
  box-shadow: 0 0 0 5px color-mix(in oklab, var(--loop-success) 14%, transparent);
}

.product-info > .size-hint strong {
  color: var(--loop-ink);
  font-size: 18px;
}

.product-info > .add-button {
  min-height: 62px;
  margin-top: 18px;
  border-radius: 7px;
  background: var(--loop-deep);
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 10px 24px oklch(0.28 0.05 145 / 17%);
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.product-info > .add-button:hover:not(:disabled) {
  background: var(--loop-deep-hover);
  transform: translateY(-1px);
  box-shadow: 0 13px 28px oklch(0.28 0.05 145 / 22%);
}

.product-info > .add-button:active:not(:disabled) {
  transform: scale(.99);
}

.product-info .launch-note {
  margin-top: 12px;
  color: var(--loop-muted);
}

.product-info .product-accordion {
  margin-top: 20px;
  border-top: 1px solid var(--loop-line);
}

@media (max-width: 900px) {
  .product.wrap {
    grid-template-columns: 1fr;
    width: calc(100% - 32px);
    margin-inline: auto;
  }

  .product .gallery {
    padding: 24px;
  }

  .product .main-photo {
    aspect-ratio: 1;
  }

  .product-info {
    padding: 34px 28px 30px;
  }
}

@media (max-width: 560px) {
  .product.wrap {
    width: calc(100% - 24px);
    border-radius: 7px;
    margin-bottom: 44px;
  }

  .product .gallery {
    padding: 14px;
  }

  .product .photo-button {
    padding: 42px 24px 58px;
  }

  .product .thumbnails > button {
    width: 58px;
    height: 58px;
  }

  .product-info {
    padding: 30px 20px 26px;
  }

  .product-info .config-title {
    font-size: 34px;
  }

  .product-info .price {
    font-size: 27px;
  }

  .product-info .quick-benefits {
    gap: 12px;
  }

  .product-info #dog-selector {
    padding: 18px;
  }

  .product-info .dog-fields {
    grid-template-columns: 1fr;
  }

  .product-info > .add-button {
    min-height: 60px;
    padding-inline: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product .zoom-button,
  .product-info .color-options label,
  .product-info > .add-button {
    transition: none;
  }
}


/* Conversion helpers in the live cart preview */
.cart-panel .panel-heading {
  flex: 0 0 auto;
  padding-block: 16px 12px;
}
.cart-panel .cart-items {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 16px;
  overscroll-behavior: contain;
}
.cart-panel .cart-item {
  min-height: max-content;
  padding-block: 14px;
}
.cart-panel .cart-summary {
  flex: 0 0 auto;
  padding-block: 12px;
}
.cart-panel .cart-summary .add-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--loop-deep);
  border-radius: 6px;
  background: var(--loop-deep);
  color: var(--loop-white);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.cart-panel .cart-summary .add-button:hover {
  background: var(--loop-deep-hover);
  transform: translateY(-1px);
}
.cart-panel .cart-summary .add-button:active { transform: scale(.99); }
.cart-panel .cart-summary .add-button:focus-visible {
  outline: 2px solid var(--loop-deep);
  outline-offset: 3px;
}
.cart-panel .cart-summary .launch-note { margin-top: 9px; }
.preview-cart-reservation {
  flex: 0 0 auto;
  margin: 12px 20px 10px;
  padding: 9px 12px 8px;
  border: 1px solid var(--loop-line);
  border-radius: 6px;
  background: var(--loop-soft);
  color: var(--loop-ink);
}
.preview-reservation-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.preview-reservation-top strong { font-size: 12px; }
.preview-reservation-top b { color: var(--loop-muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.preview-cart-reservation p { margin: 3px 0 6px; color: var(--loop-muted); font-size: 10.5px; line-height: 1.35; }
.preview-reservation-track { height: 2px; overflow: hidden; border-radius: 2px; background: var(--loop-line); }
.preview-reservation-track span { display: block; width: 100%; height: 100%; transform-origin: left; background: var(--loop-deep); transition: transform 1s linear; }
.preview-cart-shipping { flex: 0 0 auto; margin: 0 20px 12px; color: var(--loop-ink); }
.preview-shipping-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: 11.5px; line-height: 1.35; }
.preview-shipping-label span:last-child { flex: 0 0 auto; color: var(--loop-muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.preview-shipping-track { height: 5px; overflow: hidden; border-radius: 3px; background: var(--loop-line); }
.preview-shipping-track span { display: block; height: 100%; border-radius: inherit; background: var(--loop-olive); transition: width .35s ease; }
.preview-cart-shipping.is-unlocked .preview-shipping-track span { background: var(--loop-deep); }
.preview-cart-upsell { flex: 0 0 auto; display: grid; grid-template-columns: 58px minmax(0,1fr) auto; align-items: center; gap: 10px; margin: 0 20px 10px; padding: 10px; border: 1px solid var(--loop-line); border-radius: 6px; background: var(--loop-surface); }
.preview-cart-upsell img { width: 58px; height: 64px; object-fit: contain; background: var(--loop-white); }
.preview-cart-upsell div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.preview-cart-upsell small { color: var(--loop-olive); font-size: 9px; font-weight: 700; letter-spacing: .8px; }
.preview-cart-upsell strong { color: var(--loop-ink); font-size: 13px; }
.preview-cart-upsell span { color: var(--loop-muted); font-size: 11px; }
.preview-cart-upsell button { min-width: 76px; padding: 10px 9px; border-radius: 4px; background: var(--loop-deep); color: var(--loop-white); font-size: 11px; font-weight: 700; cursor: pointer; }
.preview-cart-upsell button:disabled { background: var(--loop-olive); cursor: default; }
.preview-cart-upsell { transition: opacity .2s ease, transform .2s ease; }
.preview-cart-upsell.is-leaving { opacity: 0; transform: translateY(6px); }
.preview-cart-upsell button.is-added { background: var(--loop-olive); animation: leash-pop .3s ease-out; }
.preview-leash-item { animation: leash-in .35s ease-out; }
@keyframes leash-pop { 0% { transform: scale(1); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes leash-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (max-width: 390px) {
  .preview-cart-reservation { margin-inline: 16px; }
  .preview-cart-shipping, .preview-cart-upsell { margin-inline: 0; }
  .preview-cart-upsell { grid-template-columns: 54px minmax(0,1fr); }
  .preview-cart-upsell img { width: 54px; height: 64px; }
  .preview-cart-upsell button { grid-column: 1 / -1; width: 100%; }
}

/* Modification d'un produit depuis le panier */
.cart-panel .cart-item[data-loop-editable] { cursor: pointer; transition: background .15s ease; }
.cart-panel .cart-item[data-loop-editable]:hover { background: var(--loop-surface); }
.loop-edit-backdrop { position: fixed; inset: 0; z-index: 9999; pointer-events: auto; display: flex; align-items: center; justify-content: center; padding: 20px; background: color-mix(in oklch, var(--loop-ink) 55%, transparent); animation: loop-edit-fade .18s ease-out; }
.loop-edit-backdrop[hidden] { display: none; }
.loop-edit-modal { position: relative; width: min(420px, 100%); max-height: min(86vh, 700px); overflow-y: auto; padding: 22px 22px 20px; border-radius: 10px; background: var(--loop-white); box-shadow: 0 24px 60px var(--loop-shadow); animation: loop-edit-rise .22s ease-out; }
.loop-edit-close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--loop-surface); color: var(--loop-ink); font-size: 18px; line-height: 1; cursor: pointer; }
.loop-edit-head { display: grid; grid-template-columns: 62px minmax(0,1fr); align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--loop-line); }
.loop-edit-head img { width: 62px; height: 66px; object-fit: contain; background: var(--loop-surface); border-radius: 6px; }
.loop-edit-head div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.loop-edit-head small { color: var(--loop-olive); font-size: 9px; font-weight: 700; letter-spacing: .9px; }
.loop-edit-head strong { font-size: 15px; color: var(--loop-ink); }
.loop-edit-head span { font-size: 12px; color: var(--loop-muted); }
.loop-edit-label { display: block; margin: 16px 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--loop-muted); }
.loop-edit-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.loop-edit-colors button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px 7px 8px; border: 1px solid var(--loop-line); border-radius: 999px; background: var(--loop-white); font-size: 12px; color: var(--loop-ink); cursor: pointer; }
.loop-edit-colors button span { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--loop-ink) 18%, transparent); }
.loop-edit-colors button.is-active { border-color: var(--loop-deep); box-shadow: 0 0 0 1px var(--loop-deep); }
.loop-edit-modal select { width: 100%; padding: 11px 12px; border: 1px solid var(--loop-line); border-radius: 6px; background: var(--loop-white); color: var(--loop-ink); font-size: 13px; font-family: inherit; }
.loop-edit-advice { margin: 14px 0 0; padding: 10px 12px; border-radius: 6px; background: var(--loop-soft); font-size: 12px; color: var(--loop-ink); }
.loop-edit-sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.loop-edit-sizes button { padding: 11px 0; border: 1px solid var(--loop-line); border-radius: 6px; background: var(--loop-white); font-size: 13px; font-weight: 600; color: var(--loop-ink); cursor: pointer; }
.loop-edit-sizes button.is-active { border-color: var(--loop-deep); background: var(--loop-deep); color: var(--loop-white); }
.loop-edit-save { width: 100%; margin-top: 20px; padding: 14px; border-radius: 6px; background: var(--loop-deep); color: var(--loop-white); font-size: 13px; font-weight: 700; letter-spacing: .3px; cursor: pointer; }
@keyframes loop-edit-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes loop-edit-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 390px) {
  .loop-edit-modal { padding: 18px 16px 16px; }
}
@media (min-width: 901px) {
  .loop-edit-backdrop { padding-right: 404px; }
}

/* Product / worn view toggle (replaces thumbnails) */
.product .thumbnails { display: none; }

/* View toggle overlaid on the main photo (replaces LOOP / 01 label) */
.product .main-photo .view-toggle {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--loop-line);
  border-radius: 999px;
  background: oklch(1 0 0 / 90%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px oklch(0.2 0.02 140 / 10%);
}

.product .main-photo .view-toggle > button {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--loop-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.product .main-photo .view-toggle > button:hover {
  color: var(--loop-ink);
}

.product .main-photo .view-toggle > button.selected {
  background: var(--loop-deep);
  color: var(--loop-white);
}

@media (prefers-reduced-motion: reduce) {
  .product .main-photo .view-toggle > button { transition: none; }
}
