/* =========================================
   1. THEME VARIABLES & RESET
   ========================================= */
:root {
    /* Dark Mode (Default) */
    --bg-color: #000000;
    --card-bg: #111111;
    --card-bg-header: #1a1a1a;
    --text-color: #ffffff;
    --text-muted: #888888;
    --accent-color: #ff9800;
    --accent-rgb: 255, 152, 0;
    --border-color: #222222;
    --top-bar-bg: #0a0a0a;
    --header-bg: #000000;
    --footer-bg: #050505;
    --transition-speed: 0.3s;
    --slider-track: #333333;
    --slider-knob: #ffffff;
    --input-bg: #111111;
    --modal-bg: #111111;
}

html.light-mode,
body.light-mode {
    --bg-color: #ffffff !important;
    --card-bg: #ffffff !important;
    --card-bg-header: #f8f8f8 !important;
    --text-color: #111111 !important;
    --text-muted: #666666 !important;
    --accent-color: #2ecc71 !important;
    --accent-rgb: 46, 204, 113 !important;
    --border-color: #e8e8e8 !important;
    --top-bar-bg: #f5f5f5 !important;
    --header-bg: #ffffff !important;
    --footer-bg: #f9f9f9 !important;
    --slider-track: #e0e0e0 !important;
    --slider-knob: #ffffff !important;
    --input-bg: #fcfcfc !important;
    --modal-bg: #ffffff !important;
}

.rich-text-content .accent-text,
.rich-text-content strong,
.rich-text-content b {
    color: var(--accent-color);
}

.accent-text {
    color: var(--accent-color) !important;
}

html,
body {
    min-height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    overflow-x: hidden;
    background-color: var(--bg-color) !important;
}

.site-wrapper {
    width: 100%;
    position: relative;
    min-height: 100vh;
}

.page-content-wrapper {
    width: 100%;
    position: relative;
}

footer,
.main-footer {
    flex-shrink: 0 !important;
    margin-top: auto !important;
    z-index: 100 !important;
    position: relative !important;
    background: var(--footer-bg) !important;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

/* Custom Scrollbar for Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color) !important;
}

::-webkit-scrollbar-thumb {
    background: #444 !important;
    border-radius: 6px;
    border: 2px solid var(--bg-color) !important;
    /* Creates padding effect */
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color) !important;
}

/* Firefox standard */
html {
    scrollbar-width: thin;
    scrollbar-color: #444 var(--bg-color) !important;
}

/* =========================================
   NAVIGATION ACTIVE INDICATOR
   ========================================= */
nav.main-nav .nav-link {
    position: relative !important;
    display: inline-block !important;
    padding-bottom: 5px !important;
    transition: color 0.3s ease !important;
}

nav.main-nav .nav-link:hover {
    color: var(--accent-color) !important;
}

nav.main-nav .nav-link.active::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 3px !important;
    background: var(--accent-color) !important;
    border-radius: 3px 3px 0 0 !important;
    display: block;
}

/* =========================================
   FOOTER HOVER EFFECTS
   ========================================= */
.footer-col a {
    color: #777;
    transition: all 0.3s ease;
}

.footer-col a:hover {
    color: var(--accent-color) !important;
    transform: translateX(5px);
}

.social-links-circle a {
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.social-links-circle a:hover {
    border-color: var(--accent-color) !important;
    color: var(--bg-color) !important;
    background: var(--accent-color) !important;
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 5px 15px rgba(var(--accent-rgb), 0.4);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
}

body.theme-settled {
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Fix for invisible dropdown options in some browsers/dark mode */
select option {
    background-color: var(--card-bg);
    color: var(--text-color);
}

main {
    flex: 1;
    padding-bottom: 50px;
}

.wide-wrapper {
    width: 100%;
    max-width: 2560px;
    margin: 0 auto;
    padding: 0 5%;
    box-sizing: border-box;
}

/* Account Dashboard Specific Styles - COMPACT MODE */
.steam-level-container {
    background: var(--card-bg-header);
    padding: 15px;
    /* Reduced from 20px */
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    /* Reduced from 15px */
    transition: background var(--transition-speed), border-color var(--transition-speed);
}

.level-badge {
    min-width: 40px;
    /* Reduced from 50px */
    height: 40px;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-weight: 800;
    font-size: 14px;
}

.xp-bar-bg {
    height: 6px;
    /* Reduced from 8px */
    background: var(--bg-color);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: background var(--transition-speed), border-color var(--transition-speed);
}

.xp-bar-fill {
    height: 100%;
    background: var(--accent-color);
}

.mini-card,
.stat-card {
    cursor: pointer;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 15px 15px;
    /* Reduced from 25px 20px */
    border-radius: 12px;
    /* Reduced radius */
    display: flex;
    align-items: center;
    gap: 10px;
    /* Reduced gap */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    min-height: 60px;
    /* Ensure consistent height */
}

.mini-card::before,
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.05) 0%, transparent 100%);
    pointer-events: none;
}

.mini-card:hover,
.stat-card:hover {
    border-color: var(--accent-color) !important;
    transform: translateY(-2px);
    /* Subtle lift */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15), 0 0 10px rgba(var(--accent-rgb), 0.1);
}

.mini-card i,
.stat-card i {
    font-size: 20px;
    /* Reduced from 24px */
    width: 36px;
    /* Reduced from 50px */
    height: 36px;
    background: rgba(var(--accent-rgb), 0.1);
    border-radius: 8px;
    /* Reduced radius */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Reusable Account Components */
.account-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: background var(--transition-speed), border-color var(--transition-speed);
}

.account-input,
.form-input,
.form-control,
.form-control-premium {
    width: 100%;
    background: var(--input-bg) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-color) !important;
    padding: 12px 18px;
    border-radius: 12px;
    box-sizing: border-box;
    font-size: 14px;
    transition: all 0.2s ease;
}

.account-input:focus,
.form-input:focus,
.form-control:focus {
    border-color: var(--accent-color) !important;
    outline: none;
    box-shadow: 0 0 10px rgba(var(--accent-rgb, 255, 152, 0), 0.1);
}

.account-input-label {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.account-btn-primary {
    background: var(--accent-color);
    color: var(--bg-color);
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    transition: opacity 0.2s, transform 0.2s;
}

.account-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.account-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.account-btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.account-btn-secondary:hover {
    background: var(--card-bg-header);
    border-color: var(--accent-color);
}



/* Account Layout */
.account-layout {
    display: flex;
    gap: 20px;
    /* Compact gap */
    margin-top: 20px;
    align-items: flex-start;
}

.content-area {
    flex: 1;
    min-width: 0;
}

/* Sidebar Styles */
.sidebar-card {
    width: 260px;
    flex-shrink: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 25px 20px;
    /* Reduced vertical padding */
    border-radius: 20px;
    transition: background var(--transition-speed), border-color var(--transition-speed);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar-nav .nav-item i {
    width: 24px;
    font-size: 18px;
    text-align: center;
    transition: 0.3s;
    color: var(--text-muted);
    position: relative;
    z-index: 5;
    background: transparent !important;
}

.sidebar-nav .nav-item:hover {
    background: var(--card-bg-header);
    color: var(--text-color);
}

.sidebar-nav .nav-item.active {
    background: rgba(var(--accent-rgb, 255, 152, 0), 0.12) !important;
    color: var(--accent-color) !important;
    font-weight: 700;
    border-left: 4px solid var(--accent-color);
    border-radius: 0 12px 12px 0;
}

.sidebar-nav .nav-item.active i {
    color: inherit !important;
    transform: scale(1.1);
    background: transparent !important;
}

.sidebar-divider {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Order Tab Styles */
.order-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, border-color 0.3s, background var(--transition-speed);
}

.order-card:hover {
    border-color: var(--accent-color) !important;
    transform: translateX(5px);
}

.order-thumb {
    width: 80px;
    height: 80px;
    background: var(--bg-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    transition: background var(--transition-speed), border-color var(--transition-speed);
}

.order-btn {
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.view-btn {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.view-btn:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

.invoice-btn {
    background: var(--card-bg-header);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.invoice-btn:hover {
    border-color: var(--text-muted);
    color: var(--text-color);
}

/* =========================================
   2. ВЕРХНЯЯ ПАНЕЛЬ (TOP BAR)
   ========================================= */
.top-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center;
    padding: 8px 30px;
    background: var(--top-bar-bg);
    color: var(--text-color);
    font-size: 14px;
    width: 100vw;
    max-width: 100vw;
    box-sizing: border-box;
    margin: 0;
    transition: background var(--transition-speed);
}

/* Premium Theme Toggle Styles (High-End Slider) */
.premium-theme-container {
    display: flex;
    align-items: center;
    margin-right: 15px;
}

.theme-toggle-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 66px;
    height: 34px;
    cursor: pointer;
}

.theme-toggle-wrapper input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
    pointer-events: none;
}

.theme-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--card-bg-header);
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
    border: 2px solid var(--accent-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.theme-toggle-knob {
    position: absolute;
    height: 26px;
    width: 26px;
    left: 2px;
    top: 2px;
    background-color: var(--accent-color);
    transition: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-radius: 50%;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-color);
}

input:checked+.theme-toggle-slider .theme-toggle-knob {
    transform: translateX(32px);
}

.moon-icon,
.sun-icon {
    font-size: 12px;
    position: absolute;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icons inside the knob */
input:checked+.theme-toggle-slider .moon-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

input:not(:checked)+.theme-toggle-slider .sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

input:checked+.theme-toggle-slider .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

input:not(:checked)+.theme-toggle-slider .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

input:not(:checked)+.theme-toggle-slider .moon-icon {
    opacity: 1;
    transform: scale(1);
}


.top-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-menu a {
    color: #ccc;
    white-space: nowrap;
    transition: 0.2s;
}

.top-menu a:hover {
    color: var(--accent-color);
}

.top-menu-nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

.top-menu-nav a {
    margin-right: 15px;
}

.top-menu-nav a:last-child {
    margin-right: 0;
}

/* ПРОФИЛЬ И ВЫПАДАЮЩЕЕ МЕНЮ (Полная версия) */
.user-dropdown-container {
    position: relative;
    display: flex;
    align-items: center;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 14px;
    padding: 2px 0;
}

.user-avatar-mini {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-mini img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--accent-color);
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 180px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    z-index: 2000;
    margin-top: 12px;
    overflow: hidden;
    transition: background var(--transition-speed), border-color var(--transition-speed);
}

.user-dropdown-menu.active {
    display: block;
    animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-dropdown-menu a {
    display: flex !important;
    align-items: center;
    padding: 14px 22px !important;
    margin: 0 !important;
    color: var(--text-color) !important;
    font-size: 14px !important;
    gap: 12px;
    transition: 0.2s;
}

.user-dropdown-menu a i {
    width: 18px;
    text-align: center;
    font-size: 16px;
}

.user-dropdown-menu a:hover {
    background: var(--card-bg-header) !important;
    color: var(--accent-color) !important;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.logout-btn-red {
    color: #ff5252 !important;
    font-weight: 600;
}

.logout-btn-red i {
    color: #ff5252;
}

.logout-btn-red:hover {
    background: rgba(255, 82, 82, 0.1) !important;
}

/* =========================================
   3. ОСНОВНОЙ ХЕДЕР И ПОИСК
   ========================================= */
header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1000;
    transition: background var(--transition-speed), border-color var(--transition-speed);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    padding: 15px 30px;
    box-sizing: border-box;
}

.logo-box {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.main-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-container:hover .logo-box {
    transform: scale(1.05);
}

.main-nav {
    display: flex;
    gap: 30px;
    align-items: center;
    position: static !important;
    transform: none !important;
    left: auto !important;
}

.main-nav .nav-item {
    color: var(--text-muted);
    font-size: 16px;
    position: relative;
    transition: 0.2s;
}

.main-nav .nav-item.active {
    color: var(--text-color);
}

.main-nav .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-box {
    background: var(--card-bg-header);
    padding: 5px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    transition: background var(--transition-speed);
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-color);
    outline: none;
    margin-left: 5px;
    width: 120px;
}

/* КОРЗИНА (Полная логика с выпадающим списком) */
.cart-icon-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
}

#cartCount {
    position: absolute;
    top: -8px;
    left: 12px;
    background: #ff4757;
    color: var(--text-color);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--bg-color);
    font-weight: bold;
    z-index: 10;
}

.cart-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    z-index: 1000;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: background var(--transition-speed), border-color var(--transition-speed);
}

.cart-icon-wrapper:hover .cart-dropdown {
    display: block;
}

/* =========================================
   4. КАРТОЧКИ ТОВАРОВ И СЕТКА
   ========================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
    width: 100%;
    box-sizing: border-box;
}

/* Homepage Specific Layout: 2 Large Top, 3 Small Bottom */
.home-product-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    /* 6 columns for easy division */
    gap: 20px;
    position: relative;
    z-index: 2;
    /* Ensure it stays above slider if overlap occurs */
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

/* First 2 items: 50% width (span 3 of 6) */
.home-product-grid .product-card:nth-child(1),
.home-product-grid .product-card:nth-child(2) {
    grid-column: span 3;
}

/* Specific styling for the top 2 "Banner" cards */
.home-product-grid .product-card:nth-child(1) .card-img-container,
.home-product-grid .product-card:nth-child(2) .card-img-container {
    padding-top: 42%;
    /* Cinematic Ratio (approx 2.4:1) - Wider than 16:9 */
}

.home-product-grid .product-card:nth-child(n+3) .card-img-container {
    padding-top: 50%;
    /* 2:1 Ratio - Wider than 16:9 */
}

.home-product-grid .product-card:nth-child(1) .card-info-name,
.home-product-grid .product-card:nth-child(2) .card-info-name {
    font-size: 2rem;
    /* Larger title for top items */
    font-weight: 900;
}

/* Next 3 items: 33% width (span 2 of 6) */
.home-product-grid .product-card:nth-child(3),
.home-product-grid .product-card:nth-child(4),
.home-product-grid .product-card:nth-child(5) {
    grid-column: span 2;
}

/* Remaining items: default 25% (span 1.5? No, let's say 4 per row -> span 1.5 is tricky. 
   Let's just fall back to flexible checks or keep them 3 per row) */
.home-product-grid .product-card:nth-child(n+6) {
    grid-column: span 2;
    /* Keep 3 per row for consistency, or whatever */
}

/* Responsive adjustments */
@media (max-width: 1200px) {

    .home-product-grid .product-card:nth-child(1),
    .home-product-grid .product-card:nth-child(2) {
        grid-column: span 6;
        /* Full width on smaller screens */
    }

    .home-product-grid .product-card:nth-child(3),
    .home-product-grid .product-card:nth-child(4),
    .home-product-grid .product-card:nth-child(5),
    .home-product-grid .product-card:nth-child(n+6) {
        grid-column: span 3;
        /* 2 per row */
    }
}

@media (max-width: 600px) {
    .home-product-grid .product-card {
        grid-column: span 6 !important;
        /* 1 per row mobile */
        height: auto !important;
    }
}



/* Homepage Specific Overlay Styles */
.home-product-grid .product-card {
    border: none;
    box-shadow: none;
    background: transparent;
    border-radius: 0;
    display: block;
    /* Fix for collapsed height in Flexbox with padding-hack */
}

.home-product-grid .card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: transparent;
    /* Removed gradient */
    padding: 20px;
    z-index: 5;
    /* pointer-events: none removed to allow button interaction */
    box-sizing: border-box;
}

.quick-add-btn {
    background: var(--accent-color);
    color: #000;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    /* Ensure it's clickable */
    margin-left: auto;
}

.quick-add-btn:hover {
    transform: scale(1.15) rotate(5deg);
    background: #fff;
    box-shadow: 0 8px 25px rgba(var(--accent-rgb), 0.5);
}

.quick-add-btn i {
    transition: 0.3s;
}

/* Secondary Image (Hover GIF/Image) Logic */
.has-secondary-image:hover .static-img {
    opacity: 0;
}

.hover-gif {
    z-index: 1;
    opacity: 0;
    transition: 0.4s ease;
}

.has-secondary-image:hover .hover-gif {
    opacity: 1;
    z-index: 3;
}

.home-product-grid .card-info-name {
    text-align: right;
    font-size: 1.4rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    /* Improved readability */
}

.home-product-grid .card-info-price {
    display: none;
    /* User requested no prices on homepage */
}

.home-product-grid .product-card:hover .card-info-name {
    color: var(--accent-color);
}

.home-product-grid .nation-tag,
.home-product-grid .class-tag,
.home-product-grid .difficulty-tag,
.home-product-grid .wishlist-btn {
    display: none;
    /* Hide tags, difficulty, and wishlist on homepage */
}

.home-product-grid .product-card,
.home-product-grid .card-img-container img {
    border-radius: 0;
    /* Sharp corners for banner look */
    object-fit: contain;
}

/* Fix for black hover: only applied if no secondary image exists */
.home-product-grid .product-card:not(.has-secondary-image):hover .static-img {
    opacity: 1;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), background var(--transition-speed), border-color var(--transition-speed);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 0;
    /* Forced reset */
}


.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(var(--accent-rgb, 255, 152, 0), 0.3);
}

.new-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: #000;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 800;
    font-size: 11px;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.card-img-container {
    padding-top: 75%;
    /* 4:3 Aspect Ratio (Original) */
    height: 0;
    background: #000;
    position: relative;
    overflow: hidden;
}

.card-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: 0.4s ease;
}

.static-img {
    z-index: 2;
    opacity: 1;
}

.hover-gif {
    z-index: 1;
    opacity: 0;
}

.product-card.has-secondary-image:hover .static-img {
    opacity: 0;
}

.product-card:hover .hover-gif {
    opacity: 1;
}

.product-card:hover .card-img-container img {
    transform: scale(1.05);
}

.card-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--card-bg);
}

.card-info-name {
    color: var(--text-color);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Fix for lint warning */
    -webkit-box-orient: vertical;
}

.card-info-price {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.nation-tag {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent-color);
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
}

.class-tag {
    background: var(--card-bg-header);
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid var(--border-color);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
}

.buy-btn {
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 6px 15px;
    border-radius: 6px;
    font-size: 13px;
    transition: 0.3s;
}

.product-card:hover .buy-btn {
    background: var(--accent-color);
    color: var(--bg-color);
}

/* =========================================
   5. СТРАНИЦА ТОВАРА (PRODUCT PAGE)
   ========================================= */
.product-page-main {
    max-width: 2560px;
    width: 96%;
    margin: 40px auto;
    padding: 0 4%;
    box-sizing: border-box;
}

.product-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    /* Give more space to image (visual) */
    gap: 60px;
    /* Increased gap */
    align-items: start;
}

.product-visual {
    min-width: 0;
    /* Prevents grid overflow from wide children like image gallery */
    position: relative;
}

.main-image-wrapper {
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 10px;
    position: relative;
    transition: background var(--transition-speed), border-color var(--transition-speed);
}

/* Gallery Main View */
.gallery-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    /* Original 4:3 Ratio */
    overflow: hidden;
    border-radius: 15px;
    background: #000;
}

.gallery-main {
    width: 100%;
    height: 100%;
    position: relative;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    pointer-events: none;
}

.gallery-slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.gallery-arrow:hover {
    background: var(--accent-color);
    color: #000;
}

.gallery-arrow.prev {
    left: 15px;
}

.gallery-arrow.next {
    right: 15px;
}

/* Thumbnails Strip */
.gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: thin;
}

.thumb-item {
    width: 80px;
    height: 60px;
    /* Original height */
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: 0.3s;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-item:hover {
    opacity: 1;
}

.thumb-item.active {
    opacity: 1;
    border-color: var(--accent-color);
}

/* Gooey Pagination */
.gooey-pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 25px;
}

.gooey-dots {
    display: flex;
    position: relative;
    padding: 10px;
    filter: url('#p-goo');
    background: var(--card-bg-header);
    border-radius: 30px;
    gap: 8px;
    border: 1px solid var(--border-color);
}

.gooey-dot {
    width: 12px;
    height: 12px;
    background: var(--text-muted);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
    position: relative;
    z-index: 2;
}

.gooey-dot:hover {
    background: var(--text-color);
}

.gooey-active-pill {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    top: 10px;
    left: 10px;
    z-index: 5;
    pointer-events: none;
    transition: left 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
}

.nation-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--accent-color);
    color: var(--bg-color);
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
}

.price-card {
    background: var(--card-bg-header);
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    border-left: 4px solid var(--accent-color);
    transition: background var(--transition-speed), border-color var(--transition-speed);
}

.large-buy {
    width: 100%;
    padding: 18px !important;
    background: var(--accent-color);
    color: var(--bg-color);
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

/* =========================================
   6. ПРОФИЛЬ (АВАТАР И ЗУМ)
   ========================================= */
.profile-pic {
    width: 120px !important;
    height: 120px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid var(--accent-color);
    display: block;
    margin: 0 auto 15px;
}

.zoom-controls {
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--card-bg-header);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    width: fit-content;
    transition: background var(--transition-speed);
}

#zoomPercent {
    width: 55px;
    background: var(--bg-color);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    padding: 4px 6px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    outline: none;
    transition: background var(--transition-speed);
}

/* =========================================
   7. ПОДВАЛ И ФИЛЬТРЫ
   ========================================= */
.filters {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 30px 0;
}

.filter-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn i {
    font-size: 14px;
}

.filter-btn.active {
    background: var(--accent-color);
    color: #000 !important;
    border-color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.3);
}

.filter-btn.active i {
    color: #000 !important;
}

.filter-btn:hover:not(.active) {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

footer {
    padding: 80px 0 40px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    transition: background var(--transition-speed), border-color var(--transition-speed);
}

.footer-container {
    display: block;
    width: 95%;
    max-width: 2560px;
    margin: 0 auto;
    padding: 0 2.5%;
    box-sizing: border-box;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    font-weight: 800;
    color: var(--accent-color) !important;
    margin-bottom: 25px;
    text-transform: uppercase;
}

.footer-brand span {
    color: var(--accent-color) !important;
}

.footer-desc {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 13px;
}

.footer-col h4 {
    color: var(--text-color);
    font-size: 13px;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 900;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li {
    margin-bottom: 12px;
}

.footer-list a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-list a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 38px;
    height: 38px;
    background: var(--card-bg-header);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    transition: 0.3s;
}

.social-icons a:hover {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.developer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* =========================================
   8. АНИМАЦИИ
   ========================================= */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1200px) {
    .product-container {
        gap: 30px;
        grid-template-columns: 1fr 1fr;
        /* Keep 2 cols but equal */
    }
}

@media (max-width: 900px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .product-visual {
        margin-bottom: 20px;
    }

    .product-page-main {
        width: 100%;
        margin: 20px auto;
        padding: 0 15px;
    }
}

/* Настройка ползунка Croppie */
.cr-slider-wrap {
    margin-top: 25px !important;
    margin-bottom: 25px !important;
    width: 80% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.cr-slider {
    cursor: pointer;
}

.view-3d-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    z-index: 10;
    transition: 0.3s;
}

.view-3d-btn:hover {
    background: var(--accent-color);
    color: #000;
}

/* =========================================
   12. HERO SLIDER
   ========================================= */
.hero-slider-container {
    position: relative;
    width: 100%;
    height: 600px;
    /* Larger for desktop */
    margin-bottom: 80px;
    border-radius: 0;
    /* Immersive edge-to-edge */
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-slider {
    width: 100%;
    height: 100%;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 0 80px;
}

.slider-slide.active {
    opacity: 1;
}

.slide-content {
    max-width: 500px;
    transform: translateY(30px);
    transition: transform 0.8s ease, opacity 0.8s ease;
    opacity: 0;
}

.slider-slide.active .slide-content {
    transform: translateY(0);
    opacity: 1;
}

.slide-tag {
    background: var(--accent-color);
    color: #000;
    padding: 5px 12px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 20px;
}

.slide-content h2 {
    font-size: 3rem;
    margin: 0 0 15px 0;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.slide-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

.slide-btn {
    display: inline-block;
    background: #fff;
    color: #000;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
}

.slide-btn:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Dots & Nav */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 80px;
    display: flex;
    gap: 10px;
    z-index: 5;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: var(--accent-color);
    width: 30px;
    border-radius: 6px;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.slider-nav:hover {
    background: var(--accent-color);
    color: #000;
}

.slider-nav.prev {
    left: 20px;
}

.slider-nav.next {
    right: 20px;
}

@media (max-width: 768px) {
    .hero-slider-container {
        height: 350px;
    }

    .slider-slide {
        padding: 0 40px;
    }

    .slide-content h2 {
        font-size: 2rem;
    }

    .slider-nav {
        display: none;
    }

    .slider-dots {
        left: 50%;
        transform: translateX(-50%);
        bottom: 20px;
    }
}

/* =========================================
   13. FAQ ACCORDION
   ========================================= */
.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--accent-color);
    background: rgba(var(--accent-rgb), 0.05);
}

.faq-question {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--text-color);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--accent-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    padding: 0 25px;
    color: var(--text-muted);
    line-height: 1.6;
}

.faq-item.active {
    border-color: var(--accent-color);
    background: rgba(var(--accent-rgb), 0.05);
}

.faq-item.active .faq-question {
    color: var(--accent-color);
}

.faq-item.active .faq-question i {
    transform: rotate(45deg);
}

.faq-item.active .faq-answer {
    max-height: 250px;
    padding-bottom: 25px;
}

.faq-item.danger {
    border: 1px solid #ff4444;
}

.faq-item.danger .faq-question i {
    color: #ff4444;
}

.faq-item.danger.active {
    background: rgba(255, 68, 68, 0.05);
}

.faq-item.danger.active .faq-question {
    color: #ff4444;
}

/* =========================================
   14. CATALOG ENHANCEMENTS
   ========================================= */
.filter-select {
    width: 100%;
    padding: 10px;
    background: var(--card-bg-header);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    border-color: var(--accent-color);
}

.filter-flag-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-option span {
    margin-left: 2px;
}

/* =========================================
   15. WISHLIST & POLISH
   ========================================= */
.wishlist-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    right: auto;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.wishlist-btn.active i {
    color: #ff4444;
}


/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 1200px) {
    .main-nav {
        gap: 15px;
    }

    .header-actions {
        gap: 10px;
    }

    .logo-container h1 {
        font-size: 1.2rem;
    }
}

@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }

    .mobile-nav-toggle {
        display: flex !important;
    }

    .header-container {
        gap: 10px;
    }
}

@media (max-width: 768px) {

    /* Top Bar */
    .top-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
        height: auto;
    }

    .premium-theme-container {
        margin-right: 0;
        margin-bottom: 5px;
    }

    .top-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    /* Base Mobile Overrides & Responsive Tools */
    .mobile-nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--text-color);
        font-size: 22px;
        cursor: pointer;
        padding: 8px;
        z-index: 1001;
        transition: 0.3s;
    }

    .mobile-nav-toggle.active {
        color: var(--accent-color);
    }

    .main-nav {
        display: none;
    }

    .main-nav.active {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        background: var(--card-bg);
        z-index: 2000;
        padding: 80px 30px;
        gap: 15px;
        transform: none !important;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
        border-right: 1px solid var(--border-color);
        animation: slideInLeft 0.3s ease-out;
    }

    @keyframes slideInLeft {
        from {
            transform: translateX(-100%);
        }

        to {
            transform: translateX(0);
        }
    }

    .main-nav.active a {
        font-size: 18px;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        color: var(--text-color);
    }

    .main-nav.active a.active::after {
        display: none;
        /* Hide the underline bar in mobile menu */
    }

    .mobile-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(3px);
        z-index: 1500;
        display: none;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .mobile-overlay.active {
        display: block;
        opacity: 1;
    }

    body.menu-open {
        overflow: hidden;
    }

    header {
        padding: 0 !important;
    }

    .header-container {
        padding: 10px 15px;
        justify-content: space-between !important;
    }

    .logo-container h1 {
        font-size: 16px !important;
        white-space: nowrap;
    }

    .search-box {
        display: none;
    }

    .header-actions {
        gap: 15px;
    }

    .header-actions .search-box {
        display: none;
    }
}

/* Main Layout */
.wide-wrapper {
    padding: 0 15px;
}

.sidebar-card {
    width: 100%;
    box-sizing: border-box;
}

.content-area {
    width: 100%;
}

/* Account Dashboard */
.dashboard-grid {
    grid-template-columns: 1fr;
    /* Stack dashboard cards */
}

.steam-level-container {
    padding: 10px;
}

/* Products / Catalog */
.products-grid {
    grid-template-columns: 1fr;
    /* Single column on mobile */
}

@media (min-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Two columns on small tablets */
    }
}

/* Tables / Orders */
.order-card {
    grid-template-columns: 60px 1fr;
    gap: 10px;
    padding: 15px;
}

.order-card .order-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    width: 100%;
}

.action-btn,
.order-btn {
    min-width: 44px;
    min-height: 44px;
}

.order-thumb {
    width: 60px;
    height: 60px;
}

@media (max-width: 900px) {
    .mobile-filters-toggle {
        display: flex !important;
        width: 100%;
        background: var(--card-bg-header);
        border: 1px solid var(--border-color);
        color: var(--text-color);
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 20px;
        font-weight: 700;
        cursor: pointer;
        justify-content: center;
        align-items: center;
        gap: 10px;
    }
}

.filters-sidebar.active {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: var(--bg-color);
    padding: 40px 20px;
    overflow-y: auto;
    width: 100%;
}

#closeFiltersBtn {
    display: block !important;
}

/* Hero Slider Navigation */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    padding: 15px;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
    border-radius: 5px;
}

.slider-nav:hover {
    background: var(--accent-color);
    color: black;
}

.slider-nav.prev {
    left: 20px;
}

.slider-nav.next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: var(--accent-color);
    transform: scale(1.2);
}

/* =========================================
   CATALOG SIDEBAR & FILTERS
   ========================================= */
.catalog-container {
    max-width: 2560px;
    margin: 40px auto;
    padding: 0 4%;
    display: flex;
    gap: 60px;
}

.filters-sidebar {
    width: 280px;
    flex-shrink: 0;
    align-self: flex-start;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.sidebar-header {
    margin-top: 0;
    font-size: 20px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 15px;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.reset-btn {
    width: 100%;
    margin-bottom: 25px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.filter-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.filter-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Custom Checkbox Styling */
.custom-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    color: var(--text-muted);
    transition: color 0.2s;
}

.custom-checkbox:hover {
    color: var(--text-color);
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s;
}

.custom-checkbox:hover input~.checkmark {
    border-color: var(--accent-color);
}

.custom-checkbox input:checked~.checkmark {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked~.checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid black;
    border-width: 0 2px 2px 0;
    transform: rotate(35deg);
}

.option-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-flag-icon {
    width: 20px;
    border-radius: 2px;
}

/* Price Inputs */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-separator {
    color: var(--text-muted);
}

.custom-select-wrapper select {
    width: 100%;
    padding: 10px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 6px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}

.custom-select-wrapper select:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* Responsive */
@media (max-width: 900px) {
    .catalog-container {
        flex-direction: column;
    }

    .filters-sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
}


/* =========================================
   16. PRODUCT FEATURES & BADGES ENHANCEMENTS
   ========================================= */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin: 30px 0;
}

.feature-item {
    background: var(--card-bg-header);
    padding: 15px 10px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
}

.feature-item:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
    background: rgba(var(--accent-rgb), 0.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.feature-item i {
    font-size: 22px;
    color: var(--accent-color);
}

.feature-item span {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quality-info {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 25px;
    padding: 10px 15px;
    background: rgba(var(--accent-rgb), 0.05);
    border-radius: 8px;
    border-left: 3px solid #ffd700;
}

.quality-info i {
    color: #ffd700;
    font-size: 16px;
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* =========================================
   FUNCTIONALITIES GRID LAYOUT
   ========================================= */
.product-functionalities .features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.product-functionalities .feature-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    gap: 15px;
    padding: 15px 20px;
    background: #181818;
    border: 1px solid #333;
    border-radius: 8px;
    aspect-ratio: auto !important;
    text-align: left;
    transition: 0.3s;
}

.product-functionalities .feature-item:hover {
    border-color: var(--accent-color);
    background: #222;
}

.product-functionalities .feature-item i {
    font-size: 20px;
    margin-bottom: 0;
    color: var(--accent-color);
    /* Green or user accent */
    flex-shrink: 0;
}

.product-functionalities .feature-item span {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    line-height: 1.4;
}

@media (max-width: 600px) {
    .product-functionalities .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Product Page Enhancements */
.package-includes-section {
    margin-bottom: 20px;
}

.pkg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.pkg-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-color);
}

.pkg-item i {
    color: var(--accent-color);
}

.product-badge-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 5;
    background: var(--accent-color);
    color: #000;
    padding: 5px 12px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 11px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}


/* Product Meta & Badge Enhancements */
.product-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    font-size: 14px;
    color: var(--accent-color);
    font-weight: 600;
}

.product-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-id {
    color: var(--text-muted);
    font-weight: normal;
}

/* Ensure badge overlay works on frontend */
.product-visual {
    position: relative;
}

.main-image-wrapper {
    position: relative;
    /* Context for overlay */
}

.product-badge-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    pointer-events: none;
}


/* Ensure gallery container is positioned for badge overlay */
.gallery-container {
    position: relative;
    overflow: hidden;
    /* rounded corners usually */
    border-radius: 15px;
    /* match main-img-wrapper usually */
}


/* Price Card Layout Enhancements */
.price-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 30px;
}

.pc-left {
    flex-shrink: 0;
}

.pc-right {
    flex-grow: 1;
}

.main-price {
    font-size: 2.5rem;
    /* Larger price */
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.vat-info {
    display: block;
    /* Under price */
    margin-top: 5px;
    font-size: 13px;
    color: var(--text-muted);
}

.price-row {
    display: flex;
    flex-direction: column;
    /* Stack price and VAT */
    align-items: flex-start;
}

/* Package Section */
.pkg-label {
    font-size: 13px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.pkg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 columns */
    gap: 10px 20px;
}

.pkg-item {
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    /* Prevent wrapping if possible, or handle overflow */
}

/* Enhanced Badge Overlay */
.product-badge-overlay {
    background: linear-gradient(135deg, var(--accent-color), #ffb74d);
    /* Gradient */
    color: #000;
    padding: 8px 16px;
    font-weight: 900;
    /* Bolder */
    font-size: 14px;
    text-transform: uppercase;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
    /* Reset from pointer-events: none if interaction needed, but visual only so ok */
    pointer-events: auto;
}

.product-badge-overlay i {
    font-size: 16px;
}

/* Custom List Styles with FontAwesome Icons */
.list-check,
.list-arrow,
.list-star,
.list-plus,
.list-info,
.list-custom-fa {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.list-check li,
.list-arrow li,
.list-star li,
.list-plus li,
.list-info li,
.list-custom-fa li {
    position: relative !important;
    padding-left: 35px !important;
    margin-bottom: 12px !important;
    list-style-type: none !important;
    line-height: 1.5;
}

.list-check li::before,
.list-arrow li::before,
.list-star li::before,
.list-plus li::before,
.list-info li::before,
.list-custom-fa li::before {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900 !important;
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--accent-color);
    font-size: 18px;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

.list-check li::before {
    content: "\f14a" !important;
}

/* check-square */
.list-arrow li::before {
    content: "\f0a4" !important;
}

/* hand-point-right */
.list-star li::before {
    content: "\f005" !important;
}

/* star */
.list-plus li::before {
    content: "\f0fe" !important;
}

/* plus-square */
.list-info li::before {
    content: "\f05a" !important;
}

.list-custom-fa li::before {
    content: var(--list-icon, "\f005") !important;
}

/* info-circle */

/* Ensure standard lists inside rich text still have some padding */
.rich-text-content ul:not([class]) {
    padding-left: 30px;
    margin-bottom: 20px;
}

.rich-text-content ul:not([class]) li {
    margin-bottom: 8px;
}

/* Fix for Model Functionalities Grid */
.product-functionalities {
    clear: both;
    width: 100%;
    margin-bottom: 30px;
}


@media (max-width: 768px) {
    .price-card-top {
        flex-direction: column;
        gap: 20px;
    }
}

/* Mobile Header Fixes */
@media (max-width: 900px) {
    #mobileMenuToggle {
        display: block !important;
    }

    .main-nav {
        display: none !important;
        position: absolute !important;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--header-bg);
        flex-direction: column;
        gap: 0 !important;
        padding: 20px 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    .main-nav.mobile-open {
        display: flex !important;
    }

    .main-nav .nav-link {
        padding: 15px 30px !important;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
        text-align: left;
    }

    .main-nav .nav-link:last-child {
        border-bottom: none;
    }

    .main-nav .nav-link.active::after {
        left: 30px !important;
        width: calc(100% - 60px) !important;
    }

    .top-bar {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .top-menu,
    .premium-theme-container {
        width: 100%;
        justify-content: center;
    }

    .header-actions {
        gap: 10px;
    }

    #headerSearchInput {
        width: 80px;
    }
}