/* Boutique (boutique.html). Builds on styles.css: same tokens, cards and buttons. */

/* shop.js shows and hides parts with the hidden attribute; rules below that set
   display (flex, inline-block...) would otherwise override it. */
.shop-page [hidden] { display: none !important; }

.shop-section { padding-top: 56px; min-height: 60vh; }
.shop-title { font-size: clamp(40px, 4.6vw, 64px); margin: 0; }
.shop-title span { color: var(--orange-text); }

/* Showcase strip ("Nos coups de cœur") above the filters: swipe sideways. Styled
   as a navy "featured" band so it can't be mistaken for the white product grid. */
.shop-strip {
  margin: 6px 0 30px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px;
  padding: 20px 20px 12px; border-radius: var(--radius);
  background: linear-gradient(145deg, var(--navy), #123b9e); color: white;
}
.shop-section .shop-strip-title { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: 0; text-align: center; color: white; }
.shop-strip-title::before { content: "♥ "; color: var(--orange); }
.shop-strip-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: 140px; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; overscroll-behavior-x: contain;
  /* Centred while the tiles fit; once they don't, it fills the width and scrolls from the first tile. */
  width: max-content; max-width: 100%; margin-inline: auto;
}
.shop-strip-card {
  scroll-snap-align: start; display: flex; flex-direction: column; color: inherit; text-decoration: none;
  background: rgba(255,255,255,.06); border: 2px solid var(--orange); border-radius: 18px; overflow: hidden;
  position: relative; transition: transform .2s ease, box-shadow .2s ease;
}
.shop-strip-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.3); }
.shop-strip-card:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.shop-strip-card .shop-photo { aspect-ratio: 1 / 1; background: white; }
.shop-strip-body { padding: 8px 10px 10px; display: grid; gap: 2px; }
.shop-strip-body .tag { margin: 0; font-size: 9px; color: var(--turquoise); }
.shop-strip-body h3 { margin: 0; font-size: 13px; line-height: 1.3; color: white; }
.shop-strip-body .shop-price { font-size: 13px; color: var(--yellow); }
.shop-strip-row { scrollbar-color: rgba(255,255,255,.35) transparent; }

.shop-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 26px; }
.shop-filters-label { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 4px; }
.shop-filters button {
  border: 1px solid var(--line); background: white; color: var(--navy); cursor: pointer;
  border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 13px; font-weight: 700;
}
.shop-filters button:hover { border-color: var(--royal); }
.shop-filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: white; }

/* 5 products per row on a computer, fewer as the screen narrows. */
.shop-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1100px) { .shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 900px) { .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.shop-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 14px 40px rgba(10,31,92,.07); transition: transform .2s ease, box-shadow .2s ease;
}
.shop-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.shop-card-body { padding: 14px 16px 18px; display: grid; gap: 5px; }
.shop-card-body .tag { margin: 0; }
.shop-section .shop-card h2 { margin: 0; font-size: 16px; line-height: 1.3; letter-spacing: 0; }
.shop-card-options { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.shop-card-options span { margin-left: 4px; }
.shop-dot { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: white; flex: none; }

.shop-photo {
  aspect-ratio: 1 / 1; max-width: 100%; position: relative; overflow: hidden;
  display: grid; place-items: center; background: linear-gradient(145deg, #eef6ff, #fff8eb);
}
.shop-photo img { width: 100%; height: 100%; object-fit: cover; }
.shop-photo svg { width: 55%; height: 55%; fill: rgba(37,99,235,.08); stroke: var(--navy); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.shop-badge {
  position: absolute; top: 12px; left: 12px; z-index: 2; padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; background: white; color: var(--navy);
}

.shop-price { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.shop-price small { font-weight: 600; color: var(--muted); font-size: 12px; }
.shop-price-big { font-size: 28px; }

.shop-status {
  grid-column: 1 / -1; margin: 0; padding: 30px; text-align: center; color: var(--muted);
  background: white; border: 1px solid var(--line); border-radius: var(--radius);
}

/* Product page */
.shop-back { display: inline-block; margin-bottom: 22px; font-weight: 700; color: var(--royal); text-decoration: none; }
.shop-detail-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 44px; align-items: start; }
.shop-gallery { display: grid; gap: 12px; }
.shop-photo-main { border-radius: var(--radius); border: 1px solid var(--line); }
.shop-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.shop-thumbs button {
  padding: 0; border: 2px solid transparent; border-radius: 14px; overflow: hidden; cursor: pointer;
  aspect-ratio: 1 / 1; background: white;
}
.shop-thumbs button[aria-pressed="true"] { border-color: var(--orange); }
.shop-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.shop-info { display: grid; gap: 16px; align-content: start; }
.shop-info h1 { margin: 0; font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; }
.shop-info .tag { margin: 0; }
.shop-stock { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #0E7A5E; }
.shop-stock::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.shop-stock.made-to-order { color: var(--orange-text); }
.shop-label { display: block; font-size: 13px; font-weight: 800; margin-bottom: 8px; }
.shop-variation-list { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-variation-list button {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: white; color: var(--navy); cursor: pointer;
  border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 13px; font-weight: 600;
}
.shop-variation-list button[aria-pressed="true"] { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); font-weight: 800; }
.shop-modifiers { display: grid; gap: 16px; }
.shop-modifiers:empty { display: none; }
.shop-description { margin: 0; color: var(--muted); line-height: 1.75; white-space: pre-line; }
.shop-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.shop-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.shop-share-label { font-size: 13px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.shop-share-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: white; color: var(--navy); cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700; text-decoration: none;
}
.shop-share-btn:hover { border-color: var(--royal); color: var(--royal); }
.shop-share-btn svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
#share-facebook svg { fill: #1877F2; }
#share-instagram { color: var(--navy); }
#share-instagram svg { color: #D62976; fill: #D62976; }
.shop-share-status { flex-basis: 100%; font-size: 13px; font-weight: 600; color: #0E7A5E; overflow-wrap: anywhere; }
.shop-share-status:empty { display: none; }
.share-picker {
  width: min(560px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto; padding: 22px;
  border: 0; border-radius: var(--radius); background: white; color: var(--navy); box-shadow: var(--shadow);
}
.share-picker::backdrop { background: rgba(10,31,92,.55); }
.shop-section .share-picker h2 { margin: 0 0 14px; font-size: 20px; line-height: 1.25; letter-spacing: 0; }
.share-picker-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-bottom: 16px; }
.share-picker-photo {
  aspect-ratio: 1 / 1; padding: 0; border-radius: 14px; overflow: hidden; cursor: pointer;
  border: 3px solid var(--line); background: var(--cream);
}
.share-picker-photo:hover, .share-picker-photo:focus-visible { border-color: var(--orange); }
.share-picker-photo img { width: 100%; height: 100%; object-fit: cover; }
.share-picker form { display: flex; justify-content: flex-end; }
.shop-note { margin: 0; font-size: 13px; color: var(--muted); }
.shop-note a { color: var(--royal); font-weight: 700; }

@media (max-width: 860px) {
  .shop-detail-grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 760px) {
  .shop-strip-row { grid-auto-columns: 120px; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .shop-card-body { padding: 14px; }
  .shop-section .shop-card h2 { font-size: 15px; }
}
@media (max-width: 380px) {
  .shop-grid { grid-template-columns: 1fr; }
}
