/* Iteration 15: micro-fixes for product, cart, footer, header search row, hero carousel and benefits. */

/* Product: related cards use the same layout and rules as the category listing (three per row). */
.design-related-products > .item-tpl .item_end { display:grid !important; grid-template-columns:minmax(0,1fr) minmax(0,1fr); align-items:center; gap:7px; }
.design-related-products > .item-tpl .item_end > .price_block,
.design-related-products > .item-tpl .item_end > div:last-child { width:100% !important; min-width:0; flex:none; }
.design-related-products > .item-tpl .item_end .design-product-card-button { width:100%; padding-left:4px; padding-right:4px; }
.design-related-products > .item-tpl .design-product-card-actions { display:grid; grid-template-columns:minmax(0,140fr) minmax(0,110fr); justify-content:start; }
/* Four per row on desktop, as on the four-column listing; wrap to two and one on narrower screens. */
.design-related-products > .design-product-card-column-three { flex:0 0 25%; max-width:25%; }
@media (max-width:767.98px) { .design-related-products > .design-product-card-column-three { flex-basis:50%; max-width:50%; } }
@media (max-width:767.98px) { .design-related-products { margin-right:-8px; margin-left:-8px; } .design-related-products > .design-product-card-column-three { padding-right:8px; padding-left:8px; } .design-related-products > .design-related-title { padding-right:8px; padding-left:8px; } }   /* 28.11: phones keep two columns */

/* Delivery badge: white circle around the question mark. */
.design-product-delivery > summary::before { background:#fff; }

/* Header search row: categories button content centred without gaps. */
.design-search-row .design-all-categories summary { justify-content:space-evenly; gap:0; }

/* Footer contacts: same phone and mail treatment as the header. */
.design-footer-phones { margin:0; padding:0; list-style:none; }
.design-footer-phones li { margin:0 0 2px; padding:0; }
.design-footer-phones li::before,
.design-footer-phones .fa-li { content:none; display:none; }
.design-footer-phones .head-phone { display:block !important; width:fit-content; max-width:100%; margin:-1px -4px; padding:1px 4px; border-radius:4px; font-size:18px; line-height:1.3; font-weight:600; letter-spacing:-.3px; color:var(--design-blue); white-space:nowrap; text-decoration:none; }
.design-footer-phones .head-phone:hover,
.design-footer-phones .head-phone:focus-visible { color:var(--design-blue-hover); background:var(--design-blue-soft); text-decoration:none; }
.design-footer-email { color:#535d70; font-size:11px; white-space:nowrap; }

/* Cart: summary keeps only the total and the order button. */
.design-cart-summary > dl:not(.design-checkout-totals) > :nth-child(-n+4) { display:none; } /* 27.11: not the checkout totals */
.design-cart-summary .design-cart-request-note,
.design-cart-summary .design-cart-checkout-note { display:none !important; }

/* Cart: title row with the heading on the left and the secondary clear button on the right. */
[hidden] { display:none !important; }
.design-cart-titlebar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px 16px; margin:0 0 18px; }
.design-cart-titlebar > .page-title { margin:0; }
.design-cart-titlebar .design-cart-clear { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.design-cart-clear .design-cart-text-button { display:inline-flex; align-items:center; min-height:36px; padding:6px 14px; border:1px solid #d5dbe8; border-radius:var(--design-radius); background:#fff; color:var(--design-blue); font:inherit; font-size:14px; line-height:1.2; text-decoration:none; cursor:pointer; transition:background-color .18s ease, border-color .18s ease, color .18s ease, transform .12s ease; }
.design-cart-clear .design-cart-text-button:hover,
.design-cart-clear .design-cart-text-button:focus-visible { border-color:#b8c5ed; background:var(--design-blue-soft); color:var(--design-blue-hover); text-decoration:none; }
.design-cart-clear .design-cart-text-button:active { transform:scale(.98); }
.design-cart-clear-confirm { display:inline-flex; flex-wrap:wrap; align-items:center; gap:10px; }
.design-cart-clear-confirm > span:first-child { color:var(--design-ink); font-size:14px; }
.design-cart-clear-confirm .btn-primary { min-height:36px; padding:6px 14px; font-size:14px; }

/* Hero carousel: square controls in the secondary style (white, thin border; soft blue on hover) — 27.11. */
.design-hero-control { width:40px; height:40px; border:1px solid #dce1eb; border-radius:var(--design-radius); background:rgba(255,255,255,.94); color:#535d70; font-size:26px; box-shadow:none; }
.design-hero-control:hover,
.design-hero-control:focus-visible { border-color:#b8c5ed; background:var(--design-blue-soft); color:var(--design-blue); }
.design-hero-dots { bottom:12px; gap:6px; padding:5px 8px; border-radius:var(--design-radius); background:rgba(255,255,255,.92); }
.design-hero-dot { width:10px; height:10px; border:1px solid var(--design-blue); border-radius:2px; background:#fff; }
.design-hero-dot[aria-current=true] { background:var(--design-blue); }
.design-hero-dot:hover { background:var(--design-blue-soft); }

/* Benefits: centred row of tiles with the category card frame, hover lift and icon motion. */
.design-benefits-heading { justify-content:center; }
.design-benefits-list li { flex:0 1 180px; width:180px; max-width:180px; transition:transform .18s ease; }
.design-benefits-list li:hover { transform:translateY(-2px); }
.design-benefit-icon { width:100%; max-width:none; height:150px; aspect-ratio:auto; border:1px solid var(--design-line); border-radius:var(--design-radius); background:#fff; transition:border-color .18s ease, background-color .18s ease; }
.design-benefits-list li:hover .design-benefit-icon,
.design-benefits-list li:focus-within .design-benefit-icon { border-color:#b8c5ed; background:var(--design-blue-soft); }
.design-benefit-icon svg { transition:transform .22s ease; }
.design-benefits-list li:hover .design-benefit-icon svg { transform:scale(1.06); }
.design-benefit-label { width:100%; max-width:none; text-align:center; }

/* Benefits row: flat list, items spread evenly, top aligned (no extra gap). */
.design-benefits ul,
.design-benefits-list { display:flex; flex-direction:row; padding:0; margin:0; list-style:none; align-items:flex-start; justify-content:space-evenly; gap:0; }

/* Hero dots: round. */
.design-hero-dot { border-radius:16px; }

/* Cart summary: white surface, no rule above the total. */
.design-cart-summary { background:#fff; }
.design-cart-summary .design-cart-total-label { border-top:0; padding-top:0; }

/* 27.11 (iteration 20) */
/* Header: warehouse address at the right end of the service links row (hours stay hidden). */
.design-service-address { display:block !important; margin-left:auto; color:#535d70; font-size:12px; line-height:1.4; text-align:right; }
@media (max-width:767.98px) { .design-service-address { margin-left:0; text-align:left; } }
/* Home: "Наши преимущества" has the size of the other home section headings. */
.design-benefits-heading h2 { margin:0; color:var(--design-ink); font-size:32px; font-weight:600; line-height:1.25; }
@media (max-width:767.98px) { .design-benefits-heading h2 { font-size:27px; } }
/* Footer: labels look exactly like their values. */
.design-footer-label { color:inherit; font-size:inherit; font-weight:inherit; letter-spacing:normal; }
/* Product lists: only the 3-column view; the view buttons are hidden while there is nothing to choose. */
.design-view-switch [data-view-id] { display:none !important; }
/* 27.11 (iteration 21): the service row (links left, address right) runs to the right edge of the 1200px header;
   the contacts move to the second row next to the search. */
@media (min-width:768px) {
 .design-header-main .design-service-nav { grid-column:2 / -1; grid-row:1; }
 .design-header-main .design-header-contacts { grid-row:2; }
}
/* 27.11 (iteration 23): the service links start at the left edge of the search field (after the 120px «Каталог» button + 9px gap) */
@media (min-width:768px) { .design-header-main .design-service-links { padding-left:129px; } }

/* 27.11 (iteration 24): phones only (< 768px) — the normal-width site is not affected */
.design-search-toggle { display:none; }
.design-filter-toggle { all:unset; display:inline; font:inherit; color:inherit; }
@media (max-width:767.98px) {
 /* header: no address line; search collapses into a button, the field opens under the header row */
 .design-service-address { display:none !important; }
 .design-search-controls { flex-wrap:wrap; justify-content:flex-end; }
 .design-search-toggle { display:inline-flex; align-items:center; justify-content:center; flex:0 0 46px; width:46px; height:46px; padding:0; border:1px solid #dce1eb; border-radius:var(--design-radius); background:#fff; color:var(--design-blue); font-size:18px; cursor:pointer; }
 .design-search-toggle[aria-expanded="true"] { border-color:var(--design-blue); background:var(--design-blue-soft); }
 .design-search-toggle:focus-visible { outline:none; border-color:var(--design-blue); }
 .design-search-controls #search_form { display:none; }
 .design-header.is-search-open .design-search-controls #search_form { display:flex; order:10; flex:1 1 100%; }
 /* product lists: filters start collapsed; the «Фильтры» heading opens/closes them */
 .div-filter.is-collapsible:not(.is-open) > :not(.design-filter-heading) { display:none !important; }
 .div-filter.is-collapsible:not(.is-open) .design-filter-heading { margin-bottom:0; }
 .design-filter-toggle { display:flex; align-items:center; gap:8px; width:100%; cursor:pointer; }
 .design-filter-toggle::after { content:""; width:8px; height:8px; margin-left:auto; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); transition:transform .16s ease; }
 .div-filter.is-open .design-filter-toggle::after { transform:rotate(225deg); }
 .design-filter-heading .design-filter-title { flex:1 1 auto; }
 /* product cards: price on the first line, «Купить» (and − qty +) full width on the second */
 .design-product-card-actions,
 #eFiltr_results > .item-tpl .design-product-card-actions,
 .design-home-hit-products .design-product-card-actions,
 .design-related-products > .item-tpl .design-product-card-actions,
 .design-info-content > .row > .design-product-card-column-three .design-product-card-actions { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:8px !important; }
 .design-product-card-actions > .price_block,
 .design-product-card-actions > .item-buy { width:100% !important; min-width:0 !important; max-width:none !important; }
 .design-product-card-actions > .item-buy .btn,
 .design-product-card-actions > .item-buy .design-cart-quantity { width:100% !important; max-width:none !important; }
}

/* 27.11.2026: facts block under category listings (assets/seo/facts.php) */
.design-seo-facts { margin:24px 0 0; padding:18px 20px; border:1px solid var(--design-line); border-radius:var(--design-radius); background:#fff; }
.design-seo-facts-title { margin:0 0 10px; font-size:18px; font-weight:600; line-height:1.3; }
.design-seo-facts ul { margin:0; padding-left:18px; color:var(--design-ink); font-size:14px; line-height:1.55; }
.design-seo-facts li + li { margin-top:4px; }
.design-seo-facts a { color:var(--design-blue); }
@media (max-width:767.98px) { .design-seo-facts { padding:14px 14px; } .design-seo-facts-title { font-size:16px; } }
