/* ============================================================
   Aquamarine — Product detail (central content only)
   Single responsive layout. No header / footer.
   Brand accent: #3DD0E6
   ============================================================ */

:root {
  --aq-cyan:        #3DD0E6;
  --aq-cyan-deep:   #28b9d0;
  --aq-cyan-soft:   #e6f9fc;
  --aq-cyan-border: #c6eff6;

  --aq-ink:         #0f1a24;
  --aq-ink-soft:    #2a3744;
  --aq-muted:       #7c8a96;
  --aq-muted-2:     #b6c2cd;

  --aq-line:        #e7ecf0;
  --aq-line-2:      #f1f4f7;
  --aq-bg:          #ffffff;
  --aq-bg-soft:     #f7f9fb;

  --aq-success:     #22a06b;
  --aq-warn:        #c75500;
  --aq-warn-bg:     #fff0e5;

  --aq-serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --aq-sans:  "Inter", "Helvetica Neue", Arial, sans-serif;

  --aq-shadow-card: 0 1px 2px rgba(15,26,36,.04), 0 8px 24px rgba(15,26,36,.05);
  --aq-shadow-cyan: 0 8px 20px rgba(61,208,230,.35);

  --aq-r-sm: 8px;
  --aq-r-md: 14px;
  --aq-r-lg: 22px;
  --aq-r-pill: 999px;
}

/* ============ Wrapper ============ */
.ap-product * { box-sizing: border-box; }

.ap-product {
  font-family: var(--aq-sans);
  color: var(--aq-ink);
  background: var(--aq-bg);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 80px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.45;
}
.ap-product h1, .ap-product h2, .ap-product h3,
.ap-product .ap-serif {
  font-family: var(--aq-serif);
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* ============ Breadcrumbs ============ */
.ap-crumbs {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--aq-muted);
  padding: 24px 0 16px;
}
.ap-crumbs a { color: var(--aq-muted); text-decoration: none; transition: color .15s; }
.ap-crumbs a:hover { color: var(--aq-cyan-deep); }
.ap-crumbs .ap-sep { color: var(--aq-muted-2); }
.ap-crumbs .ap-current { color: var(--aq-ink); }

/* ============ Hero (gallery + info) ============ */
.ap-hero {
  display: grid;
  grid-template-columns: minmax(0,1.05fr) minmax(0,0.95fr);
  gap: 48px;
  padding-bottom: 56px;
}

/* ---- Gallery ---- */
.ap-gallery {
  display: flex;
  gap: 16px;
}
.ap-thumbs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 0 0 88px;
}
.ap-thumb {
  width: 88px;
  height: 88px;
  border-radius: var(--aq-r-sm);
  border: 1px solid var(--aq-line);
  background: var(--aq-bg-soft);
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
  position: relative;
}
.ap-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ap-thumb:hover { border-color: var(--aq-cyan-border); }
.ap-thumb.is-active {
  border-color: var(--aq-cyan);
  box-shadow: 0 0 0 3px var(--aq-cyan-soft);
}

.ap-main-image {
  flex: 1;
  position: relative;
  background: var(--aq-bg-soft);
  border-radius: var(--aq-r-md);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  cursor: zoom-in;
}
.ap-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.ap-main-image:hover img { transform: scale(1.04); }

.ap-badge-discount {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--aq-cyan);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--aq-r-pill);
  letter-spacing: .03em;
  z-index: 2;
}
.ap-zoom-btn {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  display: grid;
  place-items: center;
  color: var(--aq-ink);
  cursor: pointer;
  box-shadow: var(--aq-shadow-card);
  z-index: 2;
}
.ap-image-counter {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-size: 12px;
  color: var(--aq-muted);
  background: rgba(255,255,255,.88);
  padding: 4px 10px;
  border-radius: var(--aq-r-pill);
  z-index: 2;
}

/* ---- Info panel ---- */
.ap-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.ap-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--aq-muted);
  flex-wrap: wrap;
}
.ap-brand {
  color: var(--aq-cyan-deep);
  font-weight: 700;
  letter-spacing: .06em;
}
.ap-sku { font-variant-numeric: tabular-nums; }
.ap-sku b { color: var(--aq-ink); font-weight: 600; }

.ap-title {
  font-size: 34px;
  line-height: 1.15;
  color: var(--aq-ink);
  margin: 0;
}

.ap-rating-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--aq-muted);
}
.ap-stars {
  color: var(--aq-cyan);
  letter-spacing: 2px;
}
.ap-rating-row a {
  color: var(--aq-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Stock pill */
.ap-stock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--aq-success);
  background: #eaf7f0;
  padding: 6px 12px;
  border-radius: var(--aq-r-pill);
  width: max-content;
}
.ap-stock .ap-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aq-success);
}
.ap-stock.is-out { color: var(--aq-warn); background: var(--aq-warn-bg); }
.ap-stock.is-out .ap-dot { background: var(--aq-warn); }

/* Price */
.ap-price-block {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  padding: 6px 0;
}
.ap-price {
  font-family: var(--aq-serif);
  font-size: 42px;
  color: var(--aq-cyan-deep);
  letter-spacing: -0.01em;
  font-weight: 500;
  line-height: 1;
}
.ap-price-old {
  color: var(--aq-muted);
  text-decoration: line-through;
  font-size: 18px;
}
.ap-price-save {
  background: var(--aq-warn-bg);
  color: var(--aq-warn);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--aq-r-pill);
  white-space: nowrap;
}

/* Options */
.ap-option-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ap-option-label {
  font-size: 13px;
  color: var(--aq-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ap-option-label .ap-selected {
  color: var(--aq-ink);
  text-transform: none;
  letter-spacing: 0;
  margin-left: 8px;
  font-weight: 600;
}
.ap-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ap-chip {
  border: 1px solid var(--aq-line);
  background: #fff;
  color: var(--aq-ink-soft);
  font-size: 13px;
  padding: 10px 16px;
  border-radius: var(--aq-r-pill);
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.ap-chip:hover { border-color: var(--aq-cyan-border); }
.ap-chip.is-active {
  border-color: var(--aq-cyan);
  background: var(--aq-cyan-soft);
  color: var(--aq-cyan-deep);
  font-weight: 600;
}
.ap-chip.is-disabled {
  color: var(--aq-muted-2);
  text-decoration: line-through;
  cursor: not-allowed;
}
.ap-chip.is-disabled:hover { border-color: var(--aq-line); }

.ap-swatches {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.ap-swatch {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #fff;
  outline: 1px solid var(--aq-line);
  cursor: pointer;
  transition: outline .15s, transform .15s;
  padding: 0;
}
.ap-swatch:hover { transform: scale(1.05); }
.ap-swatch.is-active { outline: 2px solid var(--aq-cyan); }

/* Qty + CTA row */
.ap-buy-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-top: 6px;
  flex-wrap: wrap;
}
.ap-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--aq-line);
  border-radius: var(--aq-r-pill);
  overflow: hidden;
  flex: 0 0 132px;
  background: #fff;
}
.ap-qty button {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 0;
  font-size: 18px;
  color: var(--aq-ink-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: inherit;
}
.ap-qty button:hover { color: var(--aq-cyan-deep); }
.ap-qty .ap-qty-val {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.ap-cta {
  flex: 1;
  background: var(--aq-cyan);
  color: #fff;
  border: none;
  border-radius: var(--aq-r-pill);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 16px 24px;
  box-shadow: var(--aq-shadow-cyan);
  transition: transform .12s, background .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  min-width: 200px;
}
.ap-cta:hover  { background: var(--aq-cyan-deep); }
.ap-cta:active { transform: translateY(1px); }

.ap-secondary-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.ap-icon-square {
  width: 52px;
  height: 52px;
  border: 1px solid var(--aq-line);
  border-radius: var(--aq-r-pill);
  display: grid;
  place-items: center;
  color: var(--aq-ink-soft);
  background: #fff;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  padding: 0;
}
.ap-icon-square:hover {
  border-color: var(--aq-cyan);
  color: var(--aq-cyan-deep);
}
.ap-icon-square.is-active {
  background: var(--aq-cyan-soft);
  border-color: var(--aq-cyan);
  color: var(--aq-cyan-deep);
}
.ap-buy-1click {
  flex: 1;
  width: auto;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 600;
  gap: 10px;
  min-width: 180px;
}

/* Trust */
.ap-trust {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  padding: 18px 0 4px;
  border-top: 1px solid var(--aq-line-2);
  margin-top: 6px;
}
.ap-trust-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--aq-ink-soft);
}
.ap-trust-item .ap-ico {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  background: var(--aq-cyan-soft);
  color: var(--aq-cyan-deep);
  border-radius: var(--aq-r-sm);
  display: grid;
  place-items: center;
}
.ap-trust-item .ap-ti-title {
  font-weight: 600;
  color: var(--aq-ink);
  margin-bottom: 2px;
}
.ap-trust-item .ap-ti-sub {
  color: var(--aq-muted);
  font-size: 12px;
  line-height: 1.4;
}

/* ============ Tabs ============ */
.ap-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--aq-line);
  overflow-x: auto;
  margin-bottom: 28px;
  scrollbar-width: none;
}
.ap-tabs::-webkit-scrollbar { display: none; }
.ap-tab {
  padding: 14px 22px;
  font-size: 14px;
  color: var(--aq-muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  font-weight: 500;
  font-family: inherit;
}
.ap-tab:hover { color: var(--aq-ink-soft); }
.ap-tab.is-active {
  color: var(--aq-cyan-deep);
  border-bottom-color: var(--aq-cyan);
  font-weight: 600;
}

/* ============ Details (description + spec) ============ */
.ap-section-title {
  font-family: var(--aq-serif);
  font-size: 32px;
  text-align: center;
  margin: 48px 0 28px;
  color: var(--aq-ink);
}
.ap-details {
  display: grid;
  grid-template-columns: minmax(0,1.2fr) minmax(0,1fr);
  gap: 48px;
}
.ap-description p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--aq-ink-soft);
  margin: 0 0 14px;
  text-wrap: pretty;
}
.ap-feat-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}
.ap-feat-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--aq-ink-soft);
  line-height: 1.5;
}
.ap-check {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--aq-cyan-soft);
  color: var(--aq-cyan-deep);
  display: grid;
  place-items: center;
  margin-top: 1px;
}

.ap-specs {
  background: var(--aq-bg-soft);
  border-radius: var(--aq-r-md);
  padding: 8px 24px;
  align-self: start;
}
.ap-spec-row {
  display: flex;
  padding: 14px 0;
  border-bottom: 1px dashed var(--aq-line);
  font-size: 14px;
  gap: 16px;
}
.ap-spec-row:last-child { border-bottom: none; }
.ap-spec-row .ap-spec-k {
  flex: 0 0 50%;
  color: var(--aq-muted);
}
.ap-spec-row .ap-spec-v {
  flex: 1;
  color: var(--aq-ink);
  font-weight: 500;
}

/* ============ Related products ============ */
.ap-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.ap-card {
  background: #fff;
  border: 1px solid var(--aq-line);
  border-radius: var(--aq-r-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.ap-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--aq-shadow-card);
}
.ap-card .ap-card-img {
  aspect-ratio: 1 / 1;
  background: var(--aq-bg-soft);
  position: relative;
  overflow: hidden;
}
.ap-card .ap-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ap-card .ap-fav-mini {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--aq-muted);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  cursor: pointer;
}
.ap-card .ap-fav-mini:hover { color: var(--aq-cyan-deep); }
.ap-card .ap-card-meta {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ap-card .ap-card-name {
  font-size: 14px;
  color: var(--aq-ink);
  font-weight: 500;
  line-height: 1.35;
  min-height: 38px;
}
.ap-card .ap-card-sku {
  font-size: 11px;
  color: var(--aq-muted);
}
.ap-card .ap-card-sku b {
  color: var(--aq-ink-soft);
  font-weight: 600;
}
.ap-card .ap-card-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-top: 4px;
  flex-wrap: wrap;
}
.ap-card .ap-card-pr {
  font-family: var(--aq-serif);
  font-size: 20px;
  color: var(--aq-cyan-deep);
  font-weight: 500;
}
.ap-card .ap-card-pr-old {
  text-decoration: line-through;
  color: var(--aq-muted);
  font-size: 13px;
}

/* ============ Mobile sticky buy bar (only visible on mobile) ============ */
.ap-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--aq-line-2);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom,0));
  gap: 10px;
  align-items: center;
  z-index: 100;
  box-shadow: 0 -4px 16px rgba(15,26,36,.06);
}
.ap-mobile-bar .ap-mb-prs {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.ap-mobile-bar .ap-mb-now {
  font-family: var(--aq-serif);
  font-size: 20px;
  color: var(--aq-cyan-deep);
  font-weight: 500;
}
.ap-mobile-bar .ap-mb-was {
  font-size: 11px;
  color: var(--aq-muted);
  text-decoration: line-through;
}
.ap-mobile-bar .ap-cta {
  min-width: 0;
  padding: 14px 16px;
  font-size: 13px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 960px) {
  .ap-product { padding: 0 20px 100px; }
  .ap-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 32px;
  }
  .ap-gallery { flex-direction: column-reverse; }
  .ap-thumbs {
    flex-direction: row;
    flex: 0 0 auto;
    overflow-x: auto;
    padding-bottom: 4px;
    gap: 8px;
    scrollbar-width: none;
  }
  .ap-thumbs::-webkit-scrollbar { display: none; }
  .ap-thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
  }
  .ap-title { font-size: 24px; line-height: 1.2; }
  .ap-price { font-size: 30px; }
  .ap-price-old { font-size: 15px; }
  .ap-details {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .ap-section-title { font-size: 24px; margin: 32px 0 20px; }
  .ap-related-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ap-trust { grid-template-columns: 1fr; gap: 12px; }
  .ap-card .ap-card-name { font-size: 13px; min-height: 34px; }
  .ap-card .ap-card-pr { font-size: 17px; }
  .ap-tabs { gap: 0; }
  .ap-tab { padding: 12px 16px; font-size: 13px; }
  .ap-mobile-bar { display: flex; }

  /* Hide the desktop CTA row on mobile in favour of sticky bar */
  .ap-buy-row .ap-cta { font-size: 14px; padding: 14px 16px; min-width: 0; }
  .ap-buy-1click { min-width: 0; }
  .ap-secondary-btns { width: 100%; }
  .ap-icon-square { width: 46px; height: 46px; }

  .ap-main-image { border-radius: var(--aq-r-sm); }
  .ap-zoom-btn   { width: 36px; height: 36px; right: 12px; bottom: 12px; }
}

@media (max-width: 480px) {
  .ap-product { padding: 0 14px 100px; }
  .ap-crumbs  { font-size: 11px; padding: 16px 0 10px; gap: 6px; }
  .ap-title   { font-size: 22px; }
  .ap-chip    { padding: 8px 14px; font-size: 12px; }
  .ap-swatch  { width: 38px; height: 38px; }
  .ap-cta     { font-size: 13px; letter-spacing: .03em; }
  .ap-related-grid { gap: 10px; }
  .ap-card .ap-card-meta { padding: 10px 12px 12px; }
  .ap-specs { padding: 4px 16px; }
  .ap-spec-row { font-size: 13px; padding: 12px 0; gap: 12px; }
}
