/* ================================================
   FLUFFY CAT HOTEL — Boutique Herbacha
   Catalogue + fiche + panier (drawer)
   S'appuie sur les variables de style.css
   ================================================ */

/* --- Hero boutique (lookbook galerie) --- */
.shop-hero {
  padding: 9rem 0 4rem;
  background: linear-gradient(170deg, var(--sage-bg) 0%, var(--cream) 58%);
  overflow: hidden;
  text-align: center;
}
.shop-hero-head { max-width: 720px; margin: 0 auto; }
.shop-hero .script { font-size: 2rem; color: var(--gold); display: block; margin-bottom: 0.2rem; }
.shop-hero h1 { font-size: clamp(2.6rem, 5.5vw, 4.2rem); line-height: 1.02; margin-bottom: 1rem; }
.shop-hero-lead { max-width: 60ch; color: var(--text-light); margin: 0 auto; }
.shop-trust {
  display: flex; flex-wrap: wrap; gap: 0.55rem; justify-content: center;
}
.shop-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--white); border: 1px solid var(--sage-light);
  color: var(--sage-dark); font-size: 0.78rem; font-weight: 600;
  padding: 0.45rem 0.9rem; border-radius: var(--radius-xl); box-shadow: var(--shadow-sm);
}
.shop-badge svg { width: 15px; height: 15px; }

/* --- Bandeau pré-ouverture --- */
.shop-preorder {
  background: var(--sage-bg); border: 1px solid var(--sage-light); color: var(--sage-dark);
  border-radius: var(--radius-md); padding: 1rem 1.4rem; margin-bottom: 2rem;
  font-size: 0.92rem; line-height: 1.55; text-align: center;
}
.shop-preorder strong { color: var(--text-dark); }

/* --- Catalogue grid --- */
.shop-catalogue { padding: 3.5rem 0 5rem; }
.shop-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.8rem;
}
.shop-card {
  background: var(--white); border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column; cursor: pointer;
}
.shop-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.shop-card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sage-bg); }
.shop-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.shop-card:hover .shop-card-media img { transform: scale(1.05); }
.shop-card-tag {
  position: absolute; top: 0.8rem; left: 0.8rem;
  background: var(--gold); color: var(--white); font-size: 0.68rem; font-weight: 600;
  padding: 0.3rem 0.7rem; border-radius: var(--radius-xl); letter-spacing: 0.02em;
}
.shop-card-tag.is-pack { background: var(--sage-dark); }
.shop-card-soldout {
  position: absolute; inset: 0; background: rgba(42,42,42,0.45);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-family: var(--font-display); font-size: 1.3rem;
}
.shop-card-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.shop-card-body h3 { font-size: 1.25rem; margin-bottom: 0.2rem; }
.shop-card-sub { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.8rem; }
.shop-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.shop-price { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--text-dark); }
.shop-price small { font-size: 0.75rem; color: var(--text-light); font-family: var(--font-body); }

/* --- Boutons --- */
.shop-btn {
  font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
  padding: 0.7rem 1.2rem; border-radius: var(--radius-xl);
  background: var(--sage); color: var(--white); transition: background var(--transition), transform var(--transition);
  display: inline-flex; align-items: center; gap: 0.45rem;
}
.shop-btn:hover { background: var(--sage-dark); transform: translateY(-1px); }
.shop-btn:disabled { background: var(--cream-dark); color: var(--text-light); cursor: not-allowed; transform: none; }
.shop-btn-ghost { background: transparent; color: var(--sage-dark); border: 1.5px solid var(--sage-light); }
.shop-btn-ghost:hover { background: var(--sage-bg); }

.shop-todo-note {
  display: inline-block; font-size: 0.72rem; color: var(--brown-light);
  font-style: italic; margin-top: 0.3rem;
}

/* --- Fiche produit (overlay) --- */
.shop-detail-overlay {
  position: fixed; inset: 0; background: rgba(42,42,42,0.5); backdrop-filter: blur(4px);
  z-index: 1200; display: none; align-items: flex-start; justify-content: center;
  padding: 4vh 1rem; overflow-y: auto;
}
.shop-detail-overlay.open { display: flex; }
.shop-detail {
  background: var(--cream); border-radius: var(--radius-md); max-width: 940px; width: 100%;
  box-shadow: var(--shadow-lg); overflow: hidden; position: relative;
  display: grid; grid-template-columns: 1.1fr 1fr;
}
.shop-detail-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; background: var(--white);
  box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center;
  color: var(--text-dark); font-size: 1.4rem; line-height: 1;
}
.shop-detail-gallery { background: var(--sage-bg); padding: 1.2rem; }
.shop-detail-main { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--white); }
.shop-detail-main img { width: 100%; height: 100%; object-fit: cover; }
.shop-detail-thumbs { display: flex; gap: 0.5rem; margin-top: 0.7rem; }
.shop-detail-thumbs button {
  width: 60px; height: 60px; border-radius: 10px; overflow: hidden; border: 2px solid transparent;
  opacity: 0.7; transition: opacity var(--transition), border-color var(--transition);
}
.shop-detail-thumbs button.active { border-color: var(--gold); opacity: 1; }
.shop-detail-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.shop-detail-info { padding: 2.4rem 2rem 2rem; display: flex; flex-direction: column; }
.shop-detail-info h2 { font-size: 1.9rem; margin-bottom: 0.3rem; }
.shop-detail-info .shop-card-sub { font-size: 0.92rem; }
.shop-detail-price { font-family: var(--font-display); font-size: 2.1rem; font-weight: 600; margin: 0.8rem 0 0.4rem; }
.shop-detail-desc { font-size: 0.95rem; margin-bottom: 1.2rem; }
.shop-detail-qty { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.2rem; }
.shop-qty-ctrl { display: inline-flex; align-items: center; border: 1.5px solid var(--sage-light); border-radius: var(--radius-xl); }
.shop-qty-ctrl button { width: 38px; height: 40px; font-size: 1.2rem; color: var(--sage-dark); }
.shop-qty-ctrl span { width: 34px; text-align: center; font-weight: 600; }
.shop-detail-info .shop-btn { justify-content: center; width: 100%; padding: 0.95rem; font-size: 1rem; }
.shop-detail-facts { margin-top: 1.4rem; border-top: 1px solid var(--cream-dark); padding-top: 1.2rem; }
.shop-detail-facts li {
  display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.85rem; color: var(--text-mid);
  margin-bottom: 0.55rem; line-height: 1.5;
}
.shop-detail-facts svg { width: 16px; height: 16px; color: var(--sage); flex-shrink: 0; margin-top: 0.15rem; }

/* --- Panier (drawer) --- */
.cart-toggle {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; background: var(--white);
  box-shadow: var(--shadow-sm); color: var(--text-dark);
}
.cart-toggle svg { width: 20px; height: 20px; }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--gold); color: var(--white); border-radius: 10px;
  font-size: 0.7rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.cart-count[data-empty="true"] { display: none; }

.cart-backdrop {
  position: fixed; inset: 0; background: rgba(42,42,42,0.45); z-index: 1300;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.cart-backdrop.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 400px; max-width: 90vw;
  background: var(--cream); z-index: 1400; box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform var(--transition);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-head { padding: 1.4rem 1.5rem; border-bottom: 1px solid var(--cream-dark); display: flex; align-items: center; justify-content: space-between; }
.cart-head h3 { font-size: 1.4rem; }
.cart-close { font-size: 1.6rem; line-height: 1; color: var(--text-mid); }
.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.cart-empty { text-align: center; color: var(--text-light); padding: 3rem 1rem; font-size: 0.95rem; }
.cart-line { display: flex; gap: 0.9rem; padding: 0.9rem 0; border-bottom: 1px solid var(--cream-dark); }
.cart-line-img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--sage-bg); }
.cart-line-body { flex: 1; min-width: 0; }
.cart-line-body h4 { font-family: var(--font-body); font-size: 0.88rem; font-weight: 600; color: var(--text-dark); line-height: 1.3; }
.cart-line-price { font-size: 0.85rem; color: var(--text-mid); margin-top: 0.2rem; }
.cart-line-ctrl { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.cart-line-ctrl button { width: 26px; height: 26px; border-radius: 8px; background: var(--sage-bg); color: var(--sage-dark); font-size: 1rem; }
.cart-line-ctrl span { font-size: 0.85rem; font-weight: 600; min-width: 20px; text-align: center; }
.cart-line-remove { margin-left: auto; color: var(--text-light); font-size: 0.78rem; text-decoration: underline; }
.cart-foot { padding: 1.3rem 1.5rem; border-top: 1px solid var(--cream-dark); background: var(--white); }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.4rem; }
.cart-total span:first-child { font-size: 0.9rem; color: var(--text-mid); }
.cart-total span:last-child { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; }
.cart-note { font-size: 0.75rem; color: var(--text-light); margin-bottom: 1rem; }
.cart-cgv { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.78rem; color: var(--text-mid); margin-bottom: 0.9rem; line-height: 1.45; cursor: pointer; }
.cart-cgv input { margin-top: 0.15rem; flex-shrink: 0; accent-color: var(--sage); }
.cart-cgv a { color: var(--sage-dark); text-decoration: underline; }
.cart-checkout { width: 100%; justify-content: center; padding: 1rem; font-size: 1rem; }
.cart-checkout:disabled { background: var(--cream-dark); color: var(--text-light); cursor: not-allowed; }
.cart-error { color: #b3463b; font-size: 0.82rem; margin-top: 0.6rem; text-align: center; }

.footer-legal-links a { color: inherit; text-decoration: underline; }

/* --- Toast ajout panier --- */
.shop-toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(150%);
  background: var(--text-dark); color: var(--white); padding: 0.8rem 1.4rem;
  border-radius: var(--radius-xl); font-size: 0.88rem; z-index: 1500; box-shadow: var(--shadow-md);
  transition: transform var(--transition); display: flex; align-items: center; gap: 0.5rem;
}
.shop-toast.show { transform: translateX(-50%) translateY(0); }
.shop-toast svg { width: 17px; height: 17px; color: var(--sage-light); }

/* --- Formulaire infos client (checkout) --- */
.checkout-modal {
  background: var(--cream); border-radius: var(--radius-md); max-width: 480px; width: 100%;
  box-shadow: var(--shadow-lg); position: relative; padding: 2.4rem 2rem 2rem;
}
.checkout-modal h2 { font-size: 1.7rem; margin-bottom: 0.3rem; }
.checkout-sub { font-size: 0.85rem; color: var(--text-mid); margin-bottom: 1.4rem; line-height: 1.5; }
#checkout-form { display: flex; flex-direction: column; gap: 0.9rem; }
.cf-field { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.8rem; font-weight: 600; color: var(--sage-dark); }
.cf-field .cf-opt { color: var(--text-light); font-weight: 400; }
.cf-field input {
  font-family: var(--font-body); font-size: 0.95rem; font-weight: 400; color: var(--text-dark);
  padding: 0.7rem 0.9rem; border: 1.5px solid var(--cream-dark); border-radius: var(--radius-sm);
  background: var(--white); transition: border-color var(--transition);
}
.cf-field input:focus { outline: none; border-color: var(--sage); }
.cf-field input.cf-invalid { border-color: #b3463b; }
.cf-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0.9rem; }
#checkout-submit { justify-content: center; width: 100%; padding: 0.95rem; font-size: 1rem; margin-top: 0.4rem; }
.checkout-secure { text-align: center; font-size: 0.75rem; color: var(--text-light); margin-top: 0.2rem; }

/* --- Pages légales --- */
.legal { padding: 8rem 0 5rem; }
.legal .container { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 0.4rem; }
.legal h2 { font-size: 1.4rem; margin: 2.2rem 0 0.6rem; }
.legal p, .legal li { font-size: 0.95rem; color: var(--text-mid); line-height: 1.7; }
.legal ul { margin: 0.4rem 0 0.4rem 1.2rem; list-style: disc; }
.legal a { color: var(--sage-dark); text-decoration: underline; }
.legal .todo { background: #fff7ec; border: 1px dashed var(--brown-light); color: #8a6a3a; padding: 0.1rem 0.4rem; border-radius: 6px; font-style: italic; font-size: 0.85em; }
.legal-banner { background: var(--brown-light); color: var(--white); text-align: center; padding: 0.6rem 1rem; font-size: 0.82rem; font-weight: 600; }
.legal-updated { color: var(--text-light); font-size: 0.85rem; margin-bottom: 1.5rem; }

/* --- Hero : bloc prix, CTA --- */
.shop-hero-buy {
  display: inline-flex; flex-direction: column; align-items: center; gap: 0.1rem;
  padding: 0.7rem 1.6rem; margin: 0 0 0.7rem;
  background: var(--white); border: 1px solid var(--sage-light);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
}
.shop-hero-made {
  font-family: var(--font-display); font-style: italic; font-size: 0.98rem;
  color: var(--text-light); margin: 0 0 1.3rem;
}

/* Shop en haut : achat en premier */
.shop-hero--shop .shop-hero-head { margin-bottom: 1.7rem; }
.shop-grid--hero { max-width: 760px; margin: 0 auto; }
.shop-hero-note {
  margin: 1.5rem 0 1.1rem; font-family: var(--font-display); font-style: italic;
  font-size: 1.05rem; color: var(--text-light);
}
/* Bande lookbook (preuve par les chats), descendue sous le shop */
.lookbook-section .shop-lookbook { margin-top: 1.8rem; }

/* Fiche produit en haut : alignement + sélecteur de tissu (variantes) */
.shop-hero--shop { text-align: left; }
.variant-row { display: flex; align-items: center; gap: 0.9rem; margin: 0 0 1.5rem; flex-wrap: wrap; }
.variant-row .variant-label { font-family: var(--font-body); font-size: 0.9rem; color: var(--text-mid); }
.variant-row .variant-label strong { color: var(--text-dark); }
.variant-swatches { display: flex; gap: 0.6rem; }
.variant-sw {
  width: 54px; height: 54px; border-radius: 12px; overflow: hidden;
  border: 2px solid transparent; padding: 0; cursor: pointer;
  background: var(--sage-bg); box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), transform var(--transition);
}
.variant-sw img { width: 100%; height: 100%; object-fit: cover; display: block; }
.variant-sw:hover { transform: translateY(-2px); }
.variant-sw.is-active { border-color: var(--sage); }

/* Badge livraison offerte (bien visible sous le prix) */
.ship-badge {
  display: inline-flex; align-items: center; gap: 0.55rem;
  margin: 0.2rem 0 1.5rem; padding: 0.55rem 0.95rem;
  background: var(--sage-bg); color: var(--sage-dark);
  border: 1px solid var(--sage-light); border-radius: var(--radius-xl);
  font-size: 0.92rem; line-height: 1.3;
}
.ship-badge svg { width: 19px; height: 19px; flex: none; }
.ship-badge strong { color: var(--sage-dark); }

/* Phrase de clôture de l'histoire (recadrage prix-cadeau) */
.story-close {
  font-family: var(--font-display); font-style: italic; font-size: 1.25rem;
  line-height: 1.4; color: var(--text-dark); margin-top: 1.4rem;
}
.shop-hero-price {
  font-family: var(--font-display); font-size: 2rem; font-weight: 600;
  color: var(--text-dark); line-height: 1.1;
}
.shop-hero-ship {
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  color: var(--sage-dark); letter-spacing: 0.01em;
}
.shop-hero-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; margin: 0 0 1.4rem; }
.shop-hero-cta .shop-btn { min-height: 46px; display: inline-flex; align-items: center; padding: 0.75rem 1.6rem; }
.shop-hero-foot { margin-top: 2.8rem; }

/* --- Lookbook galerie : film-strip hauteur égale, image entière (aucun recadrage) --- */
.shop-lookbook {
  display: flex; gap: 1rem; margin: 2.8rem 0 0;
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  padding-bottom: 0.6rem; scrollbar-width: thin;
}
.shop-lookbook .lb-item {
  flex: 0 0 auto; margin: 0; height: clamp(280px, 38vw, 380px);
  border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-md);
  scroll-snap-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.shop-lookbook .lb-item img { height: 100%; width: auto; display: block; }
.shop-lookbook .lb-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* Affordance scroll horizontal : fondus de bord + flèches + hint */
.shop-lookbook-wrap { position: relative; }
.shop-lookbook-wrap::before,
.shop-lookbook-wrap::after {
  content: ""; position: absolute; top: 0; bottom: 0.6rem; width: 70px; z-index: 3;
  pointer-events: none; opacity: 0; transition: opacity var(--transition);
}
.shop-lookbook-wrap::before { left: 0; background: linear-gradient(to right, var(--cream), transparent); }
.shop-lookbook-wrap::after  { right: 0; background: linear-gradient(to left, var(--cream), transparent); }
.shop-lookbook-wrap.can-left::before { opacity: 1; }
.shop-lookbook-wrap.can-right::after { opacity: 1; }

.lookbook-nav {
  position: absolute; top: calc(50% - 0.3rem); transform: translateY(-50%); z-index: 4;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--white); color: var(--sage-dark); box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
}
.lookbook-nav svg { width: 20px; height: 20px; }
.lookbook-nav:hover { background: var(--sage-bg); }
.lookbook-prev { left: -10px; }
.lookbook-next { right: -10px; }
.lookbook-nav[hidden] { display: none; }

.lookbook-hint {
  display: block; text-align: center; margin-top: 0.9rem;
  font-size: 0.82rem; font-weight: 500; color: var(--text-light); letter-spacing: 0.01em;
  transition: opacity var(--transition);
}
.lookbook-hint.is-hidden { opacity: 0; pointer-events: none; }

@media (max-width: 820px) {
  .shop-hero { padding: 7rem 0 2.5rem; }
  .shop-hero h1 { font-size: clamp(2.2rem, 9vw, 3rem); }
  .shop-lookbook { margin: 1.8rem 0 0; gap: 0.8rem; }
  .shop-lookbook .lb-item { height: clamp(240px, 56vw, 320px); }
  .lookbook-nav { display: none; }
  .shop-hero-foot { margin-top: 2rem; }
}

/* Galerie testeurs : masonry (gère portrait + paysage sans recadrage forcé) */
.testers-grid {
  display: block;
  columns: 3;
  column-gap: 1.1rem;
}
.testers-grid .shop-img {
  width: 100%; height: auto; display: block;
  margin: 0 0 1.1rem; break-inside: avoid;
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
}
@media (max-width: 820px) { .testers-grid { columns: 2; } }
@media (max-width: 460px) { .testers-grid { columns: 1; } }

/* Mention frais de port (carte + fiche) */
.shop-ship-note {
  display: block; font-size: 0.8rem; font-weight: 600; color: var(--sage-dark);
  margin-top: 0.4rem;
}
.shop-detail-info .shop-ship-note { margin: 0.2rem 0 0.6rem; }
.shop-buybar-info em { font-style: normal; color: var(--sage-dark); font-weight: 600; font-size: 0.9em; }

/* --- Barre d'achat collante --- */
.shop-buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--white);
  border-top: 1px solid var(--sage-light);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08);
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(120%);
  transition: transform var(--transition);
}
.shop-buybar.is-visible { transform: translateY(0); }
.shop-buybar[hidden] { display: none; }
.shop-buybar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 64px; padding-top: 0.6rem; padding-bottom: 0.6rem;
}
.shop-buybar-info { font-size: 0.95rem; color: var(--text-light); }
.shop-buybar-info strong { color: var(--text-dark); font-family: var(--font-display); font-size: 1.15rem; }
.shop-buybar .shop-btn { min-height: 44px; white-space: nowrap; padding: 0.7rem 1.5rem; }
body.has-buybar { padding-bottom: 80px; }

/* --- Responsive --- */
@media (max-width: 720px) {
  .shop-detail { grid-template-columns: 1fr; }
  .shop-hero { padding: 7rem 0 2rem; }
  .shop-buybar-inner { gap: 0.7rem; }
  .shop-buybar-info { font-size: 0.85rem; line-height: 1.2; }
  .shop-buybar .shop-btn { flex: 0 0 auto; }
}
@media (max-width: 380px) {
  .shop-buybar-info { display: flex; flex-direction: column; }
  .shop-buybar-info strong { font-size: 1.05rem; }
}
