/* MORDO HORIZON — unified light theme
   Light mode only. Dark theme and page structure remain unchanged. */

html[data-theme="light"] {
  color-scheme: light;
  --bg: #F3F5F7;
  --panel: #FFFFFF;
  --panel2: #E9EEF2;
  --ink: #202B38;
  --cream: #202B38;
  --muted: #647181;
  --body-copy: #526171;
  --line: #DCE2E8;
  --border: #DCE2E8;
  --card: #FFFFFF;
  --soft: #EAF0F3;
  --header-bg: rgba(255,255,255,.94);
  --top-bg: rgba(255,255,255,.96);
  --field-bg: #FFFFFF;
  --gold: #9A835C;
  --gold-light: #806B49;
  --accent: #176B67;
  --accent-hover: #105650;
  --accent-soft: #DCEAE7;
  --info-bg: #F3F5F7;
  --info-panel: #FFFFFF;
  --info-panel-soft: #EAF0F3;
  --info-gold: #176B67;
  --info-gold-bright: #105650;
  --info-ink: #202B38;
  --info-muted: #647181;
  --info-border: #DCE2E8;
}

html[data-theme="light"],
html[data-theme="light"] body {
  background-color: #F3F5F7;
  color: #202B38;
}

html[data-theme="light"] body {
  color: #202B38;
}

/* Shared header, navigation and footer — colours only. */
html[data-theme="light"] .site-header,
html[data-theme="light"] .commerce-header,
html[data-theme="light"] .top,
html[data-theme="light"] header.site-header {
  background-color: rgba(255,255,255,.96);
  border-color: #DCE2E8;
}

html[data-theme="light"] .site-footer,
html[data-theme="light"] footer {
  background-color: #E9EEF2;
  border-color: #DCE2E8;
  color: #202B38;
}

html[data-theme="light"] .site-header a,
html[data-theme="light"] .commerce-nav a,
html[data-theme="light"] .header-nav a,
html[data-theme="light"] .site-footer a,
html[data-theme="light"] footer a {
  color: #344456;
}

html[data-theme="light"] .site-header a:hover,
html[data-theme="light"] .commerce-nav a:hover,
html[data-theme="light"] .header-nav a:hover,
html[data-theme="light"] .site-footer a:hover,
html[data-theme="light"] footer a:hover {
  color: #176B67;
}

/* General cards and surfaces. */
html[data-theme="light"] .panel,
html[data-theme="light"] .card,
html[data-theme="light"] .product,
html[data-theme="light"] .product-card,
html[data-theme="light"] .cart-item,
html[data-theme="light"] .cart-summary,
html[data-theme="light"] .editor,
html[data-theme="light"] .viewer,
html[data-theme="light"] .product-body {
  background-color: #FFFFFF;
  color: #202B38;
  border-color: #DCE2E8;
}

/* Clear, accessible primary actions. */
html[data-theme="light"] .btn:not(.secondary),
html[data-theme="light"] .button,
html[data-theme="light"] .button.primary,
html[data-theme="light"] .btn-primary,
html[data-theme="light"] .primary-button,
html[data-theme="light"] .studio-shop,
html[data-theme="light"] .product-buy button.button,
html[data-theme="light"] .cart-summary button,
html[data-theme="light"] .cart-checkout,
html[data-theme="light"] .checkout-button {
  background: #176B67;
  background-color: #176B67;
  color: #FFFFFF;
  border-color: #176B67;
  border-radius: 10px;
  transition: background-color .2s ease, border-color .2s ease,
              color .2s ease, box-shadow .2s ease, transform .2s ease;
}

html[data-theme="light"] .btn:not(.secondary):hover,
html[data-theme="light"] .button:hover,
html[data-theme="light"] .btn-primary:hover,
html[data-theme="light"] .primary-button:hover,
html[data-theme="light"] .studio-shop:hover,
html[data-theme="light"] .product-buy button.button:hover,
html[data-theme="light"] .cart-summary button:hover,
html[data-theme="light"] .cart-checkout:hover,
html[data-theme="light"] .checkout-button:hover {
  background: #105650;
  background-color: #105650;
  border-color: #105650;
  color: #FFFFFF;
  box-shadow: 0 5px 16px rgba(16,86,80,.16);
}

/* Secondary actions retain a quiet, refined appearance. */
html[data-theme="light"] .btn.secondary,
html[data-theme="light"] .tools button,
html[data-theme="light"] button.secondary,
html[data-theme="light"] a.secondary {
  background: #FFFFFF;
  color: #176B67;
  border-color: #B8CFCC;
  border-radius: 10px;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

html[data-theme="light"] .btn.secondary:hover,
html[data-theme="light"] .tools button:hover,
html[data-theme="light"] button.secondary:hover,
html[data-theme="light"] a.secondary:hover {
  background: #DCEAE7;
  color: #105650;
  border-color: #176B67;
}

/* Homepage: make the custom-print CTA unmistakably readable. */
html[data-theme="light"] button[onclick="openCustomModal()"] {
  background: #176B67 !important;
  color: #FFFFFF !important;
  border-color: #176B67 !important;
  border-radius: 999px;
}

html[data-theme="light"] button[onclick="openCustomModal()"]:hover {
  background: #105650 !important;
  color: #FFFFFF !important;
  border-color: #105650 !important;
}

/* Studio controls and model workspace. */
html[data-theme="light"] .product-art,
html[data-theme="light"] .editor,
html[data-theme="light"] .panel,
html[data-theme="light"] .viewer,
html[data-theme="light"] .viewer-head,
html[data-theme="light"] .product-body {
  background-color: #FFFFFF;
  color: #202B38;
  border-color: #DCE2E8;
}

html[data-theme="light"] .field label,
html[data-theme="light"] .editor-title,
html[data-theme="light"] .viewer-head,
html[data-theme="light"] .hint,
html[data-theme="light"] .note,
html[data-theme="light"] .status {
  color: #526171;
}

html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea,
html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] .field textarea {
  background: #FFFFFF;
  color: #202B38;
  border-color: #C9D3DC;
  border-radius: 9px;
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #8491A0;
}

html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  outline: none;
  border-color: #176B67;
  box-shadow: 0 0 0 3px rgba(23,107,103,.13);
}

html[data-theme="light"] #stage {
  background: radial-gradient(ellipse at 50% 42%, #FFFFFF, #E8EEF1 78%);
  border-color: #DCE2E8;
}

html[data-theme="light"] .swatches,
html[data-theme="light"] .range {
  color: #344456;
}

html[data-theme="light"] .error {
  color: #A83232;
}

html[data-theme="light"] .success {
  color: #176B67;
}

/* Information pages: replace their fixed dark surfaces in light mode. */
html[data-theme="light"] {
  background: #F3F5F7 !important;
}

html[data-theme="light"] body {
  background: #F3F5F7 !important;
  background-image: none !important;
  color: #202B38 !important;
}

html[data-theme="light"] body > main,
html[data-theme="light"] main {
  color: #202B38;
}

html[data-theme="light"] body > main h1,
html[data-theme="light"] main h1,
html[data-theme="light"] main h2,
html[data-theme="light"] main h3,
html[data-theme="light"] main p,
html[data-theme="light"] main li,
html[data-theme="light"] main strong {
  color: #202B38;
}

html[data-theme="light"] .panel,
html[data-theme="light"] main .panel,
html[data-theme="light"] .info-panel {
  background: #FFFFFF !important;
  background-image: none !important;
  color: #202B38 !important;
  border-color: #DCE2E8 !important;
  box-shadow: 0 8px 28px rgba(32,43,56,.045);
}

html[data-theme="light"] .muted,
html[data-theme="light"] main .muted {
  color: #647181 !important;
}

html[data-theme="light"] .gold,
html[data-theme="light"] main .gold {
  color: #176B67 !important;
}

html[data-theme="light"] main a {
  color: #176B67;
}

html[data-theme="light"] main a:hover {
  color: #105650;
}

/* Theme toggle and keyboard focus remain clearly visible. */
html[data-theme="light"] .theme-toggle,
html[data-theme="light"] .cart-icon-link {
  color: #344456;
}

html[data-theme="light"] :focus-visible {
  outline: 3px solid rgba(23,107,103,.38);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="light"] *,
  html[data-theme="light"] *::before,
  html[data-theme="light"] *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* MORDO light-theme CTA and footer-link correction — 2026-11-29 */

/* Replace homepage gold-gradient action buttons with accessible solid teal. */
html[data-theme="light"] a.bg-gradient-to-r,
html[data-theme="light"] button.bg-gradient-to-r {
  background-image: none !important;
  background-color: #176B67 !important;
  color: #FFFFFF !important;
  border-color: #176B67 !important;
  text-shadow: none !important;
  box-shadow: 0 3px 10px rgba(23,107,103,.14) !important;
}

html[data-theme="light"] a.bg-gradient-to-r:hover,
html[data-theme="light"] button.bg-gradient-to-r:hover {
  background-image: none !important;
  background-color: #105650 !important;
  color: #FFFFFF !important;
  border-color: #105650 !important;
}

/* Keep primary custom-print actions styled as buttons inside main content. */
html[data-theme="light"] main button[onclick="openCustomModal()"] {
  background: #176B67 !important;
  color: #FFFFFF !important;
  border-color: #176B67 !important;
}

html[data-theme="light"] main button[onclick="openCustomModal()"]:hover {
  background: #105650 !important;
  color: #FFFFFF !important;
  border-color: #105650 !important;
}

/* Footer Custom Orders is a text link, not a teal CTA button. */
html[data-theme="light"] footer button[onclick="openCustomModal()"] {
  background: transparent !important;
  background-image: none !important;
  color: #344456 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  border-radius: 0 !important;
}

html[data-theme="light"] footer button[onclick="openCustomModal()"]:hover {
  background: transparent !important;
  color: #176B67 !important;
  border-color: transparent !important;
}

/* MORDO Custom Studio — light-theme product tile artwork background */
html[data-theme="light"] .product-art {
  background: radial-gradient(
    ellipse at center,
    #FFFFFF 0%,
    #F0F3F5 68%,
    #E8EDF1 100%
  ) !important;
  color: #176B67 !important;
  border-bottom: 1px solid #DCE2E8;
}

html[data-theme="light"] .product-art img {
  background: transparent !important;
}

/* MORDO Custom Studio — light-theme SCAD slider accent */
html[data-theme="light"] .field input[type="range"] {
  accent-color: #176B67 !important;
}

/* MORDO Custom Studio — clearer customisation field labels */
html[data-theme="light"] .field label,
html[data-theme="dark"] .field label {
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.45 !important;
  letter-spacing: 0.01em;
  margin-bottom: 9px !important;
}

/* ==========================================================
   MORDO CUSTOM STUDIO — CONSISTENT TYPOGRAPHY SYSTEM
   Applies to both themes; preserves existing layout.
   ========================================================== */

/* Main customisation control stack */
html[data-theme="light"] .controls #modelControls,
html[data-theme="dark"] .controls #modelControls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* SCAD parameter group headings */
html[data-theme="light"] #modelControls > .eyebrow,
html[data-theme="dark"] #modelControls > .eyebrow {
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  letter-spacing: 1.35px !important;
  margin: 9px 0 1px !important;
}

html[data-theme="light"] #modelControls > .eyebrow {
  color: #176B67 !important;
}

html[data-theme="dark"] #modelControls > .eyebrow {
  color: var(--gold) !important;
}

/* Field labels: Your text, Width, Height, etc. */
html[data-theme="light"] .controls #modelControls .field label,
html[data-theme="dark"] .controls #modelControls .field label,
html[data-theme="light"] #orderForm .field label,
html[data-theme="dark"] #orderForm .field label {
  display: block;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  letter-spacing: 0.005em !important;
  margin: 0 0 6px !important;
}

/* Input text and control height */
html[data-theme="light"] .controls #modelControls .field input:not([type="range"]),
html[data-theme="light"] .controls #modelControls .field select,
html[data-theme="light"] .controls #modelControls .field textarea,
html[data-theme="dark"] .controls #modelControls .field input:not([type="range"]),
html[data-theme="dark"] .controls #modelControls .field select,
html[data-theme="dark"] .controls #modelControls .field textarea {
  font-size: 14px !important;
  line-height: 1.35 !important;
  min-height: 42px;
}

/* Range values and minimum/maximum indicators */
html[data-theme="light"] #modelControls .range,
html[data-theme="dark"] #modelControls .range {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px !important;
  line-height: 1.35 !important;
  margin-top: 5px !important;
}

html[data-theme="light"] #modelControls .range strong,
html[data-theme="dark"] #modelControls .range strong {
  font-size: 12px !important;
  font-weight: 700 !important;
}

/* Supporting notes and helper text */
html[data-theme="light"] #modelControls .hint,
html[data-theme="dark"] #modelControls .hint {
  font-size: 11px !important;
  line-height: 1.5 !important;
  margin-top: 3px !important;
}

/* Configurator and submission section headings */
html[data-theme="light"] .editor-title .eyebrow,
html[data-theme="dark"] .editor-title .eyebrow,
html[data-theme="light"] #orderForm + .note,
html[data-theme="dark"] #orderForm + .note {
  line-height: 1.4;
}

html[data-theme="light"] .editor-title h2,
html[data-theme="dark"] .editor-title h2 {
  line-height: 1.2 !important;
  margin: 5px 0 0 !important;
}

/* Consistent action button typography */
html[data-theme="light"] #modelControls .btn,
html[data-theme="dark"] #modelControls .btn {
  font-size: 13px !important;
  line-height: 1.4 !important;
  padding: 12px 16px !important;
}

/* Keep the SCAD slider colours theme-specific */
html[data-theme="light"] #modelControls input[type="range"] {
  accent-color: #176B67 !important;
}

html[data-theme="dark"] #modelControls input[type="range"] {
  accent-color: var(--gold) !important;
}



/* MORDO HORIZON: footer contrast and mobile cart image refinement */
html[data-theme="light"] footer .footer-bottom-copy,
html[data-theme="light"] footer .footer-legal-copy {
  color: #344456 !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #344456 !important;
}
html[data-theme="dark"] footer .footer-bottom-copy,
html[data-theme="dark"] footer .footer-legal-copy {
  color: var(--body-copy, #b4ab9e) !important;
  opacity: 1 !important;
  -webkit-text-fill-color: var(--body-copy, #b4ab9e) !important;
}

@media (max-width: 720px) {
  .commerce-main .cart-line {
    grid-template-columns: 150px minmax(0, 1fr) !important;
    gap: 16px !important;
  }
  .commerce-main .cart-line > img {
    width: 150px !important;
    height: 150px !important;
    object-fit: contain;
  }
}
@media (max-width: 380px) {
  .commerce-main .cart-line {
    grid-template-columns: 128px minmax(0, 1fr) !important;
    gap: 12px !important;
  }
  .commerce-main .cart-line > img {
    width: 128px !important;
    height: 128px !important;
  }
}


/* MORDO HORIZON: navigation, purchase buttons and responsive cart sizing */

/* Consistent, non-gold purchase buttons in both themes */
.commerce-main #p-add,
.commerce-main #checkout {
  background: #176B67 !important;
  background-color: #176B67 !important;
  background-image: none !important;
  color: #FFFFFF !important;
  border: 1px solid #176B67 !important;
  box-shadow: 0 7px 20px rgba(23,107,103,.17) !important;
}
.commerce-main #p-add:hover,
.commerce-main #checkout:hover {
  background: #105650 !important;
  background-color: #105650 !important;
  border-color: #105650 !important;
  color: #FFFFFF !important;
}
.commerce-main #p-add:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Light-mode mobile navigation contrast */
html[data-theme="light"] #mobileMenu {
  background: #FFFFFF !important;
  border-top-color: #DCE3E8 !important;
}
html[data-theme="light"] #mobileMenu > a {
  color: #263746 !important;
}
html[data-theme="light"] #mobileMenu > a:hover {
  background: #EDF3F3 !important;
  color: #176B67 !important;
}
html[data-theme="light"] #mobileMenuBtn {
  background: #FFFFFF !important;
  color: #263746 !important;
  border-color: #D5DEE5 !important;
}
html[data-theme="light"] #mobileMenuBtn:hover {
  border-color: #176B67 !important;
}

/* Cart image sizing: desktop, tablet, mobile and narrow mobile */
.commerce-main .cart-line {
  grid-template-columns: 180px minmax(0, 1fr) !important;
  gap: 22px !important;
}
.commerce-main .cart-line > img {
  width: 180px !important;
  height: 180px !important;
  object-fit: contain;
}
@media (max-width: 900px) {
  .commerce-main .cart-line {
    grid-template-columns: 132px minmax(0, 1fr) !important;
    gap: 16px !important;
  }
  .commerce-main .cart-line > img {
    width: 132px !important;
    height: 132px !important;
  }
}
@media (max-width: 680px) {
  .commerce-main .cart-line {
    grid-template-columns: 104px minmax(0, 1fr) !important;
    gap: 12px !important;
  }
  .commerce-main .cart-line > img {
    width: 104px !important;
    height: 104px !important;
  }
}
@media (max-width: 380px) {
  .commerce-main .cart-line {
    grid-template-columns: 92px minmax(0, 1fr) !important;
    gap: 10px !important;
  }
  .commerce-main .cart-line > img {
    width: 92px !important;
    height: 92px !important;
  }
}

/* MORDO HORIZON: improve cart product image visibility on mobile */
@media (max-width: 680px) {
  .commerce-main .cart-line {
    grid-template-columns: 124px minmax(0, 1fr) !important;
    gap: 13px !important;
  }
  .commerce-main .cart-line > img {
    width: 124px !important;
    height: 124px !important;
  }
}
@media (max-width: 380px) {
  .commerce-main .cart-line {
    grid-template-columns: 112px minmax(0, 1fr) !important;
    gap: 10px !important;
  }
  .commerce-main .cart-line > img {
    width: 112px !important;
    height: 112px !important;
  }
}
