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

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-700: #334155;
    --gray-900: #0f172a;
    --white: #ffffff;
    --primary-color: #1e293b;
    --accent-color: #2563eb;
    --accent-light: #3b82f6;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-light: #f1f5f9;
    --background-light: #f8fafc;
    
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition-base);
    animation: slideDown 0.6s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 12px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    max-width: 100%;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all var(--transition-base);
    letter-spacing: -0.5px;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
    border-radius: 2px;
}

.logo:hover::after {
    width: 100%;
}

/* Navigation */
.desktop-nav {
    display: flex;
    gap: 24px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 15px;
    transition: all var(--transition-base);
    position: relative;
    padding: 8px 0;
    letter-spacing: -0.2px;
    white-space: nowrap;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all var(--transition-base);
    transform: translateX(-50%);
}

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

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

.phone-link {
    background: var(--gradient-primary);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.phone-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.phone-link:hover::before {
    width: 300px;
    height: 300px;
}

.phone-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Cart Icon */
.cart-icon {
    position: relative;
    font-size: 22px;
    text-decoration: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--background-light);
    transition: all var(--transition-base);
    color: var(--text-color);
    flex-shrink: 0;
}

.cart-icon:hover {
    transform: scale(1.1);
    background: var(--accent-light);
    color: white;
    box-shadow: var(--shadow-md);
}

.cart-counter {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.cart-counter.active {
    display: flex;
}

/* ==================== MOBILE MENU ==================== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 5px;
    position: relative;
    z-index: 1001;
    flex-shrink: 0;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--primary-color);
    transition: all var(--transition-base);
    border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: white;
    flex-direction: column;
    padding: 80px 24px 40px;
    box-shadow: var(--shadow-2xl);
    z-index: 999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
}

.mobile-nav.active {
    display: flex;
    transform: translateX(0);
}

.mobile-nav-link {
    padding: 18px 0;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 17px;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-nav-link:hover {
    color: var(--accent-color);
    padding-left: 12px;
    background: var(--background-light);
}

.breadcrumbs {
    padding: 24px 0;
    border-bottom: 1px solid var(--gray-200);
}

.breadcrumb-list {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.breadcrumb-item {
    color: var(--gray-700);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.breadcrumb-item:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    color: var(--gray-300);
}

.breadcrumb-current {
    color: var(--dark);
    font-weight: 500;
}

.catalog-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    padding: 32px 0;
}

.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.filter-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.filter-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-option:hover {
    background: var(--gray-50);
}

.filter-option input[type="checkbox"],
.filter-option input[type="radio"] {
    cursor: pointer;
}

.filter-option-label {
    flex: 1;
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
}

.filter-option-count {
    font-size: 12px;
    color: var(--gray-300);
    font-weight: 600;
}

.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.price-input {
    padding: 10px 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
}

.price-input:focus {
    outline: none;
    border-color: var(--primary);
}

.apply-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: var(--transition);
}

.apply-btn:hover {
    background: var(--primary-dark);
}

.reset-filters {
    width: 100%;
    padding: 12px;
    background: var(--gray-100);
    color: var(--gray-700);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.reset-filters:hover {
    background: var(--gray-200);
}

.catalog-main {
    min-height: 600px;
}

.catalog-header {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.catalog-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.catalog-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
}

.catalog-count {
    font-size: 15px;
    color: var(--gray-700);
}

.catalog-controls {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.sort-select {
    padding: 10px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: var(--white);
    cursor: pointer;
    min-width: 200px;
}

.active-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--gray-100);
    border-radius: 20px;
    font-size: 13px;
    color: var(--gray-700);
}

.filter-tag-remove {
    cursor: pointer;
    color: var(--gray-300);
    font-weight: 700;
}

.filter-tag-remove:hover {
    color: var(--danger);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

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

.product-image-wrapper {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: var(--gray-50);
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-new {
    background: var(--success);
    color: white;
}

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

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

.product-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-brand {
    font-size: 12px;
    color: var(--gray-300);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.product-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
}

.product-old-price {
    font-size: 16px;
    color: var(--gray-300);
    text-decoration: line-through;
}

.product-discount {
    padding: 4px 8px;
    background: var(--danger);
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: auto;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: center;
}

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

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

.btn-icon {
    padding: 12px;
    background: var(--gray-100);
    color: var(--gray-700);
}

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

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
    padding: 32px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.page-btn {
    padding: 10px 16px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-700);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
}

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

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.empty-text {
    color: var(--gray-700);
    margin-bottom: 24px;
}


/* ==================== MOBILE MENU ==================== */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: var(--transition);
}

.mobile-nav {
    display: none;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 16px 24px;
    flex-direction: column;
    gap: 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-nav.active {
    display: flex;
    max-height: 400px;
}

.mobile-nav-link {
    padding: 12px 16px;
    color: var(--gray-700);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    background: var(--gray-100);
    color: var(--primary);
}

/* ==================== MOBILE FILTERS ==================== */
.mobile-filters-btn {
    display: none;
    width: 100%;
    padding: 14px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: var(--transition);
}

.mobile-filters-btn:active {
    transform: scale(0.98);
}

.filters-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filters-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    margin: -24px -24px 24px -24px;
}

.sidebar-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.close-filters {
    background: var(--gray-100);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-filters:hover {
    background: var(--gray-200);
}


/* Cart Counter Mobile */
.cart-counter-mobile {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    margin-left: auto;
}

@media (max-width: 1024px) {
    .header {
        padding: 12px 0;
    }
    
    .desktop-nav {
        gap: 16px;
    }
    
    .nav-link {
        font-size: 14px;
        padding: 6px 0;
    }
    
    .phone-link {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .logo-img {
        height: 36px;
    }
    
    .cart-icon {
        width: 42px;
        height: 42px;
        font-size: 21px;
    }
    
    .catalog-wrapper {
        grid-template-columns: 1fr;
    }
    
    .mobile-filters-btn {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 90%;
        max-width: 400px;
        height: 100vh;
        background: var(--white);
        z-index: 999;
        overflow-y: auto;
        transition: left 0.3s ease;
        display: block;
        padding: 24px;
        box-shadow: var(--shadow-lg);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .sidebar-header {
        display: flex;
    }

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


@media (max-width: 900px) {
    .desktop-nav .nav-link:nth-child(4),
    .desktop-nav .nav-link:nth-child(5) {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .header {
        padding: 10px 0;
    }
    
    .desktop-nav {
        display: none;
    }
    
    .logo {
        font-size: 22px;
    }
    
    .cart-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .sidebar {
        max-width: 320px;
    }

    .catalog-title {
        font-size: 24px;
    }

    .catalog-controls {
        width: 100%;
    }

    .sort-select {
        width: 100%;
    }

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

    .product-info {
        padding: 12px;
    }

    .product-name {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .product-brand {
        font-size: 11px;
    }

    .product-price {
        font-size: 18px;
    }
    
    .btn {
        min-height: 44px;
        font-size: 14px;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .product-actions .btn {
        width: 100%;
    }
    
    .btn-icon {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .products-grid {
        gap: 10px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 12px;
    }
    
    .product-price {
        font-size: 16px;
    }
}
/* ==================== LOGO IMAGE ==================== */
.logo-img {
    height: 40px;
    width: auto;
    display: block;
    transition: all var(--transition-base);
}

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

@media (max-width: 768px) {
    .logo-img {
        height: 28px;
    }
}

@media (max-width: 480px) {
    .logo-img {
        height: 24px;
    }
}