/* ==========================================================================
   FND Connect — Shop module
   Self-contained styling for the public shop pages. Uses the brand tokens
   defined in styles.css (:root). Loaded only on /shop pages.
   ========================================================================== */

.shop-page {
  background: var(--panel, #f6f8fb);
}

/* --- Hero ----------------------------------------------------------------- */
.shop-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 140% at 85% -10%, rgba(237, 43, 123, 0.55), transparent 55%),
    linear-gradient(135deg, var(--fnd-deep-navy), var(--fnd-navy) 60%, #4a0f33);
}
.shop-hero .wrap {
  padding: clamp(2.2rem, 6vw, 3.6rem) var(--gutter, 24px);
  max-width: var(--max, 1140px);
  margin: 0 auto;
}
.shop-hero .eyebrow {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  opacity: 0.9;
}
.shop-hero h1 {
  color: #fff;
  margin: 0.3rem 0 0.5rem;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
}
.shop-hero .lead {
  max-width: 60ch;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.92);
  margin: 0;
}
.shop-hero-actions {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

/* --- Layout sections ------------------------------------------------------ */
.shop-section {
  max-width: var(--max, 1140px);
  margin: 0 auto;
  padding: clamp(1.6rem, 4vw, 2.6rem) var(--gutter, 24px);
}
.shop-banner {
  max-width: var(--max, 1140px);
  margin: 0 auto;
  padding: 0 var(--gutter, 24px);
}
.shop-note {
  background: #fff;
  border: 1px solid rgba(0, 43, 95, 0.12);
  border-radius: 14px;
  padding: 1.1rem 1.3rem;
  color: var(--muted, #637086);
}

/* --- Product grid --------------------------------------------------------- */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.4rem;
}
.shop-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(0, 43, 95, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 43, 95, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.shop-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0, 43, 95, 0.12);
}
.shop-card-media {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #eef2f8, #fff);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.shop-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shop-placeholder {
  font-size: 3rem;
  opacity: 0.5;
}
.shop-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1.1rem 1.2rem;
  flex: 1;
}
.shop-card-title {
  margin: 0;
  font-size: 1.08rem;
  color: var(--fnd-navy, #002b5f);
}
.shop-card-summary {
  margin: 0;
  color: var(--muted, #637086);
  font-size: 0.92rem;
}
.shop-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-top: 0.6rem;
}
.shop-price {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--fnd-navy, #002b5f);
}

/* --- Buttons -------------------------------------------------------------- */
.shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--fnd-magenta, #c9005a), var(--fnd-rose, #ed2b7b));
  box-shadow: 0 6px 16px rgba(201, 0, 90, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.shop-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(201, 0, 90, 0.3); }
.shop-btn.secondary {
  background: #fff;
  color: var(--fnd-navy, #002b5f);
  border: 2px solid var(--fnd-navy, #002b5f);
  box-shadow: none;
}
.shop-btn.block { width: 100%; }
.shop-btn.large {
  padding: 1rem 1.4rem;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(201, 0, 90, 0.32);
}
.shop-btn[disabled], .shop-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Quiet, de-emphasised secondary action so the primary checkout button stands out. */
.shop-continue-link {
  display: inline-block;
  color: var(--fnd-navy, #002b5f);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 43, 95, 0.3);
  padding-bottom: 1px;
}
.shop-continue-link:hover { color: var(--fnd-magenta, #c9005a); border-bottom-color: var(--fnd-magenta, #c9005a); }

/* --- Product detail ------------------------------------------------------- */
.shop-single {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.8rem;
  align-items: start;
}
@media (max-width: 820px) {
  .shop-single { grid-template-columns: 1fr; }
}
.shop-panel {
  background: #fff;
  border: 1px solid rgba(0, 43, 95, 0.1);
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 6px 20px rgba(0, 43, 95, 0.06);
  margin-bottom: 1.2rem;
}
.shop-detail-media {
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  padding: 0.6rem;
}
/* Show the whole product (centred) rather than cropping it. */
.shop-detail-media img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

.shop-thumbs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.7rem;
}
.shop-thumb {
  width: 64px;
  height: 64px;
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 2px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
}
.shop-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.shop-thumb.is-active { border-color: var(--fnd-magenta, #c9005a); }

.shop-impact-badge {
  display: block;
  background: linear-gradient(135deg, var(--fnd-navy, #002b5f), var(--fnd-magenta, #c9005a));
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.35;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  margin-bottom: 1.2rem;
  box-shadow: 0 6px 18px rgba(0, 43, 95, 0.18);
}

.shop-delivery h3 { font-size: 1.05rem; }
.shop-detail-desc { color: var(--text, #26364d); line-height: 1.65; }
.shop-buy .shop-price-tag {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--fnd-navy, #002b5f);
}
.shop-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 1rem 0;
  font-weight: 600;
  color: var(--fnd-navy, #002b5f);
}
.shop-field input {
  border: 1.5px solid rgba(0, 43, 95, 0.2);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  font: inherit;
}

/* --- Quantity stepper ----------------------------------------------------- */
.qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1.5px solid rgba(0, 43, 95, 0.2);
  border-radius: 10px;
  overflow: hidden;
  width: max-content;
}
.qty-stepper button {
  border: 0;
  background: #f1f4f9;
  color: var(--fnd-navy, #002b5f);
  font-size: 1.2rem;
  width: 2.6rem;
  cursor: pointer;
}
.qty-stepper button:hover { background: #e3e9f2; }
.qty-stepper input {
  width: 3.6rem;
  text-align: center;
  border: 0;
  border-left: 1.5px solid rgba(0, 43, 95, 0.15);
  border-right: 1.5px solid rgba(0, 43, 95, 0.15);
  font: inherit;
  font-weight: 700;
}

/* --- Cart ----------------------------------------------------------------- */
.shop-cart-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(0, 43, 95, 0.08);
}
.shop-cart-row:last-child { border-bottom: 0; }
.shop-cart-thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  background: #eef2f8;
}
.shop-cart-name { font-weight: 700; color: var(--fnd-navy, #002b5f); }
.shop-cart-meta { color: var(--muted, #637086); font-size: 0.9rem; }
.shop-cart-line-total { font-weight: 800; color: var(--fnd-navy, #002b5f); white-space: nowrap; }
.shop-cart-totals {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--fnd-navy, #002b5f);
  margin: 1rem 0;
}
.shop-empty {
  text-align: center;
  padding: 2.4rem 1rem;
  color: var(--muted, #637086);
}

/* --- Order status --------------------------------------------------------- */
.shop-order-status {
  display: inline-block;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
}
.shop-order-status.paid { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.shop-order-status.pending { background: rgba(234, 179, 8, 0.15); color: #92600a; }
.shop-order-status.cancelled, .shop-order-status.refunded { background: rgba(100, 112, 134, 0.15); color: var(--muted, #637086); }
.shop-trust {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  color: var(--muted, #637086);
  font-size: 0.9rem;
  margin-top: 1rem;
}
.shop-trust span { display: inline-flex; align-items: center; gap: 0.4rem; }

/* --- Homepage shop band --------------------------------------------------- */
.home-shop {
  padding: clamp(2rem, 5vw, 3.4rem) 0;
  background: var(--panel, #f6f8fb);
}
.home-shop .wrap {
  max-width: var(--max, 1140px);
  margin: 0 auto;
  padding: 0 var(--gutter, 24px);
}
.home-shop-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.home-shop-head h2 {
  margin: 0.4rem 0 0.4rem;
  color: var(--fnd-navy, #002b5f);
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.home-shop-head p { margin: 0; max-width: 62ch; color: var(--text, #26364d); }
.home-shop-pill {
  display: inline-block;
  background: linear-gradient(135deg, var(--fnd-navy, #002b5f), var(--fnd-magenta, #c9005a));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}
