/* LAVI v1.9 — dual visual themes
   Default: existing minimal white theme.
   Texture: user-selected warm stone/paper texture with controlled translucency. */
:root{color-scheme:light}
html[data-theme="default"] body{background:#fff}

.theme-toggle{
  width:44px;height:44px;flex:0 0 44px;border:1px solid #d7d1c5;background:#fff;color:#111;
  display:inline-grid;place-items:center;padding:0;cursor:pointer;transition:.2s;position:relative
}
.theme-toggle:hover{border-color:var(--lavi-burgundy,#701d20);color:var(--lavi-burgundy,#701d20)}
.theme-toggle:focus-visible{outline:2px solid var(--lavi-burgundy,#701d20);outline-offset:3px}
.theme-icon{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round}
.theme-icon-texture{display:none}
html[data-theme="texture"] .theme-icon-minimal{display:none}
html[data-theme="texture"] .theme-icon-texture{display:block}
html[data-theme="texture"] .theme-toggle{background:#eee9df;border-color:#c9c0b4;color:#701d20}

html[data-theme="texture"] body{
  background-color:#f1eee7;
  background-image:linear-gradient(rgba(255,255,255,.12),rgba(255,255,255,.12)),url('../img/lavi-texture-theme.webp');
  background-repeat:repeat;
  background-position:center top;
  background-size:auto,680px auto;
  background-attachment:fixed;
}
html[data-theme="texture"] main{background:transparent}
html[data-theme="texture"] .site-header{background:rgba(255,255,255,.88);border-bottom-color:rgba(190,180,170,.62);box-shadow:0 8px 30px rgba(58,48,40,.035)}
html[data-theme="texture"] .language-current,
html[data-theme="texture"] .language-menu,
html[data-theme="texture"] .header-catalog{background:rgba(255,255,255,.86)}

/* Broad light surfaces reveal the texture without sacrificing legibility. */
html[data-theme="texture"] .hero,
html[data-theme="texture"] .section:not(.section-dark),
html[data-theme="texture"] .page-hero,
html[data-theme="texture"] .door-configurator-section,
html[data-theme="texture"] .story-page,
html[data-theme="texture"] .story-hero,
html[data-theme="texture"] .story-content-section,
html[data-theme="texture"] .story-cta-section{
  background-color:rgba(255,255,255,.56)!important;
  background-image:none
}
html[data-theme="texture"] .section-soft{background-color:rgba(225,220,205,.58)!important}
html[data-theme="texture"] .page-hero{background:linear-gradient(90deg,rgba(255,255,255,.92),rgba(241,237,229,.68))!important}
html[data-theme="texture"] .story-hero{background:linear-gradient(135deg,rgba(255,255,255,.9),rgba(225,220,205,.62))!important}

/* Cards stay calm and readable; texture remains visible around them. */
html[data-theme="texture"] .category-card,
html[data-theme="texture"] .product-card,
html[data-theme="texture"] .content-card,
html[data-theme="texture"] .feature-row,
html[data-theme="texture"] .process-grid article,
html[data-theme="texture"] .values-grid article,
html[data-theme="texture"] .inquiry-form,
html[data-theme="texture"] .configurator-step,
html[data-theme="texture"] .configurator-preview-card,
html[data-theme="texture"] .configurator-palette-card,
html[data-theme="texture"] .configuration-result,
html[data-theme="texture"] .story-tags span,
html[data-theme="texture"] .contact-panel+*{
  background-color:rgba(255,255,255,.86)!important;
  backdrop-filter:blur(2px)
}
html[data-theme="texture"] .category-visual,
html[data-theme="texture"] .product-visual,
html[data-theme="texture"] .product-stage,
html[data-theme="texture"] .hero-visual,
html[data-theme="texture"] .summary-head,
html[data-theme="texture"] .pattern-option,
html[data-theme="texture"] .palette-note{
  background-color:rgba(245,242,235,.82)!important
}
html[data-theme="texture"] .product-visual.has-image img,
html[data-theme="texture"] .product-stage.has-image img{background:rgba(245,242,235,.72)!important}
html[data-theme="texture"] input,
html[data-theme="texture"] select,
html[data-theme="texture"] textarea{background-color:rgba(255,255,255,.9)!important}

/* Dark sections remain solid anchors in both themes. */
html[data-theme="texture"] .section-dark,
html[data-theme="texture"] .cta-box,
html[data-theme="texture"] .contact-panel{background:var(--lavi-black,#000)!important}
html[data-theme="texture"] .site-footer{background:rgba(232,226,215,.9);backdrop-filter:blur(3px)}

@media(max-width:1100px){.theme-toggle{width:38px;height:38px;flex-basis:38px}.theme-icon{width:17px;height:17px}}
@media(max-width:760px){
  .theme-toggle{width:34px;height:34px;flex-basis:34px;order:-2}
  html[data-theme="texture"] body{background-size:auto,440px auto;background-attachment:scroll}
  html[data-theme="texture"] .hero,
  html[data-theme="texture"] .section:not(.section-dark),
  html[data-theme="texture"] .door-configurator-section{background-color:rgba(255,255,255,.62)!important}
}
@media(prefers-reduced-transparency:reduce){
  html[data-theme="texture"] .site-header,
  html[data-theme="texture"] .category-card,
  html[data-theme="texture"] .product-card,
  html[data-theme="texture"] .content-card{backdrop-filter:none}
}
