/* Hydro3D shop — extends /css/styles.css (load that first). */

/* ---------- shared shop chrome ---------- */
.shop-main { min-height: 60vh; }
.page-head { padding: clamp(2.2rem, 5vw, 3.6rem) 0 0.5rem; }
.page-head p { color: var(--text-soft); max-width: 60ch; }

.cart-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 0.45rem;
  font: inherit; font-weight: 700; font-size: 0.92rem;
  color: var(--text); background: transparent;
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: 0.55rem 1.05rem; cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.cart-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.cart-btn .count {
  min-width: 20px; height: 20px; padding: 0 5px;
  display: inline-grid; place-items: center;
  background: var(--sunset); color: #2a0a04;
  border-radius: 999px; font-size: 0.72rem; font-weight: 800;
}
.cart-btn .count:empty { display: none; }

/* ---------- filter chips ---------- */
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1.2rem 0 2rem; }
.chip {
  font: inherit; font-size: 0.85rem; font-weight: 700;
  color: var(--text-soft); background: var(--card);
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: 0.45rem 1rem; cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip[aria-pressed="true"] {
  color: #2a0a04; background: var(--sunset);
  border-color: transparent;
}

/* ---------- product grid ---------- */
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; padding-bottom: 4rem; }
@media (max-width: 980px) { .pgrid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .pgrid { grid-template-columns: 1fr; } }

.pcard {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); text-decoration: none; color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline)); }
.pcard-media {
  aspect-ratio: 16 / 11; display: grid; place-items: center;
  font-size: 3.4rem; position: relative; color: #eaf6fa;
}
.pcard-media .badge, .pcard-media .badge-type {
  position: absolute; font-size: 0.68rem; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.28rem 0.6rem; border-radius: 999px;
}
.pcard-media .badge { top: 12px; left: 12px; background: rgba(4,20,31,0.55); color: #cdeff6; }
.pcard-media .badge-type { top: 12px; right: 12px; background: rgba(255,255,255,0.88); color: #04141f; }
.pcard-body { padding: 1.05rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.pcard-body h3 { font-size: 1.02rem; margin: 0; }
.pcard-body p { font-size: 0.88rem; color: var(--text-soft); margin: 0; flex: 1; }
.pcard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.7rem; }
.price { font-weight: 800; font-size: 1.05rem; }
.price small { font-weight: 600; color: var(--text-soft); }
.add-mini {
  font: inherit; font-size: 0.82rem; font-weight: 700;
  color: var(--coral-deep); background: transparent;
  border: 1px solid color-mix(in srgb, var(--coral-deep) 40%, transparent);
  border-radius: 999px; padding: 0.4rem 0.9rem; cursor: pointer;
  transition: all 0.15s ease;
}
.add-mini:hover { background: var(--sunset); color: #2a0a04; border-color: transparent; }

/* Gradient tiles for product art (.g1–.g6) live in /css/styles.css — the
   homepage uses them too. A photo, when the product has one, sits on top. */
.pcard-media img, .pd-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pcard-media.has-img .art, .pd-media.has-img .art { display: none; }
.pcard-media .badge, .pcard-media .badge-type { z-index: 1; }

/* custom-print CTA tile */
.pcard-cta { justify-content: center; text-align: center; background: var(--grad-deep); color: #eaf6fa; border: 1px dashed rgba(124,217,230,0.45); }
.pcard-cta .pcard-body { align-items: center; gap: 0.55rem; padding: 2rem 1.4rem; }
.pcard-cta h3 { color: #fff; font-size: 1.15rem; }
.pcard-cta p { color: #a8d3df; }

/* ---------- cart drawer ---------- */
.drawer-veil {
  position: fixed; inset: 0; background: rgba(4,20,31,0.5);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease; z-index: 90;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw);
  background: var(--card); border-left: 1px solid var(--hairline);
  box-shadow: var(--shadow-lg); z-index: 91;
  transform: translateX(105%); transition: transform 0.25s ease;
  display: flex; flex-direction: column;
}
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-veil { opacity: 1; pointer-events: auto; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--hairline);
}
.drawer-head h2 { font-size: 1.15rem; margin: 0; }
.drawer-close {
  font: inherit; font-size: 1.3rem; line-height: 1; color: var(--text-soft);
  background: none; border: 0; cursor: pointer; padding: 0.3rem 0.5rem;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 0.6rem 1.3rem; }
.drawer-empty { text-align: center; color: var(--text-soft); padding: 3rem 1rem; }
.cline { display: flex; gap: 0.9rem; padding: 0.95rem 0; border-bottom: 1px solid var(--hairline); }
.cline-art { width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; flex: none; color: #eaf6fa; }
.cline-info { flex: 1; min-width: 0; }
.cline-info b { display: block; font-size: 0.92rem; }
.cline-info .meta { display: block; font-size: 0.78rem; color: var(--text-soft); margin-top: 0.15rem; }
.cline-row { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--hairline); border-radius: 999px; }
.qty button { font: inherit; font-weight: 700; background: none; border: 0; cursor: pointer; color: var(--text); width: 28px; height: 26px; }
.qty span { min-width: 22px; text-align: center; font-size: 0.85rem; font-weight: 700; }
.cline .rm { font-size: 0.78rem; color: var(--text-soft); background: none; border: 0; cursor: pointer; text-decoration: underline; }
.drawer-foot { padding: 1.1rem 1.3rem 1.3rem; border-top: 1px solid var(--hairline); }
.drawer-total { display: flex; justify-content: space-between; font-weight: 800; margin-bottom: 0.9rem; }
.drawer-foot .btn { width: 100%; justify-content: center; }
.drawer-note { font-size: 0.75rem; color: var(--text-soft); text-align: center; margin: 0.7rem 0 0; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: var(--ink); color: #eaf6fa; font-size: 0.88rem; font-weight: 600;
  padding: 0.7rem 1.2rem; border-radius: 999px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: all 0.25s ease; z-index: 120;
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- product detail ---------- */
.pd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6rem; align-items: start; padding: 2.2rem 0 4rem; }
@media (max-width: 860px) { .pd-grid { grid-template-columns: 1fr; } }
.pd-media { aspect-ratio: 1/0.85; border-radius: var(--radius); display: grid; place-items: center; font-size: 6.5rem; color: #eaf6fa; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.pd-media .badge-type { position: absolute; top: 14px; right: 14px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.3rem 0.7rem; border-radius: 999px; background: rgba(255,255,255,0.9); color: #04141f; }
.pd-thumbs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.7rem; }
.pd-thumbs:empty { display: none; }
.pd-thumbs button { width: 68px; height: 68px; border-radius: 10px; overflow: hidden; padding: 0; border: 2px solid transparent; background: var(--card); cursor: pointer; }
.pd-thumbs button[aria-pressed="true"] { border-color: var(--accent); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-info .price { font-size: 1.6rem; display: block; margin: 0.6rem 0 1rem; }
.pd-info .lead { color: var(--text-soft); }
.pd-row { display: flex; gap: 0.8rem; align-items: center; margin: 1.4rem 0; flex-wrap: wrap; }
.pd-perks { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; gap: 0.5rem; font-size: 0.92rem; color: var(--text-soft); }
.pd-perks li::before { content: "✓ "; color: var(--lagoon); font-weight: 800; }
.crumb { font-size: 0.85rem; color: var(--text-soft); }
.crumb a { color: inherit; text-decoration: none; }
.crumb a:hover { color: var(--accent); }

/* ---------- shipping notice strip ---------- */
.ship-strip {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  margin-top: 1.6rem; padding: 1rem 1.3rem; color: inherit;
  background: color-mix(in srgb, var(--aqua) 8%, var(--card));
  border: 1px solid color-mix(in srgb, var(--aqua) 35%, var(--hairline));
  border-radius: var(--radius); transition: border-color 0.15s ease, transform 0.15s ease;
}
.ship-strip .ts-ico { font-size: 1.6rem; }
.ship-strip .ts-copy { flex: 1; min-width: 220px; font-size: 0.88rem; color: var(--text-soft); }
.ship-strip .ts-copy b { display: block; color: var(--text); font-size: 0.98rem; }
.ship-strip .ts-cta { font-weight: 800; font-size: 0.9rem; color: var(--accent); white-space: nowrap; }

/* ---------- checkout ---------- */
.co-grid { display: grid; grid-template-columns: 1fr 0.85fr; gap: 2rem; align-items: start; padding: 2rem 0 4rem; }
@media (max-width: 860px) { .co-grid { grid-template-columns: 1fr; } }
.co-card { background: var(--card); border: 1px solid var(--hairline); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem 1.6rem; }
.co-card h2 { font-size: 1.2rem; }
.field { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
.field label { font-size: 0.82rem; font-weight: 700; color: var(--text-soft); }
.field input, .field select {
  font: inherit; padding: 0.7rem 0.9rem; border-radius: 10px;
  border: 1px solid var(--hairline); background: var(--bg); color: var(--text);
}
.field input:focus { outline: 2px solid var(--aqua); border-color: transparent; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.co-summary .cline:last-of-type { border-bottom: 0; }
.co-totals { border-top: 1px solid var(--hairline); padding-top: 1rem; display: grid; gap: 0.4rem; font-size: 0.92rem; }
.co-totals div { display: flex; justify-content: space-between; }
.co-totals .grand { font-weight: 800; font-size: 1.15rem; margin-top: 0.4rem; }
.pay-btn { width: 100%; justify-content: center; margin-top: 1.2rem; font-size: 1.05rem; }
.pay-btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 0.4rem; font-size: 0.78rem; color: var(--text-soft); margin-top: 0.8rem; }

/* The order email — shown after "Email my order", with the text to copy
   for a device that has no email app. */
.pay-box {
  text-align: left; background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem 1.5rem;
  margin: 1.6rem 0; display: grid; gap: 0.9rem; justify-items: center;
}
.pay-box .form-note { margin: 0; justify-self: start; }
.order-text {
  white-space: pre-wrap; word-break: break-word; text-align: left; justify-self: stretch;
  font-size: 0.82rem; line-height: 1.5; margin: 0;
  padding: 0.8rem 1rem; border-radius: 10px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hairline);
  max-height: 18rem; overflow: auto;
}

.success-panel { text-align: center; max-width: 560px; margin: 3rem auto 5rem; }
.success-panel .big { font-size: 3.6rem; }
.dl-list { text-align: left; margin: 1.6rem 0; display: grid; gap: 0.6rem; }
.dl-item { display: flex; align-items: center; gap: 0.8rem; background: var(--card); border: 1px solid var(--hairline); border-radius: 12px; padding: 0.8rem 1rem; }
.dl-item .fico { width: 38px; height: 38px; border-radius: 9px; background: var(--grad-aqua); display: grid; place-items: center; }
.dl-item b { flex: 1; font-size: 0.92rem; }

.form-note { font-size: 0.78rem; color: var(--text-soft); margin-top: 0.45rem; }
