/* ============================================================
   North West Elite Academy — shop.css
   Everything shop-specific. Variables, buttons, cards and type
   all come from styles.css; this only adds the storefront parts.
   Mobile first. Nothing here may create sideways scroll at 375px.
   ============================================================ */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- shop hero band ---------- */

.shop-hero {
  background:
    radial-gradient(ellipse 100% 120% at 85% 0%, rgba(226, 36, 32, 0.3), transparent 55%),
    linear-gradient(150deg, var(--royal), var(--royal-deep));
  color: var(--white);
  padding-block: clamp(2.25rem, 6vw, 3.5rem);
}
.shop-hero h1 { color: var(--white); font-size: clamp(2.2rem, 6vw, 3.6rem); }
.shop-hero .kicker { color: #ffd6d5; }
.shop-hero .lead { color: rgba(255, 255, 255, 0.88); margin-top: 0.9rem; }

.shop-announce {
  background: var(--ink);
  color: var(--white);
  border-bottom: 4px solid transparent;
  border-image: var(--stripe) 1;
}
.shop-announce p {
  padding-block: 0.75rem;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1rem;
}

/* ---------- search + category chips ---------- */

.shop-main { padding-block: clamp(2rem, 5vw, 3.5rem); }

.shop-controls { margin-bottom: 1.75rem; }
.shop-search input[type="search"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  font-family: var(--body);
  font-size: 1rem;
  background: var(--white);
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
}
.shop-search input[type="search"]:focus {
  outline: none;
  border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(29, 63, 209, 0.16);
}

.shop-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}
.chip {
  border: 1.5px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chip:hover { border-color: var(--royal); color: var(--royal); }
.chip.is-on { background: var(--royal); border-color: var(--royal); color: var(--white); }

/* ---------- product grid ---------- */

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
@media (min-width: 700px) {
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
}
@media (min-width: 1000px) {
  .shop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* Related products are capped at three, so keep the row to three columns
     rather than leaving a hole in a four-column grid. */
  .shop-grid.related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.prod-card {
  border: 1px solid var(--line);
  background: var(--white);
  position: relative;
  overflow: hidden;
  min-width: 0;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.prod-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.prod-card[hidden] { display: none; }
.prod-link { text-decoration: none; color: inherit; display: block; }

.prod-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: var(--cloud);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.prod-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.prod-media img.prod-placeholder {
  width: 55%;
  height: auto;
  object-fit: contain;
  opacity: 0.55;
}

.prod-badge {
  position: absolute;
  top: 0.5rem; left: 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  color: var(--white);
  transform: skewX(-8deg);
}
.prod-badge.sold { background: var(--ink); }
.prod-badge.low { background: var(--red); }

.prod-body { padding: 0.8rem 0.85rem 1rem; }
.prod-cat {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--royal);
  margin-bottom: 0.25rem;
}
.prod-name {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.05;
  font-size: 1.05rem;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.prod-price {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  margin-top: 0.35rem;
}
.prod-price s { color: var(--muted); font-weight: 600; font-size: 0.95rem; margin-left: 0.35rem; }
.prod-price.big { font-size: clamp(1.6rem, 4vw, 2.1rem); color: var(--royal); margin-top: 0.5rem; }

.shop-noresults, .shop-empty { margin-top: 1.5rem; color: var(--muted); }
.shop-empty {
  border: 1px solid var(--line);
  background: var(--cloud);
  border-left: 6px solid var(--royal);
  padding: clamp(1.4rem, 4vw, 2.2rem);
}
.shop-empty h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 0.6rem; }

/* ---------- product page ---------- */

.prod-page { padding-block: clamp(1.5rem, 4vw, 3rem); }
.prod-layout {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .prod-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
}

.gallery { min-width: 0; }
.gallery-main {
  width: 100%;
  aspect-ratio: 1;
  background: var(--cloud);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
}
.thumb {
  flex: 0 0 auto;
  width: 68px; height: 68px;
  border: 2px solid var(--line);
  background: var(--cloud);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-on { border-color: var(--royal); }

.prod-buy { min-width: 0; }
.prod-buy h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); }

.stock-hint {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
.stock-hint.in { color: #1a7a3c; }
.stock-hint.low { color: var(--red); }
.stock-hint.out { color: var(--muted); }

.size-field { margin-top: 1.4rem; }
.size-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}
.size-picker { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.size-btn {
  min-width: 56px;
  border: 1.5px solid var(--line);
  background: var(--white);
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.size-btn:hover:not([disabled]) { border-color: var(--royal); color: var(--royal); }
.size-btn.is-on { background: var(--royal); border-color: var(--royal); color: var(--white); }
.size-btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: line-through;
}
.size-btn small { display: block; font-size: 0.68rem; font-weight: 500; text-decoration: none; }
.size-warning { color: var(--red); font-weight: 600; }

.buy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.4rem;
}
.qty {
  display: inline-flex;
  align-items: stretch;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: var(--white);
}
.qty-btn {
  width: 44px;
  border: none;
  background: var(--cloud);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}
.qty-btn:hover { background: var(--line); }
.qty input {
  width: 46px;
  border: none;
  text-align: center;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: var(--white);
}
.qty input:focus { outline: none; }

.add-to-basket[disabled] { opacity: 0.5; cursor: not-allowed; }
.buy-msg { margin-top: 0.7rem; font-size: 0.92rem; font-weight: 600; color: #1a7a3c; min-height: 1.2em; }
.buy-msg.err { color: var(--red); }

.prod-desc { margin-top: 1.8rem; }
.prod-desc p { color: var(--muted); margin-bottom: 0.9rem; }

.prod-howto {
  margin-top: 1.8rem;
  background: var(--cloud);
  border-left: 4px solid var(--royal);
  border-radius: 8px;
  padding: 1.2rem 1.2rem 1rem;
}
.prod-howto h2 { font-size: 1.25rem; margin-bottom: 0.7rem; }
.prod-howto ul { list-style: none; }
.prod-howto li {
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.95rem;
  color: var(--muted);
}
.prod-howto li:last-child { border-bottom: none; }
.prod-howto li strong { color: var(--ink); }

.shop-missing { padding-block: clamp(3rem, 8vw, 5rem); }
.shop-missing-ctas { margin-top: 1.8rem; }

/* ---------- basket pill in the nav ---------- */

.basket-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 2px solid var(--royal);
  background: var(--white);
  color: var(--royal);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}
.basket-pill:hover { background: var(--royal); color: var(--white); }
.basket-pill .count {
  background: var(--red);
  color: var(--white);
  border-radius: 999px;
  min-width: 1.35em;
  padding: 0 0.35em;
  text-align: center;
  font-size: 0.85rem;
}
@media (max-width: 820px) {
  .basket-pill { width: 100%; justify-content: center; margin-top: 0.75rem; }
}

/* Floating basket button so the basket is reachable on a phone with the menu shut.
   Only ever shown when there is something in it. */
.basket-fab {
  display: none;
  position: fixed;
  right: 0.9rem;
  bottom: 0.9rem;
  z-index: 60;
  align-items: center;
  gap: 0.45rem;
  border: none;
  background: var(--royal);
  color: var(--white);
  border-radius: 999px;
  padding: 0.75rem 1.15rem;
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1rem;
  box-shadow: 0 8px 24px rgba(16, 18, 22, 0.32);
  cursor: pointer;
}
.basket-fab .count {
  background: var(--red);
  border-radius: 999px;
  min-width: 1.35em;
  padding: 0 0.35em;
  text-align: center;
}
@media (max-width: 820px) {
  .basket-fab.has-items { display: inline-flex; }
}

/* ---------- basket drawer ---------- */

.drawer { position: fixed; inset: 0; z-index: 200; }
.drawer[hidden] { display: none; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 18, 22, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.drawer.is-open .drawer-backdrop { opacity: 1; }

.drawer-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100%);
  max-width: 100%;
  background: var(--white);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: -10px 0 30px rgba(16, 18, 22, 0.2);
}
.drawer.is-open .drawer-panel { transform: none; }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: var(--royal);
  color: var(--white);
  flex-shrink: 0;
}
.drawer-head h2 { color: var(--white); font-size: 1.4rem; }
.drawer-close {
  border: none;
  background: transparent;
  color: var(--white);
  font-size: 1.9rem;
  line-height: 1;
  padding: 0 0.3rem;
  cursor: pointer;
}

.drawer-body { flex: 1 1 auto; overflow-y: auto; padding: 1rem 1.1rem; }
.drawer-empty { color: var(--muted); }

.drawer-line {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 0.75rem;
  padding-bottom: 0.9rem;
  margin-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.drawer-line:last-child { border-bottom: none; margin-bottom: 0; }
.drawer-thumb {
  width: 58px; height: 58px;
  background: var(--cloud);
  border: 1px solid var(--line);
  overflow: hidden;
}
.drawer-thumb img { width: 100%; height: 100%; object-fit: cover; }
.drawer-line-main { min-width: 0; }
.drawer-line-name {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1rem;
  line-height: 1.1;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.drawer-line-name a { color: inherit; text-decoration: none; }
.drawer-line-size { font-size: 0.85rem; color: var(--muted); }
.drawer-line-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.45rem;
}
.drawer-line-foot .qty { border-radius: 6px; }
.drawer-line-foot .qty-btn { width: 34px; font-size: 1.05rem; }
.drawer-line-foot .qty input { width: 34px; font-size: 0.95rem; }
.drawer-line-price { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.drawer-remove {
  border: none;
  background: none;
  padding: 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-decoration: underline;
  cursor: pointer;
}
.drawer-remove:hover { color: var(--red); }

.drawer-foot {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  background: var(--cloud);
}
.fulfil { border: none; margin-bottom: 0.85rem; }
.fulfil legend {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.45rem;
  color: var(--text);
}
.fulfil label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 0.92rem;
  cursor: pointer;
  margin-bottom: 0.45rem;
}
.fulfil label:last-child { margin-bottom: 0; }
.fulfil label:has(input:checked) { border-color: var(--royal); box-shadow: 0 0 0 2px rgba(29, 63, 209, 0.14); }
.fulfil input { margin-top: 0.25rem; accent-color: var(--royal); flex-shrink: 0; }
.fulfil small { display: block; color: var(--muted); font-size: 0.8rem; }

.drawer-totals { margin-bottom: 0.85rem; }
.drawer-totals div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.95rem;
  padding: 0.15rem 0;
}
.drawer-totals .total {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.2rem;
  color: var(--ink);
  border-top: 1px solid var(--line);
  margin-top: 0.35rem;
  padding-top: 0.45rem;
}
.drawer-checkout { width: 100%; text-align: center; }
.drawer-checkout[disabled] { opacity: 0.5; cursor: not-allowed; }
.drawer-msg {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}
.drawer-msg.err { color: var(--red); font-weight: 600; }
.drawer-msg a { font-weight: 600; }

/* ---------- thanks page ---------- */

.thanks-page { padding-block: clamp(2rem, 6vw, 4rem); }
.thanks-card {
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 4vw, 2.5rem);
  max-width: 640px;
  position: relative;
  overflow: hidden;
}
.thanks-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--stripe);
}
.thanks-card h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); margin-bottom: 0.6rem; }
.thanks-card h2 { font-size: 1.3rem; margin-top: 1.6rem; margin-bottom: 0.5rem; }
.thanks-card p { margin-bottom: 0.6rem; }
.thanks-items { list-style: none; margin: 1.2rem 0; }
.thanks-items li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.97rem;
}
.thanks-sub, .thanks-total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}
.thanks-total {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 1.25rem;
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
  margin-top: 0.3rem;
}
.thanks-ctas { margin-top: 1.8rem; }

@media (prefers-reduced-motion: reduce) {
  .drawer-panel, .drawer-backdrop, .prod-card { transition: none; }
}
