/* ========== RESET / NORMALIZE (расширенный) ========== */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, figcaption,
figure, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
    vertical-align: baseline;
}

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
    display: block;
}

body {
    line-height: 1;
}

.body-dev .logo {
    color: #d40707;
}


ol, ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

blockquote:before, blockquote:after, q:before, q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ========== /RESET ========== */

/* ========== DESIGN TOKENS (CSS-переменные) ========== */
:root {
    --font-main: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
    --font-size: 16px;
    --gap: 1.25rem; /* базовый отступ – 20 px */

    /* скандинавская пастель: */
    --color-bg: #f5f7f8;
    --color-surface: #ffffff;
    --color-surface-alt: #f0f2f3;
    --color-primary: #2a6f97; /* приглушённый сине-бирюзовый */
    --color-primary-light: #3c8db8;
    --color-primary-dark: #1f5874;
    --color-accent: #e87b09; /* мягкий тёплый акцент */
    --color-text: #31475e;
    --color-text-light: #6b7a86;
    --color-text-ulight: #7c94ac;
    --color-border: #d9e1e6;

    --color-primary-soft: #d2e6ee; /* светлый фон для "primary" кнопок */
    --color-primary-muted: #497c91; /* менее насыщенный, чем primary-dark */

    --color-accent-soft: #f5d9b8; /* пастельный вариант accent */
    --color-accent-muted: #c96a0a; /* более спокойный оранжевый */

    --color-success: #4caf50; /* зелёный для позитивных действий */
    --color-success-soft: #d8f0dc;

    --color-danger: #d9534f; /* красный для удаления/опасных действий */
    --color-danger-soft: #f7d6d5;

    --color-warning: #f0ad4e; /* мягкий янтарный */
    --color-warning-soft: #fae3c7;

    --radius: 6px;
    --shadow-s: 0 1px 3px rgba(0, 0, 0, .07);
    --shadow-m: 0 2px 6px rgba(0, 0, 0, .10);
}

/* ========== GLOBAL TYPOGRAPHY ========== */
html {
    font-size: 100%;
}

body {
    font-family: var(--font-main);
    font-size: var(--font-size);
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

/* ========== STICKY FOOTER LAYOUT ========== */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main.page-wrapper {
    flex: 1;
    width: 100%;
    padding-top: 64px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: calc(var(--gap) / 2);
}

p {
    margin-bottom: calc(var(--gap) / 1.6);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color .2s;
}

a:hover, a:focus {
    color: var(--color-primary-dark);
}

/* таблицы */
table {
    width: 100%;
    margin: var(--gap) 0;
    border: 1px solid var(--color-border);
}

th, td {
    padding: .6em;
    border: 1px solid var(--color-border);
    text-align: left;
}

th {
    background: var(--color-surface-alt);
}

/* ========== LAYOUT WRAPPER ========== */

.page-wrapper {
    max-width: 1280px; /* меняется при медиазапросах */
    margin: 0 auto;
    padding: 0 var(--gap);
}

/* адаптивная ширина */
@media (max-width: 1400px) {
    .page-wrapper {
        max-width: 1140px;
    }
}

@media (max-width: 1200px) {
    .page-wrapper {
        max-width: 960px;
    }
}

@media (max-width: 992px ) {
    .page-wrapper {
        max-width: 820px;
    }
}

@media (max-width: 860px ) {
    .page-wrapper {
        max-width: 720px;
    }
}

@media (max-width: 768px ) {
    .page-wrapper {
        max-width: 100%;
        padding: 0 .8rem;
        box-sizing: border-box;
    }
}


/* --- HEADER --- */
header {
    background: var(--color-surface);
    box-shadow: var(--shadow-s);
    border-bottom: 1px solid var(--color-border);
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 10;
}

header.show-search {
    box-shadow: var(--shadow-m);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
    padding: 0 var(--gap);
    height: 64px;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.2em;
    min-width: 0;
    flex: 0 0 auto;
}

.menu-icon {
    font-size: 1.8em;
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    margin-right: .7em;
    transition: color .2s;
    position: relative;
    top: -1px;
}

.menu-icon:hover,
.menu-icon:focus {
    color: var(--color-primary-dark);
}

nav.topcat {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-m);
    display: none;
    padding: var(--gap);
    z-index: 99;
}

header.open nav.topcat {
    display: block;
    animation: fadeSlide .25s;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

nav.topcat ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: .6rem 2rem;
}

nav.topcat a {
    color: var(--color-text);
    font-weight: 500;
    display: block;
    padding: .45em .3em;
    border-radius: 4px;
}

nav.topcat a:hover {
    background: var(--color-surface-alt);
    color: var(--color-primary);
}

.logo {
    font-size: 1.32rem;
    font-weight: 700;
    margin-left: .85em;
    margin-right: 1em;
    letter-spacing: .01em;
    color: var(--color-primary-dark);
    text-decoration: none;
    white-space: nowrap;
}

.header-center {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 210px;
    max-width: 400px;
}


.search-box input {
    flex: 1 1 auto;
    padding: .54rem .7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius) 0 0 var(--radius);
    background: var(--color-surface-alt);
    font-size: 1.03em;
    outline: none;
    transition: border .16s;
    margin-left: .54rem;
}

.search-box input:focus {
    border-color: var(--color-primary);
}

.search-box button {
    padding: .52rem .95rem;
    border: none;
    border-radius: 0 var(--radius) var(--radius) 0;
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
    font-size: 1.1em;
    transition: background .2s;
}

.search-btn {
    background: none;
    border: none;
    padding: .5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s;
    color: var(--color-primary);
}

.search-btn svg {
    display: block;
    width: 1.2em;
    height: 1.2em;
    fill: currentColor;
}

.search-btn:hover,
.search-btn:focus {
    color: var(--color-primary-light);
}

.search-box button:hover {
    background: var(--color-primary-dark);
    color: #fff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: .7em;
    margin-left: .8em;
}

.language, .currency {
    padding: .43rem .7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface-alt);
    cursor: pointer;
    font-size: .98rem;
    min-width: 60px;
}


.language.loading,
.currency.loading {
    opacity: 0.6;
    cursor: wait;
}


.search-overlay {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    box-shadow: var(--shadow-s);
    padding: var(--gap);
    display: none;
    z-index: 9;
}


header.show-search .search-overlay {
    display: block;
}


.search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: .4em;
    color: var(--color-primary);
    transition: color .2s;
    margin-right: 1.5em;
}

.search-toggle:hover,
.search-toggle:focus {
    color: var(--color-primary-dark);
}

.search-toggle .icon-close {
    display: none;
}

header.show-search .search-toggle .icon-open {
    display: none;
}

header.show-search .search-toggle .icon-close {
    display: inline;
}


@media (max-width: 768px) {


    body {
        min-width: 360px;
    }

    .search-overlay {
        border-top: 1px solid var(--color-border);
    }

    .header-right {
        margin-right: 0.8em;
    }

    .header-left {
        margin-left: 0.6em;
    }

    .header-center .search-box {
        display: flex;
        max-width: none;
    }

    .logo {
        font-size: 1.2rem;
        margin-left: .3em;
        margin-right: .3em;
    }
}


@media (min-width: 769px) {
    .search-toggle {
        display: none;
    }

    .search-overlay {
        position: static;
        display: block;
        box-shadow: none;
        padding: 0;
    }
}


@media (max-width: 430px) {
    .menu-icon {
        margin-right: 0.3em;
    }

    .search-toggle {
        margin-right: 0.7em;
    }

    .language, .currency {
        padding: .43rem .3rem;
    }

}


/* --- MAIN CONTENT --- */
/* Для главной страницы */
.main-content {
    margin: 1.9rem auto 1.9rem auto;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}


.listing-layout .main-content {
    max-width: none;
    margin: 0;
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
}


/* Для листингов (двухколонка) */
.listing-layout .main-content .products-grid {
    gap: 2rem;
    margin-bottom: 1.8em;
}


.main-content section {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
    padding: 1.3em 1.6em 1.5em 1.6em;
}

.main-content section.description {
    padding-bottom: 1em;
}

.main-content section:not(:last-child) {
    margin-bottom: .5rem;
}

.main-content section.no-bg {
    background: none;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
    margin-top: 0;
}

.main-content .page-title {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
}

.main-content h2 {
    font-size: 1.19rem;
    color: var(--color-primary-dark);
    font-weight: 600;
    margin-bottom: 1.3em;
    margin-top: 1em;
    letter-spacing: .02em;
}


.product-page.main-content h2 {
    margin-bottom: 0.5em;
    font-size: 1.2em;
}

.grid {
    display: grid;
    gap: .65em 1.2em;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    margin: .7em 0 1.1em 0;
    padding: 0;
}

@media (max-width: 800px) {

    main.page-wrapper {
        flex: 1;
        width: 100%;
        padding-top: 56px;
    }

    .main-content.product-page {
        margin-top: 1.2rem;
    }


    .grid {
        grid-template-columns:repeat(2, 1fr);
    }

    .listing-layout .main-content {
        width: 100%;
    }

    .listing-layout .main-content .page-title {
        margin-left: 0.15rem;
        font-size: 1.45em;
    }

    .listing-layout .main-content .products-grid {
        gap: 1.2rem 1.2rem;
    }

}


.grid li {
    border-radius: var(--radius);
    /* box-shadow: var(--shadow-s); */ /* убираем тень */
    padding: .3em 0;
    text-align: left;
    transition: background .13s;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}


.grid li a {
    color: var(--color-primary);
    font-weight: 400;
    font-size: 1em;
    text-decoration: none;
    transition: color .13s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.27;
    max-width: 100%;
    word-break: break-word;
    max-height: 2.7em;
    white-space: normal;
    padding: 0;
}

.grid li a:hover {
    color: var(--color-accent);
    text-decoration: underline;
    background: none;
}

.grid li:hover {
    background: var(--color-surface);
}


/* --- Ссылка "смотреть все" --- */
.all-link {
    display: inline-block;
    color: var(--color-accent);
    font-weight: 500;
    margin-top: .5em;
    font-size: 1.01em;
    text-decoration: none;
    letter-spacing: .01em;
    transition: color .13s;
}

.all-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* --- Описание --- */
.description {
    color: var(--color-text-light);
    font-size: 1.08em;
    padding: .7em 0 .2em 0;
    line-height: 1.65;
    letter-spacing: .01em;
    background: none;
    box-shadow: none;
    border-radius: 0;
}


@media (max-width: 1100px) {
    .main-content, .header-container {
        max-width: 950px;
    }

    .grid {
        grid-template-columns:repeat(auto-fit, minmax(170px, 1fr));
    }

}

@media (max-width: 800px) {
    .main-content, .header-container {
        max-width: 99%;
        padding: 0 1vw;
    }

    .main-content section {
        padding: 1em .7em;
    }

    .grid {
        grid-template-columns:repeat(2, 1fr);
    }


    .header-container {
        height: 56px;
    }

    .header-left {
        gap: .5em;
    }
}

@media (max-width: 600px) {
    .main-content, .header-container {
        max-width: 100%;
        padding: 0 .1em;
    }

    .grid {
        grid-template-columns:1fr;
    }

    .main-content h2 {
        font-size: 1em;
    }

    .header-right {
        gap: .25em;
    }


    .main-content section {
        padding: .6em .2em;
    }

    .main-content--home section {
        padding: .6em .8em;
    }
}

@media (max-width: 480px) {
    .main-content section {
        padding: .4em .1em;
    }


    .main-content--home section {
        padding: .8em .8em;
    }

    .logo {
        font-size: 1.1rem;
    }
}

/* --- Утилиты --- */
.mt {
    margin-top: var(--gap);
}

.mb {
    margin-bottom: var(--gap);
}


/* ========== FOOTER ========== */
footer {
    background: var(--color-surface);
    text-align: center;
    padding: 1.2rem 0;
    border-top: 1px solid var(--color-border);
    font-size: .85rem;
    color: var(--color-text-light);
}

.botmenu {
    margin-top: 0.5em;
    display: flex;
    gap: .3em 1.3em;
    flex-wrap: wrap;
    font-size: 0.9em;
    justify-content: center;
    color: var(--color-text-light);

}

.botmenu a {
    color: var(--color-text-light);
    opacity: 0.8;
    white-space: nowrap;
}

.botmenu a:hover {
    opacity: 1;
}

/* ========== BUTTONS & LINKS ========== */
.btn-primary,
.load-more {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    padding: .6rem 1.2rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background .2s, transform .15s;
}

.btn-primary:hover,
.load-more:hover {
    background: var(--color-primary-light);
    transform: translateY(-2px);
    color: #fff;
}

.load-more:focus,
.load-more:active,
.load-more:visited {
    color: #fff;
}

.load-more[aria-disabled="true"] {
    pointer-events: none;
}


.btn-view {
    font-size: 1.6rem;
    background: var(--color-accent);
}


/* =================== LISTINGS LAYOUT =================== */
.listing-layout {
    display: flex;
    align-items: flex-start;
    margin: 2rem auto;
    gap: 2.1rem;
}

/* ---------- десктоп: старый вид ---------- */
.sidebar {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
    padding: 1.1em;
    min-width: 210px;
    max-width: 300px;
    flex: 0 0 240px;
    font-size: .97em;
}

.sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar li {
    margin-bottom: .45em;
}

.sidebar a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
}

.sidebar a.active,
.sidebar a:hover {
    color: var(--color-accent);
    text-decoration: underline;
    font-weight: 500;
}


@media (max-width: 992px) {
    .listing-layout {
        flex-direction: column;
        gap: 0.9rem 1.4rem;
        max-width: 99%;
        margin-top: 1.8em;
        margin-bottom: 1.6em;
    }

    .sidebar {
        background: transparent;
        box-shadow: none;
        padding: 0;
        max-width: 100%;
        flex: none;
        position: relative;
        /*padding-right: 0.8em;*/
        box-sizing: border-box;
    }

    .sidebar::-webkit-scrollbar {
        display: none;
    }


    /*

    .sidebar::after {
        content: '›';
        right: -0.3em;
        padding: 0 0.3em;
        position: absolute;
        margin-top: -6px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1.5rem;
        color: var(--color-text-light);
        pointer-events: none;
        z-index: 2;
    }
    .sidebar[data-scrollable-end="true"]::after {
        display: none;
    }
    */
    .sidebar ul {

        display: flex;
        gap: .8rem .6rem;
        margin: 0;
        padding: .3rem .1rem .1rem;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    /*.sidebar ul::after {
        content: '';
        flex: 0 0 2em;
    }*/
    .sidebar li {
        flex: 0 0 auto;
        display: inline-block;
        border-radius: var(--radius);
        background: var(--color-surface-alt);
        font-size: 1em;
        color: var(--color-primary);
        text-decoration: none;
        order: 2;
    }

    .sidebar li.active {
        order: 1;
    }


    .sidebar a {
        white-space: nowrap;
        padding: .4rem .8rem;
        border-radius: var(--radius);
        background: var(--color-surface);
        font-size: 1em;
        text-decoration: none;
        color: var(--color-primary);
        transition: background .2s, color .2s;
    }

    .sidebar a:hover,
    .sidebar a.active {
        background: var(--color-primary);
        color: #fff;
        text-decoration: none;
    }
}

/* ============ PRODUCTS GRID ============ */
.products-grid, .recommend-products {
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    justify-items: stretch;
}

.products-grid {
    margin-bottom: var(--gap);
}

.recommend-products {
    gap: .8em;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

/* Чтобы карточки не растягивались, если товаров меньше чем колонок */
.products-grid > .product-card, .recommend-products > .product-card {
    max-width: 300px; /* можно 320-350 */
    margin-left: auto;
    margin-right: auto;
}

/* Адаптив */
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 860px) {
    .products-grid, .recommend-products {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============ PRODUCT CARD ============ */
.product-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    transition: box-shadow .18s, transform .18s;
    min-height: 320px;
    position: relative;
}

.product-card:hover {
    box-shadow: var(--shadow-m);
    transform: translateY(-2px) scale(1.02);
    z-index: 2;
}

.product-card-link {
    text-align: center;
}

/* Заголовок карточки */
.product-card-title {
    font-size: 1.02em;
    font-weight: 400;
    margin-bottom: .55em;
    min-height: 2.3em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.28;
    text-align: center;
}

/* Картинка — квадрат, центрируется, ограничение размера */
.product-card-imgbox {
    width: 100%;
    aspect-ratio: 1/1;
    background: var(--color-surface-alt);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: .7em;
}

.product-card-imgbox img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    transition: transform .2s;
}

.product-card:hover .product-card-imgbox img {
    transform: scale(1.04);
}

/* Цена и старая цена — по центру */
.product-card-pricing {
    margin-bottom: .45em;
    display: flex;
    align-items: center;
    gap: .8em;
    justify-content: center;
}

.product-card-price {
    font-weight: 700;
    color: var(--color-primary-dark);
    font-size: 1.12em;
    text-align: center;
}

.product-card-oldprice {
    color: var(--color-text-light);
    text-decoration: line-through;
    font-size: .97em;
}

/* Метаданные (бренд, продавец) */
.product-card-meta {
    font-size: .93em;
    color: var(--color-text-light);
    margin-bottom: .4em;
    display: flex;
    gap: .6em;
    flex-wrap: wrap;
    justify-content: center;
}

.product-card-meta a {
    color: var(--color-accent);
}

.product-card-meta a:hover {
    text-decoration: underline;
}

/* ===== Recommend Block Styles ===== */
.recommend-products {
    gap: 1em;
}

.recommend-products .product-card {
    padding: .7em .6em;
    /*background: var(--color-surface-alt);*/
    min-height: 180px;
    border-radius: var(--radius);
    box-shadow: none;
    font-size: 0.96em;
    transition: box-shadow .16s, transform .14s;
    max-width: 220px;
}

.recommend-products .product-card:hover {
    box-shadow: var(--shadow-s);
    transform: translateY(-2px) scale(1.015);
}

.recommend-products .product-card-title {
    font-size: 0.97em;
    margin-bottom: .4em;
    min-height: 2.1em;
    -webkit-line-clamp: 2;
}

.recommend-products .product-card-imgbox {
    aspect-ratio: 1/1;
    margin-bottom: .7em;
    max-width: 150px;
    margin-left: auto;
    margin-right: auto;
}

.recommend-products .product-card-pricing {
    font-size: .8em;
    margin-bottom: .3em;
}

.recommend-products .product-card-meta {
    font-size: .90em;
    color: var(--color-text-light);
    margin-bottom: .2em;
    justify-content: center;
}

@media (max-width: 800px) {
    .recommend-products {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ============ Load More Button ============ */
.load-more-block {
    display: flex;
    justify-content: center;
    margin: var(--gap) 0;
}

.load-more {
    font-size: 1.05em;
    font-weight: 500;
    padding: .7em 2.5em;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background .18s, box-shadow .16s;
    box-shadow: var(--shadow-s);
}

.load-more:hover {
    background: var(--color-primary-light);
}

/* ============ Breadcrumbs ============ */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .5em;
    font-size: .92em;
    color: var(--color-text-light);
    align-items: center;
    margin-bottom: 0.8em;
}

.breadcrumbs a {
    color: var(--color-text-ulight);
    text-decoration: none;
}

.breadcrumbs span {
    font-weight: 500;
    color: var(--color-text);
}

.breadcrumbs .crumb-sep {
    color: var(--color-border);
    margin: 0 .2em;
    font-size: 1.1em;

}

@media (max-width: 800px) {

    .breadcrumbs {
        gap: 0.1em .5em;
        margin-bottom: 0.7em;
    }

    .breadcrumbs .home-link {
        display: none;
    }


}


/* ============ Main Content Gap ============ */
.main-content {
    gap: 2rem;
}


/* Load More — спиннер слева от текста */
.load-more {
    position: relative;
    padding-left: 2.2em; /* место под спиннер */
}

.load-more.loading {
    cursor: wait;
    opacity: 0.8;
}

/* спиннер поверх ::before, а не ::after */
.load-more.loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0.6em; /* отступ от левого края кнопки */
    width: 1em;
    height: 1em;
    margin-top: -0.6em; /* центрируем по вертикали */
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spinner .6s linear infinite;
}


@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}


/* ========== PRODUCT PAGE ========== */
.product-page {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

/* TWO-COLUMN LAYOUT */
.gallery-details {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
    margin-bottom: 1em;
}

@media (min-width: 1100px) {
    .gallery-details {
        flex-direction: row;
    }

    .gallery, .details {
        flex: 1;
    }


}


/* GALLERY */
.gallery {
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

/* Новый квадратный контейнер только для главного изображения */
.main-image {
    width: 100%;
    /* задаёт ровно квадрат */
    aspect-ratio: 1 / 1;
    background: var(--color-surface-alt);
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
    overflow: hidden;

    /* центрируем изображение внутри */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Главная картинка растягивается по квадрату без обрезки */
.main-image img#main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Thumbnails остаются снаружи и не обрезаются */
.thumbs {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding-top: .5rem;
}

.thumbs img {
    width: 90px;
    aspect-ratio: 1/1;
    object-fit: cover;
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color .2s;
}

@media (min-width: 1200px) {
    .thumbs img {
        width: 96px;
    }
}

.thumbs img:hover,
.thumbs img:focus {
    border-color: var(--color-primary);
}

/* ---- Gallery helpers ---- */
.main-image {
    position: relative;
}

.img-loader {
    position: absolute;
    inset: 0;
    display: none;
    place-content: center;
    background: var(--color-surface-alt);
}

.img-loader::after {
    content: '';
    width: 36px;
    aspect-ratio: 1;
    border: 4px solid var(--color-primary-light);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0.8;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.thumb {
    opacity: .9;
    transition: opacity .2s;
}

.thumb.active,
.thumb:hover {
    opacity: 1;
    border-color: var(--color-primary);
}

.thumb.lazy-loading {
    background: var(--color-surface-alt);
    text-indent: -10000px;
}

/* place-holder */

/* == GALLERY: square main image and loader == */
.gallery .main-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* ровно квадрат */
    background: var(--color-surface-alt);
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery .main-image img#main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* loader overlay */
.gallery .img-loader {
    position: absolute;
    inset: 0;
    display: none; /* скрыт по умолчанию */
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    z-index: 2;
}

.gallery .img-loader::after {
    content: "";
    width: 30px;
    aspect-ratio: 1/1;
    border: 4px solid var(--color-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* DETAILS */
.details {
    display: flex;
    flex-direction: column;
}

.details .price {
    display: flex;
    align-items: baseline;
    gap: .2em .8em;
    justify-content: left;
    margin-bottom: 0.5em;
    color: var(--color-text-light);
    flex-wrap: wrap;
}

.details .price-date {
    color: var(--color-text-light);
    opacity: 0.8;
    font-size: 1rem;
}

.details .price .new {
    font-size: 1.9em;
    font-weight: 700;
    color: var(--color-primary-dark);
    text-align: center;
}

.details .price .old {
    font-size: 1em;
    color: var(--color-text-light);
    opacity: 0.7;
    text-decoration: line-through;
}

.details p {
    font-size: 1em;
    color: var(--color-text-light);
}

.details p a {
    color: var(--color-accent);
    text-decoration: none;
}

.details p a:hover {
    text-decoration: underline;
}

.details .btn-go {
    padding: .8rem 1.2rem;
    margin-top: 1.5rem;
    font-size: 1.6rem;
    width: 100%;
    border-radius: var(--radius) var(--radius);
    background-color: #d89220;
}

.details .btn-go:hover {
    background-color: #e8a73d;
}


.details .btn-cart {
    padding: 0.8rem 1.2rem;
    font-size: 1rem;
    margin-top: 0;
    width: 100%;
    border-radius: var(--radius) var(--radius);
    /*background-color: #388bad;*/
}

.details .view-wrap {
    margin-bottom: 1rem;
}

.details-info {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
    padding: var(--gap);
}


.details-desc {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
    padding: var(--gap);
    margin-top: .5rem;
}


/* PRICE HISTORY */
.price-history {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-s);
    padding: var(--gap);
}


.price-history h2 {
    font-size: 1.2em;
    color: var(--color-primary-dark);
}


.price-history canvas {
    width: 100% !important;
    height: 240px !important;
}


/* Star rating common */
/*
.star-rating {
    margin-left: 0.2em;
    display: inline-block;
    color: var(--color-accent);
    font-size: 1.2em;
    line-height: 1;
}


.star-rating .star {
    margin-right: 1px;
    font-family: Times; !* чтобы «★» ровно отображались *!
    opacity: 0.8;
}

.star-rating .star.empty {
    color: var(--color-text-light);
}

.star-rating .review-count {
    margin-left: .1em;
    font-size: .8em;
    color: var(--color-text-light);
}

.product-card .star-rating{
    position: relative;
    top: -3px;
    font-size: 1em;
}


.product-card .star-rating .review-count{
    margin-left: .2em;
}
*/


:root {
    --star-empty: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bdbdbd' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>");
    --star-full: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffc107' stroke='%23ffc107' ><polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2'/></svg>");
}

/*  ── контейнер со звёздами ─────────────────────────────────────────── */
.star-rating {
    display: inline-flex; /* звёзды + текст в одну строку */
    align-items: center;
    gap: .35rem;
    color: var(--color-text-light);
}

.star-rating .stars {
    --rating: 0%; /* задаём inline-style из PHP */
    display: inline-block;
    width: 80px; /* 5 × 16 px = 80 px */
    height: 16px;
    position: relative;
    background: var(--star-empty) repeat-x;
    background-size: 16px 16px;
}

.star-rating .stars::after {
    content: '';
    position: absolute;
    inset: 0;
    width: var(--rating); /* % приходит из PHP */
    background: var(--star-full) repeat-x;
    background-size: 16px 16px;
    overflow: hidden; /* «обрезаем» по ширине */
}


/* текст-кол-во отзывов рядом */
.star-rating .reviews-text {
    color: var(--color-text-light);
    font-weight: 400;
    white-space: nowrap;
    font-size: 0.95em;
}


/* SIMILAR PRODUCTS */
.products.similar {
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    justify-items: center;
    margin-top: var(--gap);
}

@media (max-width: 800px) {
    .products.similar {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* PAGE TITLE */
.main-content.product-page {
    gap: 0;
}

.product-page > h1 {
    margin-bottom: var(--gap);
    font-size: 1.6em;
    color: var(--color-primary-dark);
}

@media (max-width: 800px) {

    .product-page > h1 {
        font-size: 1.4em;
        line-height: 1.2em;
    }

}


@media (max-width: 1100px) {
    .main-content, .header-container {
        max-width: 950px;
    }

    .grid {
        grid-template-columns:repeat(auto-fit, minmax(170px, 1fr));
    }


    .details .details-info {
        order: 2;
        margin-top: 0.5rem;
    }

    .details .details-desc {
        order: 3;
    }

    .details .btn-primary {
        margin-top: 0;
    }

    .details .btn-go {
        order: 1;
        margin-top: 0.1em;
    }

    .details .view-wrap {
        margin-bottom: 1rem;
    }
}


.items-list,
.items-list ul {
    display: grid;
    gap: var(--gap) 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin: 1.2em 0;
    padding: 0;
    list-style: none;
}


.listing-page--seller .items-list,
.listing-page--seller .items-list ul {
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}


.items-list li {
    text-align: center;
    transition: box-shadow .2s, background .2s;
}

.items-list li:hover {
    box-shadow: var(--shadow-m);
    background: var(--color-surface);
}

.items-list a {
    display: block;
    color: var(--color-primary);
    font-weight: 500;
    font-size: 1.05em;
    text-decoration: none;
    transition: color .2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.items-list a:hover {
    color: var(--color-accent);
}

/* Пагинация */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5em;
    margin: var(--gap) 0 2em;
    padding: 0;
    list-style: none;
}

.pagination li {
    display: inline;
}

.pagination a,
.pagination span {
    display: inline-block;
    min-width: 2.2em;
    padding: .45em .7em;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    text-align: center;
    font-size: .95em;
    color: var(--color-primary);
    text-decoration: none;
    transition: background .2s, color .2s;
}

.pagination a:hover {
    background: var(--color-primary);
    color: #fff;
}

.pagination .current-page {
    background: var(--color-primary);
    color: #fff;
    cursor: default;
}

.pagination .disabled {
    opacity: .5;
    cursor: not-allowed;
}

pre.info {
    font-size: 13px;
    line-height: 15px;
    font-family: sans-serif;
    padding-top: 60px;
}


.listing-page {
    width: 100%;
}


.listing-page .page-title {
    font-size: 1.4em;
    color: var(--color-primary-dark);
    margin-bottom: var(--gap);
}

@media (max-width: 800px) {
    .items-list {
        grid-template-columns: repeat(2, 1fr);
    }
}


.content-page {
    gap: 0;
}

.content-page--wrap {
    box-shadow: var(--shadow-s);
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 1.1em;
}

.content-page--contact .page-title {
    margin-left: 0.7em;
}


.contact-form label {
    display: block;
    margin-bottom: .5rem;
    color: var(--color-text);
}

.contact-form .form-input,
.contact-form .form-textarea {
    width: 100%;
    padding: .6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface-alt);
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--color-text);
    box-sizing: border-box;
}

.contact-form .form-textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn-primary {
    min-width: 160px;
    font-size: 1em;
    padding: 0.7rem 0.5rem;
    margin-top: 10px;

}


/* ====== HEADER CART ====== */
.header-right .cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .35rem .45rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface-alt);
    color: var(--color-primary);
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}

.header-right .cart-link:hover {
    background: var(--color-surface);
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
}

.header-right .cart-ico {
    width: 20px;
    height: 20px;
    display: inline-block;
    flex: 0 0 20px;
    background-repeat: no-repeat;
    background-size: contain;
    /* SVG with currentColor */
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHZpZXdCb3g9JzAgMCAyNCAyNCcgZmlsbD0nbm9uZScgc3Ryb2tlPSdjdXJyZW50Q29sb3InIHN0cm9rZS13aWR0aD0nMicgc3Rya2UtbGluZWNhcD0ncm91bmQnIHN0cm9rZS1saW5lam9pbj0ncm91bmQnPjxjaXJjbGUgY3g9JzknIGN5PScyMScgcj0nMScvPjxjaXJjbGUgY3g9JzIwJyBjeT0nMjEnIHI9JzEnLz48cGF0aCBkPSdNMSAxaDRsMi42OCAxMy4zOWEyIDIgMCAwIDAgMiAxLjYxaDkuNzJhMiAyIDAgMCAwIDItMS42MUwyMyA2SDYnLz48L3N2Zz4=");
    background-position: -1px 50%;
}

.header-right .cart-text {
    font-weight: 500;
    font-size: .98rem;
}

.header-right .cart-badge {
    position: absolute;
    top: -6px;
    left: 100%;
    min-width: 18px;
    height: 18px;
    margin-left: -8px;
    padding: 0 1px;
    border-radius: 9px;
    background: var(--color-accent);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: var(--shadow-s);
}

/* компактнее на мобилках */
@media (max-width: 768px) {
    .header-right .cart-text {
        display: none;
    }
}


/* шапка блока */
.cart-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: -0.6rem;
}

.cart-bar .page-title {
    margin: 0;
}

.cart-bar .btn-secondary .ico {
    width: 1.05em;
    height: 1.05em;
}


@media (max-width: 800px) {
    .cart-table .cart-head {
        display: none;
    }
}
@media (max-width: 450px) {
    .cart-actions .view-wrap{
        order: 1;
        margin-top: 0.2rem;
        width: 100%;
    }
    .cart-actions .view-wrap .btn-view{
        width: 100%;
        box-sizing: border-box;
    }
    .cart-actions>.btn-secondary{
        order: 2;
        padding: .3rem 1.1rem;
        margin-top: 0.8rem;
    }
    .cart-actions {
        flex-direction: column;
        align-items: center;
        font-size: 0.9rem;
    }
}

.cart-empty {

}

.cart-empty-info {
    font-size: 1.1em;
    padding: 0.5em 0 0.5em;
}


.cart-page .page-title {
    font-size: 1.4rem;
    margin-left: 0.7em;
    margin-bottom: 0;
}


.cart-page .cart-actions {
    display: flex;
    gap: .6rem;
    justify-content: flex-end;
}


.cart-table {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-surface);
}

.cart-table .row {
    display: grid;
    grid-template-columns: 1.6fr .4fr .5fr .6fr 40px; /* item, price, qty, sum, remove */
    gap: .9rem;
    align-items: center;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.cart-table .cart-head {
    background: var(--color-surface-alt);
    font-weight: 600;
    color: var(--color-text);
}

.cart-table .cart-row:last-child {
    border-bottom: 0;
}


.cart-table .item {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: .8rem;
    align-items: center;
}

.cart-table .item .thumb {
    width: 84px;
    height: 84px;
    display: block;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.cart-table .item .thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cart-table .item .info .name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    margin-bottom: .25rem;
}

.cart-table .item .brand {
    font-size: .9rem;
    color: var(--color-text-light);
}

.cart-table .price,
.cart-table .sum {
    font-weight: 700;
    color: var(--color-primary-dark);
    white-space: nowrap;
}

.cart-table .qty .qty-form {
    display: inline-flex;
    gap: .4rem;
    align-items: center;
}


.cart-table .btn-small {
    padding: .4rem .6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-primary);
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.cart-table .btn-small:hover {
    background: var(--color-surface-alt);
    border-color: var(--color-primary);
}

.cart-table .remove .btn-link {
    background: none;
    border: none;
    color: var(--color-text-light);
    font-size: 1.1rem;
    cursor: pointer;
}

.cart-table .remove .btn-link:hover {
    color: var(--color-accent);
}

.cart-total {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    align-items: center;
    font-size: 1.05rem;
}

.cart-total .value {
    font-weight: 700;
    color: var(--color-primary-dark);
}


.cart-table .qty input[type="number"] {
    width: 50px;
    padding: .42rem .45rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    font-size: .95rem;
    appearance: auto;
    -webkit-appearance: number-input;
    -moz-appearance: auto;
}


.cart-table .qty input[type="number"]::-webkit-inner-spin-button,
.cart-table .qty input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    height: auto;
}

.cart-table .price,
.cart-table .sum {
    font-weight: 700;
    color: var(--color-primary-dark);
    white-space: nowrap;
}

@media (max-width: 900px) {
    .cart-table .price,
    .cart-table .cart-head {
        display: none;
    }
}

@media (max-width: 900px) {
    /*.cart-table .row{

        grid-template-columns: 1fr minmax(120px,auto) minmax(120px,auto) 40px;
        grid-template-areas:
      "item  item  item  remove"
      "price qty   sum   remove";
        row-gap:.6rem;
        column-gap:.8rem;
    }

    .cart-table .row .item   { grid-area: item; }
    .cart-table .row .price  { grid-area: price; justify-self:start; }
    .cart-table .row .qty    { grid-area: qty;   justify-self:start; }
    .cart-table .row .sum    { grid-area: sum;   justify-self:end; text-align:right; white-space:nowrap; }

    .cart-table .item{
        grid-template-columns:72px 1fr;
        gap:.6rem;
    }*/
    .cart-table .item .thumb {
        width: 72px;
        height: 72px;
    }

    .cart-table .row {
        grid-template-columns: 1.6fr .2fr .4fr 20px;
        gap: .6rem;
        padding: .8rem 0.2rem;
    }

    .cart-table {
        border: none;
        padding: 0;
        box-sizing: border-box;
    }

    .cart-table .item {
        grid-template-columns: 78px 1fr;
        gap: .4rem;
    }

    .cart-total {
        margin: 0;
        padding-top: 1rem;
        border-top: 1px solid var(--color-border);
    }

    .cart-table .sum {
        white-space: normal;
        text-align: right;
    }

    .cart-table .num {
        display: block;
        white-space: nowrap;
        overflow: hidden;
    }

    .cart-table .curr {
        display: block;
        line-height: 1rem;
        font-size: 0.8rem;
    }

    .cart-table .qty .qty-form {
        gap: 0.2rem;
    }

    .cart-table .qty input[type="number"] {
        width: 35px;
    }

    .main-content section.cart-page {
        padding: .6em 1em;
    }

    .cart-actions {
        margin-bottom: 0.8em;
    }
}


@media (max-width: 450px) {

    .cart-table .cart-row {
        padding-right: 5px;
        position: relative;
    }
    .cart-table .remove {
        position: absolute;
        right: 0;
        margin-top: -14px;
        top: 50%;
    }
}


/* ===== Buttons: Secondary ===== */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .6rem 1.1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-primary);
    font: inherit;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, transform .15s, box-shadow .15s;
}

.btn-secondary:hover {
    background: var(--color-surface-alt);
    border-color: var(--color-primary);
    color: var(--color-primary-dark);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-secondary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 111, 151, .15);
}

.btn-secondary:disabled,
.btn-secondary[disabled] {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

/* size tweak */
.btn-secondary.btn-small {
    padding: .4rem .7rem;
    font-size: .95rem;
}

/* optional: icon inside */
.btn-secondary .ico {
    width: 1.1em;
    height: 1.1em;
    display: inline-block;
}


/* доступный скрытый текст */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
    padding: 0;
    margin: -1px;
}

/* универсальная иконка-кнопка */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-primary);
    cursor: pointer;
    transition: background .18s, color .18s, border-color .18s, transform .1s;
}

.btn-icon:hover {
    background: var(--color-surface-alt);
    color: var(--color-primary-dark);
}

.btn-icon:active {
    transform: translateY(1px);
}

/* чтобы в списке не расползалось */
.qty-form .btn-icon {
    margin-left: .4rem;
}

.btn-update.use-bg {
    background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0nMjQnIGhlaWdodD0nMjQnIHZpZXdCb3g9JzAgMCAyNCAyNCcgeG1sbnM9J2h0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnJyBmaWxsPSdub25lJyBzdHJva2U9JyMyYTZmOTcnIHN0cm9rZS13aWR0aD0nMS44JyBzdHJva2UtbGluZWNhcD0ncm91bmQnIHN0cm9rZS1saW5lam9pbj0ncm91bmQnPjxwYXRoIGQ9J00yMSAxMmE5IDkgMCAxIDEtMi42NC02LjM2Jy8+PHBvbHlsaW5lIHBvaW50cz0nMjEgMyAyMSAxMCAxNCAxMCcvPjwvc3ZnPg==");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
}


/* ===== SHARE BLOCK (blue + outline) ===== */
.share-block {
    margin-top: -5px;
    display: flex;
    align-items: center;
    gap: .55rem 0;
    flex-wrap: wrap;
}

.star-rating + .share-block {
    margin-top: 0.5rem;
}

.share-block .share-label {
    color: var(--color-text-light);
    margin-right: .2rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 34px;
    border: none; /* без рамки */
    background: transparent; /* без подложки */
    color: var(--color-primary); /* синий брендовый */
    cursor: pointer;
    transition: color .18s, transform .1s, background .18s;
}

.share-btn svg {
    width: 24px;
    height: 24px;
    display: block;
}

.share-btn:hover {
    color: var(--color-primary-dark); /* темнее при ховере */
    background: transparent; /* без заливки */
    transform: translateY(-1px);
}

.share-btn:active {
    transform: translateY(0);
}

/* Немного выделим Pinterest за счёт масштаба иконки (без рамки) */
.share-btn.share-pinterest svg {
    width: 26px;
    height: 26px;
}

/* Тост «скопировано» — как раньше */
.share-toast {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    background: rgba(42, 111, 151, .95); /* синий */
    color: #fff;
    padding: .45rem .75rem;
    border-radius: 999px;
    font-size: .92rem;
    box-shadow: var(--shadow-m);
    z-index: 1000;
    animation: toastIn .18s ease-out, toastOut .25s ease-in 1.6s forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translate(-50%, 6px);
    }
}


@media (max-width: 540px) {

    nav.topcat {
        padding: 0.6em 0.9em;
    }

    nav.topcat ul {
        gap: .4rem 1.8rem;
    }

    .products-grid > .product-card,
    .recommend-products > .product-card {
        width: 100%;
        box-sizing: border-box;
        min-height: 265px;
    }

    .products-grid > .product-card {
        max-width: none;
    }

    .grid {
        grid-template-columns:1fr;
    }

    .listing-layout .main-content .products-grid {
        gap: 1.6rem 0;
        grid-template-columns: 1fr;
    }

    .recommend-products {
        grid-template-columns: 1fr;
    }

    .product-card-title {
        font-size: 1.2em;
        margin: 0.3em 0.6em 0.25em;
    }

    .product-card-price {
        font-size: 1.3em;
    }

    .product-card-pricing {
        margin-right: 0.85em;
    }

    .product-card-price {
        font-size: 1.2em;
    }

    .product-card-oldprice {
        font-size: 0.9em;
    }

    .recommend-products-title {
        text-align: center;
    }

    .recommend-products-wrap {
        margin: 1em 1em 0;
    }

    .recommend-products-wrap .products-grid {
        background: none;
        box-shadow: none;
    }

    .recommend-products .product-card-pricing {
        font-size: 1em;
    }

    .products-grid > .product-card .product-card-imgbox {
        margin-bottom: 0.9em;
        margin-top: 1em;
    }


    .recommend-products .product-card-imgbox {
        max-width: 200px;
    }

    .recommend-products .product-card-title {
        margin: 0.3em 0.6em 0.7em;
    }

    .similar .product-card-title {
        font-size: 1em;
        margin: 0.3em 0.6em 0.7em;
    }


    .load-more-block {
        margin: 0.6em 0 2em;
    }

    .load-more {
        font-size: 1.3em;
        font-weight: 500;
        padding: .8em 3.1em;
    }

    .products.similar {
        grid-template-columns: 1fr;
    }

    .items-list {
        grid-template-columns: 1fr;
    }

    /* .sidebar ul{
         gap: .2rem 0.6rem;
         margin: 0;
         padding: .2rem .1rem;
     }*/

}


.gdpr-banner {
    opacity: 0.88;
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    z-index: 1100;
    /*width: min(720px, calc(100% - 24px));*/
    max-width: 600px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-m);
    padding: 1rem 1.4rem;
    text-align: center;
}


.gdpr-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .9rem;
}

.gdpr-text {
    color: var(--color-text);
    font-size: 0.9em;
    padding: 0 0.7rem;
}


.gdpr-text p {
    margin: 0;
}

.gdpr-link {
    text-decoration: none;
    border-bottom: 1px dotted transparent;
    color: #1f5874;
}

.gdpr-link:hover {
    color: var(--color-primary-dark);
    border-color: var(--color-primary);
}

.gdpr-actions {
    display: flex;
    gap: .5rem;
}

.gdpr-actions .btn-primary {
    white-space: nowrap;
    font-size: 0.9rem;
    padding-left: 1.6rem;
    padding-right: 1.6rem;
}

@media (max-width: 720px) {
    .gdpr-inner {
        flex-direction: column;
        align-items: stretch;
        gap: .6rem;
    }

    .gdpr-actions {
        justify-content: center;
        padding-bottom: 0.3rem;
    }
}


/*

.gdpr-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1em;
}

.gdpr-modal[hidden] {
    display: none;
}

.gdpr-modal__panel {
    position: relative;
    width: min(580px, 94vw);
    max-height: 92vh;
    overflow: auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-m);
    padding: 1rem 1.2rem 1.1rem;
}

.gdpr-modal__title {
    margin: .2rem 1.6rem 0.6rem .1rem;
    font-size: 1.2rem;
    color: var(--color-primary-dark);
}

.gdpr-modal__intro {
    color: var(--color-text-light);
    margin: .2rem 0 0.8rem;
}

.gdpr-modal__intro a {
    color: var(--color-primary);
    text-decoration: none;
}

.gdpr-modal__intro a:hover {
    text-decoration: underline;
}

.gdpr-optlist {
    display: flex;
    flex-direction: column;
    gap: .35rem;

}

.gdpr-opt {
    display: flex;
    gap: .6rem;
    align-items: center;
    padding: .25rem 0;
}

.gdpr-opt span,
.gdpr-opt input{
    cursor: pointer;
}
.gdpr-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: .5rem;
    margin-top: .8rem;
}

!* close icon *!
.gdpr-close {
    font-size: 24px;
    position:absolute; top:.5rem; right:.6rem;
    width: 28px; height: 28px; line-height: 26px;
    border:1px solid var(--color-border);
    border-radius: 50%;
    background: var(--color-surface);
    color: var(--color-text-light);
    cursor:pointer;
}
.gdpr-close:hover{ color: var(--color-primary-dark); border-color: var(--color-primary); }

!* small screens: panel uses more width, bigger tap targets *!
@media (max-width:480px){
    .gdpr-modal__panel{ width: 96vw; padding: .9rem .95rem; }
    .gdpr-close{ top:.4rem; right:.45rem; }
}*/
