:root {
  --cart-bar-height: 64px;
  --site-header-clear: 108px; /* floating pill header: top 24px + height 68px + gap */
}

.commander-page {
  padding-top: var(--site-header-clear);
  min-height: 60vh;
  color: #6b2f1b;
  background: #f2e4cf;
}

.commander-experience {
  max-width: 1540px;
  margin: 0 auto;
  padding: 18px 4vw 100px;
}

.commander-hero {
  position: relative;
  min-height: clamp(170px, 18vw, 255px);
  overflow: hidden;
  border-radius: 20px;
  color: #fff8ee;
  background: #9f3d18;
}

.commander-hero > img,
.commander-hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.commander-hero > img {
  object-fit: cover;
  object-position: 62% center;
}

.commander-hero-shade {
  background: linear-gradient(90deg, rgba(71, 23, 8, .88) 0%, rgba(89, 29, 10, .58) 33%, rgba(89, 29, 10, .08) 66%);
}

.commander-hero-copy {
  position: relative;
  z-index: 1;
  width: min(520px, 48%);
  padding: clamp(22px, 3vw, 43px) clamp(16px, 2.5vw, 36px);
}

.commander-hero-copy h1 {
  margin: 0;
  font-family: "Arial Black", "Arial Bold", Arial, Helvetica, sans-serif;
  font-size: clamp(24px, 2.65vw, 40px);
  font-weight: 900;
  letter-spacing: -.075em;
  line-height: .82;
  text-transform: uppercase;
}

.commander-hero-note {
  position: absolute;
  z-index: 1;
  top: 24%;
  right: 4%;
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 2px solid currentColor;
  font-family: var(--font-handwritten), "Comic Sans MS", cursive;
  font-size: clamp(13px, 1.3vw, 18px);
  line-height: 1.15;
  text-align: right;
  transform: rotate(-7deg);
}

.commander-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: clamp(24px, 3vw, 44px);
  margin-top: 18px;
  align-items: start;
}

.commander-tabs {
  position: sticky;
  top: var(--site-header-clear);
  z-index: 5;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  background: rgba(242, 228, 207, .94);
  backdrop-filter: blur(16px);
  padding: 18px 0 14px;
  border-bottom: 1px solid var(--line);
}

.commander-tabs button {
  flex: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  border-radius: 0;
  padding: 9px 14px;
  font-family: "Arial Black", "Arial Bold", Arial, Helvetica, sans-serif;
  font-weight: 900;
  color: #6b2f1b;
  text-transform: uppercase;
  cursor: pointer;
}

.commander-tabs button.active {
  background: transparent;
  border-color: var(--orange);
  color: #d85311;
}

.commander-section { scroll-margin-top: 140px; }
.commander-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin: 38px 0 14px;
}
.commander-section-heading h2 {
  margin: 0;
  color: #d85311;
  font-family: "Arial Black", "Arial Bold", Arial, Helvetica, sans-serif;
  font-size: clamp(42px, 4.5vw, 68px);
  font-weight: 900;
  letter-spacing: -.065em;
  line-height: .85;
  text-transform: uppercase;
}
.commander-group h3 {
  margin: 26px 0 10px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #d85311;
  opacity: 1;
}

.commander-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 20px;
  margin: 16px 0 8px;
}

.commander-tile {
  position: relative;
  cursor: pointer;
}

.commander-tile[aria-disabled="true"] {
  cursor: default;
  opacity: 0.55;
}

.commander-tile-photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cream);
}

.commander-tile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.commander-tile-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    135deg,
    var(--cream),
    var(--cream) 10px,
    #efe1cb 10px,
    #efe1cb 20px
  );
}

.commander-tile-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.commander-tile-name {
  display: block;
  font-family: "Arial Black", "Arial Bold", Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.035em;
  color: #d85311;
  text-transform: uppercase;
}

.commander-tile-price {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  color: #6b2f1b;
  opacity: .72;
}

.commander-tile-badge {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--orange);
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  pointer-events: none;
}

.commander-tile-unavailable-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink);
  pointer-events: none;
}

.commander-sidebar {
  position: sticky;
  top: calc(var(--site-header-clear) + 16px);
  padding-top: 18px;
}

.order-summary {
  color: #6b2f1b;
  background: linear-gradient(180deg, rgba(255, 250, 243, .42), rgba(234, 212, 186, .22));
  border: 0;
  border-radius: 24px;
  padding: 28px 24px 26px;
  box-shadow:
    0 22px 60px rgba(107, 47, 27, .12),
    inset 0 1px 0 rgba(255, 255, 255, .85),
    inset 0 0 0 1px rgba(255, 255, 255, .45);
}
.order-summary > h2 {
  margin: 0 0 22px;
  color: #d85311;
  font-family: "Arial Black", "Arial Bold", Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -.035em;
  text-transform: uppercase;
}
.order-summary-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  text-align: center;
}
.order-summary-empty img {
  width: 118px;
  height: 118px;
  object-fit: contain;
  margin: 0 auto 8px;
}
.order-summary-empty strong { font-size: 16px; }
.order-summary-empty p {
  max-width: 240px;
  margin: 7px auto 0;
  color: rgba(107, 47, 27, .72);
  font-size: 13px;
  line-height: 1.45;
}

.order-summary-lines {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.order-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.order-summary-line-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-summary-line-badge {
  font-size: 0.75rem;
  color: #b3261e;
}

.order-summary-line-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px;
  background: rgba(255, 255, 255, .32);
  box-shadow:
    0 6px 16px rgba(107, 47, 27, .1),
    inset 0 1px 0 rgba(255, 255, 255, .85),
    inset 0 0 0 1px rgba(255, 255, 255, .3);
}

.order-summary-line-controls button {
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  color: #6b2f1b;
  background: transparent;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.order-summary-line-controls button:hover {
  color: #fff;
  background: #d85311;
  transform: scale(1.04);
}
.order-summary-line-controls button:focus-visible {
  outline: 2px solid #d85311;
  outline-offset: 2px;
}
.order-summary-line-controls button:disabled {
  color: rgba(107, 47, 27, .25);
  background: transparent;
  cursor: default;
  transform: none;
}
.order-summary-line-controls svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.order-summary-line-controls .order-summary-qty {
  min-width: 24px;
  color: #6b2f1b;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}
.order-summary-line-controls .order-summary-remove-button {
  margin-left: 5px;
  color: #d85311;
  background: rgba(216, 83, 17, .1);
}

.order-summary-subtotal {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  margin: 16px 0;
}

.order-summary-checkout {
  width: 100%;
  color: #fff;
  background: linear-gradient(180deg, rgba(216, 83, 17, .92), rgba(184, 62, 8, .92));
  border: 0;
  box-shadow:
    0 10px 26px rgba(107, 47, 27, .25),
    inset 0 1px 0 rgba(255, 255, 255, .35),
    inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.order-summary-checkout:disabled {
  opacity: 1;
  cursor: default;
}
.order-summary-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(107, 47, 27, .14);
}
.order-summary-benefits span {
  padding: 0 8px;
  color: rgba(107, 47, 27, .78);
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
}
.order-summary-benefits span + span { border-left: 1px solid rgba(107, 47, 27, .12); }
.order-summary-benefits b {
  display: block;
  margin-bottom: 7px;
  color: var(--orange);
  font-size: 24px;
}
.order-summary-signature {
  margin: 22px 0 0;
  color: var(--orange);
  font-family: var(--font-handwritten), "Comic Sans MS", cursive;
  font-size: 27px;
  text-align: center;
  transform: rotate(-5deg);
}

.order-summary-notice {
  margin-top: 12px;
  font-size: 0.85rem;
  background: var(--cream);
  border-radius: 8px;
  padding: 8px 12px;
}

.commander-mobile-cart {
  display: none;
}

/* --- Modale produit --- */

.product-detail-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 5, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: calc(var(--site-header-clear) + 60px) 5vw 5vw;
}

.product-detail-modal-panel {
  background: #fff;
  border-radius: 20px;
  max-width: 720px;
  width: 100%;
  height: min(560px, 90vh);
  display: flex;
  position: relative;
  overflow: hidden;
}

.product-detail-modal-photo {
  flex: 0 0 45%;
  min-height: 0;
  position: relative;
  overflow: hidden;
  background: #fff;
}

.product-detail-modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-detail-modal-photo-nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  pointer-events: none;
}

.product-detail-modal-photo-nav button {
  pointer-events: auto;
  border: none;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

.product-detail-modal-body {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

.product-detail-modal-variants {
  list-style: none;
  margin: 20px 0;
  padding: 0;
}

.product-detail-modal-variant-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.product-detail-modal-variant-label {
  flex: 1;
  font-weight: 700;
  color: var(--ink);
}

.product-detail-modal-variant-price {
  font-weight: 800;
  color: var(--ink);
}

.product-detail-modal-variant-row:not(:has(.product-detail-modal-variant-label)) .product-detail-modal-variant-price {
  flex: 1;
}

.product-detail-modal-variant-unavailable {
  font-size: 0.85rem;
  color: var(--ink);
  opacity: 0.5;
}

.product-detail-modal-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-detail-modal-stepper button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.product-detail-modal-stepper button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.product-detail-modal-stepper span {
  min-width: 16px;
  text-align: center;
  font-weight: 700;
  color: var(--ink);
}

.product-detail-modal-buy {
  width: 100%;
  background: var(--orange);
  color: #fff;
  border: none;
}

.product-detail-modal-buy:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.product-detail-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
  z-index: 1;
}

/* --- Tiroir panier mobile --- */

.cart-drawer-bar {
  display: none;
}

.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 5, 0.55);
  z-index: 60;
  display: flex;
  align-items: flex-end;
}

.cart-drawer-panel {
  background: #fff;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 24px;
  position: relative;
}

.cart-drawer-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: var(--cream);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  cursor: pointer;
}

@media (max-width: 860px) {
  .commander-page { padding-top: 84px; }
  .commander-experience { padding: 10px 14px 80px; }
  .commander-hero {
    min-height: 500px;
    border-radius: 16px;
  }
  .commander-hero > img { object-position: 64% center; }
  .commander-hero-shade {
    background: linear-gradient(180deg, rgba(71, 23, 8, .18), rgba(71, 23, 8, .84));
  }
  .commander-hero-copy {
    position: absolute;
    inset: auto 0 0;
    width: auto;
    padding: 36px 26px;
  }
  .commander-hero-copy h1 { font-size: clamp(46px, 14vw, 68px); }
  .commander-hero-note { top: 24px; right: 22px; font-size: 20px; }
  .commander-layout {
    grid-template-columns: 1fr;
    margin-top: 8px;
    padding-bottom: calc(var(--cart-bar-height) + env(safe-area-inset-bottom) + 24px);
  }

  .commander-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .commander-sidebar {
    display: none;
  }

  .commander-mobile-cart {
    display: block;
  }

  .cart-drawer-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: #fff;
    border-top: 1px solid var(--line);
    padding: 12px 5vw calc(12px + env(safe-area-inset-bottom));
    height: var(--cart-bar-height);
    box-sizing: border-box;
  }

  .cart-drawer-trigger {
    width: 100%;
  }

  .product-detail-modal-panel {
    flex-direction: column;
    height: min(640px, 85vh);
    overflow-y: auto;
  }

  .product-detail-modal-photo {
    flex: 0 0 220px;
  }
}

@media (max-width: 480px) {
  .commander-grid { grid-template-columns: 1fr 1fr; gap: 22px 10px; }
  .commander-tile-name { font-size: 17px; }
  .commander-section-heading { margin-top: 30px; }
  .commander-section-heading h2 { font-size: 42px; }
  .commander-tabs { top: 80px; }
}

.mock-payment-page {
  max-width: 480px;
  margin: 80px auto;
  padding: 0 5vw;
  text-align: center;
}

.mock-payment-amount {
  font-size: 32px;
  font-weight: 600;
}

.mock-payment-notice {
  color: var(--muted, #777);
  font-size: 14px;
  margin: 16px 0 24px;
}

.mock-payment-page form {
  margin-bottom: 12px;
}

.mock-payment-fail {
  background: transparent;
  border: 1px solid var(--line, #ddd);
  color: inherit;
}

.order-confirmation-page {
  max-width: 480px;
  margin: 80px auto;
  padding: 0 5vw;
  text-align: center;
}

.order-confirmation-status {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
}

.order-confirmation-home-link {
  display: inline-block;
  margin-top: 32px;
}

.checkout-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line, #eee);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
}

.checkout-form-field input,
.checkout-form-field select {
  padding: 10px 12px;
  border: 1px solid var(--line, #ddd);
  border-radius: 8px;
  font-size: 15px;
}

.checkout-form-error {
  color: #b3261e;
  font-size: 13px;
}

.checkout-form-error-list {
  color: #b3261e;
  font-size: 13px;
  padding-left: 18px;
}

.checkout-form-actions {
  display: flex;
  gap: 12px;
}

.checkout-form-cancel {
  background: transparent;
  border: 1px solid var(--line, #ddd);
  border-radius: 999px;
  padding: 0 16px;
}
