/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
    --blue-900: #0F2B6B;
    --blue-700: #1B4FD1;
    --blue-600: #2F6FF0;
    --blue-500: #3D7BF5;
    --blue-300: #A9C6FB;
    --blue-100: #E7EFFE;
    --bg: #F3F6FC;
    --card: #FFFFFF;
    --ink: #16223D;
    --muted: #7C879C;
    --red: #FF4D4F;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --shadow-card: 0 8px 24px rgba(20, 40, 90, .08);
    --shadow-pop: 0 16px 40px rgba(20, 40, 90, .16);
    --header-h: 64px;
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    padding-bottom: 72px; /* space for mobile tabbar */
}
h1, h2, h3, h4 {
    font-family: 'Manrope', 'Inter', sans-serif;
    margin: 0;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; border: none; background: none; cursor: pointer; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

.icon-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: var(--ink);
    background: var(--card);
    box-shadow: var(--shadow-card);
    transition: transform .15s ease, box-shadow .15s ease;
}
.icon-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-pop); }
.icon-btn:active { transform: translateY(0); }
.icon-btn:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(243, 246, 252, .85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(20,40,90,.06);
}
.header-inner {
    height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
}
.logo {
    display: flex; align-items: center; gap: 8px;
    font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 20px;
}
.logo-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 9px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-900));
    color: #fff; font-size: 14px;
}
.header-actions { display: flex; gap: 10px; }
.desktop-nav { display: none; gap: 28px; font-weight: 600; align-items: center; }
.desktop-nav a { color: var(--muted); transition: color .15s ease; }
.desktop-nav a:hover { color: var(--blue-700); }

.catalog-dropdown { position: relative; }
.catalog-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--card); box-shadow: var(--shadow-card); color: var(--ink);
    font-weight: 700; font-size: 14.5px; padding: 10px 16px; border-radius: 10px;
    transition: box-shadow .15s ease;
}
.catalog-toggle:hover { box-shadow: var(--shadow-pop); }
.catalog-toggle .chevron { transition: transform .2s ease; margin-left: 2px; }
.catalog-dropdown.open .catalog-toggle .chevron { transform: rotate(180deg); }
.catalog-panel {
    position: absolute; top: calc(100% + 12px); left: 0; width: 400px;
    background: var(--card); border-radius: 16px; box-shadow: var(--shadow-pop);
    padding: 10px 16px 10px 18px; max-height: 74vh; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 120;
}
.catalog-dropdown.open .catalog-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.catalog-panel .menu-group-toggle { font-size: 15px; }

.back-btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 600; padding: 8px 14px 8px 10px;
    background: var(--card); border-radius: 999px; box-shadow: var(--shadow-card);
}

/* Search panel */
.search-panel {
    max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
    background: var(--card);
    border-bottom: 1px solid rgba(20,40,90,.06);
}
.search-panel.open { max-height: 420px; }
.search-panel-inner { display: flex; gap: 10px; align-items: center; padding: 14px 16px; }
.search-input {
    flex: 1; height: 44px; border-radius: var(--radius-sm);
    border: 1.5px solid var(--blue-100); padding: 0 16px; font-size: 15px;
    background: var(--bg); color: var(--ink);
}
.search-input:focus { outline: none; border-color: var(--blue-500); }
.search-results { padding-bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.search-result-item {
    display: flex; justify-content: space-between; padding: 10px 12px;
    border-radius: var(--radius-sm); transition: background .15s ease;
}
.search-result-item:hover { background: var(--blue-100); }
.search-empty, .search-hint { color: var(--muted); font-size: 14px; padding: 6px 12px; }

/* ==========================================================================
   Mobile menu (burger)
   ========================================================================== */
.menu-overlay {
    position: fixed; inset: 0; background: rgba(15, 25, 55, .45);
    backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
    z-index: 90;
}
.menu-overlay.open { opacity: 1; pointer-events: auto; }

.mobile-menu {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(86vw, 340px);
    background: var(--card); z-index: 95;
    transform: translateX(-105%);
    transition: transform .3s cubic-bezier(.22,.9,.32,1);
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-pop);
    padding: 18px 6px 18px 18px;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-top { display: flex; justify-content: flex-end; padding-right: 12px; margin-bottom: 6px; }
.menu-list { flex: 1; overflow-y: auto; padding-right: 12px; }
.menu-group-toggle {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: 13px 4px; font-weight: 700; font-size: 15.5px; color: var(--ink);
}
.chevron { transition: transform .25s ease; color: var(--muted); }
.menu-group.open .chevron { transform: rotate(90deg); }
.menu-subitems {
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
    display: flex; flex-direction: column;
}
.menu-group.open .menu-subitems { max-height: 400px; }
.menu-subitems a {
    padding: 9px 4px 9px 14px; color: var(--muted); font-size: 14.5px;
    border-left: 2px solid var(--blue-100); margin-left: 4px;
}
.menu-subitems a:hover { color: var(--blue-700); border-left-color: var(--blue-500); }
.menu-search-link {
    display: block; text-align: center; padding: 12px; margin-top: 8px;
    color: var(--blue-700); font-weight: 600; border-top: 1px solid var(--blue-100);
}

/* ==========================================================================
   Hero slider
   ========================================================================== */
.hero { margin-top: 16px; }
.slider { position: relative; border-radius: var(--radius-lg); overflow: hidden; }
.slider-track {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    scrollbar-width: none; border-radius: var(--radius-lg);
}
.slider-track::-webkit-scrollbar { display: none; }
.slide {
    position: relative; min-width: 100%; scroll-snap-align: start;
    height: 190px; border-radius: var(--radius-lg);
    display: flex; align-items: center; padding: 0 28px;
    overflow: hidden; color: #fff;
}
.slide-0 { background: linear-gradient(135deg, #2C57E8 0%, #0F2B6B 100%); }
.slide-1 { background: linear-gradient(135deg, #1B4FD1 0%, #142F86 100%); }
.slide-2 { background: linear-gradient(135deg, #3D7BF5 0%, #10306E 100%); }
.slide-glow {
    position: absolute; width: 220px; height: 220px; right: -60px; top: -60px;
    background: radial-gradient(circle, rgba(255,255,255,.22), transparent 70%);
    border-radius: 50%;
    animation: driftGlow 6s ease-in-out infinite;
}
@keyframes driftGlow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-16px, 12px) scale(1.08); }
}
.slide-content { position: relative; z-index: 1; }
.slide-eyebrow { font-size: 13px; opacity: .85; font-weight: 600; letter-spacing: .02em; }
.slide-content h2 { font-size: 30px; font-weight: 800; margin: 6px 0 14px; }
.slide-btn {
    display: inline-block; background: #fff; color: var(--blue-900);
    padding: 10px 22px; border-radius: 999px; font-weight: 700; font-size: 14px;
    transition: transform .15s ease;
}
.slide-btn:hover { transform: translateY(-2px); }
.slide-arrow {
    width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.18);
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease, transform .15s ease;
}
.slide-arrow:hover { background: rgba(255,255,255,.3); transform: translateX(3px); }

.slider-dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.slider-dots .dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--blue-300);
    transition: all .2s ease; cursor: pointer;
}
.slider-dots .dot.active { width: 20px; border-radius: 4px; background: var(--blue-600); }

.slide.slide-trust {
    background: linear-gradient(120deg, #0F2B6B 0%, #17307A 45%, #0E3B33 100%);
    height: auto; min-height: 224px;
    align-items: flex-start;
    padding: 22px 20px;
}
.slide-trust .slide-glow {
    background: radial-gradient(circle, rgba(124,242,176,.28), transparent 70%);
}
.slide-trust .slide-eyebrow { color: #9FD9FF; opacity: 1; }
.slide-trust .slide-content { width: 100%; }
.slide-trust .slide-content h2 { font-size: 20px; line-height: 1.28; margin: 6px 0 14px; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.trust-badge {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28);
    backdrop-filter: blur(2px);
    color: #fff; font-size: 12px; font-weight: 600;
    padding: 8px 12px; border-radius: 999px; white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.trust-badge svg { flex-shrink: 0; color: #7CF2B0; }

@media (max-width: 420px) {
    .slide.slide-trust { padding: 18px 16px; min-height: 250px; }
    .slide-trust .slide-content h2 { font-size: 17px; }
    .trust-badges { flex-direction: column; align-items: flex-start; gap: 7px; }
    .trust-badge { width: 100%; box-sizing: border-box; }
}

@media (min-width: 640px) {
    .slide.slide-trust { align-items: center; min-height: 190px; padding: 0 28px; }
    .slide-trust .slide-content h2 { font-size: 26px; margin: 6px 0 16px; }
    .trust-badge { font-size: 12.5px; padding: 9px 14px; }
}

@media (min-width: 768px) {
    .slide.slide-trust { min-height: 230px; }
}

@media (min-width: 1024px) {
    .slide.slide-trust { min-height: 300px; padding: 0 56px; }
    .slide-trust .slide-content h2 { font-size: 34px; }
}

/* ==========================================================================
   Sections / titles
   ========================================================================== */
.section { margin-top: 34px; }
.section-title { font-size: 19px; font-weight: 800; margin-bottom: 16px; }

/* Reveal-on-scroll */
.reveal > * { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in-view > * { opacity: 1; transform: translateY(0); }
.reveal > *:nth-child(2) { transition-delay: .05s; }
.reveal > *:nth-child(3) { transition-delay: .1s; }
.reveal > *:nth-child(4) { transition-delay: .15s; }
.reveal > *:nth-child(5) { transition-delay: .2s; }
.reveal > *:nth-child(6) { transition-delay: .25s; }

/* ==========================================================================
   Category grid
   ========================================================================== */
.cat-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.cat-card {
    background: var(--card); border-radius: var(--radius-md);
    padding: 16px; box-shadow: var(--shadow-card);
    display: flex; flex-direction: column; gap: 10px;
    transition: transform .18s ease, box-shadow .18s ease;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.cat-thumb {
    width: 100%; aspect-ratio: 4/3; border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--blue-100), #fff);
    display: flex; align-items: center; justify-content: center;
}
.cat-thumb-fallback { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 30px; color: var(--blue-600); }
.cat-title { font-weight: 700; font-size: 14.5px; }
.cat-arrow { color: var(--blue-600); align-self: flex-end; }

/* ==========================================================================
   Product grid + cards
   ========================================================================== */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.product-card {
    position: relative; background: var(--card); border-radius: var(--radius-md);
    padding: 14px; box-shadow: var(--shadow-card);
    display: flex; flex-direction: column; gap: 8px;
    transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); }
.product-thumb-link { display: block; }
.product-thumb {
    aspect-ratio: 1/1; border-radius: var(--radius-sm);
    background: linear-gradient(160deg, var(--blue-600), var(--blue-900));
    display: flex; align-items: center; justify-content: center;
}
.product-thumb.has-image { background: var(--card); overflow: hidden; }
.product-thumb.has-image img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.win-mark { color: #fff; font-size: 34px; }
.win-mark.big { font-size: 90px; }
.badge {
    position: absolute; top: 22px; right: 22px;
    background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
    padding: 4px 9px; border-radius: 999px;
}
.product-name { font-weight: 700; font-size: 14px; line-height: 1.3; }
.rating { display: flex; align-items: center; gap: 2px; }
.star { color: #D8DEEA; font-size: 13px; }
.star.filled { color: #FFB800; }
.reviews-count { margin-left: 6px; font-size: 13px; color: var(--muted); }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 800; font-size: 16px; }
.price.big { font-size: 26px; }
.old-price { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.discount { color: var(--red); font-size: 12px; font-weight: 700; }
.add-to-cart {
    margin-top: 4px; background: var(--blue-600); color: #fff; font-weight: 700;
    font-size: 13.5px; padding: 10px; border-radius: var(--radius-sm);
    transition: background .15s ease, transform .1s ease;
}
.add-to-cart:hover { background: var(--blue-700); }
.add-to-cart:active { transform: scale(.97); }
.add-to-cart.big { padding: 14px; font-size: 15px; border-radius: 14px; }
.add-to-cart.pulsing { animation: pulse .35s ease; }
@keyframes pulse { 50% { transform: scale(1.06); } }

/* ==========================================================================
   "С этим товаром покупают" — карусель похожих товаров на странице товара
   ========================================================================== */
.related-section { margin: 34px auto; }
.related-carousel { position: relative; display: flex; align-items: center; gap: 10px; }
.related-track {
    display: flex; gap: 14px; overflow-x: auto; scroll-behavior: smooth;
    scroll-snap-type: x mandatory; padding: 2px 2px 8px;
    -ms-overflow-style: none; scrollbar-width: none;
    flex: 1 1 auto; min-width: 0;
}
.related-track::-webkit-scrollbar { display: none; }
.related-card {
    flex: 1 1 168px; max-width: 210px; scroll-snap-align: start;
}
.related-nav {
    flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%;
    background: var(--card); box-shadow: var(--shadow-card);
    display: flex; align-items: center; justify-content: center;
    color: var(--blue-600); border: none; cursor: pointer;
    transition: background .15s ease, transform .1s ease;
}
.related-nav:hover { background: var(--blue-100); }
.related-nav:active { transform: scale(.94); }
.related-nav[disabled] { opacity: .35; cursor: default; pointer-events: none; }

@media (max-width: 640px) {
    .related-nav { display: none; }
    .related-card { flex: 0 0 46%; }
}

@media (min-width: 900px) {
    .related-card { flex-basis: 200px; max-width: 240px; }
}

/* ==========================================================================
   Fullscreen lightbox — просмотр фото товара на весь экран
   ========================================================================== */
.lightbox-overlay {
    display: none; position: fixed; inset: 0; z-index: 200;
    background: rgba(10, 14, 26, .96);
    flex-direction: column; align-items: center; justify-content: center;
    padding: 16px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-topbar {
    position: absolute; top: 0; left: 0; right: 0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; color: #fff;
}
.lightbox-counter { font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.lightbox-close {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.1); color: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease;
}
.lightbox-close:hover { background: rgba(255,255,255,.2); }
.lightbox-stage {
    position: relative; width: 100%; max-width: 720px;
    display: flex; align-items: center; justify-content: center;
    flex: 1 1 auto; min-height: 0;
}
.lightbox-stage img {
    max-width: 100%; max-height: 70vh; object-fit: contain;
    border-radius: var(--radius-md); box-shadow: 0 20px 60px rgba(0,0,0,.5);
    user-select: none;
}
.lightbox-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,.12); color: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s ease, transform .1s ease; z-index: 1;
}
.lightbox-arrow:hover { background: rgba(255,255,255,.25); }
.lightbox-arrow:active { transform: translateY(-50%) scale(.92); }
.lightbox-arrow.prev { left: 0; }
.lightbox-arrow.next { right: 0; }
.lightbox-thumbs {
    display: flex; gap: 8px; margin-top: 18px; max-width: 100%;
    overflow-x: auto; padding-bottom: 4px;
}
.lightbox-thumb {
    flex: 0 0 auto; width: 52px; height: 52px; padding: 0;
    border-radius: 10px; overflow: hidden; opacity: .5;
    border: 2px solid transparent; transition: opacity .15s ease, border-color .15s ease;
}
.lightbox-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox-thumb.active { opacity: 1; border-color: #fff; }

@media (min-width: 640px) {
    .lightbox-arrow { width: 52px; height: 52px; }
    .lightbox-arrow.prev { left: 16px; }
    .lightbox-arrow.next { right: 16px; }
}

/* ==========================================================================
   Footer + mobile tabbar
   ========================================================================== */
/* margin-top: auto — в flex-колонке body это выталкивает футер к низу,
   даже когда контента на странице мало (ло����н/регистра��ия/профи��ь). */
.site-footer { margin-top: auto; background: var(--blue-900); color: #fff; padding: 40px 0 20px; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
.footer-brand p { color: rgba(255,255,255,.6); font-size: 13.5px; margin-top: 8px; }
.footer-col h4 { font-size: 14px; margin-bottom: 10px; }
.footer-col a { display: block; color: rgba(255,255,255,.7); font-size: 13.5px; padding: 4px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12); margin-top: 24px; padding-top: 16px;
    font-size: 12.5px; color: rgba(255,255,255,.5);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
}
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-legal-links a { color: rgba(255,255,255,.5); transition: color .15s ease; }
.footer-legal-links a:hover { color: rgba(255,255,255,.85); }
@media (max-width: 640px) {
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}

.mobile-tabbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: var(--card); box-shadow: 0 -6px 20px rgba(20,40,90,.08);
    display: flex; justify-content: space-around; align-items: center;
    height: 60px; padding-bottom: env(safe-area-inset-bottom);
}
.tab { position: relative; color: var(--muted); display: flex; }
.tab.active { color: var(--blue-600); }
.cart-count {
    position: absolute; top: -6px; right: -8px; background: var(--red); color: #fff;
    font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

/* ==========================================================================
   Product page
   ========================================================================== */
.product-main { padding-top: 20px; padding-bottom: 40px; }
.product-hero-thumb {
    aspect-ratio: 1/1; border-radius: var(--radius-lg);
    background: linear-gradient(160deg, var(--blue-600), var(--blue-900));
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-card);
    position: relative; width: 100%; padding: 0; margin: 0; border: none;
    font: inherit; color: inherit;
}
button.product-hero-thumb { cursor: zoom-in; }
.product-hero-thumb.has-image { background: var(--card); overflow: hidden; padding: 0; }
.product-hero-thumb.has-image img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.gallery-zoom-hint {
    position: absolute; right: 12px; bottom: 12px; width: 34px; height: 34px;
    border-radius: 50%; background: rgba(15, 23, 42, .55); color: #fff;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .15s ease;
}
.product-hero-thumb:hover .gallery-zoom-hint, .product-hero-thumb:focus-visible .gallery-zoom-hint { opacity: 1; }

/* Галерея: миниатюры + главное фото. Мобильный порядок — фото сверху, миниатюры лентой снизу. */
.product-gallery { display: flex; flex-direction: column; gap: 10px; }
.gallery-thumbs { order: 2; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.product-gallery .product-hero-thumb { order: 1; }
.gallery-thumb {
    flex: 0 0 auto; width: 56px; height: 56px; padding: 0;
    border-radius: var(--radius-sm); overflow: hidden;
    border: 2px solid transparent; background: var(--card);
    box-shadow: var(--shadow-card); cursor: pointer;
    transition: border-color .15s ease;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb.active { border-color: var(--blue-600); }
.product-info { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.product-info h1 { font-size: 22px; }
.price-block { display: flex; align-items: baseline; gap: 10px; }
.discount-pill { background: var(--red); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.delivery-note { color: var(--muted); font-size: 13.5px; margin: -4px 0 0; }
.spec-title { font-size: 16px; margin-top: 12px; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-bottom: 1px solid var(--blue-100); }
.spec-table td { padding: 9px 0; font-size: 13.5px; }
.spec-table td:first-child { color: var(--muted); }
.spec-table td:last-child { text-align: right; font-weight: 600; }
.description { font-size: 14px; line-height: 1.6; color: #384664; }

.mobile-sticky-cta {
    position: fixed; bottom: 60px; left: 0; right: 0; z-index: 45;
    background: var(--card); box-shadow: 0 -6px 20px rgba(20,40,90,.08);
    padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.mobile-sticky-cta .add-to-cart { flex-shrink: 0; padding: 12px 22px; }

/* ==========================================================================
   Cart icon (header) + Cart page + Profile page
   ========================================================================== */
.cart-btn { position: relative; display: none; }
.cart-btn .cart-count {
    position: absolute; top: -4px; right: -4px;
    background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
    min-width: 16px; height: 16px; border-radius: 999px;
    display: flex; align-items: center; justify-content: center; padding: 0 3px;
}

.page-title { font-size: 22px; margin: 20px 0 18px; }

.cart-main, .profile-main { padding-top: 24px; padding-bottom: 40px; min-height: 50vh; }

.cart-empty { display: none; text-align: center; padding: 40px 16px; color: var(--muted); }
.cart-empty p { margin-bottom: 16px; }
.slide-btn.dark { background: var(--blue-600); color: #fff; }

.cart-layout { display: flex; flex-direction: column; gap: 18px; }
.cart-list { display: flex; flex-direction: column; gap: 10px; }
.cart-row {
    display: grid; grid-template-columns: 52px 1fr auto auto auto;
    align-items: center; gap: 12px;
    background: var(--card); border-radius: var(--radius-md);
    padding: 10px 12px; box-shadow: var(--shadow-card);
}
.cart-row-thumb {
    width: 52px; height: 52px; border-radius: var(--radius-sm);
    background: linear-gradient(160deg, var(--blue-600), var(--blue-900));
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.cart-row-thumb .win-mark { font-size: 20px; }
.cart-row-thumb.has-image { background: var(--bg); }
.cart-row-thumb.has-image img {
    width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm);
}
.cart-row-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cart-row-name { font-weight: 700; font-size: 13.5px; }
.cart-row-price { font-size: 12.5px; color: var(--muted); }
.qty-stepper {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg); border-radius: 999px; padding: 4px 8px;
}
.qty-btn { width: 22px; height: 22px; border-radius: 50%; background: var(--card); font-weight: 700; box-shadow: var(--shadow-card); }
.qty-value { min-width: 16px; text-align: center; font-weight: 700; font-size: 13px; }
.cart-row-subtotal { font-weight: 800; font-size: 13.5px; white-space: nowrap; }
.cart-row-remove { color: var(--muted); padding: 6px; }
.cart-row-remove:hover { color: var(--red); }

.cart-summary {
    background: var(--card); border-radius: var(--radius-md); padding: 18px;
    box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 12px;
}
.cart-summary-row { display: flex; justify-content: space-between; font-size: 15px; font-weight: 700; }
.cart-note { font-size: 12.5px; color: var(--muted); margin: 0; }

.cart-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.cart-title-row .page-title { margin: 0; }
.cart-clear-btn {
    display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
    background: var(--card); border: none; color: var(--muted);
    font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: 999px;
    box-shadow: var(--shadow-card); cursor: pointer; transition: 0.15s ease;
}
.cart-clear-btn:hover { color: var(--red); box-shadow: var(--shadow-pop); transform: translateY(-1px); }
.cart-clear-btn:active { transform: translateY(0); }

.cart-email-field { display: flex; flex-direction: column; gap: 6px; }
.cart-email-field label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.cart-email-field input {
    padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border, #e2e4e9);
    font-size: 13.5px; font-family: inherit; background: var(--bg);
}
.cart-email-field input:focus { outline: none; border-color: var(--blue-600); }
.cart-email-field input.invalid { border-color: var(--red); }
.cart-email-error { display: none; font-size: 12px; color: var(--red); }
.cart-email-field.show-error .cart-email-error { display: block; }
.cart-email-field.show-error input { border-color: var(--red); }

.profile-card { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.profile-avatar {
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-900));
    color: #fff; font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 22px;
    display: flex; align-items: center; justify-content: center;
}
.profile-name { font-weight: 800; font-size: 17px; }
.profile-rows {
    background: var(--card); border-radius: var(--radius-md);
    box-shadow: var(--shadow-card); overflow: hidden;
}
.profile-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 18px; border-bottom: 1px solid var(--blue-100);
}
.profile-row:last-child { border-bottom: none; }
.profile-row-label { color: var(--muted); font-size: 14px; }
.profile-row-value { font-weight: 700; font-size: 14px; }
.bonus-value { color: var(--blue-700); }
.profile-row-link { transition: background .15s ease; }
.profile-row-link:hover { background: var(--blue-100); }
.row-arrow { color: var(--muted); margin-left: 4px; }

/* ==========================================================================
   Desktop breakpoints
   ========================================================================== */
@media (min-width: 768px) {
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .slide { height: 230px; }
    .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

@media (min-width: 1024px) {
    body { padding-bottom: 0; }
    .mobile-tabbar, .mobile-sticky-cta, .burger-btn { display: none; }
    .desktop-nav { display: flex; }
    .cart-btn { display: flex; }
    .cat-grid { grid-template-columns: repeat(6, 1fr); }
    .product-grid { grid-template-columns: repeat(4, 1fr); }
    .slide { height: 300px; padding: 0 56px; }
    .slide-content h2 { font-size: 42px; }
    .product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
    .product-info { margin-top: 0; }
    .product-gallery { flex-direction: row; position: sticky; top: 90px; }
    .gallery-thumbs { order: 1; flex-direction: column; overflow-x: visible; overflow-y: auto; max-height: 520px; }
    .product-gallery .product-hero-thumb { order: 2; flex: 1; min-width: 0; position: static; }
    .cart-layout { display: grid; grid-template-columns: 2fr 1fr; align-items: start; }
    .cart-summary { position: sticky; top: 90px; }
    .profile-rows, .profile-card { max-width: 520px; }
}

/* ===== Формы авторизации / регистрации ===== */
.auth-main { max-width: 420px; margin: 0 auto; padding-top: 24px; padding-bottom: 48px; }
.auth-form { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.auth-form label { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 10px; }
.auth-form input,
.review-form select,
.review-form textarea {
    font: inherit;
    padding: 12px 14px;
    border: 1px solid var(--border, #e2e5ea);
    border-radius: 10px;
    background: #fff;
}
.auth-form button, .review-form button { margin-top: 16px; }
.auth-switch { margin-top: 16px; font-size: 14px; color: var(--muted); }
.auth-switch a { color: var(--blue-600); font-weight: 600; }
.form-error { color: #e0433c; font-size: 13px; margin: 4px 0 0; }
.form-success { color: #1b9e5a; font-size: 14px; margin: 8px 0; }
.logout-btn { display: inline-block; margin-top: 20px; text-align: center; text-decoration: none; }

/* ===== Отзывы на товаре ===== */
.reviews-section { padding: 32px 0 48px; border-top: 1px solid var(--border, #eef0f3); margin-top: 24px; }
.review-form { display: flex; flex-direction: column; gap: 6px; max-width: 480px; margin: 12px 0 32px; }
.review-form label { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 8px; }
.review-login-note { margin: 12px 0 32px; color: var(--muted); font-size: 14px; }
.review-login-note a { color: var(--blue-600); font-weight: 600; }
.review-list { display: flex; flex-direction: column; gap: 16px; }
.review-empty { color: var(--muted); font-size: 14px; }
.review-item { border: 1px solid var(--border, #eef0f3); border-radius: 12px; padding: 14px 16px; }
.review-item-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-author { font-weight: 700; font-size: 14px; }
.review-stars .star { font-size: 13px; }
.review-date { margin-left: auto; font-size: 12px; color: var(--muted); }
.review-body { margin-top: 8px; font-size: 14px; line-height: 1.5; }

/* Фото к отзыву: выбор файла в форме + превью + отображение в карточке отзыва */
.review-photo-field { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.review-photo-input-native {
    position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none;
}
.review-photo-btn {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
    background: var(--card); box-shadow: var(--shadow-card); color: var(--blue-600);
    font-size: 13.5px; font-weight: 700; padding: 10px 16px; border-radius: 10px;
    transition: box-shadow .15s ease, transform .1s ease;
}
.review-photo-btn:hover { box-shadow: var(--shadow-pop); }
.review-photo-btn:active { transform: translateY(1px); }
.review-photo-btn svg { flex-shrink: 0; }
.review-photo-filename { font-size: 13px; color: var(--muted); }
.review-photo-hint { font-size: 12px; color: var(--muted); margin: 0; }
.review-photo-hint.error { color: #e0433c; }
.review-photo-preview {
    position: relative; width: 96px; height: 96px; border-radius: 10px;
    overflow: hidden; margin-top: 4px; box-shadow: var(--shadow-card);
}
.review-photo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.review-photo-remove {
    position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%;
    background: rgba(15,27,55,.65); color: #fff; font-size: 15px; line-height: 1;
    display: flex; align-items: center; justify-content: center; border: none;
}
.review-photo-link { display: inline-block; margin-top: 10px; }
.review-photo {
    display: block; max-width: 160px; max-height: 160px; border-radius: 10px;
    box-shadow: var(--shadow-card); object-fit: cover;
}

/* Отзывы: список слева + шкала оценок справа (на десктопе) */
.reviews-layout { display: flex; flex-direction: column; gap: 24px; }
.reviews-main { min-width: 0; }

.review-filters { display: flex; gap: 8px; overflow-x: auto; margin: 4px 0 20px; padding-bottom: 2px; }
.review-filter {
    flex: 0 0 auto; padding: 8px 14px; border-radius: 999px;
    font-size: 13px; font-weight: 600; color: var(--muted);
    background: var(--card); box-shadow: var(--shadow-card);
    white-space: nowrap; transition: background .15s ease, color .15s ease;
}
.review-filter.active { background: var(--blue-600); color: #fff; box-shadow: none; }

.rating-summary {
    background: var(--card); border-radius: var(--radius-md);
    box-shadow: var(--shadow-card); padding: 20px; height: fit-content;
}
.rating-summary-title { font-size: 15px; margin-bottom: 14px; }
.rating-bar-row { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 8px; }
.rating-bar-row:last-child { margin-bottom: 0; }
.rating-bar-label { width: 62px; flex-shrink: 0; color: var(--muted); }
.rating-bar-track { flex: 1; height: 6px; border-radius: 999px; background: var(--blue-100); overflow: hidden; }
.rating-bar-fill { display: block; height: 100%; background: #FFB800; border-radius: 999px; }
.rating-bar-count { width: 22px; flex-shrink: 0; text-align: right; color: var(--muted); }

@media (min-width: 1024px) {
    .reviews-layout { flex-direction: row; align-items: flex-start; gap: 40px; }
    .rating-summary { width: 280px; flex-shrink: 0; }
}
@media (max-width: 800px) {
    .review-filters { display: grid; grid-template-columns: repeat(3, 1fr); }
    .reviews-section { width: 100%; }
}

/* ===== Кликабельная строка корзины ===== */
.cart-row-thumb { cursor: pointer; }
.cart-row { cursor: pointer; }
.cart-row .qty-stepper, .cart-row .cart-row-remove, .cart-row-name { cursor: pointer; }

/* ===== Попап "нужна авторизация" ===== */
.auth-modal-overlay {
    position: fixed; inset: 0; background: rgba(15, 27, 55, .55);
    display: flex; align-items: center; justify-content: center;
    padding: 20px; z-index: 200; opacity: 0; visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}
.auth-modal-overlay.open { opacity: 1; visibility: visible; }
.auth-modal {
    background: var(--card); border-radius: var(--radius-lg); padding: 30px 24px 24px;
    max-width: 360px; width: 100%; text-align: center; position: relative;
    box-shadow: var(--shadow-pop); transform: translateY(14px) scale(.97);
    transition: transform .2s ease;
}
.auth-modal-overlay.open .auth-modal { transform: translateY(0) scale(1); }
.auth-modal-close { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; box-shadow: none; }
.auth-modal-icon {
    width: 56px; height: 56px; border-radius: 50%; background: var(--blue-100); color: var(--blue-600);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.auth-modal h3 { font-size: 18px; margin-bottom: 8px; }
.auth-modal p { font-size: 13.5px; color: var(--muted); margin: 0 0 20px; line-height: 1.5; }
.auth-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.auth-modal-login-link { display: block; text-align: center; text-decoration: none; }
.auth-modal-register-link { font-size: 13.5px; color: var(--blue-600); font-weight: 600; padding: 6px; }

/* ===== Отзывы: лайки и комментарии ===== */
.review-actions { display: flex; align-items: center; gap: 18px; margin-top: 10px; }
.review-like-btn, .comment-like-btn {
    display: inline-flex; align-items: center; gap: 6px; color: var(--muted);
    font-size: 13px; font-weight: 600; padding: 4px 2px; transition: color .15s ease, transform .1s ease;
}
.review-like-btn:hover, .comment-like-btn:hover { color: var(--red); }
.review-like-btn:active, .comment-like-btn:active { transform: scale(.95); }
.review-like-btn.liked, .comment-like-btn.liked { color: var(--red); }
.review-reply-btn { color: var(--blue-600); font-size: 13px; font-weight: 600; padding: 4px 2px; }
.review-reply-btn:hover { text-decoration: underline; }

.review-comments {
    display: flex; flex-direction: column; gap: 12px; margin: 14px 0 0 12px;
    padding-left: 14px; border-left: 2px solid var(--blue-100);
}
.review-comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-comment-author { font-weight: 700; font-size: 13px; }
.review-comment-date { font-size: 11.5px; color: var(--muted); }
.review-comment-body { margin: 4px 0 6px; font-size: 13.5px; line-height: 1.45; }

.reply-form { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 0 12px; max-width: 460px; }
.reply-form[hidden] { display: none; }
.reply-form textarea {
    font: inherit; padding: 10px 12px; border: 1px solid var(--border, #e2e5ea);
    border-radius: 10px; resize: vertical; min-height: 44px;
}
.reply-form button { align-self: flex-start; padding: 8px 18px; font-size: 13px; margin-top: 0; }

/* ===== Профиль: вкладки, настройки, покупки ===== */
.profile-tabs { display: flex; gap: 8px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 2px; }
.profile-tab {
    flex: 0 0 auto; padding: 10px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
    color: var(--muted); background: var(--card); box-shadow: var(--shadow-card); white-space: nowrap;
    transition: background .15s ease, color .15s ease;
}
.profile-tab.active { background: var(--blue-600); color: #fff; box-shadow: none; }
.profile-panel { display: none; }
.profile-panel.active { display: block; }

.settings-form {
    max-width: 420px; background: var(--card); border-radius: var(--radius-md);
    padding: 18px; box-shadow: var(--shadow-card); margin-bottom: 16px;
}
.settings-form label:first-of-type { margin-top: 0; }

.orders-list { display: flex; flex-direction: column; gap: 12px; }
.order-card { background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-card); padding: 16px; }
.order-card-head { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.order-date { color: var(--muted); font-weight: 600; font-size: 13px; }
.order-items { margin: 0; padding-left: 18px; font-size: 13.5px; color: #384664; }

.purchases-empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.purchases-empty-title { font-weight: 700; font-size: 16px; color: var(--ink); margin-bottom: 6px; }
.purchases-empty-text { margin-bottom: 18px; }
.purchases-empty-text a { color: var(--blue-600); font-weight: 600; }

/* ==========================================================================
   Бредкррумбы (общие для /programms)
   ========================================================================== */
.breadcrumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 16px; flex-wrap: wrap; }
.breadcrumbs a { color: var(--blue-600); font-weight: 600; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs-current { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   Каталог /programms — общая страница
   ========================================================================== */
.programms-main { padding-bottom: 40px; min-height: 50vh; }
.programms-lead { color: var(--muted); font-size: 14px; margin: -6px 0 18px; max-width: 640px; }
.programms-search {
    display: flex; align-items: center; gap: 10px;
    background: var(--card); border-radius: 999px; padding: 12px 16px;
    box-shadow: var(--shadow-card); margin-bottom: 20px; color: var(--muted);
}
.programms-search input { flex: 1; border: none; background: none; font-size: 14px; font-family: inherit; color: var(--ink); }
.programms-search input:focus { outline: none; }

.programms-cat-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .programms-cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .programms-cat-grid { grid-template-columns: repeat(3, 1fr); } }
.programms-cat-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--card); border-radius: var(--radius-md); padding: 14px 16px;
    box-shadow: var(--shadow-card); transition: transform .15s ease, box-shadow .15s ease;
}
.programms-cat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.programms-cat-icon {
    width: 44px; height: 44px; border-radius: var(--radius-sm); flex-shrink: 0;
    background: var(--blue-100); display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.programms-cat-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.programms-cat-name { font-weight: 700; font-size: 14px; }
.programms-cat-brand { font-size: 12px; color: var(--muted); }
.programms-cat-count {
    background: var(--bg); color: var(--muted); font-weight: 700; font-size: 12px;
    padding: 4px 10px; border-radius: 999px; flex-shrink: 0;
}
.programms-empty { text-align: center; color: var(--muted); padding: 30px 16px; grid-column: 1 / -1; }

/* ==========================================================================
   Каталог /programms — страница категории
   ========================================================================== */
.version-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; }
.version-tab {
    flex-shrink: 0; padding: 8px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
    background: var(--card); color: var(--muted); box-shadow: var(--shadow-card); transition: .15s;
}
.version-tab.active { background: var(--blue-600); color: #fff; box-shadow: none; }

.software-list { display: flex; flex-direction: column; gap: 10px; }
.software-row {
    display: grid; grid-template-columns: 44px 1fr auto auto auto;
    align-items: center; gap: 14px;
    background: var(--card); border-radius: var(--radius-md); padding: 12px 16px;
    box-shadow: var(--shadow-card);
}
.software-row-icon {
    width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--blue-100);
    display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.software-row-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.software-row-name { font-weight: 700; font-size: 13.5px; }
.software-row-publisher { font-size: 12px; color: var(--muted); }
.software-row-stat { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.software-row-btn {
    background: var(--blue-600); color: #fff; font-size: 13px; font-weight: 700;
    padding: 8px 16px; border-radius: 999px; white-space: nowrap;
}
.software-row-btn:hover { background: var(--blue-700); }
@media (max-width: 720px) {
    .software-row { grid-template-columns: 40px 1fr; row-gap: 8px; }
    .software-row-stat:nth-of-type(3) { display: none; }
    .software-row-btn { grid-column: 2; justify-self: start; }
}

/* ==========================================================================
   Каталог /programms — страница программы
   ========================================================================== */
.software-layout { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
@media (min-width: 900px) { .software-layout { display: grid; grid-template-columns: 2fr 1fr; align-items: start; gap: 22px; } }
.software-main-col { display: flex; flex-direction: column; gap: 16px; }
.software-hero {
    background: linear-gradient(160deg, var(--blue-600), var(--blue-900));
    border-radius: var(--radius-md); height: 220px;
    display: flex; align-items: center; justify-content: center;
}
.software-hero-icon { font-size: 64px; }
.software-block { background: var(--card); border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-card); }
.software-block h3 { font-size: 15px; margin-bottom: 10px; }
.software-block p { font-size: 13.5px; color: #384664; line-height: 1.6; margin: 0; }
.software-articles { margin: 0; padding-left: 18px; font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; }
.software-articles a { color: var(--blue-600); font-weight: 600; }
.software-articles a:hover { text-decoration: underline; }

.software-sidebar {
    background: var(--card); border-radius: var(--radius-md); padding: 18px; box-shadow: var(--shadow-card);
    display: flex; flex-direction: column; gap: 14px; align-self: start;
}
@media (min-width: 900px) { .software-sidebar { position: sticky; top: 90px; } }
.software-verified-badge {
    display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
    color: #1E9E5A; background: #E9FBF1; padding: 8px 12px; border-radius: 999px; width: fit-content;
}
.software-download-links { display: flex; flex-direction: column; gap: 8px; }
.software-download-link {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--bg); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13.5px; font-weight: 600;
    transition: .15s;
}
.software-download-link:hover { background: var(--blue-100); }
.software-download-btn { color: var(--blue-600); font-weight: 700; font-size: 12.5px; }
.software-updated { font-size: 12.5px; color: var(--muted); margin: 0; }
.software-cta { display: block; text-align: center; }
.software-meta { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid rgba(20,40,90,.08); display: flex; flex-direction: column; gap: 8px; }
.software-meta li { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.software-meta li span { color: var(--muted); }
.software-meta li strong { text-align: right; }

/* ==========================================================================
   Страница "Ответы на вопросы" (FAQ)
   ========================================================================== */
.faq-main { padding-bottom: 40px; min-height: 50vh; }
.faq-lead { color: var(--muted); font-size: 14px; margin: -6px 0 22px; max-width: 640px; }
.faq-section { margin-bottom: 26px; }
.faq-section-title { font-size: 16px; margin-bottom: 12px; }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-card); overflow: hidden; }
.faq-question {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 15px 18px; font-size: 14px; font-weight: 700; text-align: left; cursor: pointer;
}
.faq-toggle-icon { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); color: var(--blue-600); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; transition: transform .2s ease; }
.faq-item.open .faq-toggle-icon { transform: rotate(45deg); background: var(--blue-100); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-answer-inner { padding: 0 18px 16px; font-size: 13.5px; color: #384664; line-height: 1.6; }
.faq-item.open .faq-answer { max-height: 600px; }

.legal-main { padding-top: 4px; padding-bottom: 48px; min-height: 50vh; max-width: 760px; margin: 0 auto; }
.legal-updated { color: var(--muted); font-size: 13px; margin: -8px 0 20px; }
.legal-card {
    background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-card);
    padding: 26px 28px; display: flex; flex-direction: column; gap: 22px;
}
.legal-section h2 { font-size: 15.5px; margin-bottom: 8px; color: var(--blue-700); }
.legal-section p { font-size: 13.5px; line-height: 1.7; color: #384664; margin: 0; }
.legal-section ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.legal-section li { font-size: 13.5px; line-height: 1.6; color: #384664; }
.legal-section a { color: var(--blue-600); text-decoration: underline; }
@media (max-width: 640px) {
    .legal-card { padding: 20px; }
}

.menu-quick-links { display: flex; flex-direction: column; gap: 2px; margin: 6px 0; padding: 10px 0; border-top: 1px solid rgba(20,40,90,.08); border-bottom: 1px solid rgba(20,40,90,.08); }
.menu-quick-links a { padding: 8px 4px; font-size: 14px; font-weight: 600; color: var(--ink); }
.menu-quick-links a:hover { color: var(--blue-600); }


/* ==========================================================================
   Страница /reviews.php — все отзывы по всем товарам
   ========================================================================== */
.reviews-page-main { padding-top: 20px; padding-bottom: 48px; }
.reviews-page-head { margin-bottom: 18px; }
.reviews-page-head h1 { font-size: 24px; margin: 0 0 4px; }
.reviews-page-count { color: var(--muted); font-size: 14px; }

.reviews-toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.reviews-photo-toggle {
    display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600;
    color: var(--muted); cursor: pointer; width: fit-content;
}
.reviews-photo-toggle input { width: 34px; height: 20px; accent-color: var(--blue-600); cursor: pointer; }

.site-review-list { display: flex; flex-direction: column; gap: 16px; }
.site-review-item { border: 1px solid var(--border, #eef0f3); border-radius: 12px; padding: 16px 18px; }
.site-review-product {
    display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700;
    color: var(--blue-600); background: var(--blue-100); border-radius: 999px; padding: 5px 12px;
    margin-bottom: 10px; text-decoration: none;
}
.site-review-product:hover { text-decoration: underline; }
.site-review-avatar {
    width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0;
}

@media (min-width: 1024px) {
    .reviews-toolbar { flex-direction: row; align-items: center; justify-content: space-between; }
    .reviews-page-layout { display: flex; align-items: flex-start; gap: 40px; }
    .reviews-page-layout .reviews-main { flex: 1; min-width: 0; }
    .reviews-page-layout .rating-summary { width: 280px; flex-shrink: 0; }
}