:root {
    --primary: #1a1a1a;       
    --accent: #c4a484;        
    --bg-color: #faf9f8;      
    --white: #ffffff;
    --alert: #d9534f;         
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    --pad-x: clamp(0.75rem, 3.5vw, 1.25rem);
}

html { scroll-behavior: smooth; }

body {
    background-color: #eeeded;
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--primary);
    -webkit-font-smoothing: antialiased;
    width: 100%;
}

.main_wrap {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    background-color: var(--bg-color);
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

section {
    padding: 1.25rem var(--pad-x);
    box-sizing: border-box;
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* --- HEADERS --- */
.head_section { padding-top: 0; }
.brand-header { box-sizing: border-box; text-align: center; padding: 20px 0; background: var(--white); width: 100%; }
.brand-header h2 { font-family: var(--font-heading); font-size: clamp(1.5rem, 1.15rem + 1.75vw, 2rem); margin: 0; letter-spacing: 2px; text-transform: uppercase; }

/* Логотип из двух частей: «LEXARO» шрифтом заголовков и «MENSWEAR»
   разрядкой через тонкий разделитель. letter-spacing добавляет отступ
   ПОСЛЕ последней буквы — он гасится отрицательным margin-right, иначе
   надпись выглядит сдвинутой влево относительно центра. */
.brand-title { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; }
.brand-mark { font-family: var(--font-heading); letter-spacing: 2px; }
.brand-line {
    font-family: var(--font-body, inherit);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 4px;
    margin-right: -4px;
    color: #666;
    padding-left: 10px;
    border-left: 1px solid rgba(0, 0, 0, 0.18);
    line-height: 1;
    white-space: nowrap;
}
.brand-header p { font-size: 0.625rem; text-transform: uppercase; letter-spacing: 3px; color: #888; margin: 5px 0 0; }
.hero-title { font-family: var(--font-heading); font-size: clamp(1.375rem, 1.1rem + 1.4vw, 1.75rem); text-align: center; margin: 0.875rem 0 0.5rem; font-style: italic; font-weight: 400; }
img { max-width: 100%; height: auto; display: block; }

/* --- PRICE BLOCK --- */
.price_block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 0.75rem 0 0.75rem 0;
    background: var(--white);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    width: 100%;
    box-sizing: border-box;
}
.price_block .rating-box { margin: 0 0 10px 0; transform: scale(0.9); }
.cost_block { display: flex; justify-content: space-between; width: 100%; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.old_price { font-size: 0.875rem; color: #999; text-align: center; }
.old_price p { text-decoration: line-through; font-size: 1.125rem; margin: 5px 0 0; }
.new_price { text-align: center; color: var(--alert); }
.new_price p { font-size: clamp(1.625rem, 1.35rem + 1.4vw, 2rem); font-weight: 700; margin: 0; font-family: var(--font-heading); }
.discount-tag { background: var(--primary); color: var(--white); padding: 5px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }

/* --- BENEFITS --- */
.benefits_block { display: flex; flex-wrap: wrap; justify-content: center; margin: 0 0 1rem 0; gap: 10px; width: 100%; box-sizing: border-box; }
.benef_card { flex: 1 1 0; min-width: 5.5rem; box-sizing: border-box; text-align: center; background: var(--white); padding: 15px 5px; border-radius: 6px; border: 1px solid #eee; }
.benef_card h6 { margin: 0; font-size: 0.6875rem; text-transform: uppercase; font-weight: 600; line-height: 1.4; font-family: var(--font-body); }

/* --- BUTTONS --- */
.button {
    display: block; width: 100%; padding: 1.125rem 0.75rem; min-height: 3rem; background-color: var(--primary); color: var(--white);
    text-align: center; text-decoration: none; text-transform: uppercase; font-weight: 600; font-size: 1rem;
    border-radius: 4px; letter-spacing: 1px; transition: background 0.3s; border: none; cursor: pointer;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15); box-sizing: border-box; font-family: var(--font-body);
}
.button:hover { background-color: var(--accent); }

/* --- STOCK BAR --- */
.stock-container { width: 90%; margin: 0.75rem auto 0.5rem; text-align: center; }
.stock-text { color: #d9534f; font-size: 0.8125rem; font-weight: 700; text-transform: uppercase; margin: 0 0 8px 0; display: flex; align-items: center; justify-content: center; gap: 5px; letter-spacing: 0.5px; animation: pulse-red 2s infinite; }
.stock-bar { width: 100%; height: 6px; background-color: #e9ecef; border-radius: 3px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,0.1); }
.stock-fill { height: 100%; background: linear-gradient(90deg, #d9534f, #ff6b6b); border-radius: 3px; transition: width 1s ease-out; }
@keyframes pulse-red { 0% { opacity: 1; } 50% { opacity: 0.8; } 100% { opacity: 1; } }

/* --- SHOWROOM / DETAILS (Виправлено злипання тексту) --- */
.sec_title { font-family: var(--font-heading); font-size: clamp(1.375rem, 1.15rem + 1.15vw, 1.625rem); text-align: center; margin: 0 0 30px 0; position: relative; padding-bottom: 15px; width: 100%; }
.sec_title::after { content: ""; display: block; width: 60px; height: 2px; background: var(--accent); margin: 10px auto 0; }
.desc_bl { width: 100%; }
.description_block { list-style: none; padding: 20px; background: var(--white); border-radius: 8px; margin: 0; }

/* ОСЬ ТУТ ВИПРАВЛЕННЯ ДЛЯ ТЕКСТУ: */
.description_block li {
    display: flex;
    flex-direction: column; /* Текст під заголовком */
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.875rem;
}
.description_block li:last-child { border-bottom: none; }
.description_block li b { 
    color: var(--primary); 
    font-size: 0.9375rem; 
    margin-bottom: 8px; /* Відступ між заголовком і текстом */
    width: 100%; 
    display: block;
}
.description_block li span {
    color: #555;
    line-height: 1.6;
    text-align: left;
    width: 100%;
    display: block;
}

/* --- TABLE --- */
.title_table { text-align: center; text-transform: uppercase; font-size: 0.875rem; letter-spacing: 2px; margin: 30px 0 10px; font-weight: 700; }
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background:
        linear-gradient(90deg, #fff 40%, rgba(255,255,255,0)) left center / 1.25rem 100% no-repeat local,
        linear-gradient(270deg, #fff 40%, rgba(255,255,255,0)) right center / 1.25rem 100% no-repeat local,
        radial-gradient(farthest-side at 0 50%, rgba(0,0,0,0.16), rgba(0,0,0,0)) left center / 0.6rem 100% no-repeat scroll,
        radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,0.16), rgba(0,0,0,0)) right center / 0.6rem 100% no-repeat scroll;
}
.tbl_size { width: 100%; min-width: 17.5rem; border-collapse: collapse; background: var(--white); font-size: 0.8125rem; text-align: center; }
.tbl_size td { border: 1px solid #eee; padding: 8px; }
.tops td { background: var(--primary); color: var(--white); font-weight: 600; }
.sep { height: 30px; width: 100%; }

/* --- PRODUCT CARD --- */
.product_card { background: var(--white); padding: 0 0 20px 0; border-radius: 8px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.03); width: 100%; box-sizing: border-box; }
.product_card .slider { margin: 0; padding: 0; }
.product_card h5 { display: none; }
.text_block_card { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; }
.color { font-family: var(--font-heading); font-size: 1.375rem; margin: 0; }
.color .smler { display: block; font-family: var(--font-body); font-size: 0.875rem; color: var(--accent); margin-top: 5px; }
.product_card .button { width: 90%; margin: 0 auto; }

/* --- SIZE CHIPS --- */
.size_wrapper { width: 90%; margin: 0 auto 15px auto; text-align: center; }
.size_label { font-size: 0.75rem; color: #777; margin-bottom: 8px; text-transform: uppercase; font-weight: 600; }
.size-selector-block {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(3.25rem, 1fr));
    gap: 0.5rem;
    justify-content: center;
}
.size-btn-chip {
    padding: 0.625rem 0.5rem; min-height: 2.75rem; min-width: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background-color: #fff; border: 1px solid #1a1a1a; color: #1a1a1a;
    font-family: 'Montserrat', sans-serif; font-size: 0.8125rem; font-weight: 600;
    text-transform: uppercase; cursor: pointer; border-radius: 4px;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
/* Выбранный размер должен быть виден. Раньше единственной реакцией на
   касание был :hover, который на телефоне залипает после тапа и гаснет от
   касания в стороне: человек не понимал, выбрался размер или нет. */
.size-btn-chip.is-selected {
    background-color: var(--primary); border-color: var(--primary); color: #fff;
}
.size-btn-chip.is-selected::after {
    content: "✓"; margin-left: 0.375rem; font-size: 0.75rem; line-height: 1;
}
.size-btn-chip {
    background-image: linear-gradient(var(--primary), var(--primary));
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: 100% 0%;
    transition: background-size 0.28s cubic-bezier(0.22, 0.61, 0.36, 1),
                color 0.22s ease, border-color 0.25s ease, transform 0.18s ease;
}
@media (hover: hover) {
    .size-btn-chip:hover { background-size: 100% 100%; color: #fff; border-color: var(--primary); }
}
.size-btn-chip:active { transform: scale(0.96); }
.size-btn-chip:active { transform: scale(0.95); }

/* --- HOW TO ORDER --- */
.howto_section { background: var(--white); padding: 40px 20px; text-align: center; }
.howto_section .sec_title { color: var(--primary); margin-bottom: 30px; }
.delivery_grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 10px; }
.del_item { width: 48%; display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 10px; }
.del_icon_wrapper { width: 3.75rem; height: 3.75rem; background-color: var(--bg-color); border: 1px solid var(--accent); border-radius: 50%; display: flex; justify-content: center; align-items: center; margin-bottom: 15px; position: relative; transition: all 0.3s ease; }
.del_icon_wrapper::after { content: attr(data-step); position: absolute; top: -5px; right: -5px; width: 1.25rem; height: 1.25rem; background-color: var(--primary); color: #fff; border-radius: 50%; font-size: 0.625rem; font-weight: 700; display: flex; justify-content: center; align-items: center; }
.del_item:hover .del_icon_wrapper { background-color: var(--accent); box-shadow: 0 5px 15px rgba(196, 164, 132, 0.4); }
.del_item img { width: 1.75rem; height: auto; transition: all 0.3s ease; }
.del_svg { width: 1.75rem; height: 1.75rem; color: var(--primary); transition: color 0.3s ease; }
.ui-ico { width: 1.5rem; height: 1.5rem; display: block; }
.benef_icon { display: flex; justify-content: center; margin-bottom: 0.5rem; color: var(--primary); }
.trust-item .ui-ico { width: 1.375rem; height: 1.375rem; }
.trust-item { color: rgba(255,255,255,0.9); }
.g-icon .ui-ico { width: 1.5rem; height: 1.5rem; margin: 0 auto; }
.g-icon { color: var(--primary); }
.foot-line { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 0; }
.foot-ico { width: 1rem; height: 1rem; flex-shrink: 0; opacity: 0.75; }
.del_item:hover .del_icon_wrapper .del_svg { color: #fff; }
.del_item h4 { margin: 0 0 5px 0; font-size: 0.875rem; text-transform: uppercase; font-family: var(--font-heading); font-weight: 700; color: var(--primary); }
.del_item p { margin: 0; font-size: 0.6875rem; line-height: 1.4; color: #666; font-weight: 400; }

/* --- TRUST STRIP --- */
.trust-strip { box-sizing:border-box; display:flex; justify-content:space-around; background:var(--primary); padding:1rem 0.625rem; margin:1.25rem calc(-1 * var(--pad-x)) 0; width:calc(100% + 2 * var(--pad-x)); }
.trust-item { display:flex; flex-direction:column; align-items:center; text-align:center; font-size: 0.625rem; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; color:rgba(255,255,255,0.9); gap:6px; }
.trust-item span:first-child { font-size: 1.375rem; }

/* --- FORM --- */
.form_section { background: var(--white); padding-bottom: 40px; }
/* Кнопки заказа и выбор цвета ведут к этому блоку (id="order_start"), а не к
   самой форме: раньше поля упирались в верх экрана, и строки «оплата при
   получении», «доставка», «обмен» вместе с ценой оставались выше границы
   видимости. Отступ прокрутки — чтобы блок не прилипал к самому краю. */
.guarantee-block { scroll-margin-top: 0.75rem; }
.guarantee-block { box-sizing:border-box; display:flex; flex-direction:column; gap:12px; background:var(--white); border:1.5px solid #e0d0c0; border-radius:12px; padding:20px; margin:0 0 20px; width:90%; align-self:center; }
.g-item { display:flex; align-items:center; gap:14px; font-size: 0.9375rem; color:#444; line-height:1.4; font-weight:500; }
.g-icon { font-size: 1.625rem; flex-shrink:0; width:2.125rem; text-align:center; }
form { width: 90%; margin: 0 auto; display: flex; flex-direction: column; align-items: center; }
.field { width: 100%; padding: 15px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 4px; font-family: var(--font-body); font-size: 0.875rem; box-sizing: border-box; outline: none; transition: border 0.3s; background: #f9f9f9; }
.field:focus { border-color: var(--accent); background: #fff; }
select.field { cursor: pointer; background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); background-repeat: no-repeat; background-position: right 15px top 50%; background-size: 10px auto; -webkit-appearance: none; -moz-appearance: none; appearance: none; }

/* --- FOOTER --- */
footer { background: #111; color: #666; padding: 30px 15px; text-align: center; font-size: 0.625rem; width: 100%; box-sizing: border-box; }
footer a { color: #888; text-decoration: none; }
.copyright { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; }
.discount-note { color: var(--accent); margin-bottom: 20px; font-size: 0.75rem; }
.bx-wrapper { box-shadow: none !important; border: none !important; margin-bottom: 0 !important; background: transparent !important; }

/* --- RATING --- */
.rating-box { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.rating-stars { color: #eebb00; font-size: 1.125rem; letter-spacing: 2px; }
.rating-text { font-size: 0.6875rem; font-family: var(--font-body); color: #999; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.review-summary { text-align: center; margin-bottom: 20px; }
.review-summary .rating-stars { font-size: 1.5rem; }
.review-summary p { margin: 5px 0 0 0; font-size: 0.8125rem; color: #555; }

/* --- REVIEWS LIST --- */
.reviews-container { display: flex; flex-direction: column; gap: 15px; width: 90%; margin: 0 auto; }
.review-card { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); border: 1px solid #f0f0f0; text-align: left; }
.rev-header { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; align-items: center; margin-bottom: 10px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.rev-header-left { display: flex; align-items: center; gap: 10px; }
.rev-avatar { width: 2.375rem; height: 2.375rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: 0.9375rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-family: var(--font-heading), serif; }
.rev-name { font-weight: 700; font-size: 0.875rem; color: var(--primary); display: block; }
.rev-stars { color: #eebb00; font-size: 0.875rem; letter-spacing: 1px; }
.rev-date { font-size: 0.6875rem; color: #999; }
.rev-text { font-size: 0.875rem; line-height: 1.5; color: #555; font-style: italic; margin: 0; }
.leave-review-block { margin: 40px auto 20px auto; padding: 20px; background: #fff; border-radius: 8px; width: 90%; box-sizing: border-box; border: 1px dashed #ccc; text-align: center; }
.leave-review-block h4 { margin-top: 0; font-family: var(--font-heading); }
.rev-field { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ddd; border-radius: 4px; font-family: var(--font-body); box-sizing: border-box; }
.rev-btn { background: var(--primary); color: #fff; border: none; padding: 12px 20px; border-radius: 4px; cursor: pointer; font-weight: 600; text-transform: uppercase; width: 100%; }

/* --- MOBILE FIXES --- */
@media screen and (max-width: 480px) {
    .stock-text { font-size: 0.6875rem; white-space: normal; flex-wrap: wrap; letter-spacing: 0px; width: 100%; justify-content: center; }
    .stock-container { margin: 0.5rem auto 0.25rem; }
    .size-selector-block { gap: 5px; padding: 0; }
    .size-btn-chip { padding: 0.5rem 0.375rem; font-size: 0.75rem; min-width: 0; border-width: 1px; }
    .product_card { padding-bottom: 15px; }
    .tbl_size td { padding: 0.375rem 0.25rem; }
    .tbl_size { font-size: 0.75rem; }
}

/* --- ИСПРАВЛЕНИЕ ТОЧЕК СЛАЙДЕРА --- */
.bx-wrapper .bx-pager {
    position: absolute;
    bottom: 15px !important; /* Поднимаем точки внутрь картинки */
    width: 100%;
    margin: 0;
    padding: 0;
    z-index: 50; 
}
.bx-wrapper .bx-pager.bx-default-pager a {
    background: rgba(255, 255, 255, 0.6) !important; /* Полупрозрачные белые точки */
    margin: 0 4px !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2); /* Легкая тень, чтобы точки читались на белом фоне */
}
.bx-wrapper .bx-pager.bx-default-pager a.active,
.bx-wrapper .bx-pager.bx-default-pager a:hover {
    background: #1a1a1a !important;
}

/* --- STICKY ORDER BAR --- */
.sticky-order-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary);
    padding: 12px 20px;
    box-shadow: 0 -2px 16px rgba(0,0,0,.3);
    transform: translateY(110%);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sticky-order-bar.visible {
    transform: translateY(0);
}
.sticky-price {
    color: #fff;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.2;
}
.sticky-price small {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255,255,255,.55);
    text-decoration: line-through;
}
.sticky-btn {
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 8px;
    white-space: nowrap;
    transition: opacity 0.2s;
}
.sticky-btn:active { opacity: 0.8; }

/* --- SCROLL ANIMATIONS --- */
.anim-fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.anim-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}
/* --- КОЛЛАЖ ПЕРВОГО ЭКРАНА ---
   Собирается сам из первых кадров каждой расцветки: одно фото — одна
   колонка, четыре — журнальная сетка. Владелец выбрал этот вариант для
   шаблона A вместо галереи с миниатюрами. */
.hero-collage {
    display: grid;
    width: 100%;
    aspect-ratio: 1 / 1;
    gap: 2px;
    background: var(--white);
}
.hero-collage img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: top center;
    display: block;
}
.collage-1 { grid-template-columns: 1fr; }
.collage-2 { grid-template-columns: 1fr 1fr; }
.collage-3 { grid-template-columns: 1.5fr 1fr; grid-template-rows: 1fr 1fr; }
.collage-3 img:nth-child(1) { grid-row: 1 / 3; grid-column: 1; }
.collage-4 { grid-template-columns: 1.5fr 1fr; grid-template-rows: 1fr 1fr 1fr; }
.collage-4 img:nth-child(1) { grid-row: 1 / 4; grid-column: 1; }

/* Шапка: телефон и кнопка заказа появляются только на широком экране */
.hero-info { display: contents; }
.brand-bar { display: flex; flex-direction: column; align-items: center; }
.brand-actions { display: none; }

/* ===== ПЛАНШЕТ И ДЕСКТОП =====
   До этого блока во всём шаблоне был ОДИН брейкпоинт (max-width: 480px):
   от 481 до 1920 px показывалась та же мобильная колонка 480 px по центру,
   а по краям оставались пустые поля. По статистике сети это 12% заходов
   (7.8% десктоп + 4.2% планшеты).

   Всё ниже живёт внутри min-width, поэтому мобильная раскладка не меняется
   ни одним правилом этого блока. */

@media (min-width: 768px) {
    :root { --pad-x: max(1.25rem, calc((100vw - 45rem) / 2)); }
    .main_wrap { max-width: none; box-shadow: none; }

    /* Первый экран в две колонки: фото слева, решающее — справа.
       :not(.form_section) обязателен: секция заказа внизу использует тот же
       класс head_section, и сетка ей не нужна. */
    .head_section:not(.form_section) {
        display: grid;
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        column-gap: 1.75rem;
        align-items: start;
    }
    .head_section:not(.form_section) > .hero-image-wrap { grid-column: 1; grid-row: 1; }
    .head_section:not(.form_section) > .trust-strip { grid-column: 1 / -1; grid-row: 2; }

    /* Правая колонка — один блок с собственным ритмом. Когда её части
       лежали отдельными ячейками сетки, высокая галерея растягивала строки
       и между ценой, преимуществами и кнопкой зияли дыры. */
    .hero-info {
        display: flex; flex-direction: column; gap: 1.25rem;
        grid-column: 2; grid-row: 1;
    }
    .hero-info > * { margin: 0; }
    .hero-info .hero-title {
        text-align: left;
        font-size: clamp(1.5rem, 0.6rem + 1.6vw, 2.25rem);
        text-wrap: balance;
    }
    .hero-info .stock-container { width: 100%; margin: 0; }

    /* Карточки цветов. Сетка из шести колонок: карточка занимает две
       (три в ряд) или три (две в ряд). Какие карточки расширить, считает
       PHP по остатку от деления на три — так один цвет никогда не остаётся
       на пустой строке: 4 цвета это 2+2, 5 — 3+2, 7 — 3+2+2. */
    .main_section { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.5rem; align-items: start; }
    .main_section > .sec_title { grid-column: 1 / -1; }
    .main_section > .product_card { grid-column: span 3; }
    .main_section > .product_card.card-t3 { grid-column: span 2; }
    .main_section > .product_card.card-solo { grid-column: 1 / -1; max-width: 26rem; margin-inline: auto; }
    /* .sep — распорки между карточками для мобильной колонки. В сетке они
       занимали вторую ячейку ряда, и карточки вставали друг под друга. */
    .main_section > .sep { display: none; }

    /* Стрелки слайдера цветов. bxSlider рисует их спрайтом controls.png и
       прячет подпись отрицательным text-indent — перебиваем и то и другое. */
    /* Стрелки слайдера цветов. Раньше это был повёрнутый уголок из двух
       рамок: у такой фигуры центр фигуры не совпадает с центром бокса, и
       стрелка сидела в кружке косо. Теперь иконка идёт фоном по центру. */
    .bx-wrapper .bx-controls-direction a {
        width: 2.5rem; height: 2.5rem; margin-top: -1.25rem;
        border-radius: 50%; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
        font-size: 0; text-indent: 0; z-index: 60;
        background-color: rgba(255, 255, 255, 0.92) !important;
        background-repeat: no-repeat !important;
        background-position: center center !important;
        background-size: 1.125rem 1.125rem !important;
        transition: background-color 0.2s ease;
    }
    .bx-wrapper .bx-prev { left: 0.75rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 5l-7 7 7 7'/%3E%3C/svg%3E") !important; }
    .bx-wrapper .bx-next { right: 0.75rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E") !important; }
    .bx-wrapper .bx-controls-direction a:hover { background-color: #fff !important; }
    .bx-wrapper .bx-pager.bx-default-pager a { width: 0.625rem !important; height: 0.625rem !important; }


    /* Отзывы — в две колонки */
    .reviews-container { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }

    /* Шаги заказа — четыре в ряд вместо двух */
    .del_item { width: 22%; }

    /* Форма заказа не должна растягиваться на всю ширину экрана:
       поле ввода в 900 px никто не просил, и попадать в него мышью неудобно */
    .form_section form,
    .form_section .price_block,
    .form_section .guarantee-block,
    .form_section .stock-container { max-width: 30rem; margin-left: auto; margin-right: auto; }
}

@media (min-width: 1024px) {
    /* Страница идёт от края до края: фон каждой секции тянется на всю
       ширину окна, а содержимое держится в колонке 1200 px по центру.
       Раньше вместо этого посреди экрана стояла колонка 1120 px с серыми
       полями по бокам — растянутая мобилка, а не десктопная страница.

       Поля считаются от 100vw, а не от процентов: к --pad-x привязан вынос
       .trust-strip за края секции, а процент там резолвится от другого
       контейнера и даёт другое число. */
    :root { --pad-x: max(1.5rem, calc((100vw - 75rem) / 2)); }
    .main_wrap { max-width: none; box-shadow: none; }

    /* Шапка держится сверху при прокрутке и несёт телефон и кнопку заказа:
       липкой полосы внизу на десктопе больше нет, а действие под рукой нужно. */
    /* Липкая шапка перекрыла бы верх блока, к которому мы прокручиваем. */
    .guarantee-block { scroll-margin-top: 5.5rem; }

    .brand-header {
        position: sticky; top: 0; z-index: 200;
        padding: 0.875rem var(--pad-x);
        border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    }
    .brand-bar { flex-direction: row; align-items: center; justify-content: space-between; gap: 1.5rem; }
    .brand-id { text-align: left; }
    .brand-header h2 { font-size: 1.625rem; }
    .brand-header p { margin: 0.25rem 0 0; }
    .brand-actions { display: flex; align-items: center; gap: 1.25rem; }
    .brand-phone {
        color: var(--primary); text-decoration: none;
        font-weight: 600; font-size: 0.9375rem; white-space: nowrap;
    }
    .brand-phone:hover { color: var(--accent); }
    .brand-cta {
        background: var(--primary); color: #fff; text-decoration: none;
        padding: 0.6875rem 1.5rem; border-radius: 3px;
        font-size: 0.8125rem; font-weight: 600;
        text-transform: uppercase; letter-spacing: 1px; white-space: nowrap;
        transition: background 0.25s ease;
    }
    .brand-cta:hover { background: var(--accent); }

    .head_section:not(.form_section) {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        column-gap: 3rem;
        padding-top: 2rem;
    }

    /* Детали: характеристики слева, размерные таблицы справа —
       вместо строки «Модель: 002», растянутой на 1200 px */
    .showroom_section {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 3rem;
        align-items: start;
    }
    .showroom_section > .sec_title,
    .showroom_section > .size-help-note { grid-column: 1 / -1; }
    .showroom_section > .desc_bl { grid-column: 1; }
    .showroom_section > .size-tables { grid-column: 2; }
    .showroom_section > .size-tables .title_table:first-child { margin-top: 0; }

    /* Карточки цветов и форма живут в колонке поуже: фотография во всю
       ширину экрана превращается в постер, а не в карточку товара */
    .main_section { padding-inline: max(1.5rem, calc((100vw - 62rem) / 2)); }
    .form_section { padding-inline: max(1.5rem, calc((100vw - 62rem) / 2)); }

    /* Оформление заказа: слева гарантии и цена, справа поля */
    .form_section {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 3rem;
        align-items: start;
    }
    .form_section > .sec_title { grid-column: 1 / -1; }
    .form_section > .guarantee-block { grid-column: 1; grid-row: 2; width: 100%; max-width: none; margin: 0 0 1.25rem; }
    .form_section > .price_block { grid-column: 1; grid-row: 3; max-width: none; margin: 0; }
    .form_section > form { grid-column: 2; grid-row: 2 / span 2; max-width: none; width: 100%; }
    .form_section > .stock-container { grid-column: 2; grid-row: 4; max-width: 30rem; margin-inline: auto; }

    .main_section > .product_card { grid-column: span 2; }
    .main_section > .product_card.card-wide { grid-column: span 3; }

    .reviews-container { grid-template-columns: repeat(3, 1fr); }
    .footer_section > * { max-width: 46rem; margin-left: auto; margin-right: auto; }

    /* Липкая полоса заказа — решение для телефона, где кнопка уезжает вверх.
       На большом экране её роль играет кнопка в закреплённой шапке. */
    .sticky-order-bar { display: none; }
}

/* --- АНИМАЦИИ ---
   Раньше ради двух анимаций тянулся animate.css целиком (78 КБ): из него в
   шаблоне используются только fadeIn (WOW.js вешает его на фото первого
   экрана) и pulse на кнопке заказа. Имена классов и длительность совпадают с
   animate.css, поэтому разметку и вызов new WOW() менять не пришлось. */
.animated { animation-duration: 1s; animation-fill-mode: both; }
.animated.infinite { animation-iteration-count: infinite; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fadeIn { animation-name: fadeIn; }
@keyframes pulse {
    from, to { transform: scale3d(1, 1, 1); }
    50% { transform: scale3d(1.05, 1.05, 1.05); }
}
.pulse { animation-name: pulse; }

/* Уважаем системную настройку «уменьшить движение»: у части людей анимация
   вызывает укачивание, и в iOS/Android это отдельный переключатель. */
@media (prefers-reduced-motion: reduce) {
    .animated, .fadeIn, .pulse { animation: none !important; }
    .anim-fade-up { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}
