@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Jost:wght@200;300;400;500;600;700&display=swap");

/* ═══════════════════════════════════════════════════════════════════════════
   SHARED BASE — loaded by every page
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Design tokens ───────────────────────────────────────────────────────── */
/* These are the Oceanside Alloy defaults and act as CSS fallbacks.           */
/* applyTheme() (called in each page's module script) overrides them at       */
/* runtime with the active client's values from app/clients/<slug>/theme.js. */

:root {
  --teal:       #3d5a5e;
  --teal-dk:    #2c4347;
  --teal-mid:   #4e7175;
  --teal-light: #e8f0f1;
  --teal-pale:  #f2f6f7;
  --sand:       #f7f4ef;
  --white:      #ffffff;
  --dark:       #1c2426;
  --mid:        #4a5c5e;
  --muted:      #8a9e9f;
  --border:     #d8e4e5;
  --border-lt:  #eaf0f1;
  --red:        #c0392b;
  --green:      #2d6a4f;
  --amber:      #c87e00;
  --radius:     2px;

  /* Font tokens — set by applyTheme(); fallbacks match Oceanside defaults. */
  --font-body:    'Jost', sans-serif;
  --font-display: 'Cormorant Garamond', serif;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Base ────────────────────────────────────────────────────────────────── */

body {
  font-family: var(--font-body);
  background: var(--sand);
  color: var(--dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
  display: flex;
  align-items: center;
  height: 72px;
  flex-shrink: 0;
}

.oa-logo img:not(.client-logo) { height: 26px; width: auto; }

/* Standard class for client logos in headers, panels, and carts */
.client-logo { max-height: 48px; max-width: 200px; width: auto; height: auto; object-fit: contain; }

.header-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
  margin: 0 24px;
}

.header-sub {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 300;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 400;
}

/* Wrapper that spaces the back link away from the subtitle */
.header-back { margin-left: 16px; }

.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--white);
  transition: border-color 0.15s, color 0.15s;
}

.btn-home:hover {
  border-color: var(--teal);
  color: var(--teal);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.page-footer {
  background: var(--teal-dk);
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.page-footer span {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 400;
}

.footer-logo {
  height: 28px;
  width: auto;
  opacity: 0.55;
}

/* ── Shared responsive ───────────────────────────────────────────────────── */

@media (max-width: 640px) {
  header { padding: 0 20px; }
  .header-right { display: none; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   INDEX PAGE — product catalogue
   ═══════════════════════════════════════════════════════════════════════════ */

.page {
  max-width: 1080px;
  margin: 40px auto;
  padding: 0 24px;
  flex: 1;
}

/* ── Hero section (full-bleed dark teal) ─────────────────────────────────── */

.page-hero {
  background: var(--teal-dk);
  padding: 52px 0 44px;
  width: 100%;
  flex-shrink: 0;
}

.page-hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.page-hero-eyebrow {
  font-size: 0.62rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.5px;
  margin-bottom: 18px;
  line-height: 1;
}

.page-hero-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 300;
  line-height: 1.75;
  max-width: 560px;
  margin: 0 auto 32px;
}

.page-hero-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-step-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-step-text {
  font-size: 0.62rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ── Request a Quote CTA bar ─────────────────────────────────────────────── */

.quote-cta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--teal-dk);
  margin-bottom: 16px;
}

.quote-cta-msg {
  font-size: 0.78rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
}

.quote-cta-btn {
  padding: 10px 22px;
  background: var(--white);
  color: var(--teal-dk);
  border: none;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.quote-cta-btn:hover { background: var(--teal-light); }

/* ── Product grid ─────────────────────────────────────────────────────────── */

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.loading-msg {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 300;
}

/* ── Product card ─────────────────────────────────────────────────────────── */

.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.product-card:hover {
  border-color: var(--teal-mid);
  box-shadow: 0 2px 12px rgba(44, 67, 71, 0.08);
}

.product-card-head {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-lt);
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-card-head h2 {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--teal);
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.product-card-badge {
  background: var(--teal-light);
  color: var(--teal);
  font-size: 0.58rem;
  font-weight: 600;
  padding: 3px 8px;
  margin-left: auto;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.product-card-body {
  padding: 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card-desc {
  font-size: 0.79rem;
  color: var(--mid);
  line-height: 1.8;
  font-weight: 300;
  flex: 1;
}

.product-card-meta {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0.5px;
}

.product-card-from {
  font-size: 0.75rem;
  color: var(--teal);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.product-card-img {
  overflow: hidden;
  background: transparent;
  border-bottom: 1px solid var(--border-lt);
}

.product-card-img img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  display: block;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card-img img { transform: scale(1.03); }

.btn-configure {
  display: block;
  width: 100%;
  padding: 13px;
  background: var(--teal-dk);
  color: var(--white);
  border: none;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  margin-top: auto;
  transition: background 0.15s;
}

.btn-configure:hover { background: var(--teal-mid); }

/* ── Error state ──────────────────────────────────────────────────────────── */

.error-msg {
  font-size: 0.8rem;
  color: var(--red);
  font-weight: 300;
  line-height: 1.7;
}

/* ── Index responsive ────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .page { margin: 24px auto; }
  .product-grid { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   QUOTE CART — shared across index + product pages
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Cart FAB ─────────────────────────────────────────────────────────────── */

.cart-fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--teal-dk);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(44, 67, 71, 0.3);
  transition: background 0.15s, box-shadow 0.15s;
}

.cart-fab:hover {
  background: var(--teal-mid);
  box-shadow: 0 6px 28px rgba(44, 67, 71, 0.4);
}

.cart-fab--hidden { display: none; }

.cart-fab-badge {
  background: var(--white);
  color: var(--teal-dk);
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* ── Cart panel ───────────────────────────────────────────────────────────── */

.cart-panel {
  position: fixed;
  bottom: 0;
  right: 32px;
  z-index: 999;
  width: 380px;
  max-height: 80vh;
  background: var(--white);
  border: 1px solid var(--border);
  border-bottom: none;
  box-shadow: 0 -4px 32px rgba(44, 67, 71, 0.15);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-panel--open { transform: translateY(0); }

.cart-panel-head {
  background: var(--teal-dk);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.cart-panel-title {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--white);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.cart-panel-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px 6px;
  transition: color 0.15s;
}
.cart-panel-close:hover { color: var(--white); }

.cart-panel-body {
  overflow-y: auto;
  flex: 1;
}

.cart-items-list { padding: 4px 0; }

.cart-empty {
  padding: 24px 20px;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  font-weight: 300;
}

/* ── Cart items ───────────────────────────────────────────────────────────── */

.cart-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-lt);
}
.cart-item:last-child { border-bottom: none; }

.cart-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.cart-item-name {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cart-item-price {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--teal-dk);
  white-space: nowrap;
}

.cart-item-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}

.cart-item-summary span {
  font-size: 0.66rem;
  color: var(--muted);
  font-weight: 300;
}

.cart-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.6rem;
  color: var(--muted);
  font-family: var(--font-body);
  padding: 0;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: color 0.15s;
}
.cart-item-remove:hover { color: var(--red); }

.cart-item-name-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cart-item-reconfigure {
  font-size: 0.6rem;
  color: var(--teal);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.15s;
}
.cart-item-reconfigure:hover { color: var(--teal-mid); }

/* ── Cart handling fee + grand total ──────────────────────────────────────── */

.cart-handling-fee {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 20px 6px;
  border-top: 1px dashed var(--border);
  gap: 8px;
}

.cart-handling-label {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.cart-handling-price {
  font-size: 0.72rem;
  color: var(--mid);
  font-weight: 500;
  white-space: nowrap;
}

.cart-grand-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 20px 14px;
  gap: 8px;
}

.cart-grand-total-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cart-grand-total-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--teal-dk);
  white-space: nowrap;
}

/* ── Cart panel footer ────────────────────────────────────────────────────── */

.cart-panel-footer {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  flex-shrink: 0;
  background: var(--white);
}

.cart-customer-form {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-lt);
  margin-bottom: 0;
}

/* ── Cart indicative note ─────────────────────────────────────────────────── */

.cart-indicative-note {
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.5;
  text-align: center;
  margin-bottom: 10px;
}

.cart-customer-title {
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.cart-customer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.cart-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.cart-customer-grid .cart-field { margin-bottom: 0; }

.cart-field label {
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cart-field input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--dark);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 400;
  transition: border-color 0.15s;
}
.cart-field input:focus {
  outline: none;
  border-color: var(--teal-mid);
}

.cart-submit-btn {
  width: 100%;
  padding: 13px;
  background: var(--teal-dk);
  color: var(--white);
  border: none;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  margin-bottom: 8px;
  transition: background 0.15s;
}
.cart-submit-btn:not(:disabled):hover { background: var(--teal-mid); }
.cart-submit-btn:disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}

.cart-submit-status {
  font-size: 0.7rem;
  line-height: 1.5;
  display: none;
  padding: 8px 12px;
}
.cart-submit-status:not(:empty) { display: block; }
.cart-submit-status.status-ok {
  background: #eef5f0;
  border-left: 2px solid var(--green);
  color: var(--green);
}
.cart-submit-status.status-err {
  background: #fdf0ef;
  border-left: 2px solid var(--red);
  color: var(--red);
}

/* ── Cart status bar (index page only) ────────────────────────────────────── */

.cart-status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--teal-pale);
  border: 1px solid var(--border-lt);
  border-left: 3px solid var(--teal-mid);
  margin-bottom: 28px;
  font-size: 0.72rem;
  color: var(--mid);
  font-weight: 300;
  min-height: 40px;
}

.cart-status-msg { flex: 1; }

.cart-status-view {
  padding: 6px 14px;
  background: var(--teal-dk);
  color: var(--white);
  border: none;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.cart-status-view:hover { background: var(--teal-mid); }

/* ── Standard products section (index page) ───────────────────────────────── */

.standard-products-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-lt);
  margin-bottom: 16px;
}

.standard-products-subhead {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.products-section-heading {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin: 0;
  padding: 0;
  border: none;
}

/* ── Standard product image gallery ────────────────────────────────────────── */

.sp-gallery {
  position: relative;
  background: transparent;
  overflow: hidden;
  line-height: 0;
}

.sp-slides {
  display: flex;
  transition: none;
}

/* Scoped to .sp-gallery to beat .product-card-img img { display:block } (0,1,1)
   and .product-hero-img { display:block } (0,1,0) via higher specificity (0,2,0). */
.sp-gallery .sp-slide {
  display: none;
  width: 100%;
  height: 200px;
  object-fit: contain;
  flex-shrink: 0;
}

.sp-gallery .sp-slide--active {
  display: block;
}

.sp-dots {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.sp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.15s;
}

.sp-dot--active {
  background: #fff;
}

.sp-arrow-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 1;
  padding: 0;
}

.sp-arrow-btn:hover {
  background: rgba(0,0,0,0.6);
}

.sp-arrow-btn--prev { left: 6px; }
.sp-arrow-btn--next { right: 6px; }

/* ── Powder coat checkbox row ───────────────────────────────────────────────── */

.sp-powder-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  cursor: pointer;
}

.sp-powder-check {
  accent-color: var(--teal);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  cursor: pointer;
}

.sp-powder-label {
  font-size: 0.75rem;
  color: var(--body);
  line-height: 1.4;
}

.sp-powder-price {
  color: var(--teal);
  font-weight: 500;
}

/* ── Standard product powder coat colour input ───────────────────────────── */

.sp-powder-colour-row {
  margin-bottom: 8px;
  margin-top: 6px;
}

.sp-powder-colour-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--dark);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  transition: border-color 0.15s;
}

.sp-powder-colour-input:focus {
  outline: none;
  border-color: var(--teal-mid);
}

.sp-powder-colour-error {
  font-size: 0.65rem;
  color: var(--red);
  font-weight: 400;
  margin-top: 4px;
}

.product-card-price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--teal-dk);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.btn-add-to-quote {
  display: block;
  width: 100%;
  padding: 13px;
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--teal);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  margin-top: auto;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-add-to-quote:hover:not(:disabled) {
  background: var(--teal);
  color: var(--white);
}
.btn-add-to-quote:disabled {
  background: var(--teal-light);
  color: var(--teal-mid);
  border-color: var(--teal-light);
  cursor: default;
}

/* ── Cart success message (shown in panel body after submission) ─────────── */

.cart-success-msg {
  padding: 32px 20px;
  text-align: center;
}

.cart-success-msg p {
  font-size: 0.82rem;
  color: var(--teal-dk);
  font-weight: 400;
  line-height: 1.7;
}

.cart-success-msg p:first-child {
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

/* ── Cart responsive ─────────────────────────────────────────────────────── */

@media (max-width: 780px) {
  .product-grid    { grid-template-columns: 1fr; }
  .header-right    { display: none; }
  .cart-panel      { width: 100vw; right: 0; left: 0; border-radius: 0; }
  .page-hero-title { font-size: 2.2rem; }
  .page-hero-steps { gap: 8px; flex-direction: column; align-items: center; }
  .hero-step-box   { padding: 8px 12px; width: 100%; max-width: 280px; justify-content: center; }
  .quote-cta-bar   { flex-direction: column; align-items: flex-start; gap: 10px; }
}

@media (max-width: 480px) {
  .cart-fab { right: 16px; bottom: 16px; }
  .page     { margin: 24px auto; }
}
