/* ========================================= */
/* ====== ОБЩИЕ НАСТРОЙКИ ====== */
/* ========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #ffffff;
    color: #222;
    padding: 0;
}

/* ========================================= */
/* ====== ОБЩАЯ ШАПКА ДЛЯ ВСЕХ СТРАНИЦ ====== */
/* ========================================= */

.main-header {
    background: #ffffff;
    border-bottom: 1px solid #e8ecf1;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.header-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* ====== ЛОГОТИП ====== */
.header-logo {
    flex-shrink: 0;
}

.header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.header-logo img {
    height: 40px;
    width: auto;
    display: block;
}

/* ====== КНОПКА КАТАЛОГ (как на Ozon) ====== */
.header-catalog {
    position: relative;
    flex-shrink: 0;
}

.btn-catalog {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #005bff;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-catalog:hover {
    background: #0047cc;
}

.btn-catalog .burger-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 18px;
}

.btn-catalog .burger-icon span {
    display: block;
    height: 2px;
    background: white;
    border-radius: 2px;
    width: 100%;
}

/* ====== ВЫПАДАЮЩЕЕ МЕНЮ КАТАЛОГА ====== */
.catalog-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    min-width: 220px;
    padding: 8px 0;
    z-index: 1001;
    border: 1px solid #e8ecf1;
}

.catalog-dropdown.active {
    display: block;
}

.catalog-dropdown a {
    display: block;
    padding: 10px 20px;
    color: #222;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}

.catalog-dropdown a:hover {
    background: #f0f4ff;
    color: #005bff;
}

.catalog-dropdown .divider {
    height: 1px;
    background: #e8ecf1;
    margin: 4px 12px;
}

/* ====== КОРЗИНА ====== */
.header-cart {
    flex-shrink: 0;
    margin-left: auto;
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #222;
    position: relative;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.cart-link:hover {
    background: #f0f4ff;
}

.cart-icon {
    width: 28px;
    height: 28px;
    position: relative;
}

.cart-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #222;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ====== СЧЁТЧИК НА КОРЗИНЕ (синий кружок) ====== */
.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #005bff;
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(0,91,255,0.3);
    transition: transform 0.2s;
}

.cart-badge.pop {
    transform: scale(1.3);
}

/* ========================================= */
/* ====== ВЕРХНЯЯ ПЛАНКА (для карточки) ====== */
/* ========================================= */

.product-top-bar {
    max-width: 1300px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: #666;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.product-brand {
    font-weight: 700;
    font-size: 18px;
    color: #222;
}

.product-sku {
    color: #888;
}

/* ========================================= */
/* ====== ОСНОВНАЯ СЕТКА: 3 КОЛОНКИ ====== */
/* ========================================= */

.product-main {
    display: grid;
    grid-template-columns: 1fr 1.2fr 0.9fr;
    gap: 30px;
    max-width: 1300px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* ========================================= */
/* ====== КОЛОНКА 1: ГАЛЕРЕЯ ====== */
/* ========================================= */

.product-gallery {
    position: sticky;
    top: 20px;
}

.main-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.thumbnails img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border 0.2s;
}

.thumbnails img.active {
    border-color: #005bff;
}

.thumbnails img:hover {
    border-color: #ccc;
}

/* ========================================= */
/* ====== КОЛОНКА 2: ИНФОРМАЦИЯ ====== */
/* ========================================= */

.product-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #222;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    margin-bottom: 16px;
}

.stars {
    color: #ffaa00;
    font-weight: 600;
}

.reviews-count,
.questions-count {
    color: #005bff;
    cursor: pointer;
}

.reviews-count:hover,
.questions-count:hover {
    text-decoration: underline;
}

/* ====== ВЫБОР ОПЦИЙ ====== */

.product-options {
    margin-bottom: 16px;
}

.option-group {
    margin-bottom: 14px;
}

.option-label {
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 6px;
    color: #555;
}

.option-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.option-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fa;
    padding: 6px 14px;
    border-radius: 20px;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.option-radio.active {
    border-color: #005bff;
    background: #e6f0ff;
}

.option-radio input {
    display: none;
}

.option-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    min-width: 200px;
}

/* ====== КРАТКИЕ ХАРАКТЕРИСТИКИ ====== */

.product-short-specs {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 8px;
}

.spec-row {
    display: flex;
    padding: 4px 0;
    font-size: 14px;
}

.spec-label {
    color: #888;
    width: 140px;
    flex-shrink: 0;
}

.spec-value {
    color: #222;
}

.goto-description {
    color: #005bff;
    font-size: 14px;
    text-decoration: none;
}

.goto-description:hover {
    text-decoration: underline;
}

/* ========================================= */
/* ====== КОЛОНКА 3: ЦЕНА И ЗАКАЗ ====== */
/* ========================================= */

.product-buy {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 20px;
}

/* ====== ЦЕНА ====== */

.price-block {
    margin-bottom: 16px;
}

.price-main {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.current-price {
    font-size: 28px;
    font-weight: 700;
    color: #222;
}

.old-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}

.discount-badge {
    background: #ff4d4f;
    color: white;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.price-savings {
    color: #4caf50;
    font-size: 14px;
    margin-top: 4px;
}

/* ====== ОСТАТОК ====== */

.stock-block {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #e8f5e9;
    border-radius: 8px;
    margin-bottom: 16px;
}

.stock-status {
    color: #2e7d32;
    font-weight: 600;
    font-size: 15px;
}

.stock-quantity {
    color: #555;
    font-size: 14px;
}

/* ====== УСЛУГИ ====== */

.services-block {
    margin-bottom: 16px;
    padding: 12px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.service-item {
    font-size: 14px;
    color: #555;
    padding: 4px 0;
}

/* ====== КНОПКА КУПИТЬ ====== */

.btn-buy {
    width: 100%;
    background: #005bff;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-buy:hover {
    background: #0047cc;
}

/* ========================================= */
/* ====== ОПИСАНИЕ ====== */
/* ========================================= */

.product-description {
    max-width: 1300px;
    margin: 16px auto 16px;
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.product-description h2 {
    font-size: 20px;
    margin-bottom: 12px;
}

.product-description p {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    margin-bottom: 12px;
}

.product-description p:last-child {
    margin-bottom: 0;
}

/* ========================================= */
/* ====== ХАРАКТЕРИСТИКИ ====== */
/* ========================================= */

.product-specs {
    max-width: 1300px;
    margin: 0 auto 24px;
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.product-specs h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.specs-table tr:last-child {
    border-bottom: none;
}

.specs-table td {
    padding: 10px 8px;
    font-size: 14px;
}

.specs-table td:first-child {
    color: #888;
    width: 35%;
}

.specs-table td:last-child {
    color: #222;
}

/* ========================================= */
/* ====== ГЛАВНАЯ СТРАНИЦА ====== */
/* ========================================= */

/* ====== БАННЕР ====== */
.hero-banner {
    background: linear-gradient(135deg, #005bff 0%, #003d99 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 30px;
}

.hero-content h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero-content p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.hero-btn {
    background: white;
    color: #005bff;
    padding: 12px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    display: inline-block;
}

.hero-btn:hover {
    background: #f0f4ff;
}

/* ====== ФИЛЬТРЫ ====== */
.filters-section {
    max-width: 1300px;
    margin: 0 auto 24px;
    padding: 0 20px;
}

.filters-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    font-size: 14px;
    color: #555;
}

.filter-group select {
    padding: 6px 12px;
    border: 1px solid #d9dde4;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

/* ====== КАТАЛОГ (СЕТКА) ====== */
.catalog-section {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ====== КАРТОЧКА ТОВАРА (в ленте) ====== */
.product-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.product-card-image {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f8f9fa;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-card-image img {
    transform: scale(1.02);
}

.badge-hit,
.badge-sale {
    position: absolute;
    top: 10px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.badge-hit {
    left: 10px;
    background: #fff3e0;
    color: #e65100;
}

.badge-sale {
    right: 10px;
    background: #ff4d4f;
    color: white;
}

.product-card-info {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px 0;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
}

.product-card-price {
    margin: 4px 0 8px;
}

.current-price {
    font-size: 20px;
    font-weight: 700;
    color: #222;
}

.old-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
}

.product-card-stock {
    margin-bottom: 10px;
}

.stock-status {
    font-size: 13px;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: 12px;
}

.stock-status.status-instock {
    color: #2e7d32;
    background: #e8f5e9;
}

.stock-status.status-outstock {
    color: #c62828;
    background: #fce4ec;
}

.btn-add-to-cart {
    background: #005bff;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: auto;
}

.btn-add-to-cart:hover {
    background: #0047cc;
}

.btn-add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card-link:hover .product-card {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* ====== ПАГИНАЦИЯ ====== */
.pagination-container {
    max-width: 1300px;
    margin: 24px auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 8px 14px;
    border: 1px solid #d9dde4;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.pagination button.active {
    background: #005bff;
    color: white;
    border-color: #005bff;
}

.pagination button:hover:not(.active) {
    background: #f0f4ff;
}

/* ========================================= */
/* ====== ПОДВАЛ ====== */
/* ========================================= */

.main-footer {
    background: #222;
    color: #ccc;
    padding: 40px 20px 20px;
    margin-top: 40px;
}

.footer-container {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 12px;
    font-size: 16px;
}

.footer-col p {
    font-size: 14px;
    line-height: 1.6;
    margin: 4px 0;
}

.footer-bottom {
    max-width: 1300px;
    margin: 20px auto 0;
    padding-top: 16px;
    border-top: 1px solid #444;
    text-align: center;
    font-size: 13px;
    color: #888;
}

/* ========================================= */
/* ====== ЗАГЛУШКИ ДЛЯ КАРТИНОК ====== */
/* ========================================= */

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
    color: #999;
    font-size: 14px;
}

.thumb-placeholder {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8e8e8;
    color: #999;
    font-size: 10px;
    border-radius: 6px;
    border: 2px solid transparent;
}

.thumb-placeholder.active {
    border-color: #005bff;
}

/* ========================================= */
/* ====== АДАПТИВ ====== */
/* ========================================= */

@media (max-width: 1024px) {
    .product-main {
        grid-template-columns: 1fr 1fr;
    }
    .product-buy {
        position: static;
    }
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-main {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 16px;
    }
    .product-gallery {
        position: static;
    }
    .product-top-bar {
        flex-wrap: wrap;
    }
    .product-title {
        font-size: 17px;
    }
    .current-price {
        font-size: 24px;
    }
    .specs-table td {
        padding: 8px 4px;
        font-size: 13px;
    }
    .specs-table td:first-child {
        width: 40%;
    }
    .option-buttons {
        flex-wrap: wrap;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .header-container {
        flex-wrap: wrap;
        gap: 10px;
        padding: 0 12px;
    }
    .header-logo img {
        height: 32px;
    }
    .btn-catalog {
        padding: 6px 14px;
        font-size: 13px;
    }
    .btn-catalog .catalog-text {
        display: none;
    }
    .cart-link {
        padding: 4px 6px;
    }
    .cart-icon {
        width: 24px;
        height: 24px;
    }
    .cart-badge {
        font-size: 10px;
        min-width: 18px;
        height: 18px;
        top: -5px;
        right: -6px;
    }
    .hero-content h1 {
        font-size: 24px;
    }
    .filters-container {
        flex-direction: column;
        gap: 10px;
    }
    .footer-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .product-card-title {
        font-size: 13px;
        min-height: 32px;
    }
    .current-price {
        font-size: 16px;
    }
    .btn-add-to-cart {
        font-size: 12px;
        padding: 8px;
    }
    .header-container {
        gap: 6px;
    }
    .header-logo img {
        height: 28px;
    }
    .btn-catalog {
        padding: 4px 10px;
        font-size: 12px;
        border-radius: 6px;
    }
    .cart-icon {
        width: 20px;
        height: 20px;
    }
    .cart-badge {
        font-size: 9px;
        min-width: 16px;
        height: 16px;
        top: -4px;
        right: -5px;
    }
}

/* ========================================= */
/* ====== КОРЗИНА ====== */
/* ========================================= */

.cart-page {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
}

.cart-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.cart-empty p {
    font-size: 20px;
    color: #888;
    margin-bottom: 16px;
}

.cart-filled {
    display: none;
}

.cart-items {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    overflow: auto;
    margin-bottom: 24px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.cart-table th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #555;
}

.cart-table td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item-info img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    background: #f0f0f0;
}

.cart-item-price,
.cart-item-sum {
    font-weight: 600;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #d9dde4;
    border-radius: 6px;
    background: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #f0f4ff;
    border-color: #005bff;
}

.remove-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.remove-btn:hover {
    color: #ff4d4f;
}

/* ====== ИТОГИ ====== */
.cart-summary {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.cart-total {
    font-size: 22px;
    font-weight: 700;
}

.total-price {
    color: #005bff;
}

.cart-delivery {
    font-size: 14px;
    color: #888;
}

.btn-checkout {
    background: #005bff;
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-checkout:hover {
    background: #0047cc;
}

/* ====== МОДАЛ ЗАКАЗА ====== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    float: right;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #222;
}

.modal h2 {
    margin-bottom: 16px;
}

.order-summary-preview {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 12px 0;
}

/* ====== АДАПТИВ ====== */
@media (max-width: 768px) {
    .cart-table {
        font-size: 13px;
    }
    .cart-table th,
    .cart-table td {
        padding: 10px 8px;
    }
    .cart-item-info img {
        width: 40px;
        height: 40px;
    }
    .cart-item-info span {
        font-size: 13px;
    }
    .cart-summary {
        align-items: stretch;
    }
    .btn-checkout {
        width: 100%;
        text-align: center;
    }
}

/* ========================================= */
/* ====== МАКЕТ КАТАЛОГА: САЙДБАР + ТОВАРЫ ====== */
/* ========================================= */

.catalog-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px 40px;
    align-items: start;
}

/* ====== САЙДБАР ФИЛЬТРОВ ====== */
.filters-sidebar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    height: fit-content;
    position: sticky;
    top: 80px;
}

/* Скроллбар для Chrome/Safari/Edge */
.filters-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filters-sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.filters-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.filters-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8ecf1;
}

.filters-reset {
    background: none;
    border: none;
    color: #005bff;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
}

.filters-reset:hover {
    text-decoration: underline;
}

.filter-block {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f1f3;
}

.filter-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    color: #222;
}

/* Цена */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-inputs input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d9dde4;
    border-radius: 8px;
    font-size: 14px;
    min-width: 0;
}

.price-inputs input:focus {
    outline: none;
    border-color: #005bff;
}

.price-inputs span {
    color: #999;
}

/* Чекбоксы */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 0;
    user-select: none;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #005bff;
}

.filter-checkbox:hover {
    color: #005bff;
}

/* ====== ПРАВАЯ КОЛОНКА ====== */
.catalog-main {
    min-width: 0;
}

/* Сортировка */
.sort-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.sort-btn {
    background: white;
    border: 1px solid #d9dde4;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #222;
}

.sort-btn:hover {
    border-color: #005bff;
    color: #005bff;
}

.sort-btn.active {
    background: #005bff;
    color: white;
    border-color: #005bff;
}

/* Заглушка "Ничего не найдено" */
.no-products {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.no-products p {
    font-size: 18px;
    color: #888;
    margin-bottom: 16px;
}

.no-products button {
    background: #005bff;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.no-products button:hover {
    background: #0047cc;
}

/* ====== АДАПТИВ ====== */
@media (max-width: 1024px) {
    .catalog-layout {
        grid-template-columns: 220px 1fr;
        gap: 16px;
    }
}

@media (max-width: 768px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }
    .filters-sidebar {
        position: static;
    }
    .filter-options {
        max-height: none;
    }
}

/* ========================================= */
/* ====== ХЛЕБНЫЕ КРОШКИ ====== */
/* ========================================= */

.breadcrumbs {
    max-width: 1300px;
    margin: 20px auto 24px;
    padding: 10px 20px;
    font-size: 14px;
    color: #888;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: #f8fafc;
    border-radius: 8px;
}

.breadcrumbs a {
    color: #005bff;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: #0047cc;
    text-decoration: underline;
}

.breadcrumb-sep {
    color: #cbd5e1;
    font-size: 12px;
}

.breadcrumb-current {
    color: #64748b;
    font-weight: 500;
}

@media (max-width: 768px) {
    .breadcrumbs {
        margin: 12px auto 16px;
        font-size: 13px;
        padding: 8px 12px;
    }
}

/* ========================================= */
/* ====== КОРЗИНА: КЛИКАБЕЛЬНЫЙ ТОВАР ====== */
/* ========================================= */

.cart-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-item-info a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #222;
    transition: color 0.2s;
}

.cart-item-info a:hover {
    color: #005bff;
}

.cart-item-info a:hover span {
    text-decoration: underline;
}

.cart-item-info img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    background: #f0f0f0;
    flex-shrink: 0;
}

/* ========================================= */
/* ====== КОРЗИНА: КОЛИЧЕСТВО (+/-) ====== */
/* ========================================= */

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    vertical-align: middle;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #d9dde4;
    border-radius: 6px;
    background: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    color: #222;
}

.qty-btn:hover {
    background: #f0f4ff;
    border-color: #005bff;
    color: #005bff;
}

.cart-item-quantity span {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
}

/* ========================================= */
/* ====== ФОРМА ОФОРМЛЕНИЯ ЗАКАЗА ====== */
/* ========================================= */

#checkoutModal .modal-content {
    max-width: 560px;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

#checkoutModal .modal-header {
    background: linear-gradient(135deg, #005bff 0%, #0047cc 100%);
    color: white;
    padding: 24px 32px;
    position: relative;
    flex-shrink: 0;
}

#checkoutModal .modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: white;
}

#checkoutModal .modal-header p {
    margin: 6px 0 0;
    font-size: 14px;
    opacity: 0.9;
}

/* ПРОКРУЧИВАЕМАЯ ОБЛАСТЬ */
#checkoutModal .modal-body {
    padding: 24px 32px 32px;
    overflow-y: auto;
    flex: 1;
}

#checkoutModal .form-group {
    margin-bottom: 16px;
}

#checkoutModal .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}

#checkoutModal .form-group input,
#checkoutModal .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8fafc;
}

#checkoutModal .form-group input:focus,
#checkoutModal .form-group textarea:focus {
    outline: none;
    border-color: #005bff;
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 91, 255, 0.1);
}

#checkoutModal .form-group textarea {
    min-height: 80px;
    resize: vertical;
}

#checkoutModal .form-group input::placeholder,
#checkoutModal .form-group textarea::placeholder {
    color: #94a3b8;
}

#checkoutModal .order-summary-preview {
    background: #f0f7ff;
    border: 1px solid #cce0ff;
    padding: 16px 20px;
    border-radius: 10px;
    margin: 20px 0 24px;
    font-size: 16px;
    color: #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#checkoutModal .order-summary-preview strong {
    font-size: 20px;
    color: #005bff;
}

#checkoutModal .btn-checkout {
    width: 100%;
    background: #005bff;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

#checkoutModal .btn-checkout:hover {
    background: #0047cc;
}

#checkoutModal .btn-checkout:active {
    transform: scale(0.99);
}

#checkoutModal .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 22px;
    color: white;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    float: none;
    padding: 0;
    line-height: 1;
}

#checkoutModal .modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    color: white;
}

@media (max-width: 768px) {
    #checkoutModal .modal-content {
        max-width: 95%;
        max-height: 95vh;
    }
    #checkoutModal .modal-header {
        padding: 20px 24px;
    }
    #checkoutModal .modal-body {
        padding: 20px 24px 24px;
    }
    #checkoutModal .modal-header h2 {
        font-size: 18px;
    }
}

/* ========================================= */
/* ====== ЗАГЛУШКА ГЛАВНОГО ФОТО ====== */
/* ========================================= */

.main-image {
    position: relative;
}

.main-image .no-photo-placeholder {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    color: #999;
    font-size: 16px;
    border-radius: 8px;
}

/* ========================================= */
/* ====== ГАЛЕРЕЯ PHOTOSWIPE ====== */
/* ========================================= */

.thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.thumbnails a {
    display: block;
    line-height: 0;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.thumbnails a:hover {
    border-color: #005bff;
}

.thumbnails a .thumbnail {
    border: none;
    display: block;
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 0;
}

/* Убираем фоновое растяжение */
.pswp__img {
    object-fit: contain !important;
}

/* ========================================= */
/* ====== СТРАНИЦЫ ДОСТАВКА И КОНТАКТЫ ====== */
/* ========================================= */

.page-content {
    min-height: 60vh;
    padding: 0 20px 60px;
}

.page-container {
    max-width: 900px;
    margin: 0 auto;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 32px 0;
    color: #222;
    text-align: center;
}

/* Информационные блоки */
.info-block {
    background: white;
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.info-block.highlight {
    background: #f0f7ff;
    border: 1px solid #cce0ff;
}

.info-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.info-block h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #222;
}

.info-block p {
    font-size: 16px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 12px;
}

.info-block p:last-child {
    margin-bottom: 0;
}

.info-block strong {
    color: #222;
}

/* Список */
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    font-size: 15px;
    color: #444;
    padding: 8px 0 8px 28px;
    position: relative;
    line-height: 1.6;
}

.info-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #005bff;
    font-weight: 700;
    font-size: 16px;
}

/* Кнопки-телефоны */
.contact-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.contact-btn {
    display: inline-block;
    background: #005bff;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.2s;
}

.contact-btn:hover {
    background: #0047cc;
}

/* Карточки адресов */
.address-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.address-card.green {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.address-card:last-child {
    margin-bottom: 0;
}

.address-text {
    font-size: 17px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
}

.address-card p {
    margin-bottom: 8px;
}

.address-card a {
    color: #005bff;
    text-decoration: none;
}

.address-card a:hover {
    text-decoration: underline;
}

/* Карты */
.map-container {
    margin-top: 16px;
    border-radius: 8px;
    overflow: hidden;
    background: #e8ecf1;
}

.map-container iframe {
    display: block;
    width: 100%;
    border: none;
}

/* ====== АДАПТИВ ====== */
@media (max-width: 768px) {
    .page-title {
        font-size: 24px;
        margin-bottom: 24px;
    }

    .info-block {
        padding: 20px 20px;
    }

    .info-block h2 {
        font-size: 18px;
    }

    .info-block p,
    .info-list li {
        font-size: 15px;
    }

    .info-icon {
        font-size: 28px;
    }

    .contact-links {
        flex-direction: column;
    }

    .contact-btn {
        text-align: center;
    }

    .address-card {
        padding: 16px;
    }

    .map-container iframe {
        height: 300px !important;
    }
}

.product-article {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
    font-weight: 400;
}