@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --primary-color: #2563EB;
    --secondary-color: #1E40AF;
    --accent-color: #3B82F6;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --background: #F9FAFB;
    --surface: #FFFFFF;
    --border-color: #E5E7EB;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition-smooth: cubic-bezier(0.4, 0.0, 0.2, 1);
    --transition-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    --gradient-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.8));
}
.component-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.component-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s var(--transition-smooth);
}

.component-name a:hover {
    color: var(--primary-color);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1, 'ss01' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(30, 64, 175, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-5px, -10px) scale(1.02); }
    50% { transform: translate(10px, 5px) scale(0.98); }
    75% { transform: translate(-3px, 8px) scale(1.01); }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--text-primary);
}

.components-header h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    animation: titleSlideIn 0.8s ease;
}

@keyframes titleSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.component-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.component-type {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-color);
}

.components-wrapper {
    position: relative;
    min-height: 100vh;
    padding: 120px 0 50px;
    background: transparent;
    animation: fadeIn 1s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sidebar-filter {
    background: var(--gradient-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 8px 32px var(--shadow-light);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 120px;
    height: calc(100vh - 140px);
    overflow-y: auto;
    backdrop-filter: blur(10px);
    transition: all 0.3s var(--transition-smooth);
    animation: slideInLeft 0.8s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar-filter:hover {
    box-shadow: 0 12px 40px var(--shadow-medium);
    transform: translateY(-2px);
}

.filter-close-btn {
    display: none;
}

.filter-section {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    animation: fadeInUp 0.6s ease;
    animation-fill-mode: both;
}

.filter-section:nth-child(1) { animation-delay: 0.1s; }
.filter-section:nth-child(2) { animation-delay: 0.2s; }
.filter-section:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-section h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.025em;
    animation: textGlow 3s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% { color: var(--text-primary); }
    50% { color: var(--primary-color); }
}

.filter-section h3 i {
    color: var(--primary-color);
    font-size: 0.875rem;
    width: 16px;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-2px); }
}

.filter-option {
    display: block;
    position: relative;
    padding-left: 32px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.875rem;
    user-select: none;
    color: var(--text-secondary);
    transition: all 0.3s var(--transition-smooth);
    font-weight: 500;
    border-radius: 6px;
    padding: 8px 8px 8px 32px;
}

.filter-option:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
    transform: translateX(4px);
}

.filter-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: var(--surface);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s var(--transition-bounce);
}

.filter-option:hover .checkmark {
    border-color: var(--primary-color);
    background-color: rgba(37, 99, 235, 0.05);
    transform: translateY(-50%) scale(1.1);
}

.filter-option input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
    animation: checkBounce 0.4s ease;
}

@keyframes checkBounce {
    0% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.3); }
    100% { transform: translateY(-50%) scale(1.1); }
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.filter-option input:checked ~ .checkmark:after {
    display: block;
}

.filter-option .checkmark:after {
    left: 5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.price-slider {
    padding: 8px 0;
}

.price-range {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, var(--border-color) 0%, var(--primary-color) 50%, var(--border-color) 100%);
    border-radius: 4px;
    outline: none;
    margin: 16px 0;
    transition: all 0.3s ease;
}

.price-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--gradient-primary);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s var(--transition-bounce);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    border: 2px solid white;
}

.price-range::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.price-range::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

.price-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.price-values span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.components-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding: 0 4px;
    animation: slideInDown 0.8s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(10deg); }
}

.view-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    animation: slideInRight 0.8s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.view-buttons {
    display: flex;
    background: var(--gradient-surface);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow-light);
    backdrop-filter: blur(10px);
}

.view-btn {
    background: none;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s var(--transition-bounce);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    min-width: 80px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.view-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.4s ease;
    z-index: -1;
}

.view-btn:hover::before {
    left: 0;
}

.view-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px) scale(1.05);
}

.view-btn:hover:not(.active) {
    color: white;
    transform: translateY(-2px) scale(1.05);
}

.view-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.view-btn:hover i {
    transform: scale(1.1) rotate(5deg);
}

.view-btn span {
    font-size: 0.8rem;
    font-weight: 600;
}

.sort-options {
    min-width: 200px;
    position: relative;
}

.form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 0.875rem;
    background: var(--gradient-surface);
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s var(--transition-smooth);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
    background: white;
}

.form-select:hover {
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.components-grid {
    display: grid;
    gap: 24px;
    padding: 0 4px;
    transition: all 0.4s var(--transition-smooth);
    align-items: stretch;
}

.components-grid.cols-2 {
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    grid-auto-rows: 1fr;
}

.components-grid.cols-3 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    grid-auto-rows: 1fr;
}

.components-grid.cols-4 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-auto-rows: 1fr;
}

.components-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-auto-rows: 1fr;
}

.component-card {
    background: var(--gradient-surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px var(--shadow-light);
    overflow: hidden;
    transition: all 0.4s var(--transition-smooth);
    border: 1px solid var(--border-color);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 340px;
    backdrop-filter: blur(10px);
    animation: cardSlideIn 0.6s ease;
    animation-fill-mode: both;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.component-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.component-card:hover::before {
    left: 100%;
}

.component-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px var(--shadow-medium);
    border-color: var(--primary-color);
}

.component-image {
    position: relative;
    height: 140px;
    background: linear-gradient(135deg, #FAFBFF 0%, var(--background) 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    flex-shrink: 0;
}

.component-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 40%, rgba(37, 99, 235, 0.02) 100%);
    pointer-events: none;
}

.component-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.4s var(--transition-smooth);
    position: relative;
    z-index: 2;
}

.component-card:hover .component-image img {
    transform: scale(1.1) rotate(2deg);
}

.sale-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--danger), #DC2626);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    z-index: 3;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.component-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 2;
}

.component-type {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.component-type::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.4s var(--transition-smooth);
}

.component-card:hover .component-type::before {
    width: 100%;
}

.component-name {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.component-card:hover .component-name {
    color: var(--primary-color);
}

.component-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.price-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.original-price {
    font-size: 0.8rem;
    color: var(--text-light);
    text-decoration: line-through;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
    height: 0.8rem;
}

.sale-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1;
    height: 1.25rem;
    transition: all 0.3s ease;
}

.component-card:hover .sale-price {
    color: var(--primary-color);
    transform: scale(1.05);
}

.component-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-icon {
    background: var(--gradient-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--transition-bounce);
    font-size: 0.8rem;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}



.btn-icon:hover::before {
    left: 0;
}


.add-to-cart {
    position: relative;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.4s var(--transition-bounce);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.25);
    overflow: hidden;
    isolation: isolate;
    flex-shrink: 0;
}

.add-to-cart::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    opacity: 0;
    transition: opacity 0.3s var(--transition-smooth);
    z-index: -1;
}

.add-to-cart:hover::before {
    opacity: 1;
}

.add-to-cart:hover {
    transform: translateY(-4px) scale(1.1) rotate(5deg);
    box-shadow: 0 12px 35px rgba(37, 99, 235, 0.4);
}

.add-to-cart:active {
    transform: translateY(-2px) scale(1.05) rotate(2deg);
    transition: all 0.1s ease;
}

.add-to-cart i {
    transition: all 0.4s var(--transition-bounce);
    position: relative;
    z-index: 1;
}

.add-to-cart:hover i {
    transform: scale(1.2);
    animation: cartBounce 0.6s ease;
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1.2); }
    25% { transform: scale(1.4) rotate(-10deg); }
    50% { transform: scale(1.3) rotate(5deg); }
    75% { transform: scale(1.25) rotate(-2deg); }
}

.add-to-cart.adding {
    pointer-events: none;
}

.add-to-cart.adding i {
    animation: cartSuccess 0.8s ease;
}

@keyframes cartSuccess {
    0% { transform: scale(1.2); }
    20% { transform: scale(1.5) rotate(20deg); opacity: 1; }
    40% { transform: scale(1.1) rotate(-10deg); opacity: 0.7; }
    60% { transform: scale(1.3) rotate(10deg); opacity: 1; }
    80% { transform: scale(1.15); opacity: 0.8; }
    100% { transform: scale(1.2); opacity: 1; }
}

.add-to-cart::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: scale(0);
    opacity: 0;
    border-radius: inherit;
    transition: all 0.3s ease;
}

.add-to-cart:active::after {
    transform: scale(1);
    opacity: 1;
    transition: all 0.1s ease;
}

.comparison-checkbox {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
}

.comparison-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.comparison-checkbox label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s var(--transition-bounce);
    backdrop-filter: blur(10px);
    pointer-events: all;
    user-select: none;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.comparison-checkbox label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(116, 192, 252, 0.3), transparent);
    transition: left 0.4s ease;
}

.comparison-checkbox label:hover::before {
    left: 100%;
}

.comparison-checkbox label::after {
    content: 'Compare';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    background: rgba(31, 41, 55, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s var(--transition-smooth);
    z-index: 100;
}

.comparison-checkbox label:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-120%);
}

.comparison-checkbox label:hover {
    background: #74C0FC;
    color: white;
    border-color: #74C0FC;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(116, 192, 252, 0.3);
}

.comparison-checkbox input[type="checkbox"]:checked + label {
    background: #74C0FC;
    color: white;
    border-color: #74C0FC;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(116, 192, 252, 0.4);
    animation: checkSuccess 0.5s ease;
}

@keyframes checkSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.3) rotate(10deg); }
    100% { transform: scale(1.1); }
}

.comparison-checkbox label i {
    font-size: 0.875rem;
    transition: all 0.3s var(--transition-smooth);
}

.comparison-checkbox label:hover i {
    transform: scale(1.1);
}

.component-card.type-restricted .comparison-checkbox label {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: var(--danger);
    cursor: not-allowed;
}

.component-card.type-restricted .comparison-checkbox label:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border-color: var(--danger);
    transform: none;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.component-card.type-restricted::after {
    content: 'Different component type';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(31, 41, 55, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--transition-smooth);
    z-index: 10;
    white-space: nowrap;
}

.component-card.type-restricted:hover::after {
    opacity: 1;
}

.nav-cart {
    position: relative;
    margin-left: 20px;
}

.nav-cart-btn {
    background: none;
    border: none;
    padding: 12px;
    font-size: 1.3rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 8px;
    position: relative;
    cursor: pointer;
}

.nav-cart-btn:hover {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
    transform: translateY(-2px) scale(1.05);
}

.nav-cart-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--gradient-primary);
    color: white;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
    border: 2px solid white;
    animation: badgeFloat 3s ease-in-out infinite;
}

@keyframes badgeFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-2px); }
}

.cart-dropdown {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 420px;
    max-width: 90vw;
    background: var(--gradient-surface);
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border-color);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.cart-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.cart-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 24px;
    width: 16px;
    height: 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
    z-index: 1;
}

.cart-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--background) 0%, #ffffff 100%);
    position: relative;
}

.cart-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.6s ease;
}

.cart-dropdown.show .cart-header::after {
    transform: scaleX(1);
}

.cart-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
    animation: titleSlide 0.6s ease 0.2s both;
}

@keyframes titleSlide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-title i {
    color: var(--primary-color);
    font-size: 1.1rem;
    animation: iconSpin 2s ease-in-out infinite;
}

@keyframes iconSpin {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(10deg); }
}

.cart-items-container {
    max-height: 320px;
    overflow-y: auto;
    padding: 0;
}

.cart-items-container::-webkit-scrollbar {
    width: 6px;
}

.cart-items-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.cart-items-container::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 3px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
    animation: itemSlideIn 0.6s ease;
    animation-fill-mode: both;
}

@keyframes itemSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-item:hover {
    background: var(--background);
    transform: translateX(4px);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    flex-shrink: 0;
    padding: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.cart-item:hover .cart-item-image {
    transform: scale(1.05) rotate(2deg);
    border-color: var(--primary-color);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    transition: color 0.3s ease;
}

.cart-item:hover .cart-item-name {
    color: var(--primary-color);
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s ease;
}

.cart-item:hover .cart-item-price {
    transform: scale(1.05);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--background);
    border-radius: 8px;
    padding: 4px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.quantity-controls:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: white;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--transition-bounce);
    font-size: 0.9rem;
    font-weight: 600;
}

.quantity-btn:hover {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.15) rotate(5deg);
}

.quantity-btn:active {
    transform: scale(0.95);
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.quantity-display {
    min-width: 32px;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.remove-item-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--transition-bounce);
    font-size: 0.85rem;
}

.remove-item-btn:hover {
    background: var(--danger);
    color: white;
    transform: scale(1.15) rotate(10deg);
}

.cart-empty {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-secondary);
    animation: emptyState 0.8s ease;
}

@keyframes emptyState {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cart-empty-icon {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 16px;
    animation: iconFloat 3s ease-in-out infinite;
}

.cart-empty-text {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

.cart-empty-subtext {
    font-size: 0.85rem;
    opacity: 0.8;
}

.cart-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--background);
    animation: footerSlideUp 0.6s ease 0.3s both;
}

@keyframes footerSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-summary {
    margin-bottom: 16px;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.cart-subtotal:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

.cart-subtotal span:last-child {
    font-family: 'JetBrains Mono', monospace;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.cart-total:hover {
    transform: scale(1.02);
}

.cart-total-amount {
    color: var(--primary-color);
    font-family: 'JetBrains Mono', monospace;
    animation: priceGlow 3s ease-in-out infinite;
}

@keyframes priceGlow {
    0%, 100% { text-shadow: 0 0 5px rgba(37, 99, 235, 0.3); }
    50% { text-shadow: 0 0 15px rgba(37, 99, 235, 0.6); }
}

.cart-actions {
    display: flex;
    gap: 12px;
}

.cart-action-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s var(--transition-bounce);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}

.cart-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cart-action-btn:hover::before {
    left: 100%;
}

.view-cart-btn {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.view-cart-btn:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.checkout-btn {
    background: var(--gradient-primary);
    color: white;
    border: 2px solid transparent;
}

.checkout-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
}

.checkout-btn a {
    color: inherit;
    text-decoration: none;
}

.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--gradient-surface);
    color: var(--text-primary);
    padding: 16px 20px;
    border-radius: 12px;
    z-index: 10000;
    transform: translateX(120%);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    font-weight: 500;
    min-width: 280px;
    max-width: 400px;
    border-left: 4px solid var(--success);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    font-family: 'Inter', sans-serif;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--success);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-text {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.filter-toggle-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    z-index: 998;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--transition-bounce);
}

.filter-toggle-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
}

.filter-toggle-btn i {
    font-size: 1.125rem;
}

.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--transition-smooth);
    backdrop-filter: blur(4px);
}

.filter-overlay.show {
    opacity: 1;
    visibility: visible;
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.component-card {
    animation: fadeInUp 0.6s ease forwards;
}

.component-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, rgba(59, 130, 246, 0.01) 100%);
    opacity: 0;
    transition: opacity 0.3s var(--transition-smooth);
    pointer-events: none;
    border-radius: var(--radius-lg);
    z-index: 1;
}

.component-card:hover::before {
    opacity: 1;
}

.component-type {
    position: relative;
    overflow: hidden;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background);
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
    border: 2px solid var(--background);
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

.add-to-cart:focus,
.btn-icon:focus,
.view-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --shadow-light: rgba(0, 0, 0, 0.2);
        --shadow-medium: rgba(0, 0, 0, 0.3);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
/* Professional Component Details Modal */
.modal-dialog {
    max-width: 900px;
    margin: 1.5rem auto;
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    background: var(--surface);
    max-height: 85vh;
    animation: contentFadeIn 0.5s ease 0.1s both;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, var(--background) 0%, #f8fafc 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    position: relative;
}

.modal-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.25rem;
    margin: 0;
    letter-spacing: -0.025em;
}

.btn-close {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.6;
    cursor: pointer;
}

.btn-close:hover {
    background: rgba(239, 68, 68, 0.1);
    opacity: 1;
    transform: scale(1.1);
}

.modal-body {
    padding: 0;
    background: var(--surface);
}

.modal-product-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 0;
    height: 450px;
}

.modal-image-section {
    background: linear-gradient(135deg, #f8fafc 0%, var(--background) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-right: 1px solid var(--border-color);
    position: relative;
}

.modal-image-section img {
    width: 100%;
    height: auto;
    max-height: 160px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.modal-image-section:hover img {
    transform: scale(1.05);
}

.modal-sale-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.modal-info-section {
    padding: 20px;
    display: grid;
    grid-template-rows: auto auto auto 1fr;
    gap: 16px;
    overflow: hidden;
}

.modal-product-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.modal-product-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    line-height: 1.2;
    letter-spacing: -0.025em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modal-product-type {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

.modal-price-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(59, 130, 246, 0.02));
    border-radius: 10px;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.modal-price-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-original-price {
    font-size: 0.9rem;
    color: var(--text-light);
    text-decoration: line-through;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

.modal-sale-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.025em;
}

.modal-stock-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--background);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.modal-stock-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
}

.modal-stock-info i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.modal-stock-status {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-stock-status.in-stock {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.modal-stock-status.low-stock {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.modal-stock-status.out-of-stock {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.modal-specs-section {
    min-height: 0;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-specs-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.modal-specs-title i {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.modal-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    overflow-y: auto;
    padding-right: 6px;
    flex: 1;
    min-height: 0;
    max-height: none;
}

.modal-specs-grid::-webkit-scrollbar {
    width: 3px;
}

.modal-specs-grid::-webkit-scrollbar-track {
    background: var(--background);
    border-radius: 2px;
}

.modal-specs-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.modal-spec-item {
    background: var(--surface);
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-spec-item:hover {
    background: var(--background);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.modal-spec-label {
    font-family: 'Inter', sans-serif;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.75rem;
    display: block;
    margin-bottom: 2px;
}

.modal-spec-value {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.75rem;
    word-break: break-word;
    line-height: 1.2;
}

.modal-footer {
    background: var(--background);
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-footer .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
}

.modal-footer .btn-secondary {
    background: var(--surface);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.modal-footer .btn-secondary:hover {
    background: var(--text-secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.modal-footer .btn-outline-primary {
    background: var(--surface);
    color: #74C0FC;
    border: 2px solid #74C0FC;
}

.modal-footer .btn-outline-primary:hover {
    background: #74C0FC;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(116, 192, 252, 0.3);
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: 2px solid transparent;
}

.modal-footer .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}



/* ===== RESPONSIVE STYLES ===== */

/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .components-grid.cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    /* Filter sidebar becomes off-canvas */
    .filter-toggle-btn {
        display: flex;
    }

    .sidebar-filter {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        height: 100vh;
        z-index: 1001;
        margin: 0;
        padding: 60px 24px 24px;
        overflow-y: auto;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
        transition: left 0.4s var(--transition-smooth);
        border-radius: 0;
        backdrop-filter: blur(20px);
        max-height: 100vh;
    }

    .sidebar-filter.show {
        left: 0;
    }

    .filter-close-btn {
        display: flex;
    }
    
    /* Grid adjustments */
    .components-grid.cols-3,
    .components-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* View controls adjustment */
    .view-controls {
        flex-direction: column;
        gap: 12px;
    }
    
    /* Modal adjustments */
    .modal-product-container {
        grid-template-columns: 200px 1fr;
    }
    
    .modal-image-section img {
        max-height: 140px;
    }
    
    .modal-specs-grid {
        grid-template-columns: 1fr;
    }
    
    /* Cart dropdown adjustment */
    .cart-dropdown {
        top: 70px;
        right: 16px;
        left: 16px;
        max-width: 400px;
        margin: 0 auto;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    /* Header adjustments */
    .components-header {
        flex-direction: column;
        gap: 16px;
    }
    
    /* Grid: 2 components per row */
    .components-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    /* Card content adjustments */
    .component-card {
        min-height: 280px;
    }
    
    .component-image {
        height: 110px;
        padding: 12px;
    }
    
    .component-info {
        padding: 14px;
    }
    
    .component-type {
        font-size: 0.7rem;
    }
    
    .component-name {
        font-size: 0.9rem;
    }
    
    .component-sku {
        font-size: 0.75rem;
    }
    
    .sale-price {
        font-size: 1.1rem;
    }
    
    /* Modal becomes single column */
    .modal-product-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        height: auto;
    }
    
    .modal-image-section {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 16px;
        text-align: center;
    }
    
    .modal-image-section img {
        max-height: 120px;
    }
    
    .modal-info-section {
        padding: 16px;
        overflow-y: auto;
        max-height: 50vh;
    }
    
    .modal-specs-grid {
        grid-template-columns: 1fr;
        max-height: 200px;
        overflow-y: auto;
    }
    
    .modal-footer {
        flex-wrap: wrap;
    }
    
    .modal-footer .btn {
        flex: 1;
        min-width: 120px;
        margin: 4px;
    }

    /* Other adjustments */
    .cart-dropdown {
        top: 60px;
        right: 10px;
        left: 10px;
    }

    .components-wrapper {
        padding: 100px 0 30px;
    }

    .filter-toggle-btn {
        bottom: 80px;
        width: 45px;
        height: 45px;
    }
    
    /* View buttons text hidden, only icons */
    .view-btn span {
        display: none;
    }
    
    .view-btn {
        min-width: 60px;
        font-size: 0.8rem;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .components-wrapper {
        padding: 80px 0 20px;
    }

    /* Grid: 2 components per row with tighter spacing */
    .components-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .component-card {
        min-height: 250px;
    }
    
    .component-image {
        height: 90px;
    }
    
    .component-info {
        padding: 12px;
    }
    
    .component-name {
        font-size: 0.85rem;
    }
    
    .component-sku {
        font-size: 0.7rem;
    }
    
    .sale-price {
        font-size: 1rem;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-content {
        max-height: 90vh;
    }
    
    .modal-image-section {
        padding: 12px;
    }
    
    .modal-image-section img {
        max-height: 100px;
    }
    
    .modal-info-section {
        padding: 12px;
        max-height: 45vh;
    }
    
    .modal-product-name {
        font-size: 1.1rem;
    }
    
    .modal-sale-price {
        font-size: 1.3rem;
    }

    /* Filter button adjustment */
    .filter-toggle-btn {
        bottom: 70px;
        left: 10px;
        width: 40px;
        height: 40px;
    }
    
    /* Full width filter on very small screens */
    .sidebar-filter {
        width: 100%;
        padding: 70px 20px 20px;
    }
}

/* Very small devices (less than 400px) */
@media (max-width: 399.98px) {
    .components-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .component-card {
        min-height: 230px;
    }
    
    .component-image {
        height: 100px;
    }
    
    /* Modal button adjustments */
    .modal-footer .btn {
        min-width: 100px;
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    /* Filter options adjustments */
    .filter-option {
        padding: 6px 6px 6px 28px;
        margin-bottom: 6px;
        font-size: 0.8rem;
    }
    
    .checkmark {
        left: 6px;
        height: 16px;
        width: 16px;
    }
    
    .filter-option .checkmark:after {
        left: 4px;
        top: 1px;
        width: 3px;
        height: 7px;
    }
}

@media print {
    .navbar, 
    .filter-toggle-btn, 
    .comparison-toggle-btn,
    .component-actions,
    .comparison-checkbox,
    .sidebar-filter,
    .view-controls,
    .modal-footer,
    .footer {
        display: none !important;
    }
    
    .components-wrapper {
        padding: 20px 0;
    }
    
    .component-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
/* ===== COMPONENT DETAILS MODAL - RESPONSIVE STYLES ===== */

/* Base Modal Styles - More Zoomed Out */
.modal-dialog {
    max-width: 95vw;
    width: 95vw;
    margin: 1rem auto;
    animation: modalSlideIn 0.4s ease;
}

.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    background: var(--surface);
    max-height: 90vh;
    animation: contentFadeIn 0.5s ease 0.1s both;
}

.modal-header {
    background: linear-gradient(135deg, var(--background) 0%, #f8fafc 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 20px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
    margin: 0;
    letter-spacing: -0.025em;
    flex: 1;
    padding-right: 15px;
}

/* Fixed Close Button */
.btn-close {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
    color: var(--danger);
    font-size: 14px;
    font-weight: bold;
    position: relative;
    z-index: 10;
}

.btn-close::before {
    content: '×';
    font-size: 18px;
    line-height: 1;
}

.btn-close:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    transform: scale(1.1);
}

.modal-body {
    padding: 0;
    background: var(--surface);
    overflow: hidden;
}

.modal-product-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    min-height: 400px;
    max-height: 70vh;
}

.modal-image-section {
    background: linear-gradient(135deg, #f8fafc 0%, var(--background) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-right: 1px solid var(--border-color);
    position: relative;
}

.modal-image-section img {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.modal-info-section {
    padding: 20px;
    display: grid;
    grid-template-rows: auto auto auto 1fr;
    gap: 12px;
    overflow: hidden;
    min-height: 0;
}

.modal-specs-section {
    min-height: 0;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-specs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    overflow-y: auto;
    padding-right: 8px;
    flex: 1;
    min-height: 0;
    max-height: 200px;
}

.modal-spec-item {
    background: var(--surface);
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-footer {
    background: var(--background);
    border-top: 1px solid var(--border-color);
    padding: 12px 20px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Large Tablets and Small Desktops (1200px and down) */
@media (max-width: 1199.98px) {
    .modal-dialog {
        max-width: 90vw;
        width: 90vw;
        margin: 1.5rem auto;
    }
    
    .modal-product-container {
        grid-template-columns: 240px 1fr;
        min-height: 380px;
        max-height: 75vh;
    }
    
    .modal-specs-grid {
        grid-template-columns: repeat(2, 1fr);
        max-height: 180px;
    }
}

/* Medium Tablets (992px and down) */
@media (max-width: 991.98px) {
    .modal-dialog {
        max-width: 95vw;
        width: 95vw;
        margin: 1rem auto;
    }
    
    .modal-header {
        padding: 12px 16px;
    }
    
    .modal-title {
        font-size: 1rem;
    }
    
    .btn-close {
        width: 30px;
        height: 30px;
    }
    
    .modal-product-container {
        grid-template-columns: 200px 1fr;
        min-height: 360px;
        max-height: 70vh;
    }
    
    .modal-image-section {
        padding: 16px;
    }
    
    .modal-image-section img {
        max-height: 150px;
    }
    
    .modal-info-section {
        padding: 16px;
        gap: 10px;
    }
    
    .modal-specs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        max-height: 160px;
    }
}

/* Small Tablets and Large Phones (768px and down) */
@media (max-width: 767.98px) {
    .modal-dialog {
        max-width: 98vw;
        width: 98vw;
        margin: 0.5rem auto;
    }
    
    .modal-content {
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 10px 16px;
    }
    
    .modal-title {
        font-size: 0.95rem;
        padding-right: 10px;
    }
    
    .btn-close {
        width: 28px;
        height: 28px;
    }
    
    .btn-close::before {
        font-size: 16px;
    }
    
    /* Switch to single column layout */
    .modal-product-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        min-height: auto;
        max-height: 80vh;
    }
    
    .modal-image-section {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 12px;
        height: auto;
        min-height: 140px;
    }
    
    .modal-image-section img {
        max-height: 120px;
    }
    
    .modal-info-section {
        padding: 12px 16px;
        overflow-y: auto;
        max-height: 60vh;
        gap: 10px;
    }
    
    .modal-product-name {
        font-size: 1.1rem;
    }
    
    .modal-sale-price {
        font-size: 1.3rem;
    }
    
    .modal-specs-grid {
        grid-template-columns: 1fr;
        max-height: 180px;
        gap: 6px;
    }
    
    .modal-spec-item {
        padding: 6px 8px;
        min-height: 40px;
    }
    
    .modal-footer {
        padding: 10px 16px;
        gap: 6px;
    }
    
    .modal-footer .btn {
        flex: 1;
        min-width: 80px;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* Medium Phones (576px and down) */
@media (max-width: 575.98px) {
    .modal-dialog {
        margin: 0.25rem auto;
        max-width: 100vw;
        width: 100vw;
    }
    
    .modal-content {
        max-height: 98vh;
        border-radius: 8px;
    }
    
    .modal-header {
        padding: 8px 12px;
    }
    
    .modal-title {
        font-size: 0.9rem;
        padding-right: 8px;
    }
    
    .btn-close {
        width: 26px;
        height: 26px;
    }
    
    .modal-image-section {
        padding: 10px;
        min-height: 120px;
    }
    
    .modal-image-section img {
        max-height: 100px;
    }
    
    .modal-info-section {
        padding: 10px 12px;
        max-height: 65vh;
        gap: 8px;
    }
    
    .modal-product-name {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .modal-sale-price {
        font-size: 1.2rem;
    }
    
    .modal-specs-title {
        font-size: 0.85rem;
        margin-bottom: 8px;
    }
    
    .modal-specs-grid {
        max-height: 150px;
        gap: 4px;
    }
    
    .modal-spec-item {
        padding: 6px;
        min-height: 38px;
    }
    
    .modal-spec-label {
        font-size: 0.7rem;
        margin-bottom: 1px;
    }
    
    .modal-spec-value {
        font-size: 0.7rem;
    }
    
    .modal-footer {
        padding: 8px 12px;
        gap: 4px;
    }
    
    .modal-footer .btn {
        padding: 6px 10px;
        font-size: 0.75rem;
        min-width: 70px;
    }
}

/* Small Phones (480px and down) */
@media (max-width: 479.98px) {
    .modal-content {
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-header {
        padding: 8px 10px;
    }
    
    .modal-title {
        font-size: 0.85rem;
    }
    
    .btn-close {
        width: 24px;
        height: 24px;
    }
    
    .btn-close::before {
        font-size: 14px;
    }
    
    .modal-image-section {
        padding: 8px;
        min-height: 100px;
    }
    
    .modal-image-section img {
        max-height: 80px;
    }
    
    .modal-info-section {
        padding: 8px 10px;
        max-height: 70vh;
    }
    
    .modal-product-name {
        font-size: 0.9rem;
    }
    
    .modal-product-type {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
    
    .modal-sale-price {
        font-size: 1.1rem;
    }
    
    .modal-specs-grid {
        max-height: 120px;
    }
    
    .modal-spec-item {
        padding: 4px 6px;
        min-height: 35px;
    }
    
    .modal-footer {
        padding: 6px 10px;
    }
    
    .modal-footer .btn {
        padding: 6px 8px;
        font-size: 0.7rem;
        min-width: 60px;
    }
}

/* Extra Small Phones (360px and down) */
@media (max-width: 359.98px) {
    .modal-title {
        font-size: 0.8rem;
    }
    
    .modal-image-section {
        min-height: 90px;
    }
    
    .modal-image-section img {
        max-height: 70px;
    }
    
    .modal-product-name {
        font-size: 0.85rem;
    }
    
    .modal-sale-price {
        font-size: 1rem;
    }
    
    .modal-specs-grid {
        max-height: 100px;
    }
    
    .modal-spec-item {
        padding: 4px;
        min-height: 32px;
    }
    
    .modal-spec-label,
    .modal-spec-value {
        font-size: 0.65rem;
    }
}