/* =====================================================
   РосМатрас — Main Stylesheet
   ===================================================== */

:root {
    --rm-primary: #4a6fa5;
    --rm-primary-light: #5a80b5;
    --rm-primary-dark: #2b3a5c;
    --rm-accent: #e8a87c;
    --rm-moonlight: #7c9ec9;
    --rm-text: #333;
    --rm-text-inv: #e8e8f0;
    --rm-muted: #6c757d;
    --rm-bg: #fff;
    --rm-bg-light: #f5f7fa;
    --rm-bg-page: #f5f5f5;
    --rm-border: #eee;
    --rm-card: #fff;
    --rm-card-border: #f0f0f0;
    --rm-shadow: 0 2px 12px rgba(30,40,70,0.08);
    --rm-shadow-hover: 0 8px 24px rgba(30,40,70,0.14);
    --rm-radius: 12px;
    --rm-transition: all 0.3s ease;
}

/* ===== Dark Theme ===== */
[data-theme="dark"] {
    --rm-primary: #6b8fc7;
    --rm-primary-light: #7c9ec9;
    --rm-primary-dark: #4a6fa5;
    --rm-accent: #f0b88a;
    --rm-moonlight: #a0c0e0;
    --rm-text: #e2e8f0;
    --rm-text-inv: #1a2232;
    --rm-muted: #8899aa;
    --rm-bg: #1a2232;
    --rm-bg-light: #1e2840;
    --rm-bg-page: #121820;
    --rm-border: #2d3a52;
    --rm-card: #1e2840;
    --rm-card-border: #2d3a52;
    --rm-shadow: 0 2px 12px rgba(0,0,0,0.25);
    --rm-shadow-hover: 0 8px 24px rgba(0,0,0,0.35);
}

/* Dark theme — base overrides */
[data-theme="dark"] body {
    background: var(--rm-bg-page);
    color: var(--rm-text);
}
/* Breadcrumbs */
[data-theme="dark"] .breadcrumb {
    background: transparent;
    border: none;
    color: var(--rm-text);
}
[data-theme="dark"] .breadcrumb-item.active { color: var(--rm-text); }
[data-theme="dark"] .breadcrumb-item > a { color: var(--rm-muted); }
[data-theme="dark"] .breadcrumb-item > a:hover { color: var(--rm-primary); }

/* Cards, forms, modals */
[data-theme="dark"] .card,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .accordion-item {
    background: var(--rm-card);
    border-color: var(--rm-border);
    color: var(--rm-text);
}
[data-theme="dark"] .card-header { background: var(--rm-bg-light); border-color: var(--rm-border); }
[data-theme="dark"] .modal-header { border-color: var(--rm-border); }
[data-theme="dark"] .modal-footer { border-color: var(--rm-border); }
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--rm-bg-light);
    border-color: var(--rm-border);
    color: var(--rm-text);
}
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    border-color: var(--rm-moonlight);
    box-shadow: 0 0 0 3px rgba(124,158,201,0.2);
}
[data-theme="dark"] .form-control::placeholder { color: var(--rm-muted); }
[data-theme="dark"] .input-group-text {
    background: var(--rm-bg-light);
    border-color: var(--rm-border);
    color: var(--rm-muted);
}
[data-theme="dark"] .btn-close { filter: invert(1); }

/* Tables */
[data-theme="dark"] .table {
    --bs-table-bg: var(--rm-card);
    --bs-table-hover-bg: var(--rm-bg-light);
    color: var(--rm-text);
    border-color: var(--rm-border);
}
[data-theme="dark"] .table > :not(caption) > * > * { border-color: var(--rm-border); }

/* Dropdowns */
[data-theme="dark"] .dropdown-menu {
    background: var(--rm-card);
    border-color: var(--rm-border);
    box-shadow: var(--rm-shadow-hover);
}
[data-theme="dark"] .dropdown-item { color: var(--rm-text); }
[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background: var(--rm-bg-light);
    color: var(--rm-primary);
}
[data-theme="dark"] .dropdown-divider { border-color: var(--rm-border); }

/* Alerts */
[data-theme="dark"] .alert { border: 1px solid var(--rm-border); }

/* Bootstrap helpers override */
[data-theme="dark"] .bg-white { background-color: var(--rm-card) !important; }
[data-theme="dark"] .bg-light { background-color: var(--rm-bg-light) !important; }
[data-theme="dark"] .text-dark { color: var(--rm-text) !important; }
[data-theme="dark"] .text-muted { color: var(--rm-muted) !important; }
[data-theme="dark"] .border { border-color: var(--rm-border) !important; }
[data-theme="dark"] .border-bottom { border-color: var(--rm-border) !important; }
[data-theme="dark"] hr { border-color: var(--rm-border); opacity: 0.3; }

/* Pagination */
[data-theme="dark"] .pagination .page-link {
    background-color: var(--rm-card);
    border-color: var(--rm-border);
    color: var(--rm-primary);
}
[data-theme="dark"] .pagination .page-link:hover {
    background-color: var(--rm-bg-light);
}

/* Accordion */
[data-theme="dark"] .accordion-button {
    background: var(--rm-card);
    color: var(--rm-text);
}
[data-theme="dark"] .accordion-button:not(.collapsed) {
    background: var(--rm-bg-light);
    color: var(--rm-primary);
}
[data-theme="dark"] .accordion-body { background: var(--rm-card); }

/* ---- Base ---- */
body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--rm-text);
    line-height: 1.6;
    background: var(--rm-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}

main > .container, main > .container-fluid {
    padding: 15px 15px 20px;
}

a { transition: color 0.2s ease; }

.not-set { color: #c55; font-style: italic; }

/* ---- Grid View Sorting ---- */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}
a.asc:after { border-bottom: solid 7px #212529; border-top-width: 0; }
a.desc:after { border-top: solid 7px #212529; border-bottom-width: 0; }
.grid-view th, .grid-view td:last-child { white-space: nowrap; }
.grid-view .filters input, .grid-view .filters select { min-width: 50px; }

.hint-block { display: block; margin-top: 5px; color: #999; }

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* ---- Breadcrumbs (Ozon-style: no background, compact) ---- */
.breadcrumb {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 12px;
    font-size: 0.82rem;
}
.breadcrumb-item > a {
    text-decoration: none;
    color: var(--rm-muted);
    transition: color 0.2s ease;
}
.breadcrumb-item > a:hover {
    color: var(--rm-primary);
}
.breadcrumb-item.active {
    color: var(--rm-text);
    font-weight: 500;
}
.breadcrumb-item + .breadcrumb-item::before {
    color: var(--rm-muted);
    font-size: 0.7rem;
}

/* =====================================================
   Top Bar
   ===================================================== */
.top-bar {
    font-size: 0.85rem;
}

/* =====================================================
   Navbar
   ===================================================== */
.navbar { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

.navbar form > button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}
@media(max-width:767px) {
    .navbar form > button.logout {
        display: block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}
.navbar form > button.logout:focus,
.navbar form > button.logout:hover { text-decoration: none; color: rgba(255, 255, 255, 0.75); }
.navbar form > button.logout:focus { outline: none; }

/* Catalog Dropdown */
.catalog-dropdown .catalog-menu {
    min-width: 320px;
    max-height: 70vh;
    overflow-y: auto;
    border: none;
    box-shadow: var(--rm-shadow-hover);
    border-radius: var(--rm-radius);
    padding: 1rem !important;
}
.catalog-dropdown .catalog-menu::-webkit-scrollbar { width: 6px; }
.catalog-dropdown .catalog-menu::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
.catalog-dropdown .catalog-menu::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }

.catalog-btn {
    font-weight: 600;
    letter-spacing: 0.3px;
}

.catalog-menu-container .nav-item a {
    display: block;
    padding: 6px 12px;
    color: var(--rm-text);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: var(--rm-transition);
}
.catalog-menu-container .nav-item a:hover {
    background: var(--rm-bg-light);
    color: var(--rm-primary);
    padding-left: 16px;
}

/* =====================================================
   Ozon-style Homepage Feed
   ===================================================== */
.oz-homepage {
    background: var(--rm-bg-page);
    min-height: 100vh;
}

/* Feature strip */
.oz-features {
    background: var(--rm-card);
    border-bottom: 1px solid var(--rm-border);
    padding: 8px 0;
    margin-bottom: 12px;
}
.oz-features-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}
.oz-features-scroll::-webkit-scrollbar { display: none; }
.oz-feat-item {
    white-space: nowrap;
    font-size: 0.82rem;
    color: var(--rm-muted);
    flex-shrink: 0;
}
.oz-feat-item i {
    color: var(--rm-primary);
}

/* Product grid */
.oz-feed {
    padding-bottom: 20px;
}
.oz-grid-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}
.oz-grid-item {
    display: flex;
}
.oz-grid-item .product-card-v2 {
    width: 100%;
    border-radius: 10px;
}

/* Promo banners between rows */
.oz-banner {
    margin: 12px 0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(30,40,70,0.12);
    border: 1px solid rgba(255,255,255,0.1);
}
[data-theme="dark"] .oz-banner {
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.06);
}
.oz-banner-link {
    display: flex;
    align-items: center;
    padding: 20px 30px;
    text-decoration: none;
    color: #fff;
    border-radius: 14px;
    transition: opacity 0.2s;
}
.oz-banner-link:hover {
    opacity: 0.92;
    color: #fff;
}
.oz-banner-content {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
}
.oz-banner-icon {
    font-size: 2.5rem;
    opacity: 0.8;
    flex-shrink: 0;
}
.oz-banner-title {
    font-size: 1.2rem;
    font-weight: 700;
}
.oz-banner-text {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 2px;
}
.oz-banner-cta {
    margin-left: auto;
    flex-shrink: 0;
    background: rgba(255,255,255,0.2);
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.oz-banner-cta:hover {
    background: rgba(255,255,255,0.3);
}

/* Load more / spinner (homepage + catalog) */
.oz-load-more,
.catalog-load-more {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}
.oz-spinner,
.catalog-spinner {
    display: flex;
    align-items: center;
}
.oz-total-info {
    font-size: 0.85rem;
}

/* Responsive grid */
@media (max-width: 1200px) {
    .oz-grid-row { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 992px) {
    .oz-grid-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .oz-grid-row { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .oz-banner-link { padding: 14px 18px; }
    .oz-banner-title { font-size: 1rem; }
    .oz-banner-cta { display: none; }
}
@media (max-width: 480px) {
    .oz-grid-row { grid-template-columns: repeat(2, 1fr); gap: 4px; }
}

/* Legacy — keep for category/catalog pages */
.category-card {
    height: 260px;
    position: relative;
    transition: var(--rm-transition);
    overflow: hidden;
    cursor: pointer;
}
.category-card-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}
.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--rm-shadow-hover);
}
.category-card:hover .category-card-bg {
    transform: scale(1.08);
}
.category-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    transition: background 0.3s ease;
    z-index: 1;
}
.category-card:hover .category-overlay {
    background: rgba(0, 0, 0, 0.5);
}
.icon-circle {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: rgba(26, 35, 126, 0.08);
    display: flex; align-items: center; justify-content: center;
    transition: var(--rm-transition);
}

/* =====================================================
   Products Grid — Uniform card widths
   ===================================================== */
.product-list-items .row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.product-list-items .row > [class*="col-"] {
    max-width: 100%;
    width: 100%;
}
@media (max-width: 991px) {
    .product-list-items .row {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 575px) {
    .product-list-items .row {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   Product Cards — Marketplace v2
   ===================================================== */
.product-card-v2 {
    background: var(--rm-card);
    border-radius: var(--rm-radius);
    box-shadow: var(--rm-shadow);
    transition: var(--rm-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--rm-card-border);
}
.product-card-v2:hover {
    box-shadow: var(--rm-shadow-hover);
    transform: translateY(-3px);
    border-color: var(--rm-border);
}

/* --- Image area --- */
.pc-image-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: var(--rm-bg-light);
    border-bottom: 1px solid var(--rm-card-border);
}
.pc-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
}
/* Плавное увеличение при наведении (если нет слайдера) */
.pc-image-wrap:not(.pc-has-slider):hover .pc-image-main {
    transform: scale(1.05);
}
/* Для слайдера — курсор указатель */
.pc-has-slider { cursor: pointer; }

/* --- Hover slider indicator dots --- */
.pc-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.pc-image-wrap:hover .pc-dots {
    opacity: 1;
}
.pc-dot {
    width: 18px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,0.45);
    transition: all 0.2s ease;
}
.pc-dot-active {
    background: #fff;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

/* --- Badges --- */
.pc-badges {
    position: absolute;
    top: 10px; left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}
.pc-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.4;
}
.pc-badge-new {
    background: #4caf50;
    color: #fff;
}
.pc-badge-sale {
    background: var(--rm-accent);
    color: #fff;
}
.pc-badge-brand {
    background: rgba(26, 35, 126, 0.08);
    color: var(--rm-primary);
}

/* --- Variants count pill --- */
.pc-variants-count {
    position: absolute;
    bottom: 10px; left: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
}

/* --- Quick add убран: дублировал кнопку «Купить» --- */

/* --- Favorite (heart) — top-right вместо бывшего quick-view --- */
.pc-image-link {
    display: block;
    width: 100%;
    height: 100%;
}
.pc-fav-btn {
    position: absolute;
    top: 10px; right: 10px;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--rm-card);
    color: var(--rm-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 1;
    transform: none;
    transition: var(--rm-transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    z-index: 5;
}
.pc-fav-btn:hover {
    color: #e74c3c;
    transform: scale(1.12);
}
.pc-fav-btn.fav-active {
    opacity: 1 !important;
    color: #e74c3c;
}
.pc-fav-btn.fav-active i { font-weight: 900; }
.product-card-v2:hover .pc-fav-btn {
    opacity: 1;
}

/* Pulse animation for heart */
@keyframes fav-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}
.fav-pulse {
    animation: fav-pulse 0.4s ease;
}

/* Active heart on product detail page */
.pv-fav-btn.fav-active {
    color: #e74c3c !important;
    border-color: #e74c3c !important;
    background: rgba(231, 76, 60, 0.05);
}


/* --- Body --- */
.pc-body {
    padding: 12px 14px 4px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pc-rating {
    display: flex;
    align-items: center;
    gap: 1px;
    margin-bottom: 6px;
    font-size: 0.72rem;
    color: #ffc107;
}
.pc-rating .far { color: #ddd; }
.pc-rating-count {
    color: var(--rm-muted);
    margin-left: 4px;
    font-size: 0.72rem;
}
.pc-rating-count::before { content: "("; }
.pc-rating-count::after { content: ")"; }

.pc-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--rm-text);
    text-decoration: none;
    margin-bottom: 4px;
    min-height: 2.4em;
}
.pc-title:hover {
    color: var(--rm-primary);
}

.pc-description {
    font-size: 0.76rem;
    color: var(--rm-muted);
    line-height: 1.3;
    margin: 0 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Footer --- */
.pc-footer {
    padding: 0 14px 14px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.pc-price-block {
    display: flex;
    flex-direction: column;
}
.pc-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rm-text);
    line-height: 1.2;
    white-space: nowrap;
}
.pc-price-range {
    font-size: 0.72rem;
    color: var(--rm-muted);
    font-weight: 400;
}
.pc-price-request {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--rm-muted);
}
.pc-old-price {
    font-size: 0.8rem;
    text-decoration: line-through;
    color: #bbb;
    font-weight: 400;
}

/* Responsive: compact cards on small screens */
@media (max-width: 576px) {
    .pc-image { padding: 10px; }
    .pc-body { padding: 8px 10px; }
    .pc-title { font-size: 0.78rem; -webkit-line-clamp: 2; }
    .pc-price { font-size: 0.9rem; }
    .pc-old-price { font-size: 0.7rem; }
    .pc-brand { font-size: 0.65rem; }
    .product-card-v2 { border-radius: 8px; }
    /* Larger touch targets for mobile */
    .pc-fav-btn { opacity: 1; transform: none; width: 32px; height: 32px; }
}

/* --- Legacy support (keep old .product-card working) --- */
.product-card {
    background: var(--rm-card);
    border-radius: var(--rm-radius) !important;
    box-shadow: var(--rm-shadow);
    transition: var(--rm-transition);
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--rm-card-border);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--rm-shadow-hover);
}

/* =====================================================
   Badges (legacy)
   ===================================================== */
.badge-new {
    position: absolute;
    top: 10px; right: 10px;
    background: var(--rm-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}
.badge-sale {
    position: absolute;
    top: 10px; left: 10px;
    background: var(--rm-accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* =====================================================
   Product View v2 (Detail page — Marketplace Style)
   ===================================================== */
.product-view-v2 {
    padding-bottom: 2rem;
    max-width: 1280px;
    margin: 0 auto;
}

/* ===== Ozon-like PDP grid ===== */
.pv-ozon-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(280px, 0.85fr);
    gap: 1.5rem 1.75rem;
    align-items: start;
}
.pv-ozon-gallery,
.pv-ozon-main,
.pv-ozon-buy { min-width: 0; }

.pv-buy-card {
    position: sticky;
    top: 1rem;
    background: var(--rm-card);
    border: 1px solid var(--rm-card-border);
    border-radius: 14px;
    padding: 1.15rem 1.2rem 1.25rem;
    box-shadow: 0 8px 28px rgba(30, 40, 70, 0.08);
}
.pv-buy-card .pv-price-block {
    border: none;
    padding: 0;
    margin-bottom: 0.65rem;
    background: transparent;
}
.pv-buy-card .pv-price {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--rm-text);
}
.pv-buy-card .pv-stock { margin-bottom: 0.35rem; }
.pv-buy-sku {
    font-size: 0.8rem;
    color: var(--rm-muted);
    margin-bottom: 1rem;
}
.pv-buy-card .pv-cart-form { margin-top: 0; }
.pv-buy-card .pv-cart-row { margin-bottom: 0.75rem; }
.pv-buy-card .pv-qty-wrap {
    width: 100%;
    justify-content: space-between;
}
.pv-buy-card .pv-add-to-cart {
    width: 100%;
    justify-content: center;
    padding: 0.95rem 1.25rem;
    font-size: 1.08rem;
    border-radius: 12px;
    margin-bottom: 0.65rem;
}
.pv-buy-secondary-row {
    display: flex;
    gap: 0.55rem;
    align-items: stretch;
    margin-bottom: 1rem;
}
.pv-buy-card .pv-buy-one-click {
    flex: 1;
    margin: 0;
    padding: 0.7rem 0.75rem;
    font-size: 0.92rem;
}
.pv-fav-square {
    width: 46px;
    flex-shrink: 0;
    border: 1px solid var(--rm-border);
    border-radius: 10px;
    background: var(--rm-bg-light);
    color: var(--rm-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.pv-fav-square:hover,
.pv-fav-square.fav-active {
    color: #e53935;
    border-color: #ffcdd2;
}
.pv-buy-card .pv-delivery-info {
    margin-top: 0.25rem;
    padding: 0.75rem 0 0;
    border-top: 1px solid var(--rm-border);
    background: transparent;
}

/* Магазин (как у Ozon) */
.pv-shop {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.85rem 0 0;
    padding: 0.85rem 0 0;
    border-top: 1px solid var(--rm-border);
}
.pv-shop-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #4a6fa5, #2b3a5c);
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pv-shop-label {
    font-size: 0.75rem;
    color: var(--rm-muted);
    line-height: 1.2;
}
.pv-shop-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--rm-text);
    line-height: 1.25;
}

/* Доставка и возврат */
.pv-ship-block {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--rm-border);
}
.pv-ship-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--rm-text);
    user-select: none;
}
.pv-ship-summary::-webkit-details-marker { display: none; }
.pv-ship-chevron {
    font-size: 0.7rem;
    color: var(--rm-muted);
    transition: transform 0.2s;
}
.pv-ship-block[open] .pv-ship-chevron {
    transform: rotate(180deg);
}
.pv-ship-body {
    padding-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.pv-ship-row {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
}
.pv-ship-row > i {
    width: 1.1rem;
    margin-top: 0.15rem;
    color: var(--rm-primary);
    text-align: center;
}
.pv-ship-row strong {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.1rem;
}
.pv-ship-row span {
    display: block;
    font-size: 0.8rem;
    color: var(--rm-muted);
    line-height: 1.35;
}
.pv-ship-row a {
    color: var(--rm-primary);
    text-decoration: none;
}
.pv-ship-row a:hover { text-decoration: underline; }

.pv-ozon .pv-option-label {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.55rem;
}
.pv-ozon .pv-size-axis-label {
    display: block;
    width: 100%;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rm-muted);
}
.pv-ozon .pv-size-axis { display: block; }
.pv-ozon .pv-size-axis-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pv-ozon .pv-size-axis-btn {
    min-width: 52px;
    min-height: 44px;
    padding: 0.55rem 0.85rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 10px;
    border: 1.5px solid var(--rm-border);
    background: #fff;
}
.pv-ozon .pv-size-axis-btn.active {
    border-color: var(--rm-primary);
    background: rgba(74, 111, 165, 0.08);
    color: var(--rm-primary);
    box-shadow: 0 0 0 1px var(--rm-primary);
}
.pv-ozon .pv-option-btn {
    min-height: 44px;
    padding: 0.55rem 0.95rem;
    font-size: 0.98rem;
    border-radius: 10px;
}
.pv-ozon .pv-title {
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.55rem;
}
.pv-ozon .pv-info {
    position: static;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
}
.pv-ozon .pv-short-desc {
    font-size: 0.95rem;
    margin-bottom: 1.15rem;
}

@media (max-width: 1100px) {
    .pv-ozon-grid {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
    }
    .pv-ozon-main { grid-column: 1 / -1; order: 3; }
    .pv-ozon-gallery { order: 1; }
    .pv-ozon-buy { order: 2; }
}
@media (max-width: 768px) {
    .pv-ozon-grid { grid-template-columns: 1fr; gap: 1.1rem; }
    .pv-ozon-gallery,
    .pv-ozon-main,
    .pv-ozon-buy { order: initial; grid-column: auto; }
    .pv-gallery {
        position: static !important;
        flex-direction: column-reverse;
    }
    .pv-thumbnails-side {
        flex-direction: row !important;
        width: 100% !important;
        max-height: none !important;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .pv-buy-card { position: static; }
}

/* --- Gallery --- */
.pv-gallery {
    position: sticky;
    top: 1rem;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.pv-thumbnails-side {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 520px;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    width: 64px;
    scrollbar-width: thin;
}
.pv-thumbnails-side .pv-thumb {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}
.pv-gallery-main {
    position: relative;
    background: var(--rm-card);
    border-radius: 12px;
    box-shadow: none;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    aspect-ratio: 1 / 1;
    flex: 1;
    padding: 0;
    cursor: pointer;
    border: 1px solid var(--rm-card-border);
}
.pv-gallery-main.pv-gallery-empty {
    cursor: default;
    background: linear-gradient(160deg, var(--rm-bg-light) 0%, var(--rm-card) 100%);
}
.pv-gallery-main.pv-gallery-empty:hover .pv-gallery-img {
    transform: none;
}
.pv-no-photo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    color: var(--rm-text-muted, #8a93a3);
    text-align: center;
    padding: 1.5rem;
}
.pv-no-photo i {
    font-size: 2.4rem;
    opacity: 0.55;
}
.pv-no-photo span {
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}
.pv-gallery-img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    transition: transform 0.4s ease;
}
.pv-gallery-main:hover .pv-gallery-img {
    transform: scale(1.03);
}

/* Zoom icon overlay */
.pv-zoom-icon {
    position: absolute;
    bottom: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 3;
    backdrop-filter: blur(4px);
}
.pv-gallery-main:hover .pv-zoom-icon {
    opacity: 1;
}
.pv-zoom-icon:hover {
    transform: scale(1.1);
    background: rgba(0,0,0,0.7);
}

/* Photo count */
.pv-photo-count {
    position: absolute;
    bottom: 14px;
    left: 14px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
    z-index: 3;
}

/* ====== Lightbox ====== */
.pv-lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.pv-lightbox-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(6px);
}
.pv-lightbox-close {
    position: absolute;
    top: 20px; right: 24px;
    width: 44px; height: 44px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1.3rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pv-lightbox-close:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}
.pv-lightbox-body {
    position: relative;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 75vh;
    gap: 16px;
}
.pv-lightbox-img {
    max-width: 80vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.25s ease;
}
.pv-lightbox-arrow {
    flex-shrink: 0;
    width: 48px; height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
}
.pv-lightbox-arrow:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}
.pv-lightbox-counter {
    position: relative;
    z-index: 10001;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    margin-top: 14px;
    font-weight: 500;
}
.pv-lightbox-thumbs {
    position: relative;
    z-index: 10001;
    display: flex;
    gap: 6px;
    margin-top: 12px;
    overflow-x: auto;
    max-width: 80vw;
    padding: 4px 0;
}
.pv-lightbox-thumbs::-webkit-scrollbar { height: 3px; }
.pv-lightbox-thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 3px; }
.pv-lb-thumb {
    flex-shrink: 0;
    width: 60px; height: 60px;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 2px;
    background: rgba(255,255,255,0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.5;
}
.pv-lb-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 5px;
}
.pv-lb-thumb:hover {
    opacity: 0.8;
}
.pv-lb-thumb-active {
    border-color: #fff;
    opacity: 1;
}

/* ====== Quick View Modal ====== */
#quickViewModal .modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}
.qv-gallery { position: relative; }
.qv-main-img {
    background: var(--rm-bg-light);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    padding: 12px;
}
.qv-main-img img {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
}
.qv-thumbs {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
}
.qv-thumb {
    flex-shrink: 0;
    width: 52px; height: 52px;
    border: 2px solid var(--rm-border);
    border-radius: 8px;
    padding: 2px;
    background: var(--rm-card);
    cursor: pointer;
    transition: all 0.2s ease;
}
.qv-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 5px;
}
.qv-thumb:hover { border-color: #ccc; }
.qv-thumb-active { border-color: var(--rm-primary); }

.qv-info { padding: 0 4px; }
.qv-brand {
    display: inline-block;
    background: rgba(26,35,126,0.08);
    color: var(--rm-primary);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.qv-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--rm-text);
}
.qv-category {
    font-size: 0.8rem;
    color: var(--rm-muted);
    margin-bottom: 12px;
}
.qv-price-block { margin-bottom: 8px; }
.qv-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--rm-text);
}
.qv-price-range {
    font-size: 0.82rem;
    color: var(--rm-muted);
    margin-left: 8px;
}
.qv-variants-info {
    font-size: 0.82rem;
    color: var(--rm-muted);
    margin-bottom: 10px;
}
.qv-desc {
    font-size: 0.85rem;
    color: var(--rm-muted);
    line-height: 1.5;
    margin-bottom: 14px;
    max-height: 120px;
    overflow: hidden;
}
.qv-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 16px;
    font-size: 0.78rem;
    color: var(--rm-muted);
}
.qv-trust-row i {
    color: var(--rm-primary);
    margin-right: 4px;
}
.qv-actions .btn {
    border-radius: 10px;
    font-weight: 600;
}

/* ====== Recently Viewed ====== */
.rv-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--rm-border);
}
.rv-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--rm-text);
}
.rv-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.rv-scroll::-webkit-scrollbar { height: 4px; }
.rv-scroll::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.rv-card-wrap {
    flex: 0 0 200px;
    scroll-snap-align: start;
}
.rv-card-wrap .product-card-v2 {
    height: 100%;
}

/* ====== Sticky Mobile Cart Bar ====== */
.pv-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: var(--rm-card);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    padding: 10px 16px;
    display: none;
    border-top: 1px solid var(--rm-border);
}
.pv-sticky-visible {
    transform: translateY(0);
}
.pv-sticky-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 12px;
}
.pv-sticky-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rm-text);
    white-space: nowrap;
}
.pv-sticky-buy {
    flex-shrink: 0;
    padding: 10px 28px;
    border: none;
    border-radius: 10px;
    background: var(--rm-primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--rm-transition);
}
.pv-sticky-buy:hover:not(:disabled) {
    background: var(--rm-primary-light);
}
.pv-sticky-buy:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* Show sticky bar on all screens when scrolled past cart */
@media (min-width: 1px) {
    .pv-sticky-bar { display: block; }
}

.pv-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}
.pv-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pv-badge-new { background: #4caf50; color: #fff; }
.pv-badge-sale { background: var(--rm-accent); color: #fff; }

/* Thumbnails */
.pv-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 0 4px;
    overflow-x: auto;
    justify-content: flex-start;
}
.pv-thumbnails::-webkit-scrollbar { height: 3px; }
.pv-thumbnails::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
.pv-thumb {
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    border: 2px solid var(--rm-border);
    border-radius: 10px;
    padding: 0;
    background: var(--rm-card);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s, opacity 0.15s;
    opacity: 0.7;
}
.pv-thumbnails-side .pv-thumb {
    width: 64px;
    height: 64px;
    border-radius: 8px;
}
.pv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pv-thumb:hover {
    opacity: 1;
    border-color: var(--rm-primary);
}
.pv-thumb-active {
    opacity: 1;
    border-color: var(--rm-primary);
    box-shadow: 0 0 0 1px var(--rm-primary);
}

/* --- Product Info --- */
.pv-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Brand */
.pv-brand { margin-bottom: 6px; }
.pv-brand-link {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--rm-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    padding: 2px 10px;
    border: 1px solid var(--rm-primary);
    border-radius: 20px;
    transition: var(--rm-transition);
}
.pv-brand-link:hover {
    background: var(--rm-primary);
    color: #fff;
}

/* Title */
.pv-title {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--rm-text);
    margin: 0 0 10px;
}

/* Meta: Rating + SKU */
.pv-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rm-border);
}
.pv-rating-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.85rem;
}
.pv-rating-stars i { color: #ffc107; }
.pv-rating-value {
    font-weight: 700;
    margin-left: 4px;
    color: var(--rm-text);
}
.pv-rating-link {
    margin-left: 6px;
    color: var(--rm-primary);
    text-decoration: none;
    font-size: 0.82rem;
}
.pv-rating-link:hover { text-decoration: underline; }
.pv-no-reviews {
    font-size: 0.82rem;
    color: var(--rm-muted);
    text-decoration: none;
}
.pv-no-reviews:hover { color: var(--rm-primary); }
.pv-sku {
    font-size: 0.78rem;
    color: var(--rm-muted);
}

/* Price block */
.pv-price-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
    padding: 16px 18px;
    background: var(--rm-bg-light);
    border-radius: 12px;
    border: 1px solid var(--rm-card-border);
}
.pv-price-main {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}
.pv-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--rm-text);
    line-height: 1.1;
}
.pv-price-range-hint {
    font-size: 0.78rem;
    color: var(--rm-muted);
    font-weight: 400;
}
.pv-variants-hint {
    font-size: 0.78rem;
    color: var(--rm-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Stock status */
.pv-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
    padding: 6px 14px;
    border-radius: 8px;
    width: fit-content;
}
.pv-stock .fa-check-circle { color: #4caf50; }
.pv-stock .fa-check-circle + span { color: #4caf50; }
.pv-stock .fa-clock { color: #ff9800; }
.pv-stock .fa-clock + span { color: #ff9800; }
.pv-stock .fa-times-circle { color: var(--rm-accent); }
.pv-stock .fa-times-circle + span { color: var(--rm-accent); }

/* Short description */
.pv-short-desc {
    font-size: 0.88rem;
    color: var(--rm-muted);
    line-height: 1.6;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--rm-bg-light);
    border-radius: 10px;
    border-left: 3px solid var(--rm-primary);
}

/* Variant selectors */
.pv-options {
    margin-bottom: 16px;
}
.pv-option-group {
    margin-bottom: 14px;
}
.pv-option-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rm-text);
    margin-bottom: 8px;
}
.pv-option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pv-option-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1.5px solid var(--rm-border);
    border-radius: 8px;
    background: var(--rm-card);
    color: var(--rm-text);
    cursor: pointer;
    transition: var(--rm-transition);
    min-width: 48px;
    text-align: center;
}
.pv-option-btn:hover {
    border-color: var(--rm-primary);
    color: var(--rm-primary);
    background: rgba(26, 35, 126, 0.04);
}
.btn-check:checked + .pv-option-btn {
    background: var(--rm-primary);
    border-color: var(--rm-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26, 35, 126, 0.25);
}
.btn-check:disabled + .pv-option-btn {
    opacity: 0.35;
    cursor: not-allowed;
    text-decoration: line-through;
}
.pv-option-size {
    min-width: 60px;
    padding: 7px 12px;
    font-family: 'Roboto Mono', monospace, sans-serif;
    letter-spacing: 0.3px;
}

/* ═══ Size Matrix Selector (Двухосевой выбор ширина×длина) ═══ */
.pv-size-matrix-group {
    background: var(--rm-bg-light, #f8f9fa);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--rm-border, #e0e0e0);
}
.pv-size-axis {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.pv-size-axis-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--rm-text-muted, #6c757d);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    min-width: 90px;
    padding-top: 7px;
    flex-shrink: 0;
}
.pv-size-axis-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.pv-size-axis-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 36px;
    padding: 0 10px;
    border: 1.5px solid var(--rm-border, #dee2e6);
    border-radius: 8px;
    background: var(--rm-card, #fff);
    color: var(--rm-text, #212529);
    font-size: 0.82rem;
    font-weight: 500;
    font-family: 'Roboto Mono', monospace, sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 0.3px;
}
.pv-size-axis-btn:hover:not(.disabled) {
    border-color: var(--rm-primary, #1a237e);
    color: var(--rm-primary, #1a237e);
    background: rgba(26, 35, 126, 0.05);
}
.pv-size-axis-btn.active {
    background: var(--rm-primary, #1a237e);
    border-color: var(--rm-primary, #1a237e);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26, 35, 126, 0.25);
}
.pv-size-axis-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    text-decoration: line-through;
    pointer-events: none;
}
.pv-size-selected-info {
    font-size: 0.85rem;
    color: var(--rm-text-muted, #6c757d);
    padding: 4px 0;
}
.pv-size-selected-info .fas {
    font-size: 0.9rem;
}
@media (max-width: 575.98px) {
    .pv-size-axis {
        flex-direction: column;
        gap: 4px;
    }
    .pv-size-axis-label {
        min-width: auto;
        padding-top: 0;
    }
    .pv-size-axis-btn {
        min-width: 42px;
        height: 32px;
        font-size: 0.78rem;
        padding: 0 8px;
    }
}

/* Add to Cart */
.pv-cart-form {
    margin-bottom: 16px;
}
.pv-cart-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
.pv-qty-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--rm-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--rm-card);
    flex-shrink: 0;
}
.pv-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--rm-text);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--rm-transition);
}
.pv-qty-btn:hover {
    background: #f0f0f0;
    color: var(--rm-primary);
}
.pv-qty-input {
    width: 48px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--rm-border);
    border-right: 1px solid var(--rm-border);
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
    -moz-appearance: textfield;
    background: var(--rm-card);
    color: var(--rm-text);
}
.pv-qty-input::-webkit-outer-spin-button,
.pv-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pv-add-to-cart {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: var(--rm-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--rm-transition);
    letter-spacing: 0.3px;
}
.pv-add-to-cart:hover:not(:disabled) {
    background: var(--rm-primary-light);
    box-shadow: 0 4px 16px rgba(26, 35, 126, 0.3);
    transform: translateY(-1px);
}
.pv-add-to-cart:disabled {
    background: #bbb;
    cursor: not-allowed;
}
.pv-add-to-cart i {
    font-size: 1.1rem;
}

/* Buy in 1 click */
.pv-buy-one-click {
    display: block;
    width: 100%;
    padding: 11px 20px;
    margin-top: 8px;
    background: transparent;
    color: var(--rm-primary);
    border: 1.5px solid var(--rm-primary);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--rm-transition);
    text-align: center;
}
.pv-buy-one-click:hover:not(:disabled) {
    background: var(--rm-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(26, 35, 126, 0.2);
}
.pv-buy-one-click:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Quick actions */
.pv-quick-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.pv-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.78rem;
    color: var(--rm-muted);
    background: transparent;
    border: 1px solid var(--rm-border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--rm-transition);
}
.pv-action-btn:hover {
    color: var(--rm-primary);
    border-color: var(--rm-primary);
    background: rgba(26, 35, 126, 0.03);
}
.pv-action-btn i { font-size: 0.85rem; }

/* Delivery info section */
.pv-delivery-info {
    padding: 14px 16px;
    background: var(--rm-bg-light);
    border: 1px solid var(--rm-card-border);
    border-radius: var(--rm-radius);
    margin-bottom: 16px;
}
.pv-delivery-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
}
.pv-delivery-row:not(:last-child) {
    border-bottom: 1px solid var(--rm-border);
}
.pv-delivery-icon {
    width: 32px;
    height: 32px;
    background: var(--rm-card);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--rm-primary);
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.pv-delivery-text {
    flex: 1;
}
.pv-delivery-text strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rm-text);
    line-height: 1.3;
}
.pv-delivery-text span {
    display: block;
    font-size: 0.75rem;
    color: var(--rm-muted);
    line-height: 1.4;
}

/* Trust badges */
.pv-trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 16px 18px;
    background: var(--rm-card);
    border: 1px solid var(--rm-card-border);
    border-radius: var(--rm-radius);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.pv-trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
}
.pv-trust-item > i {
    font-size: 1.2rem;
    color: #00a862;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}
.pv-trust-item strong {
    display: block;
    font-weight: 600;
    color: var(--rm-text);
    line-height: 1.3;
    font-size: 0.8rem;
}
.pv-trust-item span {
    color: var(--rm-muted);
    line-height: 1.3;
    font-size: 0.73rem;
}

/* Buy in 1 Click Modal */
.pv-oneclick-modal .modal-header {
    padding: 20px 24px 0;
}
.pv-oneclick-modal .modal-body {
    padding: 16px 24px 24px;
}
.pv-oneclick-modal .modal-title {
    font-size: 1.1rem;
    font-weight: 700;
}
.pv-oneclick-product {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--rm-bg-light);
    border-radius: 10px;
    border: 1px solid var(--rm-border);
    gap: 12px;
}
.pv-oneclick-product strong {
    font-size: 0.88rem;
    font-weight: 600;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pv-oneclick-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--rm-primary);
    white-space: nowrap;
    flex-shrink: 0;
}
.pv-oneclick-submit {
    font-weight: 600;
    border-radius: 10px;
}
.pv-oneclick-note {
    text-align: center;
    font-size: 0.78rem;
    color: var(--rm-muted);
    margin: 12px 0 0;
}

/* --- Tabs --- */
.pv-tabs-wrap {
    margin-top: 2rem;
    background: var(--rm-card);
    border: 1px solid var(--rm-card-border);
    border-radius: var(--rm-radius);
    overflow: hidden;
}
.pv-tabs {
    border-bottom: 1px solid var(--rm-border);
    padding: 0 8px;
    background: var(--rm-bg-light);
}
.pv-tabs .nav-link {
    font-weight: 500;
    color: var(--rm-muted);
    padding: 14px 20px;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: var(--rm-transition);
    font-size: 0.9rem;
    border-radius: 0;
}
.pv-tabs .nav-link:hover {
    color: var(--rm-primary);
    background: transparent;
}
.pv-tabs .nav-link.active {
    color: var(--rm-primary);
    border-bottom-color: var(--rm-primary);
    font-weight: 600;
    background: transparent;
}
.pv-tab-content {
    padding: 24px 20px;
}
.pv-tab-content > .tab-pane {
    padding: 0;
}

/* Description */
.pv-description {
    font-size: 0.92rem;
    line-height: 1.7;
    color: var(--rm-text);
    max-width: 800px;
}
.pv-description p { margin-bottom: 1rem; }
.pv-description img { max-width: 100%; border-radius: 8px; }
.pv-description h2,
.pv-description h3 { margin-top: 1.5rem; color: var(--rm-text); }

/* Specs table */
.pv-specs-table {
    max-width: 700px;
}
.pv-spec-row {
    display: flex;
    padding: 10px 14px;
    border-radius: 6px;
}
.pv-spec-even {
    background: var(--rm-bg-light);
}
.pv-spec-name {
    flex: 0 0 45%;
    font-weight: 500;
    color: var(--rm-muted);
    font-size: 0.88rem;
}
.pv-spec-value {
    flex: 1;
    font-weight: 500;
    color: var(--rm-text);
    font-size: 0.88rem;
}

/* Reviews */
.pv-reviews-summary {
    padding: 20px;
    background: var(--rm-bg-light);
    border-radius: var(--rm-radius);
    margin-bottom: 24px;
}
.pv-reviews-big-rating {
    display: flex;
    align-items: center;
    gap: 14px;
}
.pv-big-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--rm-text);
    line-height: 1;
}
.pv-stars-row {
    display: flex;
    gap: 2px;
    font-size: 1rem;
    color: #ffc107;
    margin-bottom: 4px;
}
.pv-reviews-count-text {
    font-size: 0.82rem;
    color: var(--rm-muted);
}
.pv-review-form-section {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--rm-card);
    border: 1px solid var(--rm-border);
    border-radius: var(--rm-radius);
}
.pv-review-form-section h5 {
    margin-bottom: 16px;
    font-size: 1rem;
}
.pv-review-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--rm-border);
}
.pv-review-item:last-child { border-bottom: none; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .pv-title { font-size: 1.2rem; }
    .pv-price { font-size: 1.6rem; }
    .pv-gallery { position: static; }
    .pv-gallery-main { min-height: 250px; }
    .pv-thumb { width: 64px; height: 64px; }
    .pv-trust { grid-template-columns: 1fr; gap: 8px; }
    .pv-cart-row { flex-direction: column; }
    .pv-qty-wrap { width: 100%; justify-content: center; }
    .pv-add-to-cart { width: 100%; }
    .pv-buy-one-click { font-size: 0.85rem; padding: 10px 16px; }
    .pv-delivery-info { padding: 10px 12px; }
    .pv-delivery-icon { width: 28px; height: 28px; font-size: 0.8rem; }
    .pv-tabs .nav-link { padding: 10px 12px; font-size: 0.82rem; }
    .pv-quick-actions { justify-content: center; }
    .pv-oneclick-product { flex-direction: column; text-align: center; }
    /* Lightbox responsive */
    .pv-lightbox-arrow { width: 36px; height: 36px; font-size: 0.9rem; }
    .pv-lightbox-img { max-width: 95vw; max-height: 70vh; }
    .pv-lightbox-body { gap: 8px; }
    .pv-lb-thumb { width: 48px; height: 48px; }
}

/* =====================================================
   Catalog Page — Filters & Toolbar
   ===================================================== */
/* =====================================================
   Compact Filter Panel
   ===================================================== */
.filters-wrapper {
    background: var(--rm-card);
    border-radius: var(--rm-radius);
    box-shadow: var(--rm-shadow);
    padding: 1rem;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    border: 1px solid var(--rm-card-border);
    font-size: 0.82rem;
}
.filters-wrapper::-webkit-scrollbar { width: 3px; }
.filters-wrapper::-webkit-scrollbar-track { background: transparent; }
.filters-wrapper::-webkit-scrollbar-thumb { background: var(--rm-border); border-radius: 4px; }
.filters-wrapper h5 { font-size: 0.9rem; }
.filters-wrapper h6 { font-size: 0.78rem; letter-spacing: 0.01em; }

/* ── Section ── */
.filter-section {
    border-bottom: 1px solid var(--rm-border);
    padding-bottom: 0.6rem;
    margin-bottom: 0.6rem;
}
.filter-section:last-child,
.filter-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
/* Compact boolean sections (switches) */
.filter-section-compact {
    padding-bottom: 0.35rem;
    margin-bottom: 0.35rem;
}
.filter-section-compact .form-switch {
    min-height: 1.4rem;
}
.filter-section-compact .form-check-input {
    width: 2em;
    height: 1.05em;
    margin-top: 0.15em;
}
.filter-section-compact .form-check-label {
    font-size: 0.78rem;
    line-height: 1.4;
}

/* ── Count hint next to section name ── */
.filter-count-hint {
    font-size: 0.62rem;
    color: var(--rm-muted);
    background: var(--rm-bg);
    border-radius: 8px;
    padding: 0 5px;
    margin-left: 4px;
    font-weight: 400;
    line-height: 1.5;
}

/* ── Collapsible headers ── */
.filter-section-header {
    cursor: pointer;
    user-select: none;
    padding: 2px 0;
    transition: color 0.2s ease;
}
.filter-section-header:hover h6 {
    color: var(--rm-primary);
}
.filter-section-header .filter-chevron {
    font-size: 0.55rem;
    color: var(--rm-muted);
    transition: transform 0.25s ease;
}
.filter-section-header[aria-expanded="false"] .filter-chevron {
    transform: rotate(180deg);
}

/* ── Show more / less ── */
.filter-option-hidden {
    display: none !important;
}
.filter-show-more-link {
    cursor: pointer;
    font-weight: 500;
    font-size: 0.72rem;
    transition: color 0.2s ease;
}
.filter-show-more-link:hover {
    color: var(--rm-primary-light) !important;
}
.filter-show-more-link .fa-chevron-down {
    transition: transform 0.2s ease;
    font-size: 0.55rem;
}
.filter-show-more-link.expanded .fa-chevron-down {
    transform: rotate(180deg);
}

/* ── Search input ── */
.filter-search-input {
    font-size: 0.75rem !important;
    border-radius: 6px;
    padding: 0.25rem 0.5rem !important;
}
.filter-search-input::placeholder {
    color: #bbb;
}

/* ── Checkbox list ── */
.filter-options-list .form-check {
    padding-left: 1.35rem;
    margin-bottom: 1px;
    line-height: 1.35;
}
.filter-options-list .form-check-input {
    margin-top: 0.25em;
    width: 0.85em;
    height: 0.85em;
}
.filter-options-list .form-check-label {
    font-size: 0.78rem;
    line-height: 1.4;
    cursor: pointer;
}

/* ── Range Slider (ширина/длина/высота/вес) ── */
.filter-range-group {
    padding: 2px 0;
}
.filter-range-slider {
    position: relative;
    height: 22px;
    margin: 6px 2px 10px;
}
.filter-range-track {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 3px;
    background: var(--rm-border);
    border-radius: 2px;
}
.filter-range-progress {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 3px;
    background: #2979ff;
    border-radius: 2px;
    pointer-events: none;
}
.filter-range-slider input[type="range"] {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 3px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0;
    padding: 0;
    outline: none;
    z-index: 2;
}
.filter-range-slider input[type="range"]::-webkit-slider-thumb {
    pointer-events: all;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2979ff;
    border: 2.5px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    position: relative;
    z-index: 3;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.filter-range-slider input[type="range"]::-webkit-slider-thumb:hover {
    box-shadow: 0 2px 8px rgba(41,121,255,0.35);
    transform: scale(1.1);
}
.filter-range-slider input[type="range"]::-webkit-slider-thumb:active {
    box-shadow: 0 2px 10px rgba(41,121,255,0.5);
    transform: scale(1.15);
}
.filter-range-slider input[type="range"]::-moz-range-thumb {
    pointer-events: all;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2979ff;
    border: 2.5px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    cursor: pointer;
}
.filter-range-slider input[type="range"]::-moz-range-track {
    background: transparent;
    border: none;
}
.filter-range-inputs {
    display: flex;
    gap: 8px;
    align-items: center;
}
.filter-range-inputs .form-control {
    text-align: center;
    font-size: 0.8rem !important;
    padding: 0.3rem 0.4rem !important;
    border-radius: 8px;
    border: 1.5px solid var(--rm-border);
    font-weight: 500;
    color: var(--rm-text);
    background: var(--rm-card);
}
.filter-range-inputs .form-control:focus {
    border-color: #2979ff;
    box-shadow: 0 0 0 2px rgba(41,121,255,0.15);
}
/* Remove spinner arrows */
.filter-range-inputs .form-control::-webkit-outer-spin-button,
.filter-range-inputs .form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.filter-range-inputs .form-control[type=number] {
    -moz-appearance: textfield;
}
/* Dark theme slider */
[data-theme="dark"] .filter-range-track {
    background: rgba(255,255,255,0.15);
}
[data-theme="dark"] .filter-range-slider input[type="range"]::-webkit-slider-thumb {
    border-color: var(--rm-card);
}

/* ── Pill View (sizes / dimensions) ── */
.filter-pills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 2px;
}
.filter-pills-grid.has-show-more {
    max-height: none; /* let show-more handle visibility */
}
.filter-pills-grid::-webkit-scrollbar { width: 3px; }
.filter-pills-grid::-webkit-scrollbar-thumb { background: var(--rm-border); border-radius: 4px; }
.filter-pill {
    font-size: 0.7rem !important;
    padding: 2px 8px !important;
    border-radius: 14px !important;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.15s ease;
    border-color: var(--rm-border) !important;
    color: var(--rm-text);
    background: var(--rm-card);
    line-height: 1.35;
    cursor: pointer;
}
.filter-pill:hover {
    border-color: var(--rm-primary) !important;
    color: var(--rm-primary);
    background: rgba(26, 35, 126, 0.06);
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.btn-check:checked + .filter-pill {
    background-color: var(--rm-primary) !important;
    border-color: var(--rm-primary) !important;
    color: #fff !important;
    box-shadow: 0 1px 4px rgba(26, 35, 126, 0.3);
}
[data-theme="dark"] .filter-pill:hover {
    background: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .btn-check:checked + .filter-pill {
    box-shadow: 0 1px 4px rgba(100, 130, 255, 0.3);
}

.catalog-toolbar {
    background: var(--rm-card);
    border-radius: var(--rm-radius);
    box-shadow: var(--rm-shadow);
    padding: 0.75rem 1rem;
    border: 1px solid var(--rm-card-border);
}

/* Filter on mobile - full width */
@media (max-width: 767px) {
    .filters-wrapper {
        position: static;
        max-height: none;
    }
}

/* =====================================================
   Category List & Menu Styles
   ===================================================== */
.categories-list .list-group-item {
    border-left: 4px solid transparent;
    transition: var(--rm-transition);
}
.categories-list .list-group-item:hover {
    border-left-color: var(--rm-primary);
    background-color: rgba(26, 35, 126, 0.05);
}

.categories-menu .nav-link {
    color: var(--rm-text);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: var(--rm-transition);
}
.categories-menu .nav-link:hover {
    color: var(--rm-primary);
    background-color: rgba(26, 35, 126, 0.05);
}

/* =====================================================
   Rating Stars
   ===================================================== */
.rating, .product-rating-stars { color: #ffc107; font-size: 0.9rem; }
.rating-count { color: var(--rm-muted); font-size: 0.8rem; margin-left: 0.5rem; }

/* Review Items */
.review-item { transition: background 0.2s ease; }
.review-item:hover { background: var(--rm-bg-light); }

/* =====================================================
   Footer
   ===================================================== */
footer {
    font-size: 0.9rem;
}
footer a { transition: color 0.2s ease; }
footer h5, footer h6 { font-weight: 600; letter-spacing: 0.3px; }

/* =====================================================
   Pagination
   ===================================================== */
.pagination .page-link {
    color: var(--rm-primary);
    border-color: #dee2e6;
    margin: 0 2px;
    border-radius: 6px !important;
    transition: var(--rm-transition);
}
.pagination .page-item.active .page-link {
    background-color: var(--rm-primary);
    border-color: var(--rm-primary);
    color: white;
}
.pagination .page-link:hover {
    background-color: rgba(26, 35, 126, 0.08);
    border-color: #dee2e6;
    color: var(--rm-primary);
}

/* =====================================================
   Animations
   ===================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fadeInUp { animation: fadeInUp 0.5s ease forwards; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   Responsive (general)
   ===================================================== */
@media (max-width: 768px) {
    .category-card {
        height: 180px;
    }
}

/* =====================================================
   Info Pages (About, Delivery, Payment, etc.)
   ===================================================== */
.site-about, .site-delivery, .site-payment, .site-contact,
.site-returns, .site-warranty, .site-sales, .site-privacy {
    max-width: 1000px;
    margin: 0 auto;
}

.site-contact {
    max-width: 1100px;
}

.site-sales {
    max-width: 1200px;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(26, 35, 126, 0.05);
    color: var(--rm-primary);
}
.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(26, 35, 126, 0.15);
}

/* =====================================================
   Misc / Utility
   ===================================================== */
.quick-call-widget .btn {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Smooth scroll behavior */
html { scroll-behavior: smooth; }

/* Selection color */
::selection {
    background-color: rgba(26, 35, 126, 0.2);
    color: inherit;
}

/* =====================================================
   Scroll-to-Top Button
   ===================================================== */
#scroll-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--rm-primary);
    color: #fff;
    border: none;
    box-shadow: 0 3px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--rm-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}
#scroll-to-top:hover {
    background: var(--rm-primary-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* =====================================================
   Pjax Loading Overlay
   ===================================================== */
.pjax-loading {
    position: relative;
    pointer-events: none;
}
.pjax-loading::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(128,128,128,0.3);
    z-index: 10;
    border-radius: var(--rm-radius);
}

/* =====================================================
   Cart — Ozon-style Layout
   ===================================================== */
.cart-page-oz {
    padding-bottom: 80px; /* space for mobile sticky bar */
}
.cart-oz-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.cart-oz-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
}
.cart-oz-count {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--rm-muted);
    margin-left: 6px;
}
/* --- Bulk operations toolbar --- */
.cart-oz-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--rm-card);
    border: 1px solid var(--rm-card-border);
    border-radius: var(--rm-radius);
    margin-bottom: 16px;
    gap: 12px;
    flex-wrap: wrap;
}
.cart-oz-select-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--rm-text);
    cursor: pointer;
    user-select: none;
    margin: 0;
}
.cart-oz-select-all input[type="checkbox"] {
    display: none;
}
.cart-oz-toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.cart-oz-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--rm-border);
    border-radius: 8px;
    color: var(--rm-muted);
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--rm-transition);
}
.cart-oz-toolbar-btn:hover {
    color: var(--rm-text);
    border-color: var(--rm-text);
    background: var(--rm-bg-light);
}
.cart-oz-toolbar-delete:hover {
    color: var(--bs-danger);
    border-color: var(--bs-danger);
    background: rgba(var(--bs-danger-rgb), 0.06);
}
.cart-oz-toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Custom Checkbox --- */
.cart-oz-checkbox-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 2px solid #c4c4c4;
    border-radius: 6px;
    background: var(--rm-card);
    flex-shrink: 0;
    transition: all 0.15s ease;
    position: relative;
}
.cart-oz-checkbox-icon::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.7rem;
    color: #fff;
    opacity: 0;
    transition: opacity 0.15s ease;
}
input[type="checkbox"]:checked + .cart-oz-checkbox-icon {
    background: var(--rm-primary);
    border-color: var(--rm-primary);
}
input[type="checkbox"]:checked + .cart-oz-checkbox-icon::after {
    opacity: 1;
}

/* --- Cart Items --- */
.cart-oz-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.cart-oz-item {
    display: flex;
    gap: 14px;
    padding: 20px 0;
    border-bottom: 1px solid var(--rm-border);
    align-items: flex-start;
    transition: opacity 0.2s ease;
}
.cart-oz-item.cart-oz-item-unchecked {
    opacity: 0.5;
}
.cart-oz-item:first-child {
    border-top: 1px solid var(--rm-border);
}
.cart-oz-item-check {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding-top: 30px;
    cursor: pointer;
    margin: 0;
}
.cart-oz-item-check input[type="checkbox"] {
    display: none;
}
/* Item action buttons */
.cart-oz-item-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.cart-oz-item-action {
    background: none;
    border: none;
    color: var(--rm-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: var(--rm-transition);
    flex-shrink: 0;
}
.cart-oz-item-action:hover {
    color: var(--rm-primary);
    background: rgba(26, 35, 126, 0.06);
}
.cart-oz-item-action.btn-remove-item:hover {
    color: var(--bs-danger);
    background: rgba(var(--bs-danger-rgb), 0.08);
}
.cart-oz-item-img-wrap {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rm-bg-light);
    border-radius: 10px;
    overflow: hidden;
}
.cart-oz-item-img {
    max-width: 90px;
    max-height: 90px;
    object-fit: contain;
}
.cart-oz-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100px;
}
.cart-oz-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.cart-oz-item-details {
    flex: 1;
    min-width: 0;
}
.cart-oz-item-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--rm-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}
.cart-oz-item-name:hover {
    color: var(--rm-primary);
}
.cart-oz-item-variant {
    font-size: 0.8rem;
    color: var(--rm-muted);
    margin-top: 3px;
}
.cart-oz-item-stock-warn {
    font-size: 0.75rem;
    color: var(--rm-accent);
    display: inline-block;
    margin-top: 4px;
}
/* .cart-oz-item-remove replaced by .cart-oz-item-action */

/* Item bottom: quantity + price */
.cart-oz-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    gap: 12px;
}
.cart-oz-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--rm-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--rm-bg-light);
}
.cart-oz-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--rm-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: var(--rm-transition);
}
.cart-oz-qty-btn:hover {
    background: var(--rm-primary);
    color: #fff;
}
.cart-oz-qty-input {
    width: 44px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--rm-border);
    border-right: 1px solid var(--rm-border);
    background: var(--rm-card);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rm-text);
    padding: 0;
    height: 36px;
    -moz-appearance: textfield;
}
.cart-oz-qty-input::-webkit-outer-spin-button,
.cart-oz-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.cart-oz-item-price-col {
    text-align: right;
    flex-shrink: 0;
}
.cart-oz-item-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rm-text);
    display: block;
}
.cart-oz-item-unit {
    font-size: 0.75rem;
    color: var(--rm-muted);
    display: block;
    margin-top: 2px;
}

/* --- Order Summary Sidebar --- */
.cart-oz-summary {
    background: var(--rm-card);
    border: 1px solid var(--rm-card-border);
    border-radius: var(--rm-radius);
    padding: 24px;
    position: sticky;
    top: 90px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.cart-oz-summary-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rm-border);
}
.cart-oz-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--rm-text);
    margin-bottom: 10px;
}
.cart-oz-discount {
    color: var(--rm-muted);
}
.cart-oz-free {
    color: #00a862;
    font-weight: 600;
}
.cart-oz-summary-delivery {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--rm-border);
    margin-bottom: 16px;
}
.cart-oz-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}
.cart-oz-checkout-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: var(--rm-primary);
    color: #fff;
    text-align: center;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--rm-transition);
    border: none;
    cursor: pointer;
}
.cart-oz-checkout-btn:hover {
    background: var(--rm-primary-dark, #1a3060);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(var(--rm-primary-rgb, 32, 58, 108), 0.25);
}

/* Trust badges */
.cart-oz-trust {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--rm-border);
}
.cart-oz-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--rm-muted);
}
.cart-oz-trust-item i {
    color: #00a862;
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
}

/* --- Mobile Sticky Checkout Bar --- */
.cart-oz-mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--rm-card);
    border-top: 1px solid var(--rm-border);
    padding: 12px 16px;
    z-index: 1040;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
}
.cart-oz-mobile-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
    gap: 12px;
}
.cart-oz-mobile-total {
    font-size: 1.15rem;
    font-weight: 700;
    display: block;
}
.cart-oz-mobile-count {
    font-size: 0.75rem;
    color: var(--rm-muted);
    display: block;
}
.cart-oz-mobile-checkout {
    display: inline-block;
    padding: 12px 24px;
    background: var(--rm-primary);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: var(--rm-transition);
}
.cart-oz-mobile-checkout:hover {
    background: var(--rm-primary-dark, #1a3060);
    color: #fff;
}

/* --- Empty Cart --- */
.cart-oz-empty {
    text-align: center;
    padding: 60px 20px;
}
.cart-oz-empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: var(--rm-bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-oz-empty-icon i {
    font-size: 2.5rem;
    color: var(--rm-muted);
    opacity: 0.5;
}
.cart-oz-empty h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.cart-oz-empty p {
    color: var(--rm-muted);
    margin-bottom: 24px;
}

/* --- Cart: mobile tweaks --- */
@media (max-width: 991px) {
    .cart-oz-summary {
        position: static;
    }
}
@media (max-width: 575px) {
    .cart-oz-toolbar {
        padding: 10px 12px;
    }
    .cart-oz-toolbar-btn span {
        display: none;
    }
    .cart-oz-toolbar-btn {
        padding: 6px 10px;
    }
    .cart-oz-item {
        gap: 10px;
        padding: 14px 0;
    }
    .cart-oz-item-check {
        padding-top: 22px;
    }
    .cart-oz-checkbox-icon {
        width: 20px;
        height: 20px;
    }
    .cart-oz-item-img-wrap {
        width: 72px;
        height: 72px;
    }
    .cart-oz-item-img {
        max-width: 64px;
        max-height: 64px;
    }
    .cart-oz-item-name {
        font-size: 0.85rem;
    }
    .cart-oz-item-bottom {
        flex-wrap: wrap;
        gap: 8px;
    }
    .cart-oz-qty-btn {
        width: 32px;
        height: 32px;
    }
    .cart-oz-qty-input {
        width: 38px;
        height: 32px;
    }
    .cart-oz-item-total {
        font-size: 1rem;
    }
    .cart-oz-title {
        font-size: 1.3rem;
    }
}

/* =====================================================
   Checkout — Ozon-style Layout
   ===================================================== */
.checkout-oz {
    padding-bottom: 80px;
}
.checkout-oz-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 24px;
}

/* --- Sections (steps) --- */
.checkout-oz-section {
    background: var(--rm-card);
    border: 1px solid var(--rm-card-border);
    border-radius: var(--rm-radius);
    margin-bottom: 16px;
    overflow: hidden;
}
.checkout-oz-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px 0;
}
.checkout-oz-step {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--rm-primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.checkout-oz-section-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
}
.checkout-oz-optional {
    font-size: 0.8rem;
    color: var(--rm-muted);
    font-weight: 400;
}
.checkout-oz-section-body {
    padding: 16px 20px 20px;
}

/* --- Form fields --- */
.checkout-oz-label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: var(--rm-text);
}
.checkout-oz-input {
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.9rem;
    border: 1px solid var(--rm-border);
    transition: var(--rm-transition);
}
.checkout-oz-input:focus {
    border-color: var(--rm-primary);
    box-shadow: 0 0 0 3px rgba(var(--rm-primary-rgb, 32, 58, 108), 0.1);
}
.checkout-oz-field-error {
    font-size: 0.8rem;
    color: var(--bs-danger);
    margin-top: 4px;
}

/* --- Saved address pills (checkout) --- */
.checkout-addr-pick {
    border-radius: 20px;
    font-size: 0.85rem;
    padding: 0.35rem 0.85rem;
    transition: all 0.2s;
}
.checkout-addr-pick.active {
    background: var(--rm-primary);
    color: #fff;
    border-color: var(--rm-primary);
}
.checkout-addr-pick:hover:not(.active) {
    border-color: var(--rm-primary);
    color: var(--rm-primary);
}

/* --- Radio cards (delivery/payment) --- */
.checkout-oz-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.checkout-oz-radio-card {
    display: block;
    cursor: pointer;
    margin: 0;
}
.checkout-oz-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.checkout-oz-radio-content {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 2px solid var(--rm-border);
    border-radius: 10px;
    transition: var(--rm-transition);
    background: var(--rm-bg-light);
}
.checkout-oz-radio-card input[type="radio"]:checked + .checkout-oz-radio-content {
    border-color: var(--rm-primary);
    background: rgba(var(--rm-primary-rgb, 32, 58, 108), 0.04);
    box-shadow: 0 0 0 1px var(--rm-primary);
}
.checkout-oz-radio-content > i {
    font-size: 1.2rem;
    color: var(--rm-muted);
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}
.checkout-oz-radio-card input[type="radio"]:checked + .checkout-oz-radio-content > i {
    color: var(--rm-primary);
}
.checkout-oz-radio-title {
    font-size: 0.9rem;
    font-weight: 600;
}
.checkout-oz-radio-desc {
    font-size: 0.78rem;
    color: var(--rm-muted);
    margin-top: 1px;
}
.checkout-oz-radio-price {
    margin-left: auto;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.checkout-oz-free-label {
    color: #00a862;
}

/* --- Error summary --- */
.checkout-oz-errors {
    background: rgba(var(--bs-danger-rgb), 0.06);
    border: 1px solid rgba(var(--bs-danger-rgb), 0.2);
    border-radius: var(--rm-radius);
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--bs-danger);
}

/* --- Submit button (below form, desktop) --- */
.checkout-oz-submit {
    margin-top: 8px;
}
.checkout-oz-submit-btn,
.checkout-oz-sidebar-submit-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: var(--rm-primary);
    color: #fff;
    text-align: center;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--rm-transition);
}
.checkout-oz-submit-btn:hover,
.checkout-oz-sidebar-submit-btn:hover {
    background: var(--rm-primary-dark, #1a3060);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(var(--rm-primary-rgb, 32, 58, 108), 0.25);
}
.checkout-oz-legal {
    font-size: 0.75rem;
    color: var(--rm-muted);
    text-align: center;
    margin-top: 10px;
    margin-bottom: 0;
}

/* --- Order summary sidebar --- */
.checkout-oz-summary {
    background: var(--rm-card);
    border: 1px solid var(--rm-card-border);
    border-radius: var(--rm-radius);
    padding: 20px;
    position: sticky;
    top: 90px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.checkout-oz-summary-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
}
.checkout-oz-summary-count {
    font-size: 0.85rem;
    color: var(--rm-muted);
    font-weight: 400;
    margin-left: 6px;
}

/* Mini items in sidebar */
.checkout-oz-items {
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 0;
    padding-right: 4px;
}
.checkout-oz-items::-webkit-scrollbar {
    width: 4px;
}
.checkout-oz-items::-webkit-scrollbar-thumb {
    background: var(--rm-border);
    border-radius: 2px;
}
.checkout-oz-mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--rm-border);
}
.checkout-oz-mini-item:last-child {
    border-bottom: none;
}
.checkout-oz-mini-img-wrap {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}
.checkout-oz-mini-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 6px;
    background: var(--rm-bg-light);
}
.checkout-oz-mini-qty {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: var(--rm-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.checkout-oz-mini-info {
    flex: 1;
    min-width: 0;
}
.checkout-oz-mini-name {
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.checkout-oz-mini-variant {
    font-size: 0.72rem;
    color: var(--rm-muted);
}
.checkout-oz-mini-price {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.checkout-oz-summary-divider {
    height: 1px;
    background: var(--rm-border);
    margin: 12px 0;
}
.checkout-oz-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    margin-bottom: 8px;
}
.checkout-oz-free-text {
    color: #00a862;
    font-weight: 600;
}
.checkout-oz-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Sidebar submit */
.checkout-oz-sidebar-submit-btn {
    margin-bottom: 12px;
}

/* Trust */
.checkout-oz-trust {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--rm-border);
}
.checkout-oz-trust-item {
    font-size: 0.78rem;
    color: var(--rm-muted);
}
.checkout-oz-trust-item i {
    color: #00a862;
    width: 16px;
    margin-right: 4px;
}

/* --- Mobile sticky bar --- */
.checkout-oz-mobile-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--rm-card);
    border-top: 1px solid var(--rm-border);
    padding: 12px 16px;
    z-index: 1040;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
}
.checkout-oz-mobile-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
    gap: 12px;
}
.checkout-oz-mobile-total {
    font-size: 1.1rem;
    font-weight: 700;
    display: block;
}
.checkout-oz-mobile-count {
    font-size: 0.75rem;
    color: var(--rm-muted);
}
.checkout-oz-mobile-submit {
    padding: 12px 24px;
    background: var(--rm-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--rm-transition);
}
.checkout-oz-mobile-submit:hover {
    background: var(--rm-primary-dark, #1a3060);
}

/* Checkout responsive */
@media (max-width: 991px) {
    .checkout-oz-summary {
        position: static;
        margin-top: 0;
    }
}
@media (max-width: 575px) {
    .checkout-oz-section-body {
        padding: 12px 14px 16px;
    }
    .checkout-oz-section-header {
        padding: 12px 14px 0;
    }
    .checkout-oz-radio-content {
        padding: 10px 12px;
        gap: 10px;
    }
    .checkout-oz-title {
        font-size: 1.3rem;
    }
}

/* =====================================================
   Empty States
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--rm-muted);
}
.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}
.empty-state h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* =====================================================
   Error Page
   ===================================================== */
.site-error .display-1 {
    font-size: 8rem;
    opacity: 0.7;
    line-height: 1;
}

/* =====================================================
   OAuth / Social Login
   ===================================================== */
.oauth-divider {
    display: flex;
    align-items: center;
    text-align: center;
}
.oauth-divider::before,
.oauth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--rm-border);
}
.oauth-divider span {
    padding: 0 1rem;
    white-space: nowrap;
}

/* Google button */
.btn-google {
    background: var(--rm-card);
    color: var(--rm-text);
    border: 1px solid var(--rm-border);
    font-weight: 500;
    transition: var(--rm-transition);
}
.btn-google:hover {
    background: var(--rm-bg-light);
    border-color: #4285f4;
    color: #4285f4;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.2);
}
.btn-google .fab.fa-google {
    color: #4285f4;
}

/* Yandex button */
.btn-yandex {
    background: var(--rm-card);
    color: var(--rm-text);
    border: 1px solid var(--rm-border);
    font-weight: 500;
    transition: var(--rm-transition);
}
.btn-yandex:hover {
    background: var(--rm-bg-light);
    border-color: #fc3f1d;
    color: #fc3f1d;
    box-shadow: 0 2px 8px rgba(252, 63, 29, 0.2);
}
.btn-yandex .fab.fa-yandex {
    color: #fc3f1d;
}

/* VK button */
.btn-vk {
    background: var(--rm-card);
    color: var(--rm-text);
    border: 1px solid var(--rm-border);
    font-weight: 500;
    transition: var(--rm-transition);
}
.btn-vk:hover {
    background: var(--rm-bg-light);
    border-color: #4a76a8;
    color: #4a76a8;
    box-shadow: 0 2px 8px rgba(74, 118, 168, 0.2);
}
.btn-vk .fab.fa-vk {
    color: #4a76a8;
}

/* =====================================================
   Account / Profile / Orders — Ozon-style
   ===================================================== */

/* --- Sidebar --- */
.acc-sidebar {
    background: var(--rm-card);
    border-radius: var(--rm-radius);
    padding: 1.25rem;
    box-shadow: var(--rm-shadow);
    position: sticky;
    top: 90px;
}
.acc-user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--rm-border);
}
.acc-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--rm-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.acc-user-name { font-weight: 600; font-size: 0.95rem; }
.acc-user-email { font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; }

.acc-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 0.75rem;
}
.acc-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    color: var(--rm-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--rm-transition);
    position: relative;
}
.acc-nav-item:hover {
    background: var(--rm-bg-light);
    color: var(--rm-primary);
}
.acc-nav-item.active {
    background: rgba(74, 111, 165, 0.08);
    color: var(--rm-primary);
    font-weight: 600;
}
.acc-nav-item i { width: 20px; text-align: center; }
.acc-nav-badge {
    margin-left: auto;
    background: var(--rm-primary);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
}

/* --- Page Title --- */
.acc-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--rm-text);
}

/* --- Section --- */
.acc-section {
    background: var(--rm-card);
    border-radius: var(--rm-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--rm-shadow);
}
.acc-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--rm-text);
}

/* --- Social Items --- */
.acc-social-item {
    padding: 0.75rem 1rem;
    border: 1px solid var(--rm-border);
    border-radius: 8px;
    transition: var(--rm-transition);
}
.acc-social-item:hover {
    border-color: var(--rm-primary);
    background: var(--rm-bg-light);
}

/* --- Empty State --- */
.acc-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--rm-card);
    border-radius: var(--rm-radius);
    box-shadow: var(--rm-shadow);
}
.acc-empty-icon {
    font-size: 4rem;
    color: var(--rm-muted);
    margin-bottom: 1rem;
    opacity: 0.4;
}

/* --- Status Badges --- */
.acc-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}
.acc-status-new {
    background: #e3f2fd;
    color: #1565c0;
}
.acc-status-processing {
    background: #fff3e0;
    color: #e65100;
}
.acc-status-shipped {
    background: #e8f5e9;
    color: #2e7d32;
}
.acc-status-delivered {
    background: #e8f5e9;
    color: #1b5e20;
}
.acc-status-canceled {
    background: #fce4ec;
    color: #c62828;
}

/* --- Order Card (list) --- */
.acc-orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.acc-order-card {
    background: var(--rm-card);
    border-radius: var(--rm-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--rm-shadow);
    transition: var(--rm-transition);
}
.acc-order-card:hover {
    box-shadow: var(--rm-shadow-hover);
}
.acc-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.acc-order-number {
    font-weight: 700;
    font-size: 1rem;
    color: var(--rm-text);
}
.acc-order-date {
    color: var(--rm-muted);
    font-size: 0.85rem;
    margin-left: 0.75rem;
}
.acc-order-items {
    padding: 0.75rem 0;
    border-top: 1px solid var(--rm-border);
    border-bottom: 1px solid var(--rm-border);
}
.acc-order-item-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    gap: 0.5rem;
}
.acc-order-item-name {
    color: var(--rm-text);
    font-size: 0.9rem;
}
.acc-order-item-name:hover {
    color: var(--rm-primary);
}
.acc-order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.acc-order-total {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}
.acc-order-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* --- Order View: Progress --- */
.ov-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--rm-card);
    border-radius: var(--rm-radius);
    padding: 1.5rem 1rem;
    box-shadow: var(--rm-shadow);
}
.ov-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    flex-shrink: 0;
}
.ov-step-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rm-bg-light);
    color: var(--rm-muted);
    font-size: 1rem;
    border: 2px solid var(--rm-border);
    transition: var(--rm-transition);
}
.ov-step-active .ov-step-icon {
    background: var(--rm-primary);
    color: #fff;
    border-color: var(--rm-primary);
}
.ov-step-current .ov-step-icon {
    box-shadow: 0 0 0 4px rgba(74, 111, 165, 0.2);
}
.ov-step-label {
    font-size: 0.72rem;
    color: var(--rm-muted);
    text-align: center;
    max-width: 80px;
}
.ov-step-active .ov-step-label {
    color: var(--rm-primary);
    font-weight: 600;
}
.ov-step-line {
    flex: 1;
    height: 2px;
    background: var(--rm-border);
    min-width: 24px;
    max-width: 80px;
    margin: 0 0.25rem;
    margin-bottom: 1.2rem;
}
.ov-step-line-active {
    background: var(--rm-primary);
}

/* --- Order View: Items --- */
.ov-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ov-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--rm-border);
}
.ov-item:last-child { border-bottom: 0; }
.ov-item-image {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--rm-bg-light);
}
.ov-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.ov-item-body {
    flex: 1;
    min-width: 0;
}
.ov-item-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--rm-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ov-item-name:hover { color: var(--rm-primary); }
.ov-item-qty { min-width: 50px; }
.ov-item-price { min-width: 90px; }

/* --- Order View: Details --- */
.ov-detail-group { margin-bottom: 0.25rem; }
.ov-detail-label { font-size: 0.78rem; color: var(--rm-muted); }
.ov-detail-value { font-size: 0.95rem; font-weight: 500; }

/* --- Order View: Right Panel --- */
.ov-panel {
    background: var(--rm-card);
    border-radius: var(--rm-radius);
    padding: 1.5rem;
    box-shadow: var(--rm-shadow);
    position: sticky;
    top: 90px;
}
.ov-panel-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--rm-border);
}
.ov-panel-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--rm-text);
}
.ov-panel-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--rm-border);
}
.ov-panel-info {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--rm-border);
}
.ov-panel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    font-size: 0.9rem;
}
.ov-panel-actions {
    padding-top: 1rem;
}
.ov-panel-link {
    display: block;
    padding: 0.4rem 0;
    color: var(--rm-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--rm-transition);
}
.ov-panel-link:hover {
    color: var(--rm-primary-dark);
}

/* --- Recommendations Widget --- */
.recommendations-widget {
    margin-top: 1rem;
}
.rec-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--rm-text);
}
.rec-scroll-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.5rem;
}
.rec-scroll-row {
    display: flex;
    gap: 1rem;
    min-width: min-content;
}
.rec-scroll-item {
    flex: 0 0 200px;
    max-width: 200px;
}

/* =====================================================
   Address Book (Profile)
   ===================================================== */
.addr-card {
    border: 1px solid var(--rm-border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
}
.addr-card:hover {
    border-color: var(--rm-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.addr-card-default {
    border-color: var(--rm-primary);
    background: linear-gradient(135deg, rgba(0,123,255,0.03), rgba(0,123,255,0.01));
}
.addr-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.addr-card-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.addr-card-title {
    font-weight: 600;
    font-size: 0.95rem;
}
.addr-default-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--rm-primary);
    background: rgba(0,123,255,0.08);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}
.addr-card-actions {
    display: flex;
    gap: 0.35rem;
}
.addr-card-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}
.addr-card-address {
    font-size: 0.93rem;
    line-height: 1.5;
    color: var(--rm-text);
}
.addr-card-details {
    margin-top: 0.25rem;
}
.addr-empty-state {
    background: var(--rm-bg-light);
    border-radius: 10px;
}

/* Address form presets */
.addr-title-presets .btn.active,
.addr-title-presets .btn:focus {
    background: var(--rm-primary);
    color: #fff;
    border-color: var(--rm-primary);
}

/* DaData suggestions dropdown */
.dadata-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1060;
    background: #fff;
    border: 1px solid var(--rm-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    max-height: 280px;
    overflow-y: auto;
}
.dadata-item {
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}
.dadata-item:last-child {
    border-bottom: none;
}
.dadata-item:hover {
    background: var(--rm-bg-light);
    color: var(--rm-primary);
}

/* =====================================================
   Account — Mobile Responsive
   ===================================================== */
@media (max-width: 767.98px) {
    .acc-sidebar {
        position: static;
        margin-bottom: 1rem;
    }
    .acc-nav {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.25rem;
    }
    .acc-nav-item {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 0.82rem;
        padding: 0.5rem 0.75rem;
    }
    .acc-user-card { display: none; }

    .acc-page-title { font-size: 1.2rem; }
    .acc-section { padding: 1rem; }

    .acc-order-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .acc-order-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .acc-order-actions {
        justify-content: stretch;
    }
    .acc-order-actions .btn { flex: 1; }

    /* Progress steps */
    .ov-progress { padding: 1rem 0.5rem; flex-wrap: nowrap; overflow-x: auto; }
    .ov-step-label { font-size: 0.65rem; max-width: 60px; }
    .ov-step-icon { width: 34px; height: 34px; font-size: 0.85rem; }

    /* Order items */
    .ov-item { flex-wrap: wrap; }
    .ov-item-image { width: 48px; height: 48px; }
    .ov-item-qty, .ov-item-price { font-size: 0.85rem; }

    /* Right panel becomes full width */
    .ov-panel {
        position: static;
        margin-top: 1rem;
    }

    /* Address cards mobile */
    .addr-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .addr-card-actions {
        align-self: stretch;
    }
    .addr-card-actions .btn { flex: 1; }
}

/* ===== Homepage hero + category sections ===== */
.rm-hero {
    position: relative;
    color: #fff;
    padding: 4.2rem 0 3.6rem;
    margin-bottom: 0;
    overflow: hidden;
    isolation: isolate;
}
.rm-hero-media {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(105deg, rgba(28, 36, 56, 0.82) 0%, rgba(28, 36, 56, 0.55) 42%, rgba(28, 36, 56, 0.22) 70%, rgba(28, 36, 56, 0.12) 100%),
        url('/img/hero-sleep.jpg') center / cover no-repeat;
}
.rm-hero-inner {
    position: relative;
    max-width: 34rem;
}
.rm-hero-brand {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.25);
}
.rm-hero-title {
    font-size: clamp(2.1rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.12;
    margin: 0 0 0.85rem;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}
.rm-hero-lead {
    font-size: 1.08rem;
    line-height: 1.45;
    opacity: 0.95;
    max-width: 28rem;
    margin-bottom: 1.6rem;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.22);
}
.rm-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.25rem;
}
.rm-hero-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    background: #e8a87c;
    color: #1f2a44;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.rm-hero-cta:hover { color: #1f2a44; filter: brightness(1.05); }
.rm-hero-note { font-size: 0.9rem; opacity: 0.85; }

.rm-home-sections { padding-top: 1.75rem; }
.rm-cat-section { margin-bottom: 2rem; }
.rm-cat-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}
.rm-cat-section-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
}
.rm-cat-section-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--rm-primary);
    text-decoration: none;
    white-space: nowrap;
}
.rm-cat-section-more:hover { text-decoration: underline; }
.rm-feed-head { margin: 0.5rem 0 1rem; }
.rm-feed-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
}

/* Cookie banner */
.rm-cookie {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1080;
}
.rm-cookie-inner {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    background: var(--rm-card, #fff);
    color: var(--rm-text);
    border: 1px solid var(--rm-border, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: 0.9rem 1rem;
}
.rm-cookie-text { margin: 0; font-size: 0.9rem; }
.rm-cookie-btn {
    flex-shrink: 0;
    border: none;
    border-radius: 8px;
    background: var(--rm-primary);
    color: #fff;
    font-weight: 600;
    padding: 0.55rem 1rem;
    cursor: pointer;
}
@media (max-width: 576px) {
    .rm-cookie-inner { flex-direction: column; align-items: stretch; }
    .rm-hero { padding: 2.6rem 0 2.2rem; min-height: 280px; }
    .rm-hero-media {
        background:
            linear-gradient(180deg, rgba(28, 36, 56, 0.78) 0%, rgba(28, 36, 56, 0.62) 100%),
            url('/img/hero-sleep.jpg') 70% center / cover no-repeat;
    }
    .rm-hero-title { font-size: 1.85rem; }
    .rm-hero-cta { width: 100%; justify-content: center; }
}
