/* ============================================================
   ПРОФТОРГ — редизайн metall03.ru
   Палитра от логотипа: синий #1b9cd9, графит #2b3138
   ============================================================ */

:root {
    --accent: #1b9cd9;
    --accent-dark: #147cb0;
    --accent-light: #e4f4fc;
    --dark: #262c33;
    --dark-2: #2f3740;
    --text: #2b3138;
    --muted: #7b828c;
    --border: #e3e8ee;
    --bg: #f4f6f9;
    --white: #ffffff;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 2px 14px rgba(38, 44, 51, 0.07);
    --shadow-hover: 0 10px 28px rgba(38, 44, 51, 0.13);
    --container: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--white);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-dark);
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: 15px;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 10px;
}

.section-kicker::before {
    content: '';
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: var(--accent);
}

.section-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 28px;
    letter-spacing: -0.01em;
}

/* ---------- Кнопки ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
    white-space: nowrap;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-dark);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    padding: 11px 24px;
}

.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

.btn-dark {
    background: var(--dark);
    color: #fff;
}

.btn-dark:hover {
    background: var(--dark-2);
    color: #fff;
}

.btn-sm {
    padding: 9px 16px;
    font-size: 14px;
    border-radius: 8px;
}

/* ============================================================
   Шапка
   ============================================================ */

.topbar {
    background: var(--dark);
    color: #aeb6bf;
    font-size: 13px;
}

.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 38px;
}

.topbar-address {
    display: flex;
    align-items: center;
    gap: 7px;
}

.topbar a {
    color: #aeb6bf;
}

.topbar a:hover {
    color: #fff;
}

.topbar-links {
    display: flex;
    gap: 20px;
}

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 10px rgba(38, 44, 51, 0.05);
}

.header-main .container {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 84px;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    height: 44px;
    width: auto;
}

.nav {
    display: flex;
    gap: 4px;
}

.nav a {
    display: block;
    padding: 10px 14px;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px;
}

.nav a:hover,
.nav a.active {
    color: var(--accent);
    background: var(--accent-light);
}

.header-contacts {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-phone {
    text-align: right;
}

.header-phone a {
    display: block;
    color: var(--text);
    font-weight: 800;
    font-size: 17px;
    line-height: 1.3;
    white-space: nowrap;
}

.header-phone a:hover {
    color: var(--accent);
}

.header-phone span {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.callback-link {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    padding: 0;
}

.callback-link:hover {
    color: var(--accent-dark);
}

/* Корзина в шапке */

.header-cart {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-weight: 700;
    font-size: 14px;
}

.header-cart:hover {
    background: var(--accent-light);
    color: var(--accent-dark);
}

.header-cart svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
}

.cart-count {
    position: absolute;
    top: 2px;
    left: 28px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--accent);
    color: #fff;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-count.hidden {
    display: none;
}

/* Бургер */

.burger {
    display: none;
    background: none;
    border: none;
    width: 44px;
    height: 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.burger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--dark);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

.burger.open span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.burger.open span:nth-child(2) {
    opacity: 0;
}

.burger.open span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* Мобильное меню */

.mobile-menu {
    display: none;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 12px 20px 20px;
}

.mobile-menu.open {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 12px 4px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.mobile-menu a:last-of-type {
    border-bottom: none;
}

.mobile-menu .btn {
    width: 100%;
    margin-top: 12px;
}

/* ============================================================
   Хиро
   ============================================================ */

.hero {
    background:
        linear-gradient(100deg, rgba(16, 21, 26, 0.94) 0%, rgba(16, 21, 26, 0.72) 45%, rgba(16, 33, 46, 0.35) 100%),
        url('/images/hero-bg.png') center right / cover no-repeat;
    background-color: var(--dark);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, transparent 70%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    padding-top: 88px;
    padding-bottom: 88px;
    max-width: var(--container);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 100px;
    background: rgba(27, 156, 217, 0.14);
    backdrop-filter: blur(4px);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #cfe9f7;
    margin-bottom: 22px;
}

.hero-kicker::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.hero h1 {
    font-size: 46px;
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -0.015em;
    max-width: 640px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.hero p {
    margin-top: 18px;
    font-size: 18px;
    color: #c3ccd4;
    max-width: 560px;
}

.hero-actions {
    margin-top: 32px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero .btn-outline {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}

.hero .btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
}

.hero-stats {
    margin-top: 52px;
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}

.hero-stat {
    padding: 4px 36px;
    border-left: 2px solid rgba(27, 156, 217, 0.55);
}

.hero-stat:first-child {
    padding-left: 0;
    border-left: none;
}

.hero-stat b {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--accent);
}

.hero-stat span {
    font-size: 14px;
    color: #aeb6bf;
}

/* ---------- Бегущая строка категорий ---------- */

.ticker {
    background: var(--dark);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    overflow: hidden;
    padding: 14px 0;
    user-select: none;
}

.ticker-track {
    display: flex;
    gap: 0;
    width: max-content;
    animation: tickerMove 40s linear infinite;
}

.ticker:hover .ticker-track {
    animation-play-state: paused;
}

.ticker span {
    display: flex;
    align-items: center;
    white-space: nowrap;
    color: #8f97a1;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ticker span::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    transform: rotate(45deg);
    background: var(--accent);
    margin: 0 22px;
    flex-shrink: 0;
}

@keyframes tickerMove {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* ---------- Плашка-акция ---------- */

.promo {
    background:
        repeating-linear-gradient(-55deg, rgba(255, 255, 255, 0.05) 0 18px, transparent 18px 36px),
        linear-gradient(90deg, var(--accent-dark) 0%, var(--accent) 60%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.promo .container {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-top: 18px;
    padding-bottom: 18px;
    flex-wrap: wrap;
}

.promo-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-icon svg {
    width: 26px;
    height: 26px;
    stroke: #fff;
}

.promo-text b {
    display: block;
    font-size: 17px;
    font-weight: 800;
}

.promo-text span {
    font-size: 14px;
    opacity: 0.85;
}

/* ============================================================
   Секции главной
   ============================================================ */

.section {
    padding: 64px 0;
}

.section-gray {
    background: var(--bg);
}

/* ---------- Сетка категорий ---------- */

.cats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.cat-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text);
    font-weight: 700;
    font-size: 15px;
    line-height: 1.3;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.cat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.25s;
}

.cat-card::after {
    content: '→';
    margin-left: auto;
    color: var(--accent);
    font-size: 18px;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.2s, transform 0.2s;
}

.cat-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
    color: var(--accent-dark);
}

.cat-card:hover::before {
    transform: scaleY(1);
}

.cat-card:hover::after {
    opacity: 1;
    transform: none;
}

.cat-card img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    background: var(--bg);
    transition: transform 0.25s;
}

.cat-card:hover img {
    transform: scale(1.12) rotate(-3deg);
}

.cat-card--note {
    grid-column: span 2;
    background: var(--accent-light);
    border-color: transparent;
}

.cat-card--note b {
    color: var(--accent-dark);
}

.cat-card--note span {
    display: block;
    font-weight: 500;
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

/* ---------- Преимущества ---------- */

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.feature {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    padding: 26px 22px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature::after {
    content: attr(data-num);
    position: absolute;
    right: 14px;
    top: 2px;
    font-size: 58px;
    font-weight: 800;
    line-height: 1;
    color: var(--bg);
    pointer-events: none;
}

.feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.feature-icon svg {
    width: 27px;
    height: 27px;
    stroke: var(--accent);
}

.feature h3 {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 8px;
}

.feature p {
    font-size: 14px;
    color: var(--muted);
}

/* ---------- Оплата и доставка ---------- */

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.info-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 30px;
    display: flex;
    gap: 20px;
}

.info-card .feature-icon {
    flex-shrink: 0;
    background: var(--white);
    margin-bottom: 0;
}

.info-card h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
}

.info-card p {
    font-size: 15px;
    color: var(--muted);
}

/* ---------- Контакты ---------- */

.contacts-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    align-items: stretch;
}

.contacts-info {
    background: var(--dark);
    color: #fff;
    border-radius: var(--radius);
    padding: 34px 30px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.contacts-info h3 {
    font-size: 22px;
    font-weight: 800;
}

.contact-row span {
    display: block;
    font-size: 13px;
    color: #8f97a1;
    margin-bottom: 3px;
}

.contact-row a,
.contact-row b {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

.contact-row a:hover {
    color: var(--accent);
}

.contacts-info .btn {
    margin-top: auto;
}

.contacts-map {
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 340px;
    background: var(--bg);
}

.contacts-map iframe {
    width: 100%;
    height: 100%;
    min-height: 340px;
    border: none;
    display: block;
}

/* ============================================================
   Внутренние страницы: крошки, layout каталога
   ============================================================ */

.page-head {
    background: var(--bg);
    padding: 22px 0 26px;
    border-bottom: 1px solid var(--border);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 10px;
}

.breadcrumbs a {
    color: var(--muted);
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs .sep {
    color: #c0c6cd;
}

.page-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.page-title small {
    font-size: 15px;
    font-weight: 600;
    color: var(--muted);
    margin-left: 10px;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    padding: 36px 0 64px;
    align-items: start;
}

/* ---------- Сайдбар категорий ---------- */

.sidebar-toggle {
    display: none;
    width: 100%;
    margin-bottom: 14px;
}

.cats-menu {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.cats-menu-title {
    padding: 16px 20px;
    background: var(--dark);
    color: #fff;
    font-weight: 800;
    font-size: 16px;
}

.cats-menu a {
    display: block;
    padding: 11px 20px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s, color 0.15s, padding-left 0.15s;
}

.cats-menu a:last-child {
    border-bottom: none;
}

.cats-menu a:hover {
    background: var(--accent-light);
    color: var(--accent-dark);
    padding-left: 24px;
}

.cats-menu a.active {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
}

/* ---------- Список позиций категории ---------- */

.products-note {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--accent-light);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    font-size: 14px;
    color: var(--accent-dark);
    font-weight: 600;
    margin-bottom: 20px;
}

.products-note svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: var(--accent-dark);
}

.products-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-row {
    display: grid;
    grid-template-columns: 64px 1fr 150px 170px 140px;
    align-items: center;
    gap: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 22px 14px 14px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.product-row:hover {
    border-color: #c9d9e4;
    box-shadow: var(--shadow);
}

.product-row-thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s;
}

.product-row:hover .product-row-thumb img {
    transform: scale(1.1);
}

.product-row-name a {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
}

.product-row-name a:hover {
    color: var(--accent);
}

.product-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted);
}

.product-row-meta span {
    white-space: nowrap;
}

.product-row-price b {
    display: block;
    font-size: 17px;
    font-weight: 800;
    white-space: nowrap;
}

.product-row-price span {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
    white-space: nowrap;
}

.products-content{margin:30px 0 0 0;}

/* Степпер количества */

.qty {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: fit-content;
    background: var(--white);
}

.qty button {
    width: 38px;
    height: 42px;
    border: none;
    background: var(--bg);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    transition: background 0.15s;
    flex-shrink: 0;
}

.qty button:hover {
    background: var(--accent-light);
    color: var(--accent-dark);
}

.qty input {
    width: 48px;
    height: 42px;
    border: none;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.product-row .btn-add {
    width: 100%;
}

.btn-add.added {
    background: #2fa96b;
}

/* ============================================================
   Карточка товара
   ============================================================ */

.product-page {
    padding: 40px 0 64px;
}

.product-grid {
    display: grid;
    grid-template-columns: 440px 1fr;
    gap: 44px;
    align-items: start;
}

.product-photo {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-photo img {
    max-height: 340px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.product-info h1 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.product-availability {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 700;
    color: #2fa96b;
    margin-bottom: 20px;
}

.product-availability::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2fa96b;
}

.product-price-box {
    display: flex;
    align-items: baseline;
    gap: 18px;
    flex-wrap: wrap;
    padding: 18px 22px;
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: 22px;
}

.product-price-box .price-main {
    font-size: 32px;
    font-weight: 800;
}

.product-price-box .price-sub {
    font-size: 14.5px;
    color: var(--muted);
    font-weight: 600;
}

.product-buy {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.product-buy .btn {
    padding: 14px 34px;
    font-size: 16px;
}

.product-specs {
    border-top: 1px solid var(--border);
    padding-top: 22px;
}

.product-specs h2 {
    font-size: 19px;
    font-weight: 800;
    margin-bottom: 14px;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table td {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 15px;
    vertical-align: top;
}

.specs-table td:first-child {
    color: var(--muted);
    width: 46%;
    padding-right: 16px;
}

.specs-table td:last-child {
    font-weight: 700;
}

.product-desc {
    margin-top: 26px;
    color: var(--muted);
    font-size: 15px;
}

/* ---------- Похожие позиции ---------- */

.related {
    padding: 24px 0 64px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.related-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.related-thumb {
    height: 96px;
    border-radius: 10px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 10px;
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s;
}

.related-card:hover .related-thumb img {
    transform: scale(1.08);
}

.related-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-hover);
}

.related-card a.related-name {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
}

.related-card a.related-name:hover {
    color: var(--accent);
}

.related-card .related-meta {
    font-size: 13px;
    color: var(--muted);
}

.related-card .related-price {
    font-size: 17px;
    font-weight: 800;
    margin-top: 4px;
}

.related-card .btn {
    margin-top: 12px;
}

/* ============================================================
   Корзина
   ============================================================ */

.cart-page {
    padding: 40px 0 64px;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 28px;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item {
    display: grid;
    grid-template-columns: 1fr 130px 130px 40px;
    align-items: center;
    gap: 18px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
}

.cart-item-name b {
    display: block;
    font-size: 16px;
    font-weight: 800;
}

.cart-item-name span {
    font-size: 13px;
    color: var(--muted);
}

.cart-item-sum {
    font-size: 17px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.cart-item-remove {
    width: 38px;
    height: 38px;
    border: none;
    background: var(--bg);
    border-radius: 8px;
    color: var(--muted);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}

.cart-item-remove:hover {
    background: #fdecec;
    color: #d64545;
}

/* Сводка и форма заказа */

.cart-summary {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 28px;
    position: sticky;
    top: 104px;
}

.cart-summary h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 18px;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 15px;
    color: var(--muted);
    margin-bottom: 8px;
}

.cart-total-row.grand {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    border-top: 1px solid #d6dde4;
    padding-top: 14px;
    margin-top: 14px;
    margin-bottom: 20px;
}

.cart-total-row.grand b {
    font-size: 24px;
}

.order-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-form label {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
}

.order-form input,
.order-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    background: var(--white);
    transition: border-color 0.15s;
}

.order-form input:focus,
.order-form textarea:focus {
    border-color: var(--accent);
}

.order-form textarea {
    resize: vertical;
    min-height: 80px;
}

.order-form .btn {
    margin-top: 6px;
}

.form-note {
    font-size: 12px;
    color: var(--muted);
}

/* Пустая корзина */

.cart-empty {
    text-align: center;
    padding: 70px 20px;
}

.cart-empty svg {
    width: 72px;
    height: 72px;
    stroke: #c6cdd5;
    margin: 0 auto 18px;
}

.cart-empty h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
}

.cart-empty p {
    color: var(--muted);
    margin-bottom: 24px;
}

/* Сообщение об успехе */

.order-success {
    text-align: center;
    padding: 70px 20px;
}

.order-success .success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #e7f7ef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.order-success .success-icon svg {
    width: 40px;
    height: 40px;
    stroke: #2fa96b;
}

.order-success h2 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 8px;
}

.order-success p {
    color: var(--muted);
    margin-bottom: 24px;
}

/* ============================================================
   Подвал
   ============================================================ */

.footer {
    background: var(--dark);
    color: #aeb6bf;
    padding: 52px 0 0;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 36px;
    padding-bottom: 40px;
}

.footer-logo img {
    height: 40px;
    width: auto;
    margin-bottom: 14px;
}

.footer h4 {
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 14px;
}

.footer ul li {
    margin-bottom: 9px;
}

.footer a {
    color: #aeb6bf;
}

.footer a:hover {
    color: #fff;
}

.footer-contacts li {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.footer-contacts span {
    font-size: 12px;
    color: #7b828c;
}

.footer-contacts a,
.footer-contacts b {
    color: #fff;
    font-weight: 700;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #7b828c;
}

/* ============================================================
   Модалка «Заказать звонок»
   ============================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(23, 28, 33, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    padding: 34px 30px 30px;
    max-width: 420px;
    width: 100%;
    position: relative;
    animation: modalIn 0.22s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.modal h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
}

.modal p {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 18px;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg);
    border-radius: 8px;
    font-size: 18px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--accent-light);
    color: var(--accent-dark);
}

.modal .order-form input {
    background: var(--bg);
}

.modal .modal-success {
    display: none;
    text-align: center;
    padding: 20px 0 10px;
}

/* Тост при добавлении в корзину */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--dark);
    color: #fff;
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-hover);
    z-index: 300;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
}

.toast.show {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.toast a {
    color: var(--accent);
    font-weight: 700;
}
