/* Kyrgyz Shape Marketplace - Main Styles */
/* Inspired by Wildberries with Red, Yellow, White color scheme */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Primary Colors */
    --primary-red: #E63946;
    --primary-dark-red: #C4303C;
    --primary-yellow: #F4A261;
    --primary-gold: #E9B44C;

    /* Neutrals */
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --gray: #E9ECEF;
    --dark-gray: #6C757D;
    --text-dark: #212529;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #E63946 0%, #F4A261 100%);
    --gradient-light: linear-gradient(135deg, #FFE5E8 0%, #FFF4E6 100%);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 36px rgba(0, 0, 0, 0.18);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.4s ease;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-dark);
    background-color: var(--light-gray);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-red);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark-red);
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-buttons .btn {
    min-width: 80px;
    text-align: center;
    box-sizing: border-box;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
}

/* Burger Menu */
.burger-menu {
    position: relative;
}

.burger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: var(--light-gray);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 8px;
}

.burger-btn:hover {
    background: var(--gray);
}

.burger-btn.active {
    background: var(--gradient-primary);
}

.burger-btn.active .burger-line {
    background: var(--white);
}

.burger-line {
    width: 20px;
    height: 2px;
    background: var(--text-dark);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

.burger-btn.active .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-btn.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-btn.active .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Category Dropdown */
.category-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 280px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    z-index: 1001;
}

.category-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-dropdown h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray);
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    color: var(--text-dark);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.category-item:hover {
    background: var(--light-gray);
    color: var(--primary-red);
}

.category-item-img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.no-categories {
    color: var(--dark-gray);
    font-size: 0.9rem;
    padding: 0.5rem;
    margin: 0;
}

.spinner-sm {
    border: 2px solid var(--gray);
    border-top: 2px solid var(--primary-red);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 0.5rem auto;
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

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

.nav-link:hover {
    color: var(--primary-red);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
}

.btn-outline:hover {
    background: var(--primary-red);
    color: var(--white);
}

.btn-yellow {
    background: var(--primary-yellow);
    color: var(--white);
}

.btn-yellow:hover {
    background: var(--primary-gold);
}

.btn-white {
    background: var(--white);
    color: var(--primary-red);
    border: 1px solid var(--gray);
}

.btn-white:hover {
    border-color: var(--primary-red);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.card-text {
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

/* Product Card */
.product-card {
    position: relative;
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-red);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-red);
}

.product-old-price {
    font-size: 1.1rem;
    color: var(--dark-gray);
    text-decoration: line-through;
    margin-left: 0.5rem;
}

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

.stars {
    color: var(--primary-yellow);
}

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

/* Grid Layouts */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.grid {
    display: grid;
    gap: 2rem;
    justify-content: center;
}

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

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

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

@media (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

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

@media (max-width: 480px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--gray);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.form-control::placeholder {
    color: var(--dark-gray);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Search Bar */
.search-bar {
    position: relative;
    max-width: 600px;
    margin: 2rem auto;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid var(--gray);
    border-radius: var(--radius-xl);
    transition: all var(--transition-fast);
}

.search-input:focus {
    border-color: var(--primary-red);
    box-shadow: var(--shadow-md);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-lg);
    padding: 0.6rem 1.2rem;
    color: var(--white);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.05);
}

/* Hero Section */
.hero {
    background: var(--gradient-light);
    padding: 4rem 0;
    text-align: center;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--dark-gray);
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

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

.footer-section h4 {
    color: var(--primary-yellow);
    margin-bottom: 1rem;
}

.footer-section a {
    color: var(--gray);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--dark-gray);
}

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

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

.fade-in-up {
    animation: fadeInUp 0.6s ease;
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--gray);
    border-top: 3px solid var(--primary-red);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

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

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-gray);
}

.modal-close:hover {
    color: var(--text-dark);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.py-1 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-2 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-3 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-4 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.hidden {
    display: none !important;
}

.block {
    display: block;
}

.flex {
    display: flex;
}

.inline-block {
    display: inline-block;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

/* Infinite Scroll */
.load-more-container {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
    min-height: 60px;
}

.end-of-products {
    text-align: center;
    padding: 2rem 0;
    color: var(--dark-gray);
}

.end-of-products p {
    margin: 0;
    font-size: 0.95rem;
}

/* Dashboard Product Grid & Badges */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-img-wrapper {
    position: relative;
    height: 220px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.no-image-placeholder {
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.product-info {
    padding: 1.25rem;
    flex-grow: 1;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.product-actions {
    padding: 1rem 1.25rem;
    background: #fcfcfc;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

/* Badges */
.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-success {
    background: #4cc9f0;
    color: white;
}

.badge-warning {
    background: var(--primary-yellow);
    color: white;
}

.badge-danger {
    background: var(--primary-red);
    color: white;
}

/* ═══════════════════════════════════════════════════════════════
   WB-Style Catalog Sidebar
═══════════════════════════════════════════════════════════════ */

/* Backdrop overlay */
.wb-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.wb-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Slide-in sidebar panel */
.wb-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: min(420px, 95vw);
    background: var(--white);
    z-index: 1999;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
}

.wb-sidebar.open {
    transform: translateX(0);
}

/* Header strip */
.wb-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    height: 64px;
    flex-shrink: 0;
    background: var(--gradient-primary);
    color: var(--white);
}

.wb-sidebar-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wb-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.18);
    border: none;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.wb-close-btn:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: rotate(90deg);
}

/* Body — two columns */
.wb-sidebar-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ── Left column: main categories ─────────────────────────── */
.wb-cat-list {
    width: 240px;
    flex-shrink: 0;
    overflow-y: auto;
    border-right: 1px solid var(--gray);
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--gray) transparent;
}

.wb-loading {
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.wb-cat-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 1.1rem;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-dark);
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    position: relative;
}

.wb-cat-item:hover {
    background: var(--light-gray);
    color: var(--primary-red);
}

.wb-cat-item.active {
    background: var(--light-gray);
    color: var(--primary-red);
    font-weight: 600;
}

.wb-cat-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    border-radius: 0 2px 2px 0;
}

.wb-cat-icon {
    font-size: 1.2rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wb-cat-name {
    flex: 1;
    line-height: 1.3;
}

.wb-cat-arrow {
    flex-shrink: 0;
    opacity: 0.45;
    transition: opacity var(--transition-fast);
}

.wb-cat-item:hover .wb-cat-arrow,
.wb-cat-item.active .wb-cat-arrow {
    opacity: 1;
}

/* ── L2 column: subcategories ─────────────────────────────── */
.wb-l2-panel {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--gray) transparent;
}

.wb-subcat-hint {
    color: var(--dark-gray);
    font-size: 0.9rem;
    padding: 2rem 1rem;
    text-align: center;
}

.wb-l2-header {
    padding: 0.75rem 1rem 0.5rem;
    border-bottom: 1px solid var(--gray);
    margin-bottom: 0.25rem;
}

.wb-l2-header a {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-dark);
    transition: color var(--transition-fast);
}

.wb-l2-header a:hover {
    color: var(--primary-red);
}

.wb-l2-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.62rem 0.9rem 0.62rem 1rem;
    font-size: 0.88rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    text-decoration: none;
}

.wb-l2-item:hover {
    background: var(--light-gray);
    color: var(--primary-red);
    text-decoration: none;
}

.wb-l2-item.active {
    background: var(--light-gray);
    color: var(--primary-red);
    font-weight: 600;
}

.wb-l2-name {
    flex: 1;
    line-height: 1.35;
}

.wb-l2-arrow {
    flex-shrink: 0;
    opacity: 0.4;
    transition: opacity var(--transition-fast);
}

.wb-l2-item:hover .wb-l2-arrow,
.wb-l2-item.active .wb-l2-arrow {
    opacity: 1;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
    .wb-sidebar {
        width: 100vw;
    }

    .wb-cat-list {
        width: 150px;
    }

    .wb-cat-item {
        padding: 0.7rem 0.6rem;
        font-size: 0.82rem;
        gap: 0.4rem;
    }

    .wb-cat-icon {
        font-size: 1rem;
        width: 24px;
        height: 24px;
    }
}

/* ── Mobile search bar in header (hidden on desktop) ───────── */
.header-search-mobile {
    display: none;
}

/* ── Bottom Mobile Navigation Bar ──────────────────────────── */
.mobile-bottom-nav {
    display: none;
}

.mbn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 6px 0;
    flex: 1;
    transition: color var(--transition-fast);
}

.mbn-item:hover,
.mbn-item.active {
    color: var(--primary-red);
}

.mbn-item svg {
    transition: transform var(--transition-fast);
}

.mbn-item.active svg {
    stroke: var(--primary-red);
}

.mbn-item span {
    line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Global mobile styles
═══════════════════════════════════════════════════════════════ */

/* Hide mobile nav toggle on desktop */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    transition: background var(--transition-fast);
}

.mobile-nav-toggle:hover {
    background: var(--light-gray);
}

.mobile-nav-toggle.active {
    background: var(--gradient-primary);
    color: var(--white);
}

/* ── 768px (tablet / mobile landscape) ───────────────────────── */
@media (max-width: 768px) {

    /* Container */
    .container {
        padding: 0 1rem;
    }

    /* Header: compact for mobile */
    .header-container {
        padding: 0.55rem 1rem;
        min-height: 52px;
        flex-wrap: nowrap;
        align-items: center;
    }

    .logo-wrapper {
        flex: 1;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .burger-btn {
        width: 34px;
        height: 34px;
    }

    /* Hide desktop nav, show mobile search bar */
    #mainNav {
        display: none !important;
    }

    .header-search-mobile {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.4rem 1rem 0.6rem;
        background: var(--white);
    }

    .header-search-input {
        flex: 1;
        padding: 0.6rem 0.9rem;
        font-size: 0.95rem;
        border: 1.5px solid var(--gray);
        border-radius: 20px;
        outline: none;
        font-family: inherit;
        background: var(--light-gray);
        transition: border-color var(--transition-fast);
    }

    .header-search-input:focus {
        border-color: var(--primary-red);
        background: var(--white);
    }

    .header-search-btn {
        width: 38px;
        height: 38px;
        flex-shrink: 0;
        background: var(--gradient-primary);
        border: none;
        border-radius: 50%;
        color: var(--white);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    /* Bottom nav bar */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--white);
        border-top: 1px solid var(--gray);
        z-index: 1000;
        padding: 6px 0 max(6px, env(safe-area-inset-bottom));
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    }

    /* Push content up so bottom nav doesn't overlap */
    body {
        padding-bottom: 62px;
    }

    /* Hero */
    .hero {
        padding: 2rem 1rem;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    /* Cards */
    .card-img {
        height: 180px;
    }

    .card-body {
        padding: 1rem;
    }

    /* Search bar (page-level) */
    .search-bar {
        margin: 1rem auto;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* Product list */
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-page {
        padding: 1rem 0;
    }

    .sort-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    /* Product detail */
    .product-main {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .gallery {
        position: static;
    }

    .info {
        padding: 1.25rem;
    }

    .info__title {
        font-size: 1.35rem;
    }

    .price-current {
        font-size: 1.6rem;
    }

    .chars-table td {
        padding: 0.5rem;
        font-size: 0.85rem;
    }

    /* Enterprises */
    .enterprise-grid,
    .enterprises-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem;
    }

    /* Contact modal */
    .contact-modal {
        width: 95vw;
        max-height: 90vh;
        overflow-y: auto;
    }

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

/* ── 480px (small phones) ────────────────────────────────────── */
@media (max-width: 480px) {

    /* Container */
    .container {
        padding: 0 0.75rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    /* Cards: single column */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .card-img {
        height: 200px;
    }

    /* Hero */
    .hero-title {
        font-size: 1.5rem;
    }

    /* Footer: single column */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .footer {
        padding: 2rem 0 1.25rem;
    }

    /* Product detail price */
    .price-current {
        font-size: 1.4rem;
    }

    /* Products page sort */
    .sort-options {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Enterprises: single column */
    .enterprise-grid,
    .enterprises-grid {
        grid-template-columns: 1fr !important;
    }

    /* Dashboard: single column */
    .products-grid {
        grid-template-columns: 1fr;
    }

    /* Buttons full-width in product detail */
    .btn-contact,
    .btn-edit {
        width: 100%;
    }

    /* Gallery thumbs: smaller */
    .thumb {
        width: 56px;
        height: 56px;
    }

    /* Breadcrumb: truncate */
    .breadcrumb {
        font-size: 0.78rem;
        flex-wrap: wrap;
    }
}