/* ============================================================================
   ATELIER CASABLANCA — Official Google <model-viewer> Luxury AR Studio
   Warm Sand / Walnut / Gold Theme | Synchronous Native AR | Zero Image Overlap
   ============================================================================ */

.ar-studio {
  --ar-bg: #F7F4EE;
  --ar-surface: #FFFFFF;
  --ar-stage: #EAE6DD;
  --ar-walnut: #1C1714;
  --ar-gold: #C29A5E;
  --ar-gold-hi: #E6C792;
  --ar-sienna: #A65E3A;
  --ar-ink: #1D1815;
  --ar-muted: #655C53;
  --ar-border: rgba(28, 23, 20, 0.10);
  --ar-radius: 22px;
  color: var(--ar-ink);
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.ar-studio *,
.ar-studio *::before,
.ar-studio *::after {
  box-sizing: border-box;
}

.ar-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  background: var(--ar-surface);
  border: 1px solid var(--ar-border);
  border-radius: 28px;
  padding: 16px;
  box-shadow: 0 22px 60px rgba(28, 23, 20, 0.08);
}

@media (min-width: 900px) {
  .ar-shell {
    grid-template-columns: minmax(0, 1.12fr) minmax(330px, 0.88fr);
    gap: 28px;
    padding: 26px;
    align-items: start;
  }
}

.ar-visual-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.ar-stage-frame {
  position: relative;
  width: 100%;
  height: 410px;
  border-radius: var(--ar-radius);
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #F5F2EB 0%, #E5E0D5 72%, #D9D3C7 100%);
  border: 1px solid var(--ar-border);
}

@media (min-width: 640px) {
  .ar-stage-frame { height: 470px; }
}

@media (min-width: 900px) {
  .ar-stage-frame { height: 530px; }
}

.ar-mv {
  width: 100%;
  height: 100%;
  display: block;
  --poster-color: transparent;
  --progress-bar-color: #C29A5E;
  --progress-bar-height: 3px;
  outline: none;
}

/* Hide floating slot button inside 3D viewport because our dedicated synchronous AR CTA sits cleanly below */
.ar-slot-btn {
  display: none !important;
}

.ar-slot-btn svg {
  width: 18px;
  height: 18px;
  color: #E6C792;
  flex-shrink: 0;
}

.ar-stage-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--ar-muted);
  padding: 2px 4px;
  flex-wrap: wrap;
}

.ar-stage-caption-dim {
  color: var(--ar-sienna);
  font-weight: 800;
  font-size: 0.78rem;
}

.ar-angles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.ar-angle-btn {
  appearance: none;
  background: var(--ar-bg);
  border: 1px solid var(--ar-border);
  color: var(--ar-walnut);
  border-radius: 12px;
  padding: 9px 4px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  line-height: 1.25;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ar-angle-btn.is-active {
  background: var(--ar-walnut);
  border-color: var(--ar-walnut);
  color: #F7F4EE;
}

/* Direct Synchronous Native AR Launch Button (Outside Viewport — Zero Async Blocking!) */
.ar-primary-cta {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 18px;
  border-radius: 14px;
  border: none;
  background: var(--ar-walnut);
  color: #F7F4EE;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(28, 23, 20, 0.22);
  transition: transform 0.16s ease, background 0.2s ease;
  text-align: center;
  line-height: 1.3;
}

.ar-primary-cta:hover {
  background: #000000;
}

.ar-primary-cta svg {
  width: 20px;
  height: 20px;
  color: var(--ar-gold-hi);
  flex-shrink: 0;
}

/* Native Apple iOS Quick Look anchor (only shown on iOS as a true synchronous <a rel="ar">) */
.ar-ios-link {
  display: none;
}

.ar-ios-link img {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ar-inapp-banner {
  display: none;
  flex-direction: column;
  gap: 8px;
  background: #FFF9EE;
  border: 1.5px solid var(--ar-gold);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.83rem;
  color: var(--ar-walnut);
  line-height: 1.5;
}

.ar-inapp-banner.is-visible {
  display: flex;
}

.ar-inapp-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ar-inapp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ar-walnut);
  color: #F7F4EE;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* Desktop QR Drawer */
.ar-qr-drawer {
  display: none;
  flex-direction: column;
  gap: 12px;
  background: var(--ar-bg);
  border: 1px solid var(--ar-border);
  border-radius: 16px;
  padding: 16px;
}

.ar-qr-drawer.is-open {
  display: flex;
}

.ar-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ar-drawer-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ar-walnut);
}

.ar-drawer-close {
  appearance: none;
  background: var(--ar-surface);
  border: 1px solid var(--ar-border);
  color: var(--ar-walnut);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 700;
}

.ar-qr-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}

@media (max-width: 480px) {
  .ar-qr-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

.ar-qr-box {
  width: 120px;
  height: 120px;
  background: #FFFFFF;
  border: 1px solid var(--ar-border);
  border-radius: 12px;
  padding: 8px;
}

.ar-qr-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ar-qr-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--ar-muted);
  line-height: 1.5;
}

/* Right Column Controls */
.ar-controls-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.ar-panel-box {
  background: var(--ar-bg);
  border: 1px solid var(--ar-border);
  border-radius: 18px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ar-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ar-panel-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ar-walnut);
}

.ar-sync-pill {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ar-sienna);
  background: #EAE1D3;
  padding: 3px 10px;
  border-radius: 999px;
}

.ar-finish-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.ar-finish-card {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 13px;
  background: var(--ar-surface);
  border: 1.5px solid var(--ar-border);
  color: var(--ar-walnut);
  font-family: inherit;
  text-align: start;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 0;
}

.ar-finish-card.is-selected {
  border-color: var(--ar-walnut);
  box-shadow: 0 8px 20px rgba(28, 23, 20, 0.10);
}

.ar-swatch-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(28, 23, 20, 0.18);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.4);
}

.ar-finish-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.ar-finish-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ar-walnut);
  line-height: 1.25;
}

.ar-finish-tag {
  font-size: 0.7rem;
  color: var(--ar-muted);
}

.ar-led-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ar-led-sub {
  font-size: 0.76rem;
  color: var(--ar-muted);
  display: block;
  margin-top: 2px;
}

.ar-led-toggle {
  appearance: none;
  padding: 9px 15px;
  border-radius: 999px;
  border: none;
  background: var(--ar-gold);
  color: #110E0C;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

.ar-led-toggle.is-off {
  background: #8B847C;
  color: #FFFFFF;
}

.ar-order-cta {
  appearance: none;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, #25D366 0%, #1CA951 100%);
  color: #06180C;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.24);
}

.ar-spec-note {
  margin: 0;
  font-size: 0.79rem;
  line-height: 1.58;
  color: var(--ar-muted);
}
