/**
 * Catalog CSS v3
 */

/* CATALOG INDEX */
.catalog-index-section { background: var(--bg-secondary); }
.catalog-search-wrap { margin-bottom: 2.5rem; }
.catalog-search-modern {
    display: flex; align-items: center; gap: 1rem;
    background: var(--bg-primary); border: 1.5px solid var(--border-color);
    border-radius: 50px; padding: 0.875rem 1.5rem; max-width: 600px;
    transition: border-color .2s, box-shadow .2s;
}
.catalog-search-modern:focus-within { border-color: var(--color-secondary); box-shadow: 0 0 0 4px rgba(37,99,235,.08); }
.catalog-search-modern i { color: var(--text-muted); flex-shrink: 0; }
.catalog-search-modern input { flex: 1; border: none; background: none; font-size: 1rem; outline: none; color: var(--text-primary); }
.catalog-search-modern button { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0; font-size: .875rem; transition: color .2s; }
.catalog-search-modern button:hover { color: var(--text-primary); }
.catalog-cat-count { position: absolute; bottom: .75rem; right: .75rem; background: rgba(37,99,235,.85); backdrop-filter: blur(8px); color: #fff; font-size: .6875rem; font-weight: 700; padding: .2rem .5rem; border-radius: 6px; }

/* CATALOG CATEGORY */
.catalog-cat-section { background: var(--bg-secondary); }
.cat-toolbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1.5rem; padding:1rem 1.25rem; background:var(--bg-primary); border-radius:var(--border-radius); border:1px solid var(--border-color); flex-wrap:wrap; }
.cat-toolbar-left { display:flex; align-items:center; gap:1.5rem; }
.cat-toolbar-right { display:flex; align-items:center; gap:1rem; }
.cat-count { font-size:.9375rem; color:var(--text-secondary); }
.cat-count strong { color:var(--text-primary); font-weight:800; }
.cat-sort { display:flex; align-items:center; gap:.5rem; color:var(--text-secondary); font-size:.875rem; }
.cat-sort-select { border:1.5px solid var(--border-color); border-radius:8px; padding:.375rem .75rem; font-size:.875rem; font-weight:600; color:var(--text-primary); background:var(--bg-primary); outline:none; cursor:pointer; }
.cat-sort-select:focus { border-color:var(--color-secondary); }
.cat-filter-btn { display:flex; align-items:center; gap:.5rem; padding:.5rem 1rem; border-radius:8px; border:1.5px solid var(--border-color); background:var(--bg-primary); font-size:.875rem; font-weight:700; color:var(--text-secondary); cursor:pointer; transition:all .2s; position:relative; }
.cat-filter-btn:hover,.cat-filter-btn.active { border-color:var(--color-secondary); color:var(--color-secondary); background:rgba(37,99,235,.05); }
.cat-filter-badge { background:var(--color-secondary); color:#fff; font-size:.625rem; font-weight:900; width:16px; height:16px; border-radius:50%; display:flex; align-items:center; justify-content:center; }
.cat-view-btns { display:flex; gap:.35rem; }
.cat-view-btn { width:36px; height:36px; display:flex; align-items:center; justify-content:center; border-radius:8px; border:1.5px solid var(--border-color); background:var(--bg-primary); color:var(--text-muted); cursor:pointer; transition:all .2s; font-size:.875rem; }
.cat-view-btn.active,.cat-view-btn:hover { border-color:var(--color-secondary); color:var(--color-secondary); background:rgba(37,99,235,.05); }
.cat-filter-panel { max-height:0; overflow:hidden; transition:max-height .4s cubic-bezier(.16,1,.3,1); margin-bottom:0; }
.cat-filter-panel.open { max-height:400px; margin-bottom:1.5rem; }
.cat-filter-inner { display:flex; gap:2.5rem; flex-wrap:wrap; padding:1.5rem; background:var(--bg-primary); border-radius:var(--border-radius); border:1px solid var(--border-color); }
.cat-filter-group { display:flex; flex-direction:column; gap:.75rem; }
.cat-filter-title { font-size:.8125rem; font-weight:800; color:var(--text-primary); text-transform:uppercase; letter-spacing:.05em; }
.cat-price-row { display:flex; align-items:center; gap:.75rem; }
.cat-price-wrap { display:flex; align-items:center; gap:.5rem; font-size:.875rem; color:var(--text-muted); }
.cat-price-sep { font-size:.875rem; color:var(--text-muted); }
.cat-price-input { width:100px; padding:.5rem .75rem; border:1.5px solid var(--border-color); border-radius:8px; font-size:.875rem; outline:none; }
.cat-price-input:focus { border-color:var(--color-secondary); }
.cat-checkbox { display:flex; align-items:center; gap:.625rem; cursor:pointer; font-size:.9375rem; font-weight:500; color:var(--text-primary); }
.cat-checkbox input { display:none; }
.cat-checkbox-mark { width:20px; height:20px; flex-shrink:0; border:2px solid var(--border-color); border-radius:6px; background:var(--bg-primary); transition:all .2s; display:flex; align-items:center; justify-content:center; }
.cat-checkbox input:checked + .cat-checkbox-mark { background:var(--color-secondary); border-color:var(--color-secondary); }
.cat-checkbox input:checked + .cat-checkbox-mark::after { content:''; width:5px; height:9px; border:2px solid #fff; border-top:none; border-left:none; transform:rotate(45deg) translateY(-1px); }
.cat-filter-actions { flex-direction:row !important; gap:.75rem; align-items:center; }

/* PRODUCTS GRID */
.cat-products-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:1.25rem; }
.cat-product-card { background:var(--bg-primary); border-radius:var(--border-radius-lg); overflow:hidden; border:1px solid var(--border-color); box-shadow:var(--shadow-card); transition:all .4s cubic-bezier(.16,1,.3,1); display:flex; flex-direction:column; }
.cat-product-card:hover { transform:translateY(-8px); box-shadow:var(--shadow-card-hover); border-color:rgba(37,99,235,.2); }
.cat-product-img { position:relative; height:200px; overflow:hidden; background:var(--bg-light); flex-shrink:0; }
.cat-product-img img { width:100%; height:100%; object-fit:cover; transition:transform .5s cubic-bezier(.16,1,.3,1); }
.cat-product-card:hover .cat-product-img img { transform:scale(1.07); }
.cat-product-badge-hit { position:absolute; top:.75rem; left:.75rem; background:linear-gradient(135deg,#f59e0b,#e85d04); color:#fff; font-size:.7rem; font-weight:800; padding:.2rem .6rem; border-radius:50px; display:flex; align-items:center; gap:.3rem; text-transform:uppercase; }
.cat-product-actions { position:absolute; top:.75rem; right:.75rem; display:flex; flex-direction:column; gap:.35rem; opacity:0; transform:translateX(8px); transition:all .3s cubic-bezier(.16,1,.3,1); }
.cat-product-card:hover .cat-product-actions { opacity:1; transform:translateX(0); }
.cat-product-action-btn { width:36px; height:36px; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.95); border-radius:50%; font-size:.875rem; color:var(--text-secondary); text-decoration:none; border:none; cursor:pointer; box-shadow:var(--shadow); transition:all .2s; }
.cat-product-action-btn:hover { background:var(--color-secondary); color:#fff; }
.cat-product-body { padding:1.125rem 1.25rem; display:flex; flex-direction:column; flex:1; }
.cat-product-art { font-size:.6875rem; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.05em; margin-bottom:.35rem; }
.cat-product-title { font-size:.9375rem; font-weight:800; color:var(--text-primary); line-height:1.35; letter-spacing:-.01em; margin-bottom:.5rem; flex:1; }
.cat-product-title a { color:inherit; text-decoration:none; }
.cat-product-title a:hover { color:var(--color-secondary); }
.cat-product-desc { font-size:.8125rem; color:var(--text-secondary); line-height:1.6; margin-bottom:.875rem; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.cat-product-footer { display:flex; align-items:center; justify-content:space-between; padding-top:.875rem; border-top:1px solid var(--border-color); margin-top:auto; }
.cat-product-price { display:flex; flex-direction:column; }
.cat-price-val { font-size:1.0625rem; font-weight:900; color:var(--text-primary); letter-spacing:-.02em; line-height:1; }
.cat-price-unit { font-size:.6875rem; color:var(--text-muted); margin-top:2px; }
.cat-price-request { font-size:.875rem; font-weight:600; color:var(--text-muted); }
.cat-products-list .cat-product-card { flex-direction:row; align-items:stretch; grid-column:1/-1; }
.cat-products-list .cat-product-img { width:140px; min-height:100%; flex-shrink:0; }
.cat-products-list .cat-product-body { padding:1.25rem; flex:1; display:flex; flex-direction:column; justify-content:space-between; }
.cat-products-list .cat-product-list-extra { display:none; }
.cat-product-list-extra { display:none; }
.cat-products-list .cat-product-desc { display:block; -webkit-line-clamp:2; }
.cat-products-list .cat-product-footer { margin-top:auto; }

/* PRODUCT PAGE */
.product-detail { display:grid; grid-template-columns:1fr 1fr; gap:3rem; align-items:start; margin-bottom:3rem; }
.product-gallery { position:sticky; top:calc(var(--header-height) + 2rem); }
.product-main-image { position:relative; border-radius:var(--border-radius-lg); overflow:hidden; background:var(--bg-light); margin-bottom:1rem; aspect-ratio:4/3; }
.product-main-image img { width:100%; height:100%; object-fit:cover; transition:opacity .15s; cursor:zoom-in; }
.gallery-zoom-btn { position:absolute; bottom:1rem; right:1rem; width:40px; height:40px; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.9); backdrop-filter:blur(8px); border-radius:10px; color:var(--text-secondary); font-size:.875rem; cursor:pointer; border:none; transition:all .2s; box-shadow:var(--shadow); }
.gallery-zoom-btn:hover { background:var(--color-secondary); color:#fff; }
.product-thumbnails { display:flex; gap:.625rem; flex-wrap:wrap; }
.product-thumbnail { width:72px; height:72px; border-radius:10px; overflow:hidden; border:2px solid var(--border-color); cursor:pointer; padding:0; background:var(--bg-light); transition:border-color .2s; flex-shrink:0; }
.product-thumbnail img { width:100%; height:100%; object-fit:cover; }
.product-thumbnail.active,.product-thumbnail:hover { border-color:var(--color-secondary); }
.product-info-meta { display:flex; align-items:center; gap:1rem; margin-bottom:1rem; flex-wrap:wrap; }
.product-article { font-size:.75rem; font-weight:700; color:var(--text-muted); background:var(--bg-light); padding:.25rem .75rem; border-radius:50px; }
.product-info-category { display:inline-flex; align-items:center; gap:.4rem; font-size:.8125rem; font-weight:600; color:var(--color-secondary); text-decoration:none; }
.product-info-title { font-size:clamp(1.5rem,3vw,2rem); font-weight:900; color:var(--text-primary); line-height:1.2; letter-spacing:-.025em; margin-bottom:1rem; }
.product-info-desc { font-size:1rem; color:var(--text-secondary); line-height:1.7; margin-bottom:1.5rem; }
.product-price-box { padding:1.5rem; background:var(--bg-secondary); border-radius:var(--border-radius); border:1px solid var(--border-color); margin-bottom:1.5rem; }
.product-price-old { font-size:1rem; color:var(--text-muted); text-decoration:line-through; margin-bottom:.25rem; }
.product-price-current { font-size:2rem; font-weight:900; color:var(--text-primary); letter-spacing:-.03em; line-height:1; }
.product-price-unit { font-size:.875rem; font-weight:500; color:var(--text-muted); }
.product-price-request { font-size:1.25rem; font-weight:700; color:var(--text-secondary); }
.product-actions { display:flex; gap:1rem; margin-bottom:1.5rem; flex-wrap:wrap; }
.product-quick-info { display:flex; flex-direction:column; gap:.875rem; }
.product-quick-item { display:flex; align-items:center; gap:.875rem; }
.product-quick-icon { width:40px; height:40px; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,var(--color-secondary),var(--color-secondary-dark)); border-radius:10px; color:#fff; font-size:.875rem; flex-shrink:0; }
.product-quick-label { font-size:.75rem; color:var(--text-muted); font-weight:600; }
.product-quick-value { font-size:.9375rem; font-weight:700; color:var(--text-primary); }
.product-tabs { margin-top:2.5rem; }
.product-tabs-nav { display:flex; border-bottom:2px solid var(--border-color); }
.product-tab-btn { padding:.875rem 1.5rem; font-size:.9375rem; font-weight:700; color:var(--text-secondary); background:none; border:none; cursor:pointer; position:relative; transition:color .2s; }
.product-tab-btn::after { content:''; position:absolute; bottom:-2px; left:0; right:0; height:2px; background:var(--color-secondary); transform:scaleX(0); transition:transform .2s; }
.product-tab-btn.active { color:var(--color-secondary); }
.product-tab-btn.active::after { transform:scaleX(1); }
.product-tab-content { display:none; padding:2rem 0; }
.product-tab-content.active { display:block; }
.product-description-text { font-size:1rem; line-height:1.85; color:var(--text-primary); }
.product-specs-table { display:flex; flex-direction:column; }
.product-spec-row { display:flex; align-items:center; gap:1rem; padding:.875rem 0; border-bottom:1px solid var(--border-color); }
.product-spec-row:last-child { border-bottom:none; }
.product-spec-key { font-size:.9375rem; color:var(--text-secondary); flex-shrink:0; width:220px; }
.product-spec-dots { flex:1; border-bottom:1px dashed var(--border-color); min-width:20px; }
.product-spec-val { font-size:.9375rem; font-weight:700; color:var(--text-primary); text-align:right; }
.product-lightbox { position:fixed; inset:0; z-index:var(--z-modal); background:rgba(5,8,16,.97); display:flex; align-items:center; justify-content:center; opacity:0; visibility:hidden; transition:all .3s; }
.product-lightbox.active { opacity:1; visibility:visible; }
.product-lightbox-overlay { position:absolute; inset:0; }
.product-lightbox-close { position:fixed; top:1.5rem; right:1.5rem; width:48px; height:48px; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.1); border-radius:50%; color:#fff; font-size:1.125rem; cursor:pointer; border:none; transition:all .2s; z-index:1; }
.product-lightbox-close:hover { background:rgba(255,255,255,.2); transform:rotate(90deg); }
.product-lightbox-prev,.product-lightbox-next { width:52px; height:52px; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.08); border-radius:50%; color:rgba(255,255,255,.7); font-size:1rem; cursor:pointer; border:none; transition:all .25s; position:relative; z-index:1; }
.product-lightbox-prev:hover,.product-lightbox-next:hover { background:rgba(37,99,235,.5); color:#fff; transform:scale(1.1); }
.product-lightbox-img-wrap { position:relative; z-index:1; margin:0 1.5rem; }
.product-lightbox-img-wrap img { max-width:80vw; max-height:85vh; object-fit:contain; border-radius:12px; box-shadow:0 32px 80px rgba(0,0,0,.6); }
.product-lightbox-counter { position:fixed; bottom:1.5rem; left:50%; transform:translateX(-50%); font-size:.875rem; color:rgba(255,255,255,.45); font-weight:600; background:rgba(255,255,255,.06); padding:.375rem 1rem; border-radius:50px; z-index:1; }

/* RESPONSIVE */
@media (max-width:1100px) { .cat-products-grid { grid-template-columns:repeat(3,1fr); } }
@media (max-width:768px) {
    .cat-products-grid { grid-template-columns:repeat(2,1fr); }
    .product-detail { grid-template-columns:1fr; }
    .product-gallery { position:static; }
    .cat-toolbar { flex-direction:column; align-items:flex-start; }
    .cat-toolbar-right { width:100%; justify-content:space-between; }
}
@media (max-width:768px) {
    .cat-products-list .cat-product-card { flex-direction: row; align-items: stretch; }
    .cat-products-list .cat-product-img { width: 110px; min-height: 100%; }
    .cat-products-list .cat-product-body { padding: 1rem; }
    .cat-products-list .cat-product-desc { -webkit-line-clamp: 2; }
}
@media (max-width:480px) {
    .cat-products-grid { grid-template-columns:1fr; }
    .cat-products-list .cat-product-img { width: 80px; }
    .cat-products-list .cat-product-body { padding: .75rem; }
    .cat-products-list .cat-product-title { font-size: .85rem; }
    .cat-products-list .cat-product-desc { display: none; }
    .cat-products-list .cat-product-art { display: none; }
    .cat-products-list .cat-product-footer { flex-wrap: wrap; gap: .4rem; }
    .cat-products-list .cat-product-footer .btn { font-size: .78rem; padding: 5px 10px; }
}

/* Touch устройства — всегда показывать кнопки действий */
@media (hover: none) {
    .cat-product-actions { opacity: 1; transform: translateX(0); }
}
