/*
 * Full storefront reference recreation layer.
 * Presentation only: existing IDs, Firebase bindings, cart and order behavior stay intact.
 */

:root{
  --ref-ink:#1d1713;
  --ref-muted:#6e6259;
  --ref-cream:#f7f0e5;
  --ref-paper:#fffdf8;
  --ref-gold:#b77821;
  --ref-gold-soft:#efdcb9;
  --ref-line:#ddd0be;
  --ref-dark:#1d1510;
  --ref-shadow:0 6px 18px rgba(48,31,20,.075);
}

body:not(:has(#home.active)){
  background:
    radial-gradient(circle at 0 0,rgba(194,152,92,.08),transparent 24rem),
    var(--ref-cream);
  color:var(--ref-ink);
}

body:not(:has(#home.active)) .announcement-bar{display:none}
body:not(:has(#home.active)) .site-header{
  position:sticky;
  top:0;
  background:var(--ref-dark);
  border-bottom:1px solid #3d2b20;
  box-shadow:none;
}
body:not(:has(#home.active)) .header-main{
  min-height:62px;
  grid-template-columns:minmax(220px,auto) minmax(390px,1fr) 32px auto;
  gap:11px;
}
body:not(:has(#home.active)) .brand-button img{width:40px;height:40px}
body:not(:has(#home.active)) .brand-copy strong{font-size:18px;letter-spacing:.015em}
body:not(:has(#home.active)) .brand-copy small{color:#c8b7a1;font-size:9px;letter-spacing:.025em}
body:not(:has(#home.active)) .nav-inner button,
body:not(:has(#home.active)) .header-category-nav button{padding:7px 5px;font-size:9px;font-weight:600}
body:not(:has(#home.active)) .header-search{
  width:32px;
  height:32px;
  max-width:32px;
  justify-self:end;
  border:0;
  background:transparent;
}
body:not(:has(#home.active)) .header-search input{display:none}
body:not(:has(#home.active)) .header-search button{
  width:32px;
  min-width:32px;
  padding:0;
  border-radius:50%;
  background:transparent;
  color:#fff4e5;
}
body:not(:has(#home.active)) .header-search button:hover{background:rgba(255,255,255,.08)}
body:not(:has(#home.active)) .header-action{min-width:44px;padding-inline:5px;font-size:7px}

.catalog-page,.product-page,.order-page,.cart-page,.dealer-page,.about-page,.contact-page{
  min-height:calc(100vh - 62px);
  padding:18px 0 58px;
}
.catalog-page>.shell,.product-page>.shell,.dealer-page>.shell{width:min(1180px,calc(100% - 34px))}
.narrow-shell{width:min(1060px,calc(100% - 34px))}
.breadcrumb{gap:6px;margin:0 0 13px;color:#766a60;font-size:10px}
.breadcrumb button{font-size:10px}
.eyebrow{color:#9b671e;font-size:8px;letter-spacing:.15em}

/* Catalog */
.catalog-title{align-items:center;margin-bottom:13px}
.catalog-title h1{margin:2px 0 3px;font-family:"Segoe UI",Arial,sans-serif;font-size:25px;font-weight:750;letter-spacing:-.025em}
.catalog-title p{font-size:10px}
.catalog-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 172px;gap:12px;margin-bottom:12px}
.catalog-toolbar label:not(.catalog-search){min-width:0;font-size:8px;font-weight:800}
.catalog-search input,.catalog-toolbar select{min-height:34px;margin-top:0;border-color:var(--ref-line);border-radius:4px;background:#fffdf9;font-size:10px}
.catalog-toolbar select{margin-top:3px}
.catalog-layout{grid-template-columns:178px minmax(0,1fr);gap:16px}
.category-sidebar{top:78px;padding:0 14px 0 0;border-right:1px solid var(--ref-line)}
.filter-head h2{font-size:13px}
.filter-group{padding:11px 0}
.filter-group h3{margin-bottom:7px;font-size:9px;letter-spacing:.08em}
.category-filter{padding:6px 7px;border-radius:3px;font-size:10px}
.price-filter label{font-size:8px}
.price-filter input{min-height:31px;padding:6px;font-size:10px}
.check-filter{padding:8px 0;font-size:9px}
.check-filter input,.consent-row input{width:14px;height:14px}
.category-sidebar .secondary{min-height:32px;padding:6px 9px;font-size:9px}
.cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.cards .card{border-radius:5px;background:#fffdf9;box-shadow:none}
.cards .card:hover{transform:translateY(-1px);box-shadow:var(--ref-shadow)}
.cards .product-image-frame,.cards .placeholder{aspect-ratio:1.14/1}
.cards .card-body{padding:9px 9px 10px}
.cards .card-category{font-size:7px;letter-spacing:.1em}
.cards .card h2{min-height:32px;margin:3px 0 5px;font-size:11px;line-height:1.36}
.cards .card-code{margin-bottom:5px;font-size:8px}
.cards .card-availability{margin-bottom:5px;font-size:7px}
.cards .card-bottom{gap:6px;padding-top:6px}
.cards .price{font-size:17px}
.cards .regular-price{font-size:8px}
.cards .card .primary{min-height:31px;padding:5px 8px;font-size:9px}
.cards .product-flag{padding:3px 5px;font-size:7px}

/* Product detail */
.product-page .breadcrumb{margin-bottom:11px}
.product-detail{grid-template-columns:minmax(0,1.04fr) minmax(330px,.96fr);gap:24px}
.product-gallery{display:grid;grid-template-columns:1fr;gap:8px}
.product-main-image{grid-row:1;min-height:0;height:min(46vw,470px);border:1px solid var(--ref-line);border-radius:5px;background:#eee8de}
.product-main-image img{width:100%;height:100%;object-fit:cover}
.product-detail-gallery{grid-row:2;display:flex;gap:7px;overflow-x:auto;padding-bottom:2px}
.product-thumb{flex:0 0 auto;width:58px;height:58px;border-width:1px;border-radius:4px}
.product-info{position:static;padding:1px 0 0}
.product-category{font-size:8px;letter-spacing:.1em}
.product-info h1{max-width:520px;margin:5px 0 6px;font-family:"Segoe UI",Arial,sans-serif;font-size:clamp(22px,2.1vw,30px);font-weight:750;line-height:1.14;letter-spacing:-.025em}
.product-code{margin:0;color:var(--ref-muted);font-size:9px}
.product-detail-price{margin:12px 0}
.product-detail-price .price{font-family:"Segoe UI",Arial,sans-serif;font-size:25px;font-weight:800}
.product-description{margin:0 0 12px;color:#4f463f;font-size:11px;line-height:1.55}
.product-meta-grid{gap:7px;margin:11px 0}
.product-meta-grid div{padding:8px;border-color:var(--ref-line);border-radius:4px;background:#fbf7f0}
.product-meta-grid span{font-size:8px}.product-meta-grid strong{font-size:11px}
.customization-summary{margin:12px 0}
.customization-summary>strong{margin-bottom:6px;font-size:11px}
.customization-chips{gap:5px}.customization-chips span{padding:4px 6px;border-radius:3px;font-size:8px}
.product-cta{min-height:40px;border-radius:4px;font-size:10px}
.product-assurances{margin-top:12px;padding-top:8px}
.product-assurances p{margin:6px 0;font-size:9px}
.product-page #relatedProductsSection{margin-top:34px}

/* Personalization */
.order-page .page-heading{margin-bottom:12px}
.order-page .page-heading h1{margin:2px 0 4px;font-family:"Segoe UI",Arial,sans-serif;font-size:24px;font-weight:750}
.order-page .page-heading p{font-size:10px}
.chosen{gap:10px;margin-bottom:10px;padding:8px 10px;border-radius:4px;background:#fffdf9}
.chosen-image{width:54px;height:54px;border-radius:4px}
.chosen-info strong{font-size:12px}.chosen-info small{font-size:8px}
.order-workspace{grid-template-columns:minmax(0,1fr) 380px;gap:13px}
.form-card,.order-preview-panel{padding:13px;border-color:var(--ref-line);border-radius:5px;background:#fffdf9;box-shadow:none}
.quantity-field{margin-bottom:10px;font-size:10px}
.quantity-input{grid-template-columns:34px 58px 34px;border-radius:3px}
.quantity-input input{width:58px;min-height:34px}.quantity-input button{font-size:16px}
.quantity-field small{font-size:8px}
.option-group{margin:7px 0;border-radius:4px;background:#fbf6ee}
.option-group summary{padding:9px 10px;font-size:10px}.option-group summary:after{font-size:15px}
.option-choices{padding:9px 10px}
.summary{gap:7px;margin-top:10px;padding:11px;border-radius:4px;background:#f1e5d4;font-size:10px}
.summary h2{font-size:13px}.summary .grand-total{padding-top:8px;font-size:14px}.summary small{font-size:8px}
.form-actions{gap:7px;margin-top:10px}.form-actions button{min-height:36px;font-size:9px}
.order-preview-panel-head span{font-size:11px}.order-preview-panel-head small,.order-preview-copy small{font-size:8px}
.order-preview-large-button{max-height:390px;border-radius:4px;background:#eee8de}.order-preview-large-button img{object-fit:cover}
.order-preview-gallery{gap:6px;padding:8px 1px}.order-preview-thumb{width:48px;height:48px;border-radius:3px}

/* Cart and checkout */
.cart-page>.narrow-shell{width:min(1020px,calc(100% - 34px))}
.cart-page-heading{margin-bottom:11px}
.cart-page-heading h1{margin:2px 0;font-family:"Segoe UI",Arial,sans-serif;font-size:24px;font-weight:750}
.cart-page-heading p{font-size:9px}
.checkout-progress{gap:7px;margin:5px 0 16px}
.checkout-progress span{font-size:9px}.checkout-progress i{width:46px}
.cart-layout{grid-template-columns:minmax(0,1fr) 280px;gap:13px}
.cart-items{gap:8px}
.cart-line{grid-template-columns:76px minmax(0,1fr) auto;gap:10px;padding:9px;border-radius:5px;background:#fffdf9;box-shadow:none}
.cart-line img,.cart-line-placeholder{width:76px;height:76px;border-radius:4px}
.cart-line-info strong{font-size:11px;line-height:1.3}
.cart-line-info span{margin-top:2px;font-size:8px}.cart-line-info small{margin-top:3px;font-size:8px}
.cart-line-actions{gap:5px}.cart-line-price{font-family:"Segoe UI",Arial,sans-serif;font-size:15px}
.cart-quantity{border-radius:3px}.cart-quantity button{width:26px;font-size:11px}.cart-quantity input{width:38px;min-height:28px;font-size:10px}
.remove-line{font-size:8px}
.cart-summary{top:78px;padding:13px;border-radius:5px;background:#fbf4e9}
.cart-summary h2{font-size:14px}.cart-summary button{min-height:35px;font-size:9px}
.empty-state{padding:38px 20px;border-radius:5px}.empty-state>span{font-size:30px}.empty-state h2{font-size:18px}.empty-state p{font-size:10px}
.checkout-form{max-width:900px;margin:8px auto 0;padding:14px;border-radius:5px;background:#fffaf2;box-shadow:none}
.checkout-form{scroll-margin-top:72px}
.checkout-form-head{align-items:center;margin-bottom:10px}.checkout-form-head h2{margin:2px 0;font-size:18px}.checkout-form-head .text-link{font-size:9px}
.checkout-reference-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(240px,.8fr);gap:10px}
.checkout-fields,.checkout-payment-note{padding:12px;border:1px solid #e3d6c4;border-radius:4px;background:#fffdf9}
.checkout-fields h3,.checkout-payment-note h3{margin:0 0 10px;font-size:12px}
.checkout-fields>.grid{gap:8px}.checkout-fields label{display:grid;gap:4px;margin-top:8px;color:#4d443c;font-size:8px;font-weight:750}
.checkout-fields input,.checkout-fields textarea{min-height:33px;padding:7px 8px;border-radius:3px;font-size:10px}.checkout-fields textarea{min-height:58px}
.checkout-payment-note>p{display:flex;gap:6px;margin:0 0 10px;font-size:9px;line-height:1.45}
.checkout-payment-note>p span{color:var(--ref-gold)}
.checkout-payment-note .checkout-note-box{padding:9px;border-radius:4px;background:#f5e5cc;color:#624b34}
.checkout-summary{margin:8px 0 0;padding:10px;background:#f2e7d7}
.checkout-summary h2{font-size:12px}
.consent-row{margin:10px 0 0;font-size:8px}
.checkout-submit{min-height:38px;margin-top:10px;border-radius:4px;font-size:10px}
.order-success,.payment-panel{max-width:520px;margin:18px auto;padding:28px;border-radius:5px;background:#fffaf2;box-shadow:var(--ref-shadow)}
.success-mark{width:46px;height:46px;margin-bottom:10px;background:#bf862f;color:#fff;font-size:22px}
.order-success h2,.payment-panel h2{font-family:"Segoe UI",Arial,sans-serif;font-size:23px}
.order-success p,.payment-panel p{font-size:10px}
.order-success-code{display:block;margin:14px auto 0;padding:13px;border-radius:4px;background:#f0dfc3;font-size:16px}
.success-actions,.payment-actions{margin-top:12px}.success-actions>*{min-height:35px;font-size:9px}

/* Dealer login */
.dealer-login-dialog{width:min(92vw,720px);max-width:720px;border-radius:6px;background:#fffaf1}
.dealer-login-shell{grid-template-columns:minmax(0,1fr) minmax(285px,.92fr)}
.dealer-login-dialog form{gap:9px;padding:26px 30px}
.dealer-brand-mark{display:flex;align-items:center;gap:8px;margin-bottom:7px}
.dealer-brand-mark img{width:35px;height:35px;border:1px solid #cf9a49;border-radius:50%;object-fit:cover}
.dealer-brand-mark span,.dealer-brand-mark strong,.dealer-brand-mark small{display:block}
.dealer-brand-mark strong{font-size:12px}.dealer-brand-mark small{margin-top:1px;color:var(--ref-muted);font-size:8px}
.dealer-dialog-heading h2{margin:2px 0;font-family:"Segoe UI",Arial,sans-serif;font-size:23px;font-weight:750}
.dealer-login-dialog p{font-size:9px;line-height:1.45}
.dealer-login-dialog label{gap:4px;font-size:9px}
.dealer-login-dialog input{min-height:35px;border-radius:3px;font-size:10px}
.dealer-login-message{min-height:14px}.dealer-login-dialog .primary{min-height:37px;font-size:10px}
.dealer-login-visual{min-height:410px;padding:24px;background-position:center;background-size:cover}
.dealer-login-visual>div{gap:8px}.dealer-login-visual img{width:38px;height:38px}.dealer-login-visual>div span{font-size:8px}
.dealer-login-visual h3{margin:13px 0 10px;font-size:23px}.dealer-login-visual ul{gap:7px}.dealer-login-visual li{padding-left:18px;font-size:9px}
.dialog-close{width:28px;height:28px;border-radius:50%;font-size:18px}

/* Footer remains one shared branded component. */
.site-footer{padding-top:34px;background:#1d1510;border-top:1px solid #4a3425}
.footer-grid{gap:24px}.footer-grid h2{font-size:9px}.footer-grid button,.footer-grid a,.footer-grid p{font-size:10px}.footer-brand img{width:42px;height:42px}
.footer-bottom{padding-block:14px;font-size:9px}

@media(max-width:900px){
  body:not(:has(#home.active)) .header-main{position:relative;grid-template-columns:auto auto 32px auto;min-height:58px}
  body:not(:has(#home.active)) .mobile-menu-toggle{display:block}
  body:not(:has(#home.active)) .brand-copy{display:none}
  body:not(:has(#home.active)) .primary-nav{display:none}
  body:not(:has(#home.active)) .primary-nav.is-open{display:block}
  .catalog-layout{grid-template-columns:1fr}.category-sidebar{border-right:0}
  .product-detail,.order-workspace,.cart-layout{grid-template-columns:1fr}
  .product-main-image{height:min(74vw,520px)}
  .order-preview-panel{order:-1}.cart-summary{position:static}
  .checkout-reference-grid{grid-template-columns:1fr}
}

@media(max-width:600px){
  body:not(:has(#home.active)) .header-main{grid-template-columns:32px minmax(0,1fr) 32px auto;gap:6px}
  body:not(:has(#home.active)) .brand-button img{width:34px;height:34px}
  body:not(:has(#home.active)) .header-action{min-width:30px}
  .catalog-page,.product-page,.order-page,.cart-page,.dealer-page,.about-page,.contact-page{padding:12px 0 42px}
  .catalog-page>.shell,.product-page>.shell,.dealer-page>.shell,.narrow-shell,.cart-page>.narrow-shell{width:calc(100% - 20px)}
  .breadcrumb{margin-bottom:9px;font-size:8px}.breadcrumb button{font-size:8px}
  .catalog-title{align-items:start}.catalog-title h1{font-size:21px}.catalog-title p{font-size:8px}
  .filter-drawer-toggle{min-height:31px;padding:6px 9px;font-size:8px}
  .catalog-toolbar{grid-template-columns:1fr 112px;gap:7px}.catalog-toolbar select,.catalog-search input{min-height:32px;font-size:8px}
  .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .cards .product-image-frame,.cards .placeholder{aspect-ratio:1/1}
  .cards .card-body{padding:7px}.cards .card h2{min-height:42px;font-size:9px}.cards .price{font-size:14px}
  .cards .card-availability{display:none}.cards .card .primary{min-height:29px;font-size:8px}
  .product-detail{gap:14px}.product-main-image{height:min(88vw,410px)}.product-thumb{width:50px;height:50px}
  .product-info h1{font-size:23px}.product-detail-price .price{font-size:22px}.product-description{font-size:9px}
  .product-meta-grid{grid-template-columns:1fr 1fr}.product-cta{min-height:38px}
  .order-page .page-heading h1{font-size:21px}.order-workspace{gap:8px}.order-preview-panel{padding:8px}.order-preview-large-button{max-height:330px}
  .cart-page-heading h1{font-size:21px}.checkout-progress{margin-bottom:12px}.checkout-progress b{display:inline}.checkout-progress i{width:24px}
  .cart-line{grid-template-columns:62px minmax(0,1fr);padding:7px}.cart-line img,.cart-line-placeholder{width:62px;height:62px}.cart-line-actions{grid-column:2;justify-items:start}
  .checkout-form{padding:9px}.checkout-fields,.checkout-payment-note{padding:9px}.checkout-fields>.grid{grid-template-columns:1fr}
  .dealer-login-dialog{width:min(94vw,390px)}.dealer-login-shell{grid-template-columns:1fr}.dealer-login-visual{display:none}.dealer-login-dialog form{padding:22px}
  .footer-grid{grid-template-columns:1fr 1fr}.footer-brand{grid-column:1/-1}
}

@media(max-width:370px){
  .catalog-toolbar{grid-template-columns:1fr}.cards{gap:6px}.cards .card h2{font-size:8.5px}
  .footer-grid{grid-template-columns:1fr}
}
