/* Переменные, сброс, базовая типографика, утилиты
 * Часть style.css. Сервер склеивает public/css/*.css по порядку имён,
 * поэтому порядок правил внутри и между файлами менять нельзя. */

.product-page {
    padding: 140px 0 50px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

#mainHeader {
    z-index: 1200;
}

/* ===== ROOT VARIABLES ===== */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-accent: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-gold: #d4af37;
    --accent-purple: #8a2be2;
    --accent-glow: rgba(212, 175, 55, 0.3);
    --transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --success: #4CAF50;
    --error: #f44336;

    --bg-900: #070607;
    --bg-800: #0f0f11;
    --bg-700: #131315;
    --muted: #bdb7b0;
    --gold: #d4af37;
    --purple: #8a2be2;
    --glow: rgba(212, 175, 55, 0.18);
    --card: #151515;
    --accent: linear-gradient(135deg, var(--gold), var(--purple));
    --radius: 14px;
    --trans: 0.35s cubic-bezier(.2, .9, .2, 1);
    --glass: rgba(255, 255, 255, 0.03);
}

/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    background: #000000;
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Ensure content appears above starfield */
.hero,
.categories,
.products,
.features,
.about,
.admin-panel,
footer {
    position: relative;
    z-index: 1;
}

/* Make sure modals appear above everything */
.cart-modal,
.order-modal,
.success-modal,
.product-modal,
.wishlist-modal,
.password-modal {
    z-index: 2001;
}

/* Header should be above starfield */
header {
    z-index: 1200;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== LAYOUT & UTILITY ===== */
.has-fixed-banner {
    padding-top: calc(56px + 70px);
    scroll-padding-top: calc(56px + 12px);
}

.modal-open::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1500;
    pointer-events: none;
}


/* Стеклянные поверхности и звёздное небо
 * Часть style.css. Сервер склеивает public/css/*.css по порядку имён,
 * поэтому порядок правил внутри и между файлами менять нельзя. */

/* ===== GLASS MORPHISM EFFECTS ===== */
.glass-glow {
    background: rgba(20, 20, 25, 0.25) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.glass-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(212, 175, 55, 0.15) 0%,
            rgba(138, 43, 226, 0.08) 50%,
            transparent 100%) !important;
    border-radius: inherit;
    z-index: -1;
    opacity: 0.6;
    transition: var(--transition);
}

/* ===== PRODUCT CARDS - ULTRA GLASS ===== */
.product-card {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
    will-change: transform;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 25px 50px rgba(139, 92, 246, 0.2),
        0 15px 30px rgba(139, 92, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ===== FEATURE CARDS - ULTRA GLASS ===== */
.feature-card {
    background: rgba(18, 18, 24, 0.18) !important;
    backdrop-filter: blur(35px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 24px !important;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2) !important;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(212, 175, 55, 0.25) 0%,
            rgba(138, 43, 226, 0.15) 100%) !important;
    border-radius: 24px;
    z-index: -1;
    opacity: 0.3;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-12px) !important;
    border-color: var(--accent-purple) !important;
    box-shadow:
        0 30px 60px rgba(138, 43, 226, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.feature-card:hover::before {
    opacity: 0.6 !important;
}

/* ===== PRODUCT CARDS - ULTRA GLASS ===== */
.product-card {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
    will-change: transform;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 25px 50px rgba(139, 92, 246, 0.2),
        0 15px 30px rgba(139, 92, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Кнопки */
.add-to-cart,
.buy-now,
.category-btn,
.action-btn {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.add-to-cart::before,
.buy-now::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.add-to-cart:hover::before,
.buy-now:hover::before {
    left: 100%;
}

/* Действия товара */
.product-actions {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateY(10px);
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateY(0);
}

/* Изображения товаров */
.product-image img {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card:hover .product-image img {
    transform: scale(1.08);
}

.feature-card {
    background: rgba(18, 18, 24, 0.18) !important;
    backdrop-filter: blur(35px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 24px !important;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2) !important;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow:
        0 30px 60px rgba(138, 43, 226, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Кнопки категорий */
.category-btn {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Заливка кнопки категории жила здесь в ::before с z-index: -1 и пряталась
   за её собственным фоном — золото не показывалось никогда, а текст при этом
   перекрашивался в тёмный. Активная категория выходила тёмным по тёмному,
   контраст 1.38:1. Цвета теперь задаёт сама кнопка, ниже в 06-catalog.css. */

/* Иконки действий */
.action-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.9);
}

.product-card:hover .action-btn {
    transform: scale(1);
}

.action-btn:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Навигация */
.nav-links a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
    transform: translateY(-2px);
}

/* Иконки корзины и вишлиста */
.cart-icon,
.wishlist-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-icon:hover,
.wishlist-icon:hover {
    transform: scale(1.15) rotate(5deg);
}

/* Кнопки в админке */
.admin-edit-btn,
.admin-delete-btn,
.admin-status-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-edit-btn:hover {
    transform: translateY(-2px) scale(1.05);
}

.admin-delete-btn:hover {
    transform: translateY(-2px) scale(1.05);
}

.admin-status-btn:hover {
    transform: translateY(-2px) scale(1.05);
}

/* Элементы списков */
.admin-product-item,
.admin-order-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-product-item:hover,
.admin-order-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Социальные иконки */
.social-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover {
    transform: translateY(-3px) scale(1.1);
}

/* Статистика */
.stat {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat:hover {
    transform: translateY(-5px) scale(1.02);
}

/* Модальные окна */
.cart-content,
.order-content,
.success-content,
.product-content,
.wishlist-content,
.password-content {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Анимация появления элементов при загрузке */
@keyframes smoothFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.product-card,
.feature-card {
    animation: smoothFadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Задержки для анимации появления */
.product-card:nth-child(1) {
    animation-delay: 0.1s;
}

.product-card:nth-child(2) {
    animation-delay: 0.2s;
}

.product-card:nth-child(3) {
    animation-delay: 0.3s;
}

.product-card:nth-child(4) {
    animation-delay: 0.4s;
}

.product-card:nth-child(5) {
    animation-delay: 0.5s;
}

.product-card:nth-child(6) {
    animation-delay: 0.6s;
}

.feature-card:nth-child(1) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.3s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.4s;
}

/* ===== FEATURE CARDS - ULTRA GLASS ===== */
.feature-card {
    background: rgba(18, 18, 24, 0.18) !important;
    backdrop-filter: blur(35px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 24px !important;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2) !important;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(212, 175, 55, 0.25) 0%,
            rgba(138, 43, 226, 0.15) 100%) !important;
    border-radius: 24px;
    z-index: -1;
    opacity: 0.3;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-12px) !important;
    border-color: var(--accent-purple) !important;
    box-shadow:
        0 30px 60px rgba(138, 43, 226, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.feature-card:hover::before {
    opacity: 0.6 !important;
}

/* ===== HERO SECTION - ULTRA GLASS ===== */
.hero-content {
    background: rgba(25, 25, 35, 0.15) !important;
    backdrop-filter: blur(40px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 32px !important;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3) !important;
}

/* ===== HEADER - ULTRA GLASS ===== */
header {
    background: rgba(10, 10, 15, 0.2) !important;
    backdrop-filter: blur(35px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(200%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* ===== ABOUT SECTION - GLASS ===== */
.about-text {
    background: rgba(20, 20, 28, 0.2) !important;
    backdrop-filter: blur(25px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px !important;
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    padding: 2.5rem !important;
    /* Добавьте эту строку */
}

/* ===== STATS - GLASS ===== */
.stat {
    background: rgba(25, 25, 35, 0.25) !important;
    backdrop-filter: blur(20px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ===== FOOTER - GLASS ===== */
footer {
    background: rgba(8, 8, 12, 0.3) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
}

/* ===== MODALS - ULTRA GLASS ===== */
.cart-content,
.order-content,
.success-content,
.product-content,
.wishlist-content,
.password-content {
    background: rgba(20, 20, 28, 0.25) !important;
    backdrop-filter: blur(50px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(50px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

/* ===== REMOVE OLD BACKGROUNDS ===== */
.categories,
.products,
.features,
.about,
.admin-panel {
    background: transparent !important;
}

/* ===== ENHANCED STARFIELD ===== */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(138, 43, 226, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #000000 0%, #0a0a15 100%);
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle linear infinite;
}

.star.small {
    width: 1px;
    height: 1px;
    opacity: 0.4;
    animation-duration: 4s;
}

.star.medium {
    width: 2px;
    height: 2px;
    opacity: 0.7;
    animation-duration: 6s;
}

.star.large {
    width: 3px;
    height: 3px;
    opacity: 0.9;
    animation-duration: 8s;
}

.star.shooting {
    width: 3px;
    height: 3px;
    background: linear-gradient(45deg, transparent, var(--accent-gold), var(--accent-purple), transparent);
    border-radius: 0;
    animation: shooting 2.5s ease-in infinite;
}

.glow-star {
    position: absolute;
    border-radius: 50%;
    filter: blur(8px);
    animation: pulse 6s ease-in-out infinite;
}

.glow-star.gold {
    background: radial-gradient(circle, var(--accent-gold) 0%, transparent 70%);
    box-shadow: 0 0 40px var(--accent-gold);
}

.glow-star.purple {
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 70%);
    box-shadow: 0 0 40px var(--accent-purple);
}


/* Шапка и навигация
 * Часть style.css. Сервер склеивает public/css/*.css по порядку имён,
 * поэтому порядок правил внутри и между файлами менять нельзя. */

/* ===== HEADER & NAVIGATION ===== */
header {
    position: fixed;
    left: 0;
    right: 0;
    top: 56px;
    background: rgba(20, 20, 22, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 1200;
    transition: var(--transition), top 0.28s ease;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(212, 175, 55, 0.05) 0%,
            rgba(138, 43, 226, 0.03) 100%);
    z-index: -1;
    opacity: 0.5;
    transition: var(--transition);
}

header.scrolled::before {
    opacity: 0.8;
    background: linear-gradient(135deg,
            rgba(212, 175, 55, 0.08) 0%,
            rgba(138, 43, 226, 0.04) 100%);
}

header.scrolled {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(25px) saturate(200%);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    top: 0 !important;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--accent-gold);
    text-decoration: none;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    font-weight: 500;
    padding: 8px 6px;
    border-radius: 8px;
}

.nav-links a:hover {
    color: var(--accent-gold);
    background: var(--glass);
    box-shadow: 0 6px 18px var(--glow);
    transform: translateY(-2px);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-icon,
.wishlist-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.cart-icon:hover,
.wishlist-icon:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
}

.cart-count,
.wishlist-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-gold);
    color: var(--bg-primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
}


/* Первый экран
 * Часть style.css. Сервер склеивает public/css/*.css по порядку имён,
 * поэтому порядок правил внутри и между файлами менять нельзя. */

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-primary) 70%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 36px;
    border-radius: 18px;
    background: rgba(30, 30, 35, 0.3);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(212, 175, 55, 0.1) 0%,
            rgba(138, 43, 226, 0.05) 50%,
            transparent 100%);
    border-radius: 18px;
    z-index: -1;
    opacity: 0.6;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--accent-gold), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px var(--accent-glow);
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s both;
}


/* Кнопки
 * Часть style.css. Сервер склеивает public/css/*.css по порядку имён,
 * поэтому порядок правил внутри и между файлами менять нельзя. */

/* ===== BUTTONS ===== */
.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--accent-gold), var(--accent-purple));
    color: var(--bg-primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 0 20px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--accent-glow);
}

.cta-button.secondary {
    background: transparent;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
}

.cta-button.secondary:hover {
    background: var(--accent-gold);
    color: var(--bg-primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
    transition: var(--trans);
}

.btn-primary {
    background: var(--accent);
    color: #0b0b09;
    box-shadow: 0 8px 30px var(--glow);
}

.btn-ghost {
    background: transparent;
    border: 2px solid rgba(212, 175, 55, 0.14);
    color: var(--gold);
}

.btn-small {
    padding: 8px 10px;
    border-radius: 10px;
    font-weight: 700;
    border: 0;
    cursor: pointer;
}


/* Категории и сетка товаров
 * Часть style.css. Сервер склеивает public/css/*.css по порядку имён,
 * поэтому порядок правил внутри и между файлами менять нельзя. */

/* ===== CATEGORIES ===== */
.categories {

    padding: 3rem 0;

    /* Темный цвет, почти черный, чтобы сочетался с космосом */

    background-color: #0F0F0F !important;

    text-align: center;

    position: relative;

    z-index: 10;

}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--accent-gold);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: var(--accent-gold);
    margin: 1rem auto;
    border-radius: 2px;
}

.section-title-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.section-title.collapsible {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--gold);
    font-weight: 800;
    cursor: pointer;
    font-size: 1.125rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    transition: transform .28s ease, box-shadow .28s ease;
    border-bottom: none;
    box-shadow: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.section-title.collapsible:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}

.section-title.collapsible .chev {
    font-size: 0.9rem;
    margin-left: 8px;
    opacity: 0.9;
    transition: transform .28s ease;
}

.section-title.collapsible.open .chev {
    transform: rotate(180deg);
}

.collapsible-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height .45s cubic-bezier(.2, .9, .2, 1);
    margin: 0 auto;
    width: 100%;
}

.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 12px 8px;
}

.category-btn {
    padding: 0.7rem 1.5rem;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    position: relative;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.category-btn:hover {
    color: var(--accent-gold);
    border-color: rgba(212, 175, 55, 0.55);
    background: rgba(212, 175, 55, 0.08);
    transform: translateY(-2px);
}

/* Выбранная категория заливается золотом. Цвет задаёт сама кнопка: попытка
   заливать её псевдоэлементом позади собственного фона не работала. */
.category-btn.active {
    background: linear-gradient(135deg, var(--accent-gold), #b8912f);
    border-color: var(--accent-gold);
    color: var(--bg-primary);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.32);
    transform: none;
}

.category-btn:focus-visible {
    outline: 2px solid var(--accent-gold);
    outline-offset: 3px;
}

.filter {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 8px 14px;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
    transition: var(--trans);
}

.filter.active {
    background: var(--gold);
    color: #0b0b09;
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.12);
}

/* ===== PRODUCTS SECTION ===== */
.products {
    padding: 3rem 0 5rem;
    background: var(--bg-secondary);
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-sort-container {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    background: var(--bg-accent);
    border: 1px solid transparent;
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    width: 250px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
}

.sort-select {
    padding: 0.7rem 1rem;
    background: var(--bg-accent);
    border: 1px solid transparent;
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, 280px);
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
}

.product-card {
    background: rgba(25, 25, 28, 0.25);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease-out forwards;
    backdrop-filter: blur(15px) saturate(160%);
    -webkit-backdrop-filter: blur(15px) saturate(160%);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(212, 175, 55, 0.08) 0%,
            rgba(138, 43, 226, 0.04) 100%);
    border-radius: 15px;
    z-index: -1;
    opacity: 0.6;
    transition: var(--transition);
}

.product-card:hover::before {
    opacity: 0.9;
    background: linear-gradient(135deg,
            rgba(212, 175, 55, 0.12) 0%,
            rgba(138, 43, 226, 0.06) 100%);
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-gold);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--success);
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

.product-badge.sale {
    background: var(--error);
}

.product-badge.new {
    background: var(--accent-purple);
}

.product-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(45deg, #2a2a2a, #3a3a3a);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-actions {
    opacity: 1;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.7);
    border: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.action-btn:hover {
    background: var(--accent-gold);
    color: var(--bg-primary);
    transform: scale(1.1);
}

.action-btn.active {
    background: var(--accent-gold);
    color: var(--bg-primary);
}

.product-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
}

.product-category {
    display: inline-block;
    background: var(--bg-primary);
    color: var(--accent-gold);
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.product-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    color: var(--accent-gold);
}

.rating-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.product-price {
    min-height: 2.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.5rem;
    color: var(--accent-gold);
    font-weight: bold;
}

.original-price {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.discount-badge {
    background: var(--error);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
}

.product-card-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.add-to-cart,
.buy-now {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    min-height: 44px;
}

.add-to-cart::before,
.buy-now::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

.add-to-cart:hover::before,
.buy-now:hover::before {
    left: 100%;
}

.add-to-cart {
    background: transparent;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
}

.add-to-cart:hover {
    background: var(--accent-gold);
    color: var(--bg-primary);
}

.buy-now {
    background: linear-gradient(45deg, var(--accent-gold), var(--accent-purple));
    color: var(--bg-primary);
}

.buy-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-glow);
}


/* Блок преимуществ и «о нас»
 * Часть style.css. Сервер склеивает public/css/*.css по порядку имён,
 * поэтому порядок правил внутри и между файлами менять нельзя. */

/* ===== FEATURES SECTION ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: rgba(18, 18, 24, 0.18) !important;
    backdrop-filter: blur(35px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(35px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 24px !important;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2) !important;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s ease-out;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(212, 175, 55, 0.25) 0%,
            rgba(138, 43, 226, 0.15) 100%) !important;
    border-radius: 24px;
    z-index: -1;
    opacity: 0.3;
    transition: all 0.4s ease-out;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-purple) !important;
    box-shadow:
        0 25px 50px rgba(138, 43, 226, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.feature-card:hover::before {
    opacity: 0.6;
}

/* Иконки фич */
.feature-icon {
    font-size: 3.5rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease-out;
    display: inline-block;
}

.feature-card:hover .feature-icon {
    transform: translateY(-5px);
    color: var(--accent-purple);
}

/* Заголовки фич */
.feature-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s ease-out;
}

.feature-card:hover .feature-title {
    color: var(--accent-gold);
    transform: translateY(-2px);
}

/* Описание фич */
.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
    transition: all 0.3s ease-out;
}

.feature-card:hover .feature-description {
    color: rgba(255, 255, 255, 0.9);
}

/* Анимация появления для фич */
.feature-card {
    opacity: 0;
    transform: translateY(20px);
    animation: smoothFeatureAppear 0.6s ease-out forwards;
}

@keyframes smoothFeatureAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Задержки для анимации появления фич */
.feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

.feature-card:nth-child(4) {
    animation-delay: 0.4s;
}

.feature-card:nth-child(5) {
    animation-delay: 0.5s;
}

.feature-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 2rem 1.5rem;
    }

    .feature-card:hover {
        transform: translateY(-5px);
    }

    .feature-icon {
        font-size: 3rem;
    }
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: 5rem 0;
    background: var(--bg-primary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-gold);
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-accent);
    border-radius: 10px;
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
}


/* Панель администратора
 * Часть style.css. Сервер склеивает public/css/*.css по порядку имён,
 * поэтому порядок правил внутри и между файлами менять нельзя. */

/* ===== ADMIN PANEL ===== */
.admin-panel {
    display: none;
    padding: 5rem 0;
    background: var(--bg-secondary);
}

.admin-panel.active {
    display: block;
}

.admin-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--bg-accent);
    flex-wrap: wrap;
    gap: 8px;
    overflow: auto;
    padding-bottom: 8px;
}

.admin-tab {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    position: relative;
    border-radius: 10px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.admin-tab::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent-gold);
    transition: var(--transition);
}

.admin-tab.active {
    color: var(--accent-gold);
    background: var(--gold);
    color: #0b0b09;
}

.admin-tab.active::after {
    width: 100%;
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

.admin-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-accent);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.admin-form .form-group {
    margin-bottom: 1.5rem;
}

.admin-form textarea {
    padding: 0.8rem;
    background: var(--bg-secondary);
    border: 1px solid transparent;
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    min-height: 100px;
    resize: vertical;
    width: 100%;
}

.admin-form textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.admin-form select {
    padding: 0.8rem;
    background: var(--bg-secondary);
    border: 1px solid transparent;
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
}

.admin-form select:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.image-preview {
    width: 100%;
    height: 200px;
    background: var(--bg-secondary);
    border-radius: 5px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: var(--transition);
}

.image-preview:hover {
    transform: scale(1.02);
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.admin-products-list,
.admin-orders-list {
    margin-top: 2rem;
}

.admin-product-item,
.admin-order-item {
    background: rgba(25, 25, 28, 0.6);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
    backdrop-filter: blur(12px) saturate(110%);
    -webkit-backdrop-filter: blur(12px) saturate(110%);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-product-item:hover,
.admin-order-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.admin-product-info,
.admin-order-info {
    flex: 1;
}

.admin-product-name,
.admin-order-customer {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.admin-product-category,
.admin-order-details {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.admin-product-actions,
.admin-order-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-edit-btn,
.admin-delete-btn,
.admin-status-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
}

.admin-edit-btn {
    background: var(--accent-gold);
    color: var(--bg-primary);
}

.admin-edit-btn:hover {
    background: #b8941f;
}

.admin-delete-btn {
    background: var(--error);
    color: white;
}

.admin-delete-btn:hover {
    background: #d32f2f;
}

.admin-status-btn {
    background: var(--success);
    color: white;
}

.admin-status-btn:hover {
    background: #388e3c;
}


/* Модальные окна: корзина, заказ, вишлист, пароль
 * Часть style.css. Сервер склеивает public/css/*.css по порядку имён,
 * поэтому порядок правил внутри и между файлами менять нельзя. */

/* ===== MODALS ===== */
.password-modal,
.cart-modal,
.order-modal,
.success-modal,
.product-modal,
.wishlist-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
    pointer-events: auto;
}

.password-content,
.cart-content,
.order-content,
.success-content,
.product-content,
.wishlist-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 15px;
    width: 95%;
    max-width: 480px;
    max-height: 85vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    pointer-events: auto;
}

.cart-content,
.product-content,
.wishlist-content {
    max-height: 80vh;
    overflow-y: auto;
}

.product-content {
    max-width: 800px;
}

.success-content {
    text-align: center;
    padding: 3rem 2rem;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--bg-accent);
    padding-bottom: 1rem;
}

.cart-title {
    font-size: 1.5rem;
    color: var(--accent-gold);
}

.close-cart {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-cart:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
}

/* Cart Items */
.cart-items {
    margin-bottom: 2rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--bg-accent);
    transition: var(--transition);
}

.cart-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.item-info h4 {
    margin-bottom: 0.5rem;
}

.item-price {
    color: var(--accent-gold);
    font-weight: bold;
}

.item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background: var(--bg-accent);
    border: none;
    color: var(--text-primary);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-btn:hover {
    background: var(--accent-gold);
    color: var(--bg-primary);
    transform: scale(1.1);
}

.quantity-input {
    width: 50px;
    text-align: center;
    background: var(--bg-primary);
    border: 1px solid var(--bg-accent);
    border-radius: 5px;
    color: var(--text-primary);
    padding: 0.3rem;
}

.remove-item {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    margin-left: 1rem;
    transition: var(--transition);
}

.remove-item:hover {
    transform: scale(1.1);
}

.cart-total {
    text-align: right;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--accent-gold);
    font-weight: bold;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, var(--accent-gold), var(--accent-purple));
    color: var(--bg-primary);
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.checkout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

.checkout-btn:hover::before {
    left: 100%;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

.checkout-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.checkout-btn:disabled::before {
    display: none;
}

/* Кнопка переноса корзины ссылкой. Второстепенная по отношению к оформлению
   заказа, поэтому контурная, а не залитая градиентом. */
.share-cart-btn {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.85rem;
    background: transparent;
    color: var(--accent-gold);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 5px;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.share-cart-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--accent-gold);
}

.share-cart-btn i {
    margin-right: 0.4rem;
}

/* Order Form */
.order-form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    color: var(--text-secondary);
    font-weight: bold;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    padding: 0.8rem;
    background: var(--bg-accent);
    border: 1px solid transparent;
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
    min-height: 44px;
    /* Минимальная высота для удобного касания */
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.form-buttons {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.form-buttons button {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 44px;
    /* Минимальная высота для удобного касания */
    min-width: 120px;
    /* Минимальная ширина для кнопок */
}

.form-buttons button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

.form-buttons button:hover::before {
    left: 100%;
}

.submit-order {
    background: linear-gradient(45deg, var(--accent-gold), var(--accent-purple));
    color: var(--bg-primary);
    position: relative;
    z-index: 10;
}

.submit-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

.cancel-order {
    background: var(--bg-accent);
    color: var(--text-primary);
}

.cancel-order:hover {
    background: #3a3a3a;
}

/* Success Modal */
.success-icon {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 0.8rem;
    animation: bounce 1s ease-out;
}

.success-message {
    font-size: 1rem;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.4;
}

.continue-shopping {
    padding: 0.7rem 1.2rem;
    background: linear-gradient(45deg, var(--accent-gold), var(--accent-purple));
    color: var(--bg-primary);
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 40px;
    width: 100%;
    max-width: 180px;
    margin: 0 auto;
    font-size: 0.9rem;
}

.continue-shopping::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

.continue-shopping:hover::before {
    left: 100%;
}

.continue-shopping:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

/* Мобильные исправления для формы заказа */
@media (max-width: 480px) {
    .order-form {
        gap: 0.6rem;
    }

    .form-group {
        gap: 0.3rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    .form-buttons {
        flex-direction: column;
        gap: 0.6rem;
        margin-top: 0.8rem;
    }

    .form-buttons button {
        min-width: 100%;
        padding: 0.7rem;
        font-size: 0.9rem;
    }

    .success-icon {
        font-size: 2rem;
        margin-bottom: 0.6rem;
    }

    .success-message {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
        padding: 0 0.5rem;
    }

    .continue-shopping {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        min-height: 38px;
        max-width: 160px;
    }
}

/* Исправления для очень маленьких экранов */
@media (max-width: 360px) {

    .form-group input,
    .form-group textarea {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .form-buttons button {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .success-icon {
        font-size: 1.8rem;
    }

    .success-message {
        font-size: 0.85rem;
        margin-bottom: 0.7rem;
    }

    .continue-shopping {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        min-height: 36px;
        max-width: 140px;
    }
}

/* Product Details Modal */
.product-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.product-details-image {
    width: 100%;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
}

.product-details-image:hover {
    transform: scale(1.02);
}

.product-details-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Wishlist Modal */
.wishlist-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.wishlist-item {
    background: var(--bg-accent);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: var(--transition);
}

.wishlist-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.wishlist-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.wishlist-item-info {
    padding: 0.8rem;
}

.wishlist-item-name {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wishlist-item-price {
    color: var(--accent-gold);
    font-weight: bold;
    font-size: 0.9rem;
}

.wishlist-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.wishlist-add-to-cart {
    flex: 1;
    padding: 0.5rem;
    background: var(--accent-gold);
    color: var(--bg-primary);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    transition: var(--transition);
}

.wishlist-add-to-cart:hover {
    background: #b8941f;
    transform: scale(1.05);
}

.remove-wishlist {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(10, 10, 10, 0.7);
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: var(--transition);
}

.remove-wishlist:hover {
    background: var(--error);
    transform: scale(1.1);
}

/* Password Modal */
.password-input {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-accent);
    border: 1px solid transparent;
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 1rem;
    margin: 1rem 0;
    text-align: center;
    transition: var(--transition);
}

.password-input:focus {
    outline: none;
    border-color: var(--accent-gold);
}


/* Уведомления и подвал
 * Часть style.css. Сервер склеивает public/css/*.css по порядку имён,
 * поэтому порядок правил внутри и между файлами менять нельзя. */

/* ===== NOTIFICATION ===== */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--accent-gold);
    color: var(--bg-primary);
    padding: 1rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    transform: translateX(400px);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: var(--success);
}

.notification.error {
    background: var(--error);
}

/* ===== FOOTER ===== */
footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--bg-accent);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-column a:nth-of-type(2) {
    display: block;
}

.footer-column a:hover {
    color: var(--accent-gold);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: var(--transition);
}

.social-link:hover {
    background: var(--accent-gold);
    color: var(--bg-primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--bg-accent);
    color: var(--text-secondary);
}

/* Баннер скидок, спиннер, общие анимации
 * Часть style.css. Сервер склеивает public/css/*.css по порядку имён,
 * поэтому порядок правил внутри и между файлами менять нельзя. */

/* ===== DISCOUNT BANNER ===== */
.discount-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(45deg, var(--accent-purple), var(--accent-gold));
    color: white;
    padding: 0.8rem 1rem;
    /* Уменьшил padding */
    text-align: center;
    font-weight: bold;
    position: relative;
    overflow: hidden;
    z-index: 1500;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .discount-banner {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
        min-height: auto;
    }

    body.has-fixed-banner {
        padding-top: calc(56px + 50px);
    }
}

@media (max-width: 480px) {
    .discount-banner {
        padding: 0.5rem 0.6rem;
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .discount-banner-content {
        padding: 0 5px;
    }
}

.discount-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,0 L100,0 L100,100 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: cover;
}

.discount-banner-content {
    position: relative;
    z-index: 1;
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 4000;
    justify-content: center;
    align-items: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-gold);
    animation: spin 1s linear infinite;
}

/* ===== ANIMATIONS ===== */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

/* ===== ACCESSIBILITY ===== */
a:focus,
button:focus,
input:focus,
select:focus {
    outline: 3px solid rgba(138, 43, 226, 0.18);
    outline-offset: 2px;
}


/* Адаптивность
 * Часть style.css. Сервер склеивает public/css/*.css по порядку имён,
 * поэтому порядок правил внутри и между файлами менять нельзя. */

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Меню было плоским чёрным прямоугольником во всю ширину. Собираем его
       в панель со стеклом, как у остальных всплывающих окон сайта. */
    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 12px;
        right: 12px;
        width: auto;
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        padding: 0.75rem;
        background: rgba(18, 18, 24, 0.82);
        -webkit-backdrop-filter: blur(24px) saturate(160%);
        backdrop-filter: blur(24px) saturate(160%);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 18px;
        box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
    }

    .nav-links.active {
        display: flex;
        animation: menuDrop 0.28s cubic-bezier(0.34, 1.3, 0.64, 1) both;
    }

    @keyframes menuDrop {
        from {
            opacity: 0;
            transform: translateY(-10px) scale(0.98);
        }
        to {
            opacity: 1;
            transform: none;
        }
    }

    .nav-links li {
        width: 100%;
    }

    /* 44px — размер, в который палец попадает без прицеливания. */
    .nav-links a {
        display: block;
        padding: 0.85rem 1rem;
        border-radius: 12px;
        font-size: 1.05rem;
        min-height: 44px;
    }

    .nav-links a:hover,
    .nav-links a:active {
        background: rgba(212, 175, 55, 0.12);
        color: var(--accent-gold);
        transform: none;
        box-shadow: none;
    }

    /* Подчёркивание рассчитано на наведение мышью, на тач-экране оно только
       мигает при касании. */
    .nav-links a::after {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .mobile-menu-btn.open {
        background: rgba(212, 175, 55, 0.14);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .item-quantity {
        align-self: flex-end;
    }

    /* Двенадцать категорий в столбик занимали 673px и уводили каталог за
       нижний край экрана. Кладём их в одну прокручиваемую строку — каталог
       виден сразу, а до любой категории один жест. */
    .category-filters {
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        overflow-x: auto;
        gap: 0.5rem;
        padding: 12px 16px;
        margin-left: -16px;
        margin-right: -16px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .category-filters::-webkit-scrollbar {
        display: none;
    }

    .category-btn {
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: 0.6rem 1.1rem;
        font-size: 0.9rem;
    }

    .products-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-sort-container {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .product-card-buttons {
        flex-direction: column;
    }

    .admin-tabs {
        flex-direction: column;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-bar {
        flex-wrap: wrap;
        align-items: center;
    }

    header.wrap .nav-links {
        flex-basis: 100%;
        order: 3;
        padding-top: 8px;
    }
}

@media (max-width: 640px) {
    .discount-banner {
        padding: 10px;
    }

    header {
        top: 48px;
    }

    body.has-fixed-banner {
        padding-top: calc(48px + 64px);
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .footer-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 1rem;
    }

    .nav-actions {
        gap: 8px;
    }

    .product-media {
        height: 180px;
    }

    .hero-inner {
        padding: 18px;
    }

    .section-title.collapsible {
        font-size: 1rem;
        padding: 8px 12px;
    }

    .collapsible-content {
        padding: 0 6px;
    }
}

@media (min-width: 980px) {
    .nav-links {
        display: flex;
    }

    .mobile-menu-btn {
        display: none;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero {
        min-height: 72vh;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* Статические страницы и модалка копирайта
 * Часть style.css. Сервер склеивает public/css/*.css по порядку имён,
 * поэтому порядок правил внутри и между файлами менять нельзя. */

/* ===== Page Layout ===== */
.page-header {
    text-align: center;
    padding: 60px 20px 20px;
    animation: fadeInDown 1s ease;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 500;
    color: #3b2d1f;
    margin-top: 10px;
}

.back-button {
    position: absolute;
    left: 20px;
    top: 20px;
    text-decoration: none;
    color: #a38b6f;
    font-weight: 500;
    transition: color 0.3s;
}

.back-button:hover {
    color: #7e674f;
}

.page-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    line-height: 1.7;
    color: #2e2e2e;
    animation: fadeInUp 1s ease;
}

.page-content ul {
    padding-left: 20px;
}

.page-footer {
    text-align: center;
    padding: 40px 0 20px;
    color: #b6a68d;
    font-size: 0.9rem;
}

.faq-item {
    margin-bottom: 20px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn.open {
        color: var(--accent-gold);
        transform: rotate(90deg);
    }

    .mobile-menu-btn.open i::before {
        content: "\f00d";
        /* Иконка крестика */
    }
}

/* Success Modal Buttons */
.success-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.success-modal .telegram-button {
    flex: 1;
    min-width: 140px;
    max-width: 180px;
    padding: 0.8rem 1.2rem;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #0088cc, #00acee);
    border: 1px solid transparent;
    text-align: center;
}

.success-modal .continue-shopping {
    flex: 1;
    min-width: 140px;
    max-width: 180px;
    padding: 0.8rem 1.2rem;
    background: linear-gradient(45deg, var(--accent-gold), var(--accent-purple));
    color: var(--bg-primary);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
}

.success-modal .continue-shopping::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

.success-modal .continue-shopping:hover::before {
    left: 100%;
}

.success-modal .continue-shopping:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .success-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }

    .success-modal .telegram-button,
    .success-modal .continue-shopping {
        min-width: 200px;
        max-width: 250px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .success-buttons {
        gap: 0.6rem;
    }

    .success-modal .telegram-button,
    .success-modal .continue-shopping {
        min-width: 180px;
        max-width: 220px;
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .success-buttons {
        flex-direction: column;
        gap: 0.8rem;
    }

    .success-modal .telegram-button,
    .success-modal .continue-shopping {
        min-width: 200px;
        max-width: 250px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .success-buttons {
        gap: 0.6rem;
    }

    .success-modal .telegram-button,
    .success-modal .continue-shopping {
        min-width: 180px;
        max-width: 220px;
        padding: 0.7rem 1rem;
        font-size: 0.85rem;
    }
}

/* ===== COPYRIGHT MODAL - GLASS EFFECT ===== */
.copyright-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 4000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.copyright-modal.active {
    display: flex;
}

.copyright-content {
    background: rgba(20, 20, 28, 0.25);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    padding: 2.5rem;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.35s ease-out forwards;
    position: relative;
}

.copyright-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(212, 175, 55, 0.15) 0%,
            rgba(138, 43, 226, 0.08) 100%);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.4;
}

/* Заголовок и крестик */
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.modal-header h2 {
    font-size: 1.3rem;
    color: var(--accent-gold);
    margin: 0;
    line-height: 1;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.6rem;
    cursor: pointer;
    transition: var(--transition);
    margin: 0;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: var(--accent-gold);
    transform: scale(1.15);
    text-shadow: 0 0 8px var(--accent-gold);
}

/* Текст */
.copyright-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    text-align: center;
    margin-top: 1rem;
}

/* Ховер по копирайту в футере */
.copyright:hover {
    color: var(--accent-gold);
    cursor: pointer;
    transition: var(--transition);
}

/* Анимации */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.features-grid,
.products-grid {
    position: relative;
    z-index: 1;
}

.hero {
    position: relative;
    z-index: 1;
}


/* Фон со звёздами и свечение
 * Часть style.css. Сервер склеивает public/css/*.css по порядку имён,
 * поэтому порядок правил внутри и между файлами менять нельзя. */

/* ===== STARFIELD BACKGROUND ===== */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle linear infinite;
}

.star.small {
    width: 1px;
    height: 1px;
    opacity: 0.3;
}

.star.medium {
    width: 2px;
    height: 2px;
    opacity: 0.5;
}

.star.large {
    width: 3px;
    height: 3px;
    opacity: 0.7;
}

.star.shooting {
    width: 2px;
    height: 2px;
    background: linear-gradient(45deg, transparent, var(--accent-gold), transparent);
    border-radius: 0;
    animation: shooting 3s ease-in infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

@keyframes shooting {
    0% {
        transform: translateX(-100px) translateY(-100px) rotate(45deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        transform: translateX(100vw) translateY(100vh) rotate(45deg);
        opacity: 0;
    }
}

/* ===== ENHANCED GLOW EFFECTS ===== */
.glow-star {
    position: absolute;
    border-radius: 50%;
    filter: blur(5px);
    animation: pulse 4s ease-in-out infinite;
}

.glow-star.gold {
    background: radial-gradient(circle, var(--accent-gold), transparent);
    box-shadow: 0 0 20px var(--accent-gold);
}

.glow-star.purple {
    background: radial-gradient(circle, var(--accent-purple), transparent);
    box-shadow: 0 0 20px var(--accent-purple);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

.error-message {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    min-height: 1rem;
}

.form-group input:invalid,
.form-group textarea:invalid {
    border-color: #ff6b6b;
}

.form-group input:valid,
.form-group textarea:valid {
    border-color: #51cf66;
}

.product-image img {
    transition: opacity 0.3s ease, filter 0.3s ease;
    opacity: 0.8;
}

.product-image img.loaded {
    opacity: 1;
}

.product-image img.loading {
    filter: blur(5px);
}

.product-image img.error {
    filter: grayscale(1);
}

@font-face {
    font-family: 'Font Awesome 5 Free';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    /* ключевой момент */
    src: url('/fonts/fa-solid-900.woff2') format('woff2');
}

@font-face {
    font-family: 'Font Awesome 5 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/fa-brands-400.woff2') format('woff2');
}

.social-lux-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* На мобильных высота будет авто, чтобы кнопки влезали */
    min-height: 56px;
    z-index: 1300;

    /* 🔥 ВОЗВРАЩАЕМ ЦВЕТ САЙТА (ТЕМНЫЙ С ОТТЕНКОМ) */
    background: rgba(10, 10, 15, 0.85);
    /* Темнее, как в хедере */
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);

    /* Золотая полоска снизу, как везде на сайте */
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);

    /* Анимация исчезновения */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    will-change: transform;
    transform: translateY(0);
    opacity: 1;
}

/* Красивое свечение сверху (Золото + Фиолетовый) */
.social-lux-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            rgba(212, 175, 55, 0.15) 0%,
            /* Gold */
            rgba(138, 43, 226, 0.15) 100%
            /* Purple */
        );
    pointer-events: none;
    z-index: -1;
}

.social-lux-banner.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.social-lux-inner {
    max-width: 1300px;
    height: 100%;
    margin: 0 auto;
    padding: 8px 20px;
    /* Добавил отступы сверху/снизу */

    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Текст "Мы в соцсетях" */
.social-lux-text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--accent-gold);
    /* Золотой цвет текста */
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.social-lux-links {
    display: flex;
    gap: 10px;
    align-items: center;
}


/* Блок соцсетей
 * Часть style.css. Сервер склеивает public/css/*.css по порядку имён,
 * поэтому порядок правил внутри и между файлами менять нельзя. */

/* ===== СТИЛИ КНОПОК ===== */
.social-lux-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 50px;

    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;

    /* Прозрачный фон с тонкой рамкой */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);

    transition: all 0.3s ease;
    white-space: nowrap;
}

.lux-icon {
    font-size: 14px;
}

/* Эффекты при наведении */
.social-lux-link:hover {
    transform: translateY(-2px);
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
    background: rgba(212, 175, 55, 0.1);
}

/* Цвета брендов (легкие акценты) */
.social-lux-link.tiktok:hover {
    color: #00f2ea;
    border-color: #00f2ea;
}

.social-lux-link.instagram:hover {
    color: #fd1d1d;
    border-color: #fd1d1d;
}

.social-lux-link.facebook:hover {
    color: #1877f2;
    border-color: #1877f2;
}

/* ========================================= */
/* 📱 МОБИЛЬНАЯ ВЕРСИЯ (ИСПРАВЛЕНА)          */
/* ========================================= */

@media (max-width: 768px) {

    /* Скрываем текст "Мы в соцсетях" */
    .social-lux-text {
        display: none;
    }

    .social-lux-inner {
        padding: 8px 10px;
        justify-content: center;
        width: 100%;
    }

    .social-lux-links {
        width: 100%;

        /* 🔥 ИСПРАВЛЕНИЕ: Центрируем и переносим, если не влезает */
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        /* Расстояние между кнопками */
    }

    .social-lux-link {
        /* Делаем кнопки чуть компактнее, но заметнее */
        padding: 6px 14px;
        font-size: 12px;
        background: rgba(20, 20, 25, 0.8);
        /* Более темный фон для контраста */
        border-color: rgba(212, 175, 55, 0.2);
        /* Легкая золотая рамка */
        flex: 0 1 auto;
        /* Чтобы не растягивались слишком сильно */
    }

    /* Специально для Facebook и других - чтобы точно влезали */
    .social-lux-link span:not(.lux-icon) {
        display: inline-block;
    }
}

/* Для очень маленьких экранов (iPhone 5/SE) */
@media (max-width: 360px) {
    .social-lux-link {
        padding: 5px 10px;
        font-size: 11px;
    }

    .lux-icon {
        display: none;
        /* Убираем иконки, оставляем только текст, если совсем мало места */
    }
}

.social-links-grid {
    display: grid;
    /* На ПК: автоматически заполняет по ширине */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px 15px;
    /* Отступы между карточками */
    width: 100%;
    margin-top: 15px;
}

/* Карточка (Заголовок + Кнопка) */
.social-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

/* ===== ЗАГОЛОВОК КАРТОЧКИ ===== */
.social-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
    color: var(--accent-gold);
    /* Золотой цвет сайта */
    margin-left: 5px;
    opacity: 0.9;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* ===== КНОПКА (ПИЛЮЛЯ) ===== */
.social-pill {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 8px 12px 8px 8px;
    /* Слева отступ меньше под аватар */
    height: 54px;
    /* Фиксированная высота для ровности */

    background: rgba(20, 20, 25, 0.4);
    /* Темный фон */
    backdrop-filter: blur(10px);
    /* Эффект стекла */
    -webkit-backdrop-filter: blur(10px);

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    /* Чуть более квадратные углы, как на скриншоте */

    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

/* Стеклянный блик */
.social-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    opacity: 0.5;
}

/* Аватарка */
.social-pill img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(212, 175, 55, 0.2);
    /* Золотая обводка */
    flex-shrink: 0;
}

/* Иконка (если нет фото) */
.social-icon,
.fallback-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* Текст */
.social-pill span {
    font-size: 13px;
    font-weight: 600;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== HOVER (НАВЕДЕНИЕ) ===== */
.social-pill:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-gold);
    /* Золотая рамка при наведении */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.social-pill:hover span {
    color: var(--accent-gold);
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ (FIX СМЕЩЕНИЯ) ===== */
@media (max-width: 600px) {
    .social-links-grid {
        grid-template-columns: 1fr 1fr;
        /* Две колонки */
        gap: 12px;
    }

    .social-card:last-child {
        grid-column: span 2;
    }

    .social-pill {
        height: 48px;
        /* Чуть компактнее на телефоне */
    }

    .social-pill span {
        font-size: 12px;
    }
}

@media (max-width: 768px) {

    /* Отключаем тяжелое размытие на мобильных */
    .glass-glow,
    .product-card,
    .feature-card,
    .hero-content,
    header,
    .social-lux-banner,
    .gallery-description,
    .product-info {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        /* Делаем фон чуть плотнее, раз нет размытия */
        background: rgba(20, 20, 25, 0.95) !important;
    }

    /* Упрощаем тени на мобильных (они тоже грузят скролл) */
    .product-card:hover,
    .feature-card:hover {
        transform: none !important;
        /* Отключаем скачки при скролле пальцем */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
    }
}

.product-image {
    position: relative;
    background-color: #0f0f11;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;

    /* 🔥 ГЛАВНОЕ ИСПРАВЛЕНИЕ: Задаем высоту, чтобы анимация не схлопывалась */
    min-height: 250px;
    height: 250px;
    /* Фиксируем высоту для сетки */
}

/* Мерцающая надпись */
.product-image::before {
    content: "e-Teria 🏛";
    position: absolute;
    z-index: 0;

    font-family: 'Segoe UI', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;

    /* Градиент */
    background: linear-gradient(90deg,
            #333333 0%,
            #d4af37 40%,
            #8a2be2 60%,
            #333333 100%);
    background-size: 200% auto;

    /* 🔥 Поддержка iPhone/Safari */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    /* Фолбек */

    animation: shine-text 2s linear infinite;
    will-change: background-position;
    /* Оптимизация для телефонов */
}

@keyframes shine-text {
    to {
        background-position: 200% center;
    }
}

.product-image img {
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image img.loaded {
    opacity: 1;
}

.checkout-page {
    padding: 140px 0 80px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2.5rem;
    margin-top: 2rem;
    align-items: start;
}

/* Одинаковый Glass-эффект для обеих панелей */
.checkout-form-container,
.checkout-summary {
    background: rgba(20, 20, 28, 0.25) !important;
    backdrop-filter: blur(40px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 20px !important;
    padding: 2.5rem;
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
}

.checkout-form-container h2,
.checkout-summary h2 {
    color: var(--accent-gold);
    margin-bottom: 2rem;
    font-size: 1.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}


/* Страница оформления заказа
 * Часть style.css. Сервер склеивает public/css/*.css по порядку имён,
 * поэтому порядок правил внутри и между файлами менять нельзя. */

/* Список товаров в чекауте */
.checkout-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Кастомный скроллбар */
.checkout-items-list::-webkit-scrollbar {
    width: 6px;
}

.checkout-items-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.checkout-items-list::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 10px;
}

.checkout-summary-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.checkout-summary-item:hover {
    transform: translateX(5px);
    border-color: rgba(212, 175, 55, 0.3);
}

.checkout-summary-image {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    margin-right: 1.2rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.checkout-item-details {
    flex-grow: 1;
}

.checkout-item-details h4 {
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(212, 175, 55, 0.3);
}

.checkout-total-row span:last-child {
    color: var(--accent-gold);
    font-size: 1.8rem;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* Кнопка оформления */
.checkout-submit-btn {
    width: 100%;
    margin-top: 2rem;
    padding: 1.2rem !important;
    font-size: 1.2rem !important;
    background: linear-gradient(45deg, var(--accent-gold), var(--accent-purple)) !important;
    box-shadow: 0 10px 25px rgba(138, 43, 226, 0.3) !important;
}

.checkout-submit-btn:hover {
    box-shadow: 0 15px 35px rgba(212, 175, 55, 0.4) !important;
    transform: translateY(-3px) !important;
}

/* Адаптивность для мобильных */
@media (max-width: 992px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* На мобильных корзина должна быть сверху, а форма снизу */
    .checkout-summary {
        order: -1;
    }
}

@media (max-width: 576px) {

    .checkout-form-container,
    .checkout-summary {
        padding: 1.5rem;
    }

    .checkout-total-row {
        font-size: 1.2rem;
    }

    .checkout-total-row span:last-child {
        font-size: 1.4rem;
    }

    .checkout-summary-image {
        width: 55px;
        height: 55px;
    }
}

.checkout-form-container input,
.checkout-form-container textarea {
    /* 16px - критично важливо для iOS, щоб екран не зумився при кліку! */
    font-size: 16px !important;
    padding: 1rem 1.2rem;
    background: rgba(15, 15, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    width: 100%;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    /* Прибирає стандартні стилі кнопок/інпутів на iOS */
    appearance: none;
    box-sizing: border-box;
}

.checkout-form-container input:focus,
.checkout-form-container textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(25, 25, 30, 0.9);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.checkout-form-container label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 500;
}

/* Прибираємо стрілочки у поля з типом number/tel, якщо вони з'являться */
.checkout-form-container input[type="number"]::-webkit-inner-spin-button,
.checkout-form-container input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.checkout-form-container input:not([type="checkbox"]),
.checkout-form-container textarea {
    font-size: 16px !important;
    /* 16px критично для iOS, щоб не зумило */
    padding: 1rem 1.2rem;
    background: rgba(15, 15, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    width: 100%;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.checkout-form-container input:not([type="checkbox"]):focus,
.checkout-form-container textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(25, 25, 30, 0.9);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.checkout-form-container label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
    font-weight: 500;
}

.checkout-form-container input[type="number"]::-webkit-inner-spin-button,
.checkout-form-container input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ========================================= */
/* КАСТОМНИЙ АНІМОВАНИЙ ЧЕКБОКС ЗГОДИ        */
/* ========================================= */

.custom-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    position: relative;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Ховаємо оригінальний інпут */
.custom-checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Наш красивий квадратик */
.custom-checkbox {
    position: relative;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(15, 15, 20, 0.6);
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

/* SVG Галочка */
.custom-checkbox svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: var(--bg-primary);
    /* Темний колір галочки на золотому фоні */
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    /* Налаштування для анімації малювання */
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    transition: stroke-dashoffset 0.4s cubic-bezier(0.65, 0, 0.45, 1);
}

/* Стан: Checked (Натиснуто) */
.custom-checkbox-wrapper input:checked~.custom-checkbox {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    transform: scale(1.05);
    /* Злегка збільшується при кліку */
}

/* Анімація появи галочки */
.custom-checkbox-wrapper input:checked~.custom-checkbox svg {
    stroke-dashoffset: 0;
}

.checkbox-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-primary);
}

.checkbox-text a {
    color: var(--accent-gold);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.checkbox-text a:hover {
    color: #fff;
}

/* Прилипання (Sticky) кошика на комп'ютерах */
@media (min-width: 992px) {
    .checkout-summary {
        position: sticky;
        top: 100px;
        /* Відступ від шапки */
        align-self: flex-start;
    }
}

.edit-cart-link:hover {
    background: rgba(212, 175, 55, 0.2) !important;
    transform: translateY(-2px);
}

.checkout-form-container input.input-error,
.checkout-form-container textarea.input-error {
    border-color: #ff4d4d !important;
    background: rgba(255, 77, 77, 0.05) !important;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.2) !important;
}

/* Анімація трясучки та червоне свічення для чекбокса */
.custom-checkbox.checkbox-error {
    border-color: #ff4d4d !important;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.4) !important;
    animation: shake-error 0.4s ease-in-out;
}

@keyframes shake-error {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }
}

/* ========================================= */
/* СТИЛІ РЕДАГУВАННЯ КОШИКА (CHECKOUT)       */
/* ========================================= */

.checkout-qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.checkout-qty-controls span {
    font-size: 0.95rem;
    font-weight: bold;
    color: white;
    min-width: 20px;
    text-align: center;
}

.checkout-qty-controls button {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
    padding: 0;
}

.checkout-qty-controls button:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--bg-primary);
    transform: translateY(-2px);
}

.checkout-qty-controls button:active {
    transform: translateY(0);
}

.checkout-remove-btn {
    background: rgba(255, 77, 77, 0.1) !important;
    border-color: rgba(255, 77, 77, 0.25) !important;
    color: #ff4d4d !important;
    margin-left: 5px;
}

.checkout-remove-btn:hover {
    background: #ff4d4d !important;
    color: white !important;
    border-color: #ff4d4d !important;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.4);
}

/* Карточка ведёт на страницу товара, но обернуть её в <a> целиком нельзя:
   внутри лежат кнопки, а интерактивные элементы внутри ссылки — невалидная
   разметка, которая ломает порядок обхода с клавиатуры и чтение скринридером.
   Поэтому ссылка одна, в заголовке (её текст и видят поисковики), а на всю
   карточку она растягивается псевдоэлементом. */
.product-card {
    cursor: pointer;
}

.product-card-link {
    color: inherit;
    text-decoration: none;
}

.product-card-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.product-card-link:hover,
.product-card-link:focus-visible {
    color: var(--accent-gold);
}

/* Кнопки остаются кликабельными поверх растянутой ссылки. */
.product-card .product-actions,
.product-card .product-card-buttons {
    z-index: 2;
}

.product-card .product-card-buttons {
    position: relative;
}


/* Поведение на сенсорных экранах
 *
 * У телефона нет наведения, но браузер всё равно применяет :hover при касании
 * и держит это состояние до следующего тапа. Эффекты наведения, которые
 * сдвигают элемент, уводят кнопку из-под пальца прямо в момент нажатия, и оно
 * не засчитывается — приходится жать второй раз.
 *
 * Правил со сдвигом в проекте больше сорока, и перечислять их поимённо значит
 * обречь список на отставание: любая новая кнопка снова начнёт убегать.
 * Поэтому целимся по типам элементов — ссылки, кнопки и карточки покрывают всё,
 * до чего покупатель дотрагивается.
 *
 * Файл идёт последним по имени, поэтому перекрывает правила выше. На мыши всё
 * остаётся как было: блок целиком под @media (hover: none).
 */

@media (hover: none) {

    /* Ничто не должно уезжать из-под пальца в момент касания.
       !important — потому что у .feature-card:hover он уже стоит выше. */
    a:hover,
    button:hover,
    [onclick]:hover,
    .product-card:hover,
    .product-card:hover *,
    .feature-card:hover,
    .feature-card:hover *,
    .stat:hover,
    .wishlist-item:hover,
    .image-preview:hover,
    .product-details-image:hover,
    .checkout-summary-item:hover,
    .admin-order-item:hover,
    .admin-product-item:hover,
    .section-title.collapsible:hover {
        transform: none !important;
    }

    /* Кнопка «в обране» лежит поверх фото товара и проявлялась только при
       наведении — на телефоне её не было видно вовсе. */
    .product-actions {
        opacity: 1;
        transform: none;
    }

    /* Подчёркивание под пунктами меню рассчитано на курсор: на тач-экране оно
       залипает после касания. */
    .nav-links a::after {
        display: none;
    }
}

/* Двойной тап масштабирует страницу, поэтому браузер ждёт, не будет ли второго
   касания, и только потом отправляет click. manipulation убирает это ожидание.
   Это правильный способ: раньше ту же задачу пытались решить отменой touchend,
   а она отменяла и сам клик — см. комментарий в public/js/07-events.js. */
button,
a,
label,
select,
summary,
input[type="submit"],
input[type="button"],
input[type="checkbox"],
input[type="radio"] {
    touch-action: manipulation;
}
