/* Storefront appearance. Original product images and the official logo retain their colors. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f4f5f6;
  --panel: #f7f8f9;
  --panel-alt: #f0f2f3;
  --text: #202428;
  --muted: #5b626a;
  --line-soft: #dce0e4;
  --line: #9a7800;
  --link: #735900;
  --focus: #876900;
  --shadow: 0 10px 28px rgba(23, 29, 35, .07);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --link: #ffdf67;
  --focus: #ffcc00;
}
:root[data-theme] { background: var(--bg); }
:root[data-theme] body { color: var(--text); background: var(--bg); }
:root[data-theme] :is(a, button, input, summary):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
/* Official light/dark logo variants are shown without filters or recoloring. */
:root[data-theme] .brand { padding: 0; border-radius: 0; background: transparent; }
:root[data-theme] .brand img { width: 200px; }
:root[data-theme] .nav-shell { gap: 20px; }
.theme-picker { position: relative; flex: none; z-index: 25; }
.theme-picker summary {
  min-height: 44px; min-width: 44px; padding: 10px 12px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-soft); border-radius: 6px;
  background: var(--bg); color: var(--text); cursor: pointer; list-style: none;
  font-size: 14px; font-weight: 600; white-space: nowrap;
}
.theme-picker summary::-webkit-details-marker { display: none; }
.theme-picker summary:hover { background: var(--bg-soft); }
.theme-picker svg { width: 20px; height: 20px; display: block; flex: none; }
.theme-options {
  position: absolute; right: 0; top: calc(100% + 10px); width: 184px;
  padding: 8px; background: var(--bg); color: var(--text);
  border: 1px solid var(--line-soft); border-radius: 8px; box-shadow: var(--shadow);
}
.theme-options p { margin: 2px 10px 6px; font-size: 12px; color: var(--muted); }
.theme-options button {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px;
  padding: 10px; border: 0; border-radius: 4px; background: transparent;
  color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer;
}
.theme-options button:hover { background: var(--bg-soft); }
.theme-options button[aria-pressed="true"] { background: #ffcc00; color: #171717; }
.theme-check { margin-left: auto; visibility: hidden; }
.theme-options button[aria-pressed="true"] .theme-check { visibility: visible; }
/* Light surfaces and readable text across every public page. */
:root[data-theme="light"] .site-header { background: #fff; border-bottom-color: var(--line-soft); }
:root[data-theme="light"] :is(.site-nav a, .nav-meta a) { color: var(--text); }
:root[data-theme="light"] .site-nav a.is-active { color: var(--link); }
:root[data-theme="light"] .site-nav a:hover { color: var(--link); }
:root[data-theme="light"] .nav-toggle { color: var(--text); background: #fff; border-color: #c4c9ce; }
:root[data-theme="light"] .nav-toggle span { background: var(--text); }
:root[data-theme="light"] .lang-switch a { color: var(--muted); border-color: var(--line-soft); }
:root[data-theme="light"] .lang-switch a:is(.is-active, :hover) { background: #ffcc00; color: #171717; border-color: #ffcc00; }
:root[data-theme="light"] :is(.hero-carousel-stage, .hero-slide) { background: var(--bg-soft); }
:root[data-theme="light"] :is(.hero, .page-hero)::before,
:root[data-theme="light"] :is(.hero, .page-hero)::after { display: none; }
:root[data-theme="light"] :is(.hero-slide .hero-text, .brand-story p, .product-body p, .purchase-note, .detail-copy > p) { color: var(--muted); }
:root[data-theme="light"] :is(.section-heading-inline a, .legacy-content a, .image-lightbox a, .content-heading > a, .text-link) { color: var(--link); }
:root[data-theme="light"] .category-card:hover h3 { color: var(--link); }
:root[data-theme="light"] :is(.category-icon, .product-thumb, .detail-main-visual) { border: 1px solid #e6e9ec; }
:root[data-theme="light"] .hero-image { border-left: 1px solid #e6e9ec; }
:root[data-theme="light"] :is(.product-card, .storefront-product) { background: transparent; }
:root[data-theme="light"] :is(.product-body .product-tag, .storefront-product .product-tag) { color: var(--muted); }
:root[data-theme="light"] :is(.product-meta strong, .price-line strong, .shop-card strong, .cart-price) { color: var(--text); }
:root[data-theme="light"] .catalog-filter span { color: var(--muted); }
:root[data-theme="light"] .catalog-filter:hover { background: var(--bg-soft); }
:root[data-theme="light"] .catalog-filter.is-active { background: #ffcc00; color: #171717; }
:root[data-theme="light"] .catalog-filter.is-active span { color: #414141; }
:root[data-theme="light"] .catalog-toolbar input {
  background: #fff; color: var(--text); border-color: #aeb6bf;
}
:root[data-theme="light"] .catalog-toolbar input::placeholder { color: #68717b; opacity: 1; }
:root[data-theme="light"] .catalog-empty { border-color: var(--line-soft); background: var(--bg-soft); color: var(--muted); }
:root[data-theme="light"] .catalog-empty a { color: var(--link); text-decoration: underline; }
:root[data-theme="light"] .button-secondary { color: var(--text); background: transparent; border-color: #868e97; }
:root[data-theme="light"] .button-secondary:hover { background: var(--bg-soft); }
:root[data-theme="light"] :is(.cart-item, .checkout-item, .order-summary, .checkout-card, .shop-card) {
  background: var(--panel); border-color: var(--line-soft); box-shadow: none;
}
:root[data-theme="light"] :is(.spec-table th, .spec-table td, .legacy-content th, .legacy-content td, .summary-list div) { border-color: var(--line-soft); }
:root[data-theme="light"] .spec-table th { color: var(--muted); }
:root[data-theme="light"] :is(.payment-methods span, .payment-option, .qty-button) {
  background: #fff; color: var(--text); border-color: #b4bbc3;
}
:root[data-theme="light"] .remove-link:hover { color: var(--link); }
:root[data-theme="light"] .detail-thumb-button { border-color: var(--line-soft); }
:root[data-theme="light"] .detail-thumb-button.is-active { border-color: #967400; }
:root[data-theme="light"] .image-lightbox { background: #fff; color: var(--text); border-color: var(--line-soft); }
:root[data-theme="light"] .site-footer { background: var(--bg-soft); border-top-color: var(--line-soft); }
:root[data-theme="light"] .footer-bottom { color: var(--muted); }
@media (max-width: 1150px) and (min-width: 861px) {
  :root[data-theme] .nav-shell { gap: 12px; }
  :root[data-theme] .site-nav { gap: 16px; }
  :root[data-theme] .brand img { width: 142px; }
  .theme-picker [data-theme-label] { display: none; }
}
@media (max-width: 860px) {
  :root[data-theme] .nav-shell {
    display: grid; grid-template-columns: minmax(0, 1fr) 44px 44px; gap: 10px;
    min-height: 76px; padding-block: 10px;
  }
  :root[data-theme] .brand { grid-column: 1; grid-row: 1; justify-self: start; padding: 0; }
  :root[data-theme] .brand img { width: min(145px, 34vw); }
  :root[data-theme] .theme-picker { grid-column: 2; grid-row: 1; }
  :root[data-theme] .theme-picker summary { padding: 10px; }
  .theme-picker [data-theme-label] { display: none; }
  :root[data-theme] .nav-toggle { grid-column: 3; grid-row: 1; width: 44px; height: 44px; margin: 0; }
  :root[data-theme] .site-nav { grid-column: 1 / -1; grid-row: 2; margin: 0; }
  :root[data-theme] .nav-shell > .lang-switch { display: none; grid-column: 1 / -1; grid-row: 3; padding: 0 16px 8px; }
  :root[data-theme] .nav-open .lang-switch { display: flex; }
  :root[data-theme="light"] .site-nav { background: var(--bg-soft); }
  :root[data-theme="light"] .catalog-filter { background: var(--bg-soft); }
  :root[data-theme="light"] .catalog-filter.is-active { background: #ffcc00; }
  :root[data-theme="light"] .hero-image { border-left: 0; border-top: 1px solid #e6e9ec; }
}

/* Keep detail actions and the availability note readable at phone widths. */
:root[data-theme] .purchase-panel {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
:root[data-theme] .purchase-panel .button {min-width:0;padding:12px;letter-spacing:0;white-space:normal;}
:root[data-theme] .purchase-note {grid-column:1 / -1;margin:0;}

:root[data-theme="light"] .brand-logo-dark,
:root[data-theme="dark"] .brand-logo-light {display:none;}
/* Matching compact language and appearance controls on every public page. */
:root[data-theme] .header-picker {position:relative;flex:none;z-index:25;}
:root[data-theme] .header-picker summary {display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;border:1px solid var(--line-soft);border-radius:8px;background:var(--bg);color:var(--text);cursor:pointer;list-style:none;}
.header-picker summary::-webkit-details-marker {display:none;}
:root[data-theme] .header-picker summary:hover {background:var(--bg-soft);border-color:var(--muted);}
:root[data-theme] .header-picker svg {width:20px;height:20px;display:block;flex:none;}
.theme-picker [data-theme-label] {display:none;}
.language-options {position:absolute;right:0;top:calc(100% + 10px);width:184px;padding:8px;background:var(--bg);color:var(--text);border:1px solid var(--line-soft);border-radius:8px;box-shadow:var(--shadow);}
.language-options p {margin:2px 10px 6px;font-size:12px;color:var(--muted);}
:root[data-theme] .language-options a {display:flex;align-items:center;min-height:44px;padding:10px;border-radius:4px;color:var(--text);font-size:14px;}
:root[data-theme] .language-options a:hover {background:var(--bg-soft);}
:root[data-theme] .language-options a[aria-current="true"] {background:#ffcc00;color:#171717;}
@media(max-width:860px) {
 :root[data-theme] .nav-shell {grid-template-columns:minmax(0,1fr) 44px 44px 44px;gap:8px;}
 :root[data-theme] .theme-picker {grid-column:2;grid-row:1;}
 :root[data-theme] .language-picker {grid-column:3;grid-row:1;}
 :root[data-theme] .nav-toggle {grid-column:4;grid-row:1;}
 :root[data-theme] .brand img {max-width:100%;width:min(145px,32vw);}
}
