/* Shared visual layer. Load after the existing component styles; no service state is hidden. */
:root {
  --paper: #fffdf9;
  --ink: #372c24;
  --muted: #756a60;
  --line: #e2d8ce;
  --olive: #87654c;
  --soft: #f1ebe3;
  --white: #fff;
  --theme-display: 'Cormorant Garamond', Georgia, serif;
  --theme-ui: 'DM Sans', 'Noto Sans Thai', sans-serif;
}
body { background: var(--paper); color: var(--ink); font-family: var(--theme-ui); }
.product-card { display:flex; flex-direction:column; min-width:0; }
.product-card .product-info { display:flex; flex:1; flex-direction:column; }
.product-card .product-buy { margin-top:auto; }
.saved-state-notice { margin: 0 0 24px; padding: 16px 18px; border: 1px solid var(--line); border-left: 2px solid var(--olive); background: var(--soft); color: var(--ink); font-size: 13px; line-height: 1.8; }
.price-reference { display: grid; gap: 5px; margin: 14px 0; color: var(--ink); }
.price-reference-label { font-size: 11px; line-height: 1.6; color: var(--muted); }
.price-reference-value { font-size: 24px; font-weight: 500; line-height: 1.3; letter-spacing: -.025em; }
.price-reference-date { display: block; font-size: 11px; line-height: 1.7; color: var(--muted); }
.price-reference-source { display: inline-flex; align-items: center; width: fit-content; min-height: 44px; font-size: 13px; font-weight: 500; line-height: 1.7; text-decoration: underline; text-underline-offset: 4px; }
.price-reference .price-reference-note { margin: 0; font-size: 11px; line-height: 1.8; color: var(--muted); }
.price-reference-detail { margin: 14px 0 0; gap: 9px; }
.price-reference-detail .price-reference-label { font-size: 13px; }
.price-reference-detail .price-reference-value { font-size: 32px; }
.price-reference-detail .price-reference-note { font-size: 12px; }
@media(max-width:600px){.price-reference-value{font-size:22px}.price-reference-detail .price-reference-value{font-size:29px}}
::selection { background: #e7d9c9; color: var(--ink); }
html[lang="en"] h1,
html[lang="en"] h2 { font-family: var(--theme-display); font-weight: 400; letter-spacing: -.025em; line-height: 1.16; }
html[lang="th"] h1,
html[lang="th"] h2 { font-family: 'Noto Sans Thai', var(--theme-ui); font-weight: 400; letter-spacing: -.025em; line-height: 1.45; }
.eyebrow { letter-spacing: .12em; }
.announcement { background: var(--ink); color: #fffaf4; font-size: 11px; line-height: 1.6; letter-spacing: .08em; }
.site-header { background: var(--paper); border-color: var(--line); box-shadow: none; }
.header-advice { display: none; font-size: 12px; line-height: 1.6; color: var(--ink); text-underline-offset: 5px; }
.header-advice:hover { text-decoration: underline; }
.header-actions { color: var(--ink); }
.languages button { font-size: 12px; }
.saved-badge { background: var(--soft); color: var(--ink); }
.nc-cart-count { background: var(--ink); color: #fff; }
.main-nav a { border-color: transparent; }
.main-nav a:hover { border-color: var(--olive); }

/* 122px masthead plus the existing 28px announcement stays within 150px. */
@media (min-width: 1001px) {
  html { scroll-padding-top: 145px; }
  .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
    grid-template-rows: 76px 45px;
    align-items: center;
    gap: 0 24px;
    height: 122px;
    min-height: 0;
    padding: 0 4.5%;
  }
  .site-header > .brand.brand-official {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    align-self: center;
    width: 76px;
    height: 76px;
    flex-basis: 76px;
  }
  .site-header > .brand.brand-official > img { width: 76px; height: 76px; object-fit: contain; }
  .site-header > .header-advice { display: inline-flex; grid-column: 1; grid-row: 1; justify-self: start; align-items: center; max-width: 260px; min-height: 44px; }
  .site-header > .header-actions { grid-column: 3; grid-row: 1; justify-self: end; min-width: 0; margin: 0; gap: 15px; flex-wrap: nowrap; }
  .site-header .main-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    position: static;
    inset: auto;
    align-self: stretch;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: clamp(18px, 2.2vw, 32px);
    min-width: 0;
    height: 45px;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--line);
    border-bottom: 0;
    background: transparent;
    box-shadow: none;
    font-size: 13px;
  }
  .site-header .main-nav > a { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 0; white-space: nowrap; line-height: 1.5; }
  .site-header .menu-toggle { display: none; }
  .nc-summary, .nd-summary, .nd-sidebar { top: 148px; }
}

/* Keep the existing compact header and its hamburger state below the breakpoint. */
@media (max-width: 1000px) {
  .site-header { display: flex; align-items: center; justify-content: space-between; height: auto; min-height: 88px; padding: 10px 5%; gap: 10px; }
  .site-header > .brand.brand-official { flex: 0 0 72px; width: 72px; height: 72px; }
  .site-header > .brand.brand-official > img { width: 72px; height: 72px; }
  .site-header > .header-advice { display: none; }
  .site-header > .header-actions { margin-left: auto; gap: 8px; flex-wrap: nowrap; min-width: 0; }
  .site-header .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 5% 18px; background: var(--paper); border-bottom: 1px solid var(--line); max-height: calc(100vh - 118px); max-height: calc(100dvh - 118px); overflow-y: auto; box-shadow: none; font-size: 13px; }
  .site-header .main-nav.open { display: flex; }
  .site-header .main-nav > a { min-height: 44px; display: flex; align-items: center; padding: 10px 0; line-height: 1.65; }
  .site-header .menu-toggle { display: flex; width: 44px; height: 44px; flex: 0 0 44px; }
  .site-header .planned-cart { width: 44px; min-height: 44px; }
}
@media (max-width: 600px) {
  .site-header > .header-actions { gap: 6px; }
  .site-header .languages { gap: 1px; }
  .site-header .languages button { min-width: 32px; min-height: 44px; padding: 0 4px; font-size: 11px; }
  .site-header .saved-nav { gap: 4px; }
}

/* Clear, square controls. Disabled and in-development controls stay distinct. */
.button, .ns-button, .nd-button, .nst-compare-button {
  border-radius: 0;
  min-height: 44px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  box-shadow: none;
  font-family: var(--theme-ui);
  font-size: 13px;
  line-height: 1.65;
}
.button:hover:not(:disabled), .ns-button:hover:not(:disabled), .nd-button:hover:not(:disabled), .nst-compare-button:hover:not(:disabled) { background: #594335; border-color: #594335; color: #fff; transform: none; filter: none; }
.button-outline, .ns-button-outline, .nd-button-secondary, .nst-compare-secondary { background: transparent; color: var(--ink); border-color: var(--olive); }
.button-outline:hover:not(:disabled), .ns-button-outline:hover:not(:disabled), .nd-button-secondary:hover:not(:disabled), .nst-compare-secondary:hover:not(:disabled) { background: var(--soft); border-color: var(--ink); color: var(--ink); }
.button.nc-disabled, .nc-disabled, .button:disabled, .ns-button:disabled, .nd-button:disabled, .nst-compare-button:disabled { background: var(--soft); border-color: var(--line); color: var(--muted); cursor: not-allowed; box-shadow: none; }
.filters button, .nsg-methods button, .compare-toggle { min-height: 44px; border-radius: 0; border-color: var(--line); color: var(--ink); background: var(--white); font-size: 12px; line-height: 1.7; }
.filters button[aria-pressed="true"], .nsg-methods button[aria-pressed="true"], .compare-toggle[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filters button:hover:not([aria-pressed="true"]), .nsg-methods button:hover:not([aria-pressed="true"]), .compare-toggle:hover:not([aria-pressed="true"]) { background: var(--soft); border-color: var(--olive); }
.nc-card-add { min-height: 44px; border-radius: 0; font-size: 12px; background: var(--ink); border-color: var(--ink); color: #fff; }
.nc-card-add:hover { background: #594335; border-color: #594335; color: #fff; }
.nc-stepper { border-color: var(--line); }
.nc-stepper button, .nc-remove, .clear-search, .reset-filters { min-height: 44px; }
.nc-stepper button { min-width: 44px; }
.save-card, .dialog-close { border-radius: 0; background: var(--white); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.save-card { width: 44px; height: 44px; }
.save-card[aria-pressed="true"], .save-detail[aria-pressed="true"] { color: #6e4937; background: var(--soft); border-color: var(--olive); }

input[type="text"], input[type="email"], input[type="search"], input[type="number"], input[type="password"], select, textarea {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--theme-ui);
}
.search-field { border-color: var(--olive); background: var(--white); }
.search-field input { border: 0; background: transparent; }
.mounting-control select, .enquiry-field input, .enquiry-field select, .enquiry-field textarea, .nd-field select, .nd-fields select { border-color: var(--line); background: var(--white); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--olive); outline-offset: 4px; }

/* Product photography and typography remain faithful to the catalogue. */
.product-card { background: transparent; box-shadow: none; }
.product-image { border-color: var(--line); background: var(--white); }
.product-image img { object-fit: contain; object-position: center; background: var(--white); }
.product-image:hover img { transform: none; }
.product-info h3 { font-family: var(--theme-ui); font-size: 15px; font-weight: 500; line-height: 1.65; }
.product-info > p { color: var(--muted); font-size: 13px; line-height: 1.85; }
.product-code { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.product-category { background: var(--white); color: var(--ink); border: 1px solid var(--line); font-size: 12px; line-height: 1.5; box-shadow: none; }
.mounting-tag { background: var(--soft); color: var(--ink); font-size: 12px; line-height: 1.7; }
.mounting-pending { border: 1px dashed var(--olive); background: #f8f1e8; color: #6a4c37; }
.product-buy { color: var(--ink); font-size: 12px; min-height: 44px; border-color: var(--line); }
.product-image-pending, .nst-compare-placeholder { background: var(--soft); color: var(--muted); }
.product-image-pending:hover { background: #eadfd3; }
.detail-image, .nc-item-photo, .nc-item img { background: var(--white); border-color: var(--line); }

/* Warm surfaces across saved lists, enquiries, guidance and the test workspace. */
.service-card, .nc-service, .nc-summary, .nc-empty, .nd-card, .platforms li { background: var(--white); border-color: var(--line); box-shadow: none; }
.service-card:hover, .nc-service:hover { background: var(--soft); border-color: var(--olive); }
.measurement-card, .social-section, .empty-state, .help-contact, .nsg-diagram, .nsg-contact, .nst-comparison, .framework-entry { background: var(--soft); border-color: var(--line); }
.social-wordmark { color: var(--olive); }
.social-wordmark:before { border-color: #cbb7a3; }
.ns-support { --ns-card: var(--white); --ns-soft: var(--soft); --ns-light: #f8f4ee; }
.contact-section { background: var(--ink); color: #fff; }
.contact-section .eyebrow, .contact-info > p, .contact-shop { color: #eadfd2; }
.email-link { border-color: #ae9380; }
.copy-email, .copy-status { color: #f2e4d5; }
.site-footer, .store-footer, .channels-section { border-color: var(--line); }
.mobile-buybar { background: var(--paper); border-color: var(--line); box-shadow: none; }
.mobile-buybar > a:last-child { background: var(--ink); color: #fff; }
.development-badge, .nd-status, .nc-badge, .ns-status, .ready-made-label, .nsg-badge { border-radius: 0; }
.development-badge { color: #6a4c37; background: #f8f1e8; border-color: #cdb9a5; }
.development-badge:before { background: var(--olive); }
.ns-status { color: #6a4c37; }
.nc-toast { background: var(--ink); box-shadow: none; }

@media (max-width: 600px) {
  input[type="text"], input[type="email"], input[type="search"], input[type="number"], input[type="password"], select, textarea { font-size: 16px; }
  .product-info h3 { font-size: 15px; min-height: 50px; }
  .product-info > p { font-size: 13px; min-height: 70px; }
  .product-category { font-size: 12px; padding: 4px 7px; }
  .save-card { left: 8px; bottom: 8px; }
  .filters button { font-size: 12px; }
}

/* Product detail refinement: the gallery stays uncropped and controls are separate. */
.product-main { padding-top: 24px; padding-bottom: 70px; }
.product-main .breadcrumbs { line-height: 1.8; margin-bottom: 24px; flex-wrap: wrap; }
.detail-section-nav { gap: 24px; flex-wrap: nowrap; overflow-x: auto; padding: 4px 0; margin-bottom: 30px; border-color: var(--line); }
.detail-section-nav a { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 44px; padding: 7px 0; font-size: 12px; line-height: 1.6; white-space: nowrap; }
.product-detail-layout { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(28px, 4.5vw, 64px); align-items: start; }
.detail-gallery { min-width: 0; }
.detail-gallery-stage { position: relative; isolation: isolate; background: var(--white); border: 1px solid var(--line); }
.detail-gallery-stage .detail-image { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: var(--white); }
.detail-gallery-stage .detail-photo-pending { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 28px; text-align: center; }
.detail-gallery-stage .detail-image > img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; background: var(--white); }
.detail-gallery-stage .detail-image .zoom-icon { width: 36px; height: 36px; right: 12px; bottom: 12px; border: 1px solid var(--line); border-radius: 0; background: var(--white); color: var(--ink); }
.detail-gallery-arrow { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 0; background: var(--white); color: var(--ink); box-shadow: none; cursor: pointer; }
.detail-gallery-arrow.gallery-prev { left: 12px; }
.detail-gallery-arrow.gallery-next { right: 12px; }
.detail-gallery-arrow svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.detail-gallery-arrow:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: var(--white); }
.detail-gallery-arrow:disabled { opacity: .4; cursor: not-allowed; }
.detail-gallery-toolbar { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 7px 18px; margin: 14px 0 5px; font-size: 12px; line-height: 1.8; }
.gallery-position { color: var(--ink); font-weight: 500; }
.gallery-keyboard-hint { color: var(--muted); font-size: 11px; }
.detail-gallery:has(.detail-gallery-toolbar) .photo-counter { display: none; }
.detail-gallery .gallery-thumbnails { gap: 10px; padding: 11px 3px 8px; scrollbar-color: var(--olive) transparent; scroll-snap-type: x proximity; }
.detail-gallery .gallery-thumbnails > button { width: 78px; height: 78px; min-width: 78px; padding: 4px; border: 1px solid var(--line); border-radius: 0; background: var(--white); scroll-snap-align: start; }
.detail-gallery .gallery-thumbnails > button[aria-pressed="true"] { border: 2px solid var(--ink); padding: 3px; }
.detail-gallery .gallery-thumbnails > button:hover { border-color: var(--olive); }
.detail-gallery .gallery-thumbnails img { display: block; width: 100%; height: 100%; object-fit: contain; }
.detail-gallery .gallery-hint, .detail-gallery .image-footnote { font-size: 12px; line-height: 1.9; color: var(--muted); }

.detail-summary { min-width: 0; align-self: start; padding-top: 2px; }
.detail-summary > .eyebrow { color: var(--muted); font-size: 10px; line-height: 1.8; }
.detail-summary h1 { font-size: clamp(27px, 2.65vw, 38px); margin: 12px 0 16px; overflow-wrap: anywhere; }
.detail-summary .ready-made-label { max-width: 100%; margin: 0 0 17px; padding: 5px 10px; border: 1px solid var(--line); font-size: 11px; line-height: 1.8; }
.detail-summary .detail-description { font-size: 14px; line-height: 1.95; color: var(--muted); }
.detail-status-panel { margin: 24px 0 0; padding: 20px 22px; border: 1px solid var(--line); border-left: 2px solid var(--olive); background: var(--white); }
.detail-status-panel > .eyebrow { color: var(--olive); font-size: 10px; line-height: 1.8; }
.detail-summary .detail-status-panel h2 { font-family: var(--theme-ui); font-size: 21px; font-weight: 400; line-height: 1.55; letter-spacing: -.02em; margin: 10px 0 0; }
.detail-status-panel > p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.9; margin-top: 10px; }
.detail-summary .product-facts { margin: 23px 0 14px; }
.detail-summary .product-facts > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px 18px; padding: 16px 0; border-color: var(--line); }
.detail-summary .product-facts dt { margin: 0; font-size: 12px; font-weight: 500; line-height: 1.85; color: var(--ink); }
.detail-summary .product-facts dd { margin: 0; font-size: 13px; line-height: 1.85; color: var(--muted); overflow-wrap: anywhere; }
.detail-summary .detail-size-help { display: inline-flex; align-items: center; min-height: 44px; margin: 0 0 4px; padding: 6px 0; font-size: 13px; line-height: 1.8; }
.detail-summary .detail-pack-note { margin: 8px 0 20px; padding: 16px 18px; background: var(--soft); border-color: var(--line); font-size: 12px; line-height: 1.9; }
.detail-summary .detail-pack-note strong { font-size: 13px; font-weight: 500; margin-bottom: 7px; }
.detail-summary .availability-note { margin-bottom: 13px; font-size: 13px; line-height: 1.85; }
.detail-summary .detail-purchase { min-height: 52px; justify-content: center; font-size: 13px; line-height: 1.7; }
.detail-checkout-note { margin: 10px 0 0; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.8; }
.product-main #product-photos, .product-main #product-guide, .product-main #product-consult { scroll-margin-top: 150px; }
.detail-summary .detail-secondary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; gap: 11px; margin-top: 12px; }
.detail-summary .detail-secondary .save-detail, .detail-summary .detail-secondary .text-link { display: inline-flex; justify-content: center; align-items: center; min-height: 48px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); font-size: 12px; line-height: 1.7; text-align: center; }
.detail-summary .detail-secondary .nc-detail-add { grid-column: 1 / -1; margin: 0; min-height: 48px; }
.detail-summary .detail-support { margin-top: 22px; padding-top: 18px; border-color: var(--line); }
.detail-summary .detail-support p { font-size: 12px; line-height: 1.9; }
.detail-summary .catalog-source { margin-top: 18px; border-color: var(--line); }
.detail-summary .catalog-source summary { min-height: 44px; font-size: 12px; line-height: 1.8; }

@media (min-width: 1001px) {
  .detail-summary { position: sticky; top: 142px; }
}
@media (min-width: 1001px) and (max-height: 700px) {
  .detail-summary { position: static; }
}
@media (max-width: 1000px) {
  .detail-summary { position: static; }
}
@media (max-width: 900px) {
  .product-detail-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .detail-gallery { width: 100%; max-width: 720px; margin: 0 auto; }
  .detail-summary { padding-top: 0; }
}
@media (max-width: 600px) {
  .product-main { padding-top: 20px; padding-bottom: 48px; }
  .product-main .breadcrumbs { margin-bottom: 18px; font-size: 11px; }
  .detail-section-nav { margin-bottom: 23px; gap: 23px; }
  .product-detail-layout { gap: 27px; }
  .detail-gallery-arrow.gallery-prev { left: 8px; }
  .detail-gallery-arrow.gallery-next { right: 8px; }
  .detail-gallery-toolbar { margin-top: 12px; gap: 3px 12px; }
  .gallery-keyboard-hint { display: none; }
  .product-main #product-photos, .product-main #product-guide, .product-main #product-consult { scroll-margin-top: 100px; }
  .detail-gallery .gallery-thumbnails { gap: 8px; }
  .detail-gallery .gallery-thumbnails > button { width: 64px; height: 64px; min-width: 64px; }
  .detail-gallery .gallery-hint, .detail-gallery .image-footnote { font-size: 11px; }
  .detail-summary h1 { font-size: 28px; margin-top: 10px; margin-bottom: 15px; }
  .detail-summary .detail-description { font-size: 13px; }
  .detail-status-panel { margin-top: 21px; padding: 18px; }
  .detail-summary .detail-status-panel h2 { font-size: 20px; }
  .detail-summary .product-facts > div { grid-template-columns: 95px minmax(0, 1fr); gap: 9px 13px; padding: 15px 0; }
  .detail-summary .detail-pack-note { padding: 15px 16px; }
  .mobile-buybar.detail-mobile-buybar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 10px; padding: 10px 5% calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); box-shadow: none; }
  .mobile-buybar.detail-mobile-buybar > a { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 48px; gap: 8px; padding: 8px 9px; border: 1px solid var(--ink); border-radius: 0; font-size: 12px; line-height: 1.6; text-align: center; overflow-wrap: anywhere; }
  .mobile-buybar.detail-mobile-buybar > a:first-child { background: var(--paper); color: var(--ink); }
  .mobile-buybar.detail-mobile-buybar > a:last-child { background: var(--ink); color: var(--white); }
  .product-main ~ .store-footer { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
}
