.products-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; }
.product-card { border:1px solid var(--line); border-radius:var(--radius); background:white; min-width:0; overflow:hidden; display:flex; flex-direction:column; transition:border-color .15s,box-shadow .15s; }
.product-card:hover { border-color:#acc1e2; box-shadow:var(--shadow); }
.product-media { display:block; padding:18px; background:white; height:214px; }
.product-media img { width:100%; height:100%; object-fit:contain; }
.product-card-body { padding:20px; border-top:1px solid #f0f3f8; display:flex; flex-direction:column; flex:1; }
.product-category { font-size:10px; color:var(--muted); margin-bottom:9px; overflow-wrap:anywhere; }
.product-card h3 { font-size:14px; line-height:1.5; letter-spacing:0; margin:0 0 20px; overflow-wrap:anywhere; }
.product-card h3 a { color:var(--ink); }
.product-card h3 a:hover { color:var(--blue); }
.product-card-bottom { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:auto; }
.price { font-size:20px; font-weight:700; letter-spacing:-.02em; white-space:nowrap; }
.price small { font-size:13px; font-weight:500; color:var(--muted); }
.add-button { border:0; background:#edf3ff; color:var(--blue); }
.add-button:hover { background:var(--blue); color:white; }
.catalog-layout { display:grid; grid-template-columns:240px minmax(0,1fr); gap:24px; align-items:start; }
.filter-panel { background:white; border:1px solid var(--line); border-radius:var(--radius); padding:24px; }
.filter-heading { display:flex; gap:10px; align-items:center; border-bottom:1px solid var(--line); padding-bottom:20px; margin-bottom:22px; }
.filter-heading .icon { color:var(--blue); width:18px; height:18px; }
.filter-heading h2 { font-size:15px; letter-spacing:0; }
.filter-panel .field { margin-bottom:20px; }
.filter-panel select { font-size:12px; padding:11px; }
.filter-reset { display:block; text-align:center; color:var(--muted); font-size:11px; margin-top:15px; }
.catalog-results .products-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.catalog-results .product-media { height:190px; }
.catalog-results .empty-state { margin-top:0; }
.search-toolbar { display:grid; grid-template-columns:minmax(0,1fr) 230px auto; align-items:end; gap:16px; background:white; border:1px solid var(--line); padding:24px; border-radius:var(--radius); margin-bottom:28px; }
.result-count { font-size:12px; color:var(--muted); margin-bottom:18px; }
.back-link { margin-bottom:24px; color:var(--muted); }
.product-detail { display:grid; grid-template-columns:1fr 1fr; gap:60px; padding:36px; background:white; border:1px solid var(--line); border-radius:16px; }
.detail-media { background:#f8fafd; border-radius:12px; display:grid; place-items:center; min-height:400px; padding:40px; }
.detail-media img { width:100%; height:340px; object-fit:contain; }
.detail-info { padding-block:12px; }
.detail-info h1 { font-size:32px; line-height:1.35; margin-bottom:24px; overflow-wrap:anywhere; }
.detail-price { font-size:36px; font-weight:750; margin-bottom:14px; }
.detail-price small { font-size:20px; font-weight:500; color:var(--muted); }
.detail-note { color:var(--muted); font-size:12px; max-width:330px; margin-bottom:28px; }
.purchase-form { display:flex; align-items:end; flex-wrap:wrap; gap:14px; }
.quantity-field { width:96px; }
.quantity-field input { height:48px; }
.detail-benefits { border-top:1px solid var(--line); margin-top:28px; padding-top:20px; font-size:12px; color:var(--muted); }
.detail-benefits p { display:flex; gap:10px; align-items:center; margin-bottom:10px; }
.detail-benefits .icon { color:var(--blue); width:17px; height:17px; }
.specifications { display:grid; grid-template-columns:.7fr 1.3fr; gap:50px; padding:36px; background:white; border:1px solid var(--line); border-radius:var(--radius); margin-top:24px; }
.specifications table { border-collapse:collapse; width:100%; }
.specifications tr+tr { border-top:1px solid var(--line); }
.specifications th,.specifications td { font-size:13px; padding:13px 0; text-align:left; vertical-align:top; }
.specifications th { font-weight:400; color:var(--muted); width:55%; padding-right:20px; }
@media(max-width:1080px) { .products-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }.catalog-results .products-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.product-detail { gap:30px; padding:26px; }.detail-info h1 { font-size:27px; }.detail-media { min-height:340px; padding:20px; }.detail-media img { height:280px; } }
@media(max-width:720px) { .products-grid,.catalog-results .products-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }.product-media,.catalog-results .product-media { height:156px; padding:12px; }.product-card-body { padding:14px; }.product-card h3 { font-size:12px; margin-bottom:18px; }.product-category { font-size:9px; }.price { font-size:17px; }.add-button { width:34px; height:34px; }.catalog-layout { grid-template-columns:1fr; gap:20px; }.filter-panel { padding:20px; }.filter-panel form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }.filter-panel .field { margin:0; }.filter-panel .button,.filter-reset { align-self:end; }.filter-reset { padding:13px 0; margin:0; }.filter-heading { padding-bottom:14px; margin-bottom:16px; }.search-toolbar { grid-template-columns:1fr; padding:20px; }.product-detail { grid-template-columns:1fr; padding:20px; gap:20px; }.detail-media { min-height:240px; }.detail-media img { height:230px; }.detail-info h1 { font-size:27px; }.specifications { grid-template-columns:1fr; padding:24px; gap:20px; }.specifications h2 { font-size:23px; }.specifications th { width:55%; } }
@media(max-width:380px) { .products-grid,.catalog-results .products-grid { grid-template-columns:1fr; }.product-media { height:210px; }.filter-panel form { grid-template-columns:1fr; } }

.product-gallery { min-width:0; }
.detail-media a { display:block; width:100%; }
.gallery-thumbnails { display:flex; gap:10px; overflow-x:auto; padding:12px 2px; }
.gallery-thumbnails a { flex:0 0 72px; border:2px solid var(--line); border-radius:8px; padding:5px; background:white; }
.gallery-thumbnails a[aria-current="true"] { border-color:var(--blue); }
.gallery-thumbnails img { width:58px; height:58px; object-fit:contain; }
.gallery-thumbnails a:focus-visible,.gallery-controls button:focus-visible { outline:3px solid var(--blue); outline-offset:3px; }
.gallery-controls { display:flex; align-items:center; justify-content:center; gap:18px; padding:8px; }
.gallery-controls button { border:1px solid var(--line); border-radius:8px; padding:8px 16px; background:white; cursor:pointer; }
.gallery-controls button[hidden] { display:none; }
.gallery-dialog { border:0; border-radius:12px; padding:40px 16px 16px; max-width:95vw; max-height:95vh; }
.gallery-dialog::backdrop { background:rgba(0,0,0,.7); }
.gallery-dialog > img { display:block; max-width:85vw; max-height:75vh; object-fit:contain; margin:auto; }
.gallery-close { position:absolute; right:8px; top:4px; border:0; background:white; font-size:30px; cursor:pointer; }

.product-description { margin-top:24px; padding:28px; background:white; border:1px solid var(--line); border-radius:var(--radius); }
.product-description p { margin-top:16px; white-space:pre-line; overflow-wrap:anywhere; }

.product-card-bottom{flex-wrap:wrap}
.product-card-bottom form{margin-left:auto;flex-shrink:0}
.detail-info,.specifications>*{min-width:0}
.specifications table{table-layout:fixed;overflow-wrap:anywhere}
.detail-info>p,.detail-price{overflow-wrap:anywhere}
.filter-panel summary{cursor:pointer;list-style:none}
.filter-panel summary::-webkit-details-marker{display:none}
.filter-panel summary::after{content:'−';margin-left:auto;font-size:20px;color:var(--blue)}
.filter-panel:not([open]) summary::after{content:'+'}
.filter-panel:not([open]) .filter-heading{border-bottom:0;padding-bottom:0;margin-bottom:0}
@media(max-width:720px){
    .add-button{width:44px;height:44px}
    .filter-panel .field{min-width:0}
    .product-card-bottom .price{font-size:16px}
    .gallery-thumbnails a{min-height:44px}
    .gallery-controls button{min-width:44px;min-height:44px}
    .specifications{padding:20px}
}
