/* ================================================================
   Omid Home — Product Configurator CSS v3
   Layout: vertical thumbs left | main image | sticky config panel right
   Style: Omid brand (--font-display, --font-mono, --accent orange)
   All config options visible at once — no hidden accordions on right
================================================================ */

/* Reset inside cpg-wrap */
.cpg-wrap * { box-sizing: border-box; }
.cpg-wrap button { font-family: inherit; }

/* ─ Page wrap ────────────────────────────────────────────────── */
.cpg-wrap {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 32px 100px;
}
@media (max-width: 768px) { .cpg-wrap { padding: 0 16px 60px; } }

/* ─ Breadcrumb ─────────────────────────────────────────────── */
.cpg-crumb {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 20px 0 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}
.cpg-crumb a { color: var(--muted); text-decoration: none; }
.cpg-crumb a:hover { color: var(--accent); }
.cpg-crumb .sep { margin: 0 6px; opacity: 0.4; }
.cpg-crumb .now { color: var(--ink); }

/* ─ Main two-column grid ───────────────────────────────────────── */
.cpg-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 56px;
  align-items: start;
  padding-top: 28px;
}
@media (max-width: 1100px) { .cpg-layout { grid-template-columns: 1fr 360px; gap: 36px; } }
@media (max-width: 860px)  { .cpg-layout { grid-template-columns: 1fr; } }

/* ─ LEFT: gallery block ──────────────────────────────────────── */
.cpg-left { min-width: 0; }

/* Gallery: thumbs column left, big image right */
.cpg-gallery {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
}
@media (max-width: 480px) { .cpg-gallery { grid-template-columns: 60px 1fr; gap: 8px; } }

/* Vertical thumb strip */
.cpg-thumbs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cpg-thumb {
  width: 80px;
  height: 80px;
  background: var(--bg-warm, #f5f0e8);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color .15s;
  overflow: hidden;
  padding: 0;
  flex-shrink: 0;
  display: block;
}
.cpg-thumb.active { border-color: var(--ink); }
.cpg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cpg-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-warm, #f0ebe0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
@media (max-width: 480px) { .cpg-thumb { width: 60px; height: 60px; } }

/* Main image */
.cpg-main-img {
  background: var(--bg-warm, #f5f0e8);
  aspect-ratio: 1 / 1.1;
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
}
.cpg-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.cpg-main-img:hover img { transform: scale(1.04); }
.cpg-img-note {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 8px;
  text-align: center;
}

/* Left info block (below gallery) */
.cpg-product-intro {
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.cpg-product-intro h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.025em;
  font-weight: 400;
  margin: 0 0 16px;
  color: var(--ink);
}
.cpg-product-intro p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.75;
  margin: 0 0 12px;
}

/* Accordion (left column, below description) */
.cpg-accord { border-top: 1px solid var(--line); margin-top: 32px; }
.cpg-accord-item { border-bottom: 1px solid var(--line); }
.cpg-accord-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 16px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}
.cpg-accord-btn .arr { transition: transform .2s; font-size: 12px; color: var(--muted); }
.cpg-accord-item.open .cpg-accord-btn .arr { transform: rotate(180deg); }
.cpg-accord-body {
  padding: 0 0 16px;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.7;
  display: none;
}
.cpg-accord-item.open .cpg-accord-body { display: block; }

/* ─ RIGHT: sticky config panel ────────────────────────────────── */
.cpg-right { min-width: 0; }

.cpg-panel {
  position: sticky;
  top: 96px;
}
@media (max-width: 860px) { .cpg-panel { position: static; } }

/* Product identity */
.cpg-panel-id {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.cpg-panel-code {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 6px;
}
.cpg-panel-name {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: -0.025em;
  font-weight: 400;
  margin: 0 0 4px;
  color: var(--ink);
  line-height: 1.1;
}

/* —— Config section: HEADING —— */
.cpg-section {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.cpg-section:last-of-type { border-bottom: none; }
.cpg-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cpg-section-label strong {
  font-family: var(--font-sans, sans-serif);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
}

/* Heading row — single selected row like Dekoria */
.cpg-heading-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  cursor: pointer;
  background: var(--bg-soft, #f8f5f0);
  transition: border-color .15s;
}
.cpg-heading-row:hover { border-color: var(--ink); }
.cpg-heading-icon { width: 36px; height: 36px; flex-shrink: 0; }
.cpg-heading-text { flex: 1; }
.cpg-heading-text .ht { font-size: 13px; font-weight: 600; color: var(--ink); }
.cpg-heading-text .hs { font-family: var(--font-mono); font-size: 10px; color: var(--muted); margin-top: 2px; }
.cpg-heading-change { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); text-decoration: underline; cursor: pointer; white-space: nowrap; }

/* Heading picker (shown on click) */
.cpg-heading-picker { display: none; margin-top: 10px; }
.cpg-heading-picker.open { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cpg-htile {
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  padding: 10px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color .15s;
  text-align: left;
}
.cpg-htile:hover { border-color: var(--ink); }
.cpg-htile.active { border-color: var(--accent); background: var(--bg-soft, #f8f5f0); }
.cpg-htile.active::before { display: none; } /* no pseudo needed */
.cpg-htile svg { width: 28px; height: 28px; flex-shrink: 0; }
.cpg-htile .ht { font-size: 12px; font-weight: 600; color: var(--ink); }
.cpg-htile .hs { font-family: var(--font-mono); font-size: 9px; color: var(--muted); }

/* —— Dimensions —— */
.cpg-dim-note {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 8px 10px;
  background: var(--bg-soft, #f8f5f0);
  border-left: 2px solid var(--accent);
}
.cpg-dims { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cpg-dim-field {
  border: 1px solid var(--line);
  background: var(--bg);
  transition: border-color .15s;
}
.cpg-dim-field:focus-within { border-color: var(--ink); }
.cpg-dim-field-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 0;
}
.cpg-dim-lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 3px;
}
.cpg-dim-steppers {
  display: flex;
  flex-direction: column;
}
.cpg-dim-steppers button {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.2;
  padding: 1px 4px;
  transition: color .1s;
}
.cpg-dim-steppers button:hover { color: var(--ink); }
.cpg-dim-input-wrap {
  display: flex;
  align-items: baseline;
  padding: 2px 10px 8px;
  gap: 4px;
}
.cpg-dim-input {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  width: 80px;
  padding: 0;
  -moz-appearance: textfield;
}
.cpg-dim-input::-webkit-outer-spin-button,
.cpg-dim-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cpg-dim-unit {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}
.cpg-dim-hint {
  padding: 0 10px 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* —— Fabric swatches —— */
.cpg-fab-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.cpg-fab-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
  padding: 2px;
  background: none;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cpg-fab-dot:hover { transform: scale(1.1); }
.cpg-fab-dot.active { border-color: var(--ink); }
.cpg-fab-dot-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}
.cpg-fab-dot-inner svg { width: 100%; height: 100%; display: block; }
.cpg-fab-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  margin-top: 4px;
}
.cpg-fab-selected { font-size: 13px; font-weight: 500; color: var(--ink); }
.cpg-fab-price { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* —— Lining —— */
.cpg-lining-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cpg-ltile {
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color .15s;
  position: relative;
  text-align: left;
}
.cpg-ltile:hover { border-color: var(--ink); }
.cpg-ltile.active { border-color: var(--accent); background: var(--bg-soft, #f8f5f0); }
.cpg-ltile.active::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
}
.cpg-ltile .lt { font-size: 12px; font-weight: 600; color: var(--ink); }
.cpg-ltile .ls { font-family: var(--font-mono); font-size: 9px; color: var(--muted); }
.cpg-ltile .lp { font-family: var(--font-mono); font-size: 10px; color: var(--accent); margin-top: 2px; }

/* —— Pole finish —— */
.cpg-pole-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cpg-pole-btn {
  border: 2px solid transparent;
  background: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: border-color .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 60px;
}
.cpg-pole-btn:hover { border-color: var(--ink-2); }
.cpg-pole-btn.active { border-color: var(--ink); }
.cpg-pole-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
}
.cpg-pole-lbl {
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
}

/* —— Price box —— */
.cpg-price-box {
  background: var(--ink);
  color: #fff;
  padding: 20px 24px;
  margin-top: 4px;
}
.cpg-price-lines { margin-bottom: 16px; }
.cpg-price-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
}
.cpg-price-line.total {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 8px;
  padding-top: 12px;
  font-family: var(--font-sans, sans-serif);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
}
.cpg-price-line.total .amount {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1;
}
.cpg-panel-sublabel {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 2px;
}

/* Qty + add */
.cpg-qty-add {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px;
  align-items: stretch;
}
.cpg-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,0.25);
  height: 52px;
  padding: 0 2px;
}
.cpg-qty button {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  color: rgba(255,255,255,0.7);
  width: 30px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s;
}
.cpg-qty button:hover { color: #fff; }
.cpg-qty-num {
  font-family: var(--font-display);
  font-size: 18px;
  color: #fff;
  min-width: 20px;
  text-align: center;
}
.cpg-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  height: 52px;
  transition: background .2s;
  padding: 0 16px;
}
.cpg-add-btn:hover { background: #d44d00; }

/* Secondary actions */
.cpg-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.cpg-sec-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: none;
  color: rgba(255,255,255,0.65);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-decoration: none;
  transition: color .15s, border-color .15s;
  text-align: center;
}
.cpg-sec-btn:hover { color: #fff; border-color: rgba(255,255,255,0.5); }

/* Trust strip */
.cpg-trust-strip {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.cpg-trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
}
.cpg-trust-item svg { color: var(--accent); flex-shrink: 0; }
