/* =======================================================
   ГЛОБАЛЬНАЯ БАЗА И СБРОС СДВИГОВ
   ======================================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
}

.main-content {
    width: 100%;
    box-sizing: border-box;
}

/* =======================================================
   КАТАЛОГ: ДЕСКТОП В 3 КОЛОНКИ (СТИЛЬ MODUL SYSTEME — КОБАЛЬТ)
   ======================================================= */
.page-catalog .catalog-products-area {
    width: 100%;
}

.page-catalog .products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    padding: 0;
}

.page-catalog .product-card {
    background: #ffffff;
    border: 1px solid var(--clr-border, #E2E8F0);
    border-radius: 10px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    height: 100%;
    box-sizing: border-box;
    box-shadow: var(--shadow-soft);
}

/* Фирменный кобальтовый акцент MODUL SYSTEME при наведении */
.page-catalog .product-card:hover {
    border-color: var(--accent-cobalt, #1D4ED8);
    box-shadow: 0 12px 28px rgba(29, 78, 216, 0.10);
    transform: translateY(-4px);
}

.page-catalog .product-card-image-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: radial-gradient(circle at center, #F8FAFC 0%, #E8EEF5 100%);
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin-bottom: 14px;
    cursor: pointer;
    overflow: hidden;
}

.page-catalog .product-card-img {
    width: 100%;
    height: 100%;
    max-width: 96%;
    max-height: 96%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.page-catalog .product-card:hover .product-card-img {
    transform: scale(1.05);
}

.page-catalog .product-card-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
}

.page-catalog .product-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--clr-dark, #0F172A);
    line-height: 1.35;
    margin-bottom: 8px;
    min-height: 40px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.page-catalog .product-title:hover {
    color: var(--accent-cobalt, #1D4ED8);
}

.page-catalog .product-stock-tag {
    font-size: 13px;
    font-weight: 600;
    color: #059669;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.stock-dot-green {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #10B981;
}

.page-catalog .product-specs-sub {
    font-size: 13px;
    color: #64748B;
    margin-bottom: 12px;
    min-height: 20px;
}

.page-catalog .product-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.product-current-price,
.product-new-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--clr-dark, #0F172A);
}

.product-new-price {
    color: var(--accent-cobalt, #1D4ED8);
}

.product-old-price {
    font-size: 14px;
    color: #94A3B8;
    text-decoration: line-through;
}

.page-catalog .product-buttons-group {
    width: 100%;
    margin-top: auto;
}

.page-catalog .product-action-box {
    width: 100%;
}

.page-catalog .btn-more-details {
    display: none;
}

.page-catalog .btn-add-to-cart {
    width: 100%;
    height: 44px;
    background: #EFF3F8;
    color: var(--clr-dark, #0F172A);
    border: 1.5px solid #CBD5E1;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-catalog .btn-add-to-cart:hover {
    background: var(--accent-cobalt, #1D4ED8);
    border-color: var(--accent-cobalt, #1D4ED8);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.2);
}

.page-catalog .quantity-selector-block {
    width: 100%;
    height: 44px;
    border: 1.5px solid var(--accent-cobalt, #1D4ED8);
    border-radius: 6px;
    background: rgba(29, 78, 216, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.page-catalog .btn-qty-control {
    width: 44px;
    height: 100%;
    font-size: 20px;
    font-weight: 700;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--accent-cobalt, #1D4ED8);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.page-catalog .btn-qty-control:hover {
    background: var(--accent-cobalt, #1D4ED8);
    color: #ffffff;
}

.page-catalog .qty-count-input {
    flex: 1;
    height: 100%;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    border: none;
    background: transparent;
    color: var(--clr-dark, #0F172A);
}

/* =======================================================
   ФИЛЬТРЫ КАТАЛОГА (ИЗОЛЯЦИЯ КАТЕГОРИЙ)
   ======================================================= */
.catalog-top-controls {
    width: 100%;
    position: relative;
    z-index: 50;
    margin-bottom: 20px;
}

.horizontal-filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.category-filter-set {
    display: none;
    gap: 10px;
    align-items: center;
}

.category-filter-set.is-active {
    display: flex;
}

.filter-dropdown {
    position: relative;
    display: inline-block;
}

.filter-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    background: #EFF3F8;
    border: 1.5px solid #E2E8F0;
    color: var(--clr-dark, #0F172A);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.filter-dropdown.open .filter-dropdown-btn,
.filter-dropdown-btn:hover {
    border-color: var(--accent-cobalt, #1D4ED8);
    color: var(--accent-cobalt, #1D4ED8);
    background: #ffffff;
}

.filter-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
    padding: 14px;
    z-index: 9999;
}

.filter-dropdown.open .filter-dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #334155;
    cursor: pointer;
}

.btn-reset-all-filters {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    background: #ffffff;
    border: 1.5px solid #E2E8F0;
    color: #64748B;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-reset-all-filters:hover {
    border-color: var(--accent-cobalt, #1D4ED8);
    color: var(--accent-cobalt, #1D4ED8);
}

/* =======================================================
   КАРТОЧКА ТОВАРА (PDP) — ДЕСКТОП (ПК / НОУТБУКИ)
   ======================================================= */
.pdp-container-wrapper {
    max-width: 1380px;
    margin: 0 auto;
    padding: 30px 24px 60px 24px;
}

.pdp-breadcrumbs {
    margin-bottom: 25px;
    font-size: 13px;
    color: #64748B;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pdp-breadcrumbs a {
    color: var(--clr-dark, #0F172A);
    text-decoration: none;
    transition: color 0.2s ease;
}

.pdp-breadcrumbs a:hover {
    color: var(--accent-cobalt, #1D4ED8);
}

.pdp-loading-message {
    padding: 80px 0;
    text-align: center;
    font-size: 15px;
    color: #64748B;
}

.pdp-main-box {
    display: grid;
    grid-template-columns: 52fr 48fr;
    gap: 44px;
    align-items: start;
    margin-bottom: 40px;
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 32px;
    box-shadow: var(--shadow-soft);
}

.pdp-media-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.zoom-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: radial-gradient(circle at center, #F8FAFC 0%, #E8EEF5 100%);
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
    position: relative;
    cursor: zoom-in;
}

.zoom-image {
    width: 100%;
    height: 100%;
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    transition: transform 0.15s ease-out;
    pointer-events: none;
}

.zoom-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #E2E8F0;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
}

.pdp-gallery-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
}

.thumb-card {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    border: 1.5px solid #E2E8F0;
    padding: 2px;
    background: #ffffff;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s ease;
}

.thumb-card.active,
.thumb-card:hover {
    border-color: var(--accent-cobalt, #1D4ED8);
}

.pdp-details-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pdp-sku-tag {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--accent-cobalt, #1D4ED8);
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.pdp-product-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--clr-dark, #0F172A);
    margin: 0 0 10px 0;
}

.pdp-stock-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #dcfce7;
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
}

.stock-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #15803d;
}

.pdp-price-section {
    border-top: 1px solid #E2E8F0;
    border-bottom: 1px solid #E2E8F0;
    padding: 16px 0;
}

.btn-add-to-cart-pdp {
    width: 100%;
    height: 50px;
    background: var(--accent-cobalt, #1D4ED8);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.22);
}

.btn-add-to-cart-pdp:hover {
    background: var(--accent-cobalt-hover, #1E40AF);
    box-shadow: 0 6px 20px rgba(29, 78, 216, 0.32);
}

.pdp-qty-selector {
    width: 100%;
    height: 50px;
    border: 1.5px solid var(--accent-cobalt, #1D4ED8);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(29, 78, 216, 0.06);
    padding: 0 8px;
}

.pdp-quick-highlights {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #F8FAFC;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    margin-top: 4px;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: #334155;
    font-weight: 500;
}

.highlight-icon {
    color: var(--accent-cobalt, #1D4ED8);
    font-weight: 800;
}

/* Секция вкладок карточки товара */
.pdp-tabs-section {
    width: 100%;
    background: #ffffff;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 60px;
}

.pdp-tab-headers {
    display: flex;
    gap: 32px;
    border-bottom: 1px solid #E2E8F0;
    margin-bottom: 24px;
}

.pdp-tab-nav-btn {
    background: none;
    border: none;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    position: relative;
}

.pdp-tab-nav-btn.active {
    color: var(--accent-cobalt, #1D4ED8);
    font-weight: 700;
}

.pdp-tab-nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-cobalt, #1D4ED8);
}

.pdp-text-content {
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
    max-width: 960px;
}

.pdp-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 50px;
    row-gap: 2px;
    max-width: 1100px;
}

.pdp-spec-line {
    display: flex;
    justify-content: space-between;
    padding: 11px 0;
    border-bottom: 1px dashed #E2E8F0;
    font-size: 14px;
}

.pdp-spec-key {
    color: #64748B;
}

.pdp-spec-val {
    color: var(--clr-dark, #0F172A);
    font-weight: 700;
}

/* =======================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ (ДО 768px)
   ======================================================= */
@media (max-width: 768px) {
    .pdp-container-wrapper {
        padding: 16px 14px 40px 14px;
    }

    .pdp-main-box {
        display: flex;
        flex-direction: column;
        gap: 16px;
        width: 100%;
        padding: 18px;
    }

    .pdp-tabs-section {
        padding: 20px 18px;
    }

    .pdp-media-col {
        width: 100%;
    }

    .pdp-details-col {
        width: 100%;
        position: static;
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .pdp-product-title {
        font-size: 20px;
        line-height: 1.3;
        margin: 0 0 8px 0;
    }

    .zoom-container {
        width: 100%;
        height: 320px;
        aspect-ratio: auto;
        padding: 8px;
        background: radial-gradient(circle at center, #F8FAFC 0%, #E8EEF5 100%);
        border: 1px solid #E2E8F0;
        border-radius: 8px;
        cursor: default;
    }

    .zoom-image {
        width: 100%;
        height: 100%;
        max-width: 96%;
        max-height: 96%;
        object-fit: contain;
        transform: none;
    }

    .zoom-badge {
        display: none;
    }

    .btn-add-to-cart-pdp {
        width: 100%;
        height: 48px;
        background: var(--accent-cobalt, #1D4ED8);
        color: #ffffff;
        border: none;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.8px;
    }

    .pdp-qty-selector {
        width: 100%;
        height: 48px;
        border: 1.5px solid var(--accent-cobalt, #1D4ED8);
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #ffffff;
        padding: 0 8px;
    }

    .pdp-specs-grid {
        grid-template-columns: 1fr;
        column-gap: 0;
    }

    .page-catalog .catalog-layout-wrapper {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

    .page-catalog .catalog-sidebar {
        width: 100%;
        margin-bottom: 4px;
    }

    .page-catalog .filter-group-header {
        cursor: pointer;
        padding: 12px 16px;
        background: #F8FAFC;
        border: 1px solid #E2E8F0;
        border-radius: 8px;
    }

    .page-catalog .filter-group-title {
        font-size: 14px;
        font-weight: 700;
        text-transform: uppercase;
        margin: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .page-catalog .category-chevron {
        font-size: 11px;
        color: #64748B;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
    }

    .page-catalog .catalog-sidebar.is-open .category-chevron {
        transform: rotate(180deg);
        color: var(--accent-cobalt, #1D4ED8);
    }

    .page-catalog .catalog-sidebar .category-menu {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, margin-top 0.3s ease;
        margin-top: 0;
        border-top: none;
    }

    .page-catalog .catalog-sidebar.is-open .category-menu {
        max-height: 800px;
        opacity: 1;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #E2E8F0;
    }

    .catalog-top-controls {
        width: 100%;
        margin-bottom: 16px;
        overflow: hidden;
    }

    .horizontal-filters-bar {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding: 4px 2px 12px 2px;
        width: 100%;
        scrollbar-width: none;
    }

    .horizontal-filters-bar::-webkit-scrollbar {
        display: none;
    }

    .category-filter-set {
        display: none;
    }

    .category-filter-set.is-active {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .filter-dropdown-btn,
    .btn-reset-all-filters {
        flex-shrink: 0;
        white-space: nowrap;
        padding: 8px 14px;
        font-size: 13px;
        height: 38px;
        border-radius: 20px;
    }

    .filter-dropdown.open .filter-dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 60vh;
        overflow-y: auto;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
        padding: 24px 20px 32px 20px;
        z-index: 99999;
        background: #ffffff;
        border: none;
    }

    .page-catalog .products-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }

    .page-catalog .product-card {
        padding: 16px;
        border: 1px solid #E2E8F0;
        border-radius: 10px;
        height: auto;
    }

    .page-catalog .product-card-image-box {
        height: 260px;
        aspect-ratio: auto;
        padding: 6px;
        margin-bottom: 12px;
    }

    .page-catalog .product-card-img {
        max-width: 96%;
        max-height: 96%;
    }

    .page-catalog .product-buttons-group {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        margin-top: 12px;
    }

    .page-catalog .btn-more-details {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 44px;
        background: var(--accent-cobalt, #1D4ED8);
        color: #ffffff;
        border: none;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        text-decoration: none;
    }
}