/* Storefront layout: keep commercial controls and existing template hooks intact. */
body { background:#fff; }
.wrap { max-width:1440px; }
a, button, input, select, summary { -webkit-tap-highlight-color:transparent; }
:focus-visible { outline:3px solid var(--brand); outline-offset:3px; }
.site-header { box-shadow:none; }
.site-header .wrap { display:grid; grid-template-columns:auto auto minmax(0, 1fr); gap:18px 28px; padding-top:20px; padding-bottom:0; }
.brand-logo { min-width:145px; }
.header-actions { min-width:0; gap:28px; }
.search { width:auto; flex:1; gap:0; border:1px solid var(--line); border-radius:8px; background:#f7f7f8; overflow:hidden; }
.search input { min-width:0; width:100%; background:transparent; border:0; border-radius:0; font-size:14px; padding:14px 16px; }
.search button { border-radius:0; box-shadow:none; }
.header-cart { display:flex; align-items:center; gap:8px; white-space:nowrap; color:var(--text); font-weight:700; padding:10px 0; }
.cart-count { display:grid; place-items:center; min-width:24px; height:24px; padding:0 6px; border-radius:12px; background:var(--soft); color:var(--brand); font-size:12px; }
.main-nav { grid-row:2; grid-column:1 / -1; border-top:1px solid var(--line); gap:24px; }
.nav-link { font-size:14px; font-weight:500; padding:13px 0; border-radius:0; }
.nav-link:hover, .catalog-nav-link { background:none; }
.catalog-toggle > summary { cursor:pointer; background:var(--brand); color:white; padding:13px 20px; border-radius:8px; font-weight:700; list-style:none; white-space:nowrap; }
.catalog-toggle > summary::-webkit-details-marker { display:none; }
.catalog-toggle[open] > summary { background:var(--brand-dark); }
.catalog-dropdown { position:absolute; top:100%; left:24px; right:24px; max-width:1392px; margin:auto; max-height:70vh; overflow-y:auto; overscroll-behavior:contain; padding:20px; background:white; border:1px solid var(--line); border-radius:0 0 12px 12px; box-shadow:0 18px 30px #0002; }
.catalog-dropdown .ctlg-menu { grid-template-columns:repeat(4, minmax(0, 1fr)); align-items:start; gap:12px; }
.catalog-dropdown .ctlg-menu-all { grid-column:1 / -1; }
.catalog-dropdown .ctlg-menu-parent { font-size:14px; }
.catalog-dropdown .ctlg-menu-children { display:grid; }
.catalog-heading { margin:4px 0 26px; }
.catalog-back { font-size:13px; color:var(--muted); }
.ctlg-title-name { color:var(--text); margin:12px 0 0; font-size:32px; font-weight:700; }
.ctlg-title-name span { font-size:20px; }
.catalog-layout { display:grid; grid-template-columns:224px minmax(0, 1fr); gap:32px; align-items:start; }
.catalog-sidebar { min-width:0; }
.local-categories { display:grid; gap:4px; padding-bottom:22px; }
.local-categories h2 { font-size:16px; margin:0 0 12px; }
.local-categories a { display:flex; justify-content:space-between; gap:8px; padding:9px 0; color:var(--text); font-size:14px; line-height:1.4; }
.local-categories a:hover { color:var(--brand); }
.catalog-filters { border-top:1px solid var(--line); }
.catalog-filters > summary { font-size:16px; font-weight:700; cursor:pointer; padding:18px 0; }
.ctlg-filter { display:grid; gap:18px; padding:0; margin:0; }
.ctlg-filter label { font-size:13px; gap:8px; color:var(--text); }
.ctlg-filter input:not([type=checkbox]), .ctlg-filter select { min-width:0; width:100%; border-radius:6px; padding:11px; font-size:14px; }
.btn { border-radius:8px; box-shadow:none; }
.ctlg-items { grid-template-columns:repeat(3, minmax(0, 1fr)); gap:28px 20px; }
.ctlg-items > li { min-width:0; }
.ctlg-item { padding:12px; height:100%; min-height:0; border-radius:10px; box-shadow:none; }
.ctlg-item:hover { transform:none; box-shadow:0 6px 20px #0000000a; border-color:#d5d5da; }
.ctlg-photo { width:100%; height:auto; aspect-ratio:1; border:0; border-radius:6px; }
.ctlg-photo img { width:100%; height:100%; object-fit:contain; }
.ctlg-photo-count { font-size:11px; background:#f4f4f6; color:var(--muted); right:4px; bottom:4px; }
.itm-price, .ctlg-info { list-style:none; padding:0; }
.itm-price { margin:16px 0 12px; }
.itm-price-amount { font-size:25px; font-weight:700; }
.itm-clrs { margin:10px 0 12px; }
.itm-clrs--images { min-height:36px; }
.itm-color-img { width:36px; height:36px; border-radius:5px; }
.itm-color-img:hover { border-color:var(--brand); }
.ctlg-name { font-size:15px; line-height:1.45; font-weight:500; min-height:44px; }
.ctlg-name a { color:var(--text); }
.ctlg-name a:hover { color:var(--brand); }
.ctlg-info { margin:12px 0 4px; gap:6px; font-size:12px; }
.detail { gap:22px; }
.detail > p { margin:0; font-size:13px; line-height:1.5; }
.detail > h1 { margin:0; font-size:30px; line-height:1.3; font-weight:650; }
.product-top { grid-template-columns:minmax(0, 1.35fr) minmax(0, 1fr); gap:40px; }
.product-gallery { padding:0; border:0; box-shadow:none; border-radius:0; min-width:0; }
.product-main-img { width:100%; height:500px; object-fit:contain; border:0; border-radius:0; }
.product-thumbs { gap:8px; }
.product-thumbs a { border:1px solid var(--line); border-radius:6px; overflow:hidden; }
.product-thumbs a:hover { border-color:var(--brand); }
.product-thumbs img { display:block; width:66px; height:66px; border:0; border-radius:0; }
.product-order { position:static; min-width:0; padding:26px; border-radius:12px; box-shadow:none; gap:20px; background:#fafafa; }
.product-order p { margin:0; font-size:13px; line-height:1.5; }
.product-price { color:var(--text); font-size:36px; margin-top:4px; }
.group-colors { margin-top:12px; }
.group-color { border-radius:6px; }
.stock-table th, .stock-table td { padding:12px 0; font-size:14px; }
.stock-table th { font-weight:500; color:var(--muted); }
.qty-row label { display:grid; gap:8px; font-size:14px; min-width:0; }
.qty-row input, .qty-row select { min-width:0; max-width:100%; width:100%; padding:12px; border:1px solid var(--line); border-radius:6px; background:white; color:var(--text); font:inherit; }
.qty-row .btn { padding:15px; font-size:16px; }
.detail-tabs { box-shadow:none; border-radius:10px; padding:28px; }
.detail-tabs h2 { font-size:22px; margin-top:0; }
.detail-tabs img { max-width:100%; height:auto; }
.detail-tabs > div { min-width:0; overflow-wrap:anywhere; }
.detail-tabs table { display:block; max-width:100%; overflow-x:auto; }
.characteristics { grid-template-columns:repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.group-colors { max-height:136px; overflow-y:auto; padding:3px; }
.catalog-dropdown .ctlg-menu-section { min-width:0; overflow-wrap:anywhere; }
.catalog-dropdown .ctlg-menu-parent span:first-child { min-width:0; }
.variant-table-wrap { max-width:100%; overflow-x:auto; }
.detail > section { min-width:0; }
.pager { flex-wrap:wrap; }
@media (max-width:1100px) {
  .site-header .wrap { gap:14px 18px; }
  .header-actions { gap:14px; }
  .catalog-layout { grid-template-columns:200px minmax(0, 1fr); gap:24px; }
  .ctlg-items { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .catalog-dropdown .ctlg-menu { grid-template-columns:repeat(3, minmax(0, 1fr)); }
  .product-top { gap:24px; }
  .product-order { padding:20px; }
}
@media (max-width:760px) {
  .wrap { padding:16px; }
  .topline .wrap { padding:8px 16px; font-size:11px; flex-direction:row; }
  .top-contacts { gap:6px; justify-content:flex-end; }
  .top-contacts a:first-child { display:none; }
  .site-header { position:relative; }
  .site-header .wrap { grid-template-columns:1fr auto; padding:14px 16px 0; gap:14px 10px; }
  .brand-logo { font-size:23px; }
  .catalog-toggle { grid-column:2; grid-row:1; }
  .catalog-toggle > summary { font-size:14px; padding:11px 15px; }
  .header-actions { grid-row:2; grid-column:1 / -1; gap:12px; }
  .search input { padding:12px 10px; font-size:13px; }
  .search button { padding:10px; font-size:12px; }
  .header-cart { font-size:13px; gap:5px; }
  .cart-count { min-width:21px; height:21px; }
  .main-nav { grid-row:3; flex-wrap:nowrap; overflow-x:auto; gap:20px; justify-content:flex-start; }
  .main-nav a { white-space:nowrap; font-size:12px; padding:11px 0; }
  .catalog-dropdown { left:8px; right:8px; padding:12px; max-height:65vh; }
  .catalog-dropdown .ctlg-menu { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
  .catalog-heading { margin:0 0 16px; }
  .ctlg-title-name { font-size:26px; margin-top:10px; }
  .ctlg-title-name span { font-size:16px; }
  .catalog-layout { grid-template-columns:minmax(0, 1fr); gap:18px; }
  .local-categories { display:flex; overflow-x:auto; padding:0 0 12px; gap:8px; }
  .local-categories h2 { display:none; }
  .local-categories a { white-space:nowrap; padding:8px 12px; border:1px solid var(--line); border-radius:6px; font-size:13px; }
  .catalog-filters { border-bottom:1px solid var(--line); }
  .catalog-filters > summary { padding:13px 0; font-size:14px; }
  .ctlg-filter { padding-bottom:16px; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px; }
  .ctlg-items { gap:18px 10px; }
  .ctlg-item { padding:8px; border-radius:8px; }
  .itm-price { margin:10px 0; font-size:12px; }
  .itm-price-amount { font-size:20px; }
  .ctlg-name { font-size:13px; min-height:0; }
  .ctlg-info { font-size:11px; line-height:1.4; overflow-wrap:anywhere; }
  .itm-clrs--images { gap:4px; }
  .itm-color-img { width:29px; height:29px; }
  .detail > h1 { font-size:24px; }
  .product-top { grid-template-columns:minmax(0, 1fr); gap:24px; }
  .product-main-img { height:300px; }
  .product-thumbs { flex-wrap:nowrap; overflow-x:auto; padding-bottom:6px; }
  .product-thumbs a { flex-shrink:0; }
  .product-order { padding:20px; }
  .detail-tabs { padding:18px; }
  .site-footer .wrap { grid-template-columns:1fr; }
}
/* Live quote uses the same purchase-panel palette and remains readable at 320px. */
.cost-summary { min-width:0; border:1px solid var(--line); border-radius:10px; padding:16px; background:#fff; }
.cost-summary h2 { margin:0 0 12px; font-size:17px; }
.cost-summary dl { margin:0; }
.cost-summary dl > div { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:4px 12px; padding:6px 0; }
.cost-summary dt { font-size:13px; color:#666; }
.cost-summary dd { margin:0; font-size:15px; font-weight:600; overflow-wrap:anywhere; }
.cost-summary dl > .cost-summary-total { margin-top:8px; padding-top:12px; border-top:1px solid var(--line); }
.cost-summary-total dd { color:#dc0e7f; font-size:20px; }
.cost-summary-note, .cost-summary-caption { font-size:12px; line-height:1.5; margin:12px 0 0; }
.cost-summary-note { color:#555; }
.cost-summary-caption { color:#777; }
@media (prefers-reduced-motion:reduce) { * { transition:none !important; } }
