/*
===========================================
FACTORZ PRODUCT COMPARISON STYLE GUIDE
===========================================

Based on 2025 e-commerce and comparison website design trends
Research-driven design system for modern product comparison experiences

===========================================
TABLE OF CONTENTS
===========================================
1. Color Palette
2. Typography
3. Spacing & Layout
4. Component Library
5. Card Systems
6. Interactive Elements
7. Responsive Grid
8. Animation & Transitions
===========================================
*/

/* ===========================================
   1. COLOR PALETTE
   =========================================== */

:root {
    /* Primary Brand Colors */
    --color-primary: #6366f1;           /* Modern indigo */
    --color-primary-light: #a5b4fc;     /* Light indigo */
    --color-primary-dark: #4338ca;      /* Dark indigo */
    --color-primary-50: #eef2ff;        /* Very light indigo */
    --color-primary-100: #e0e7ff;       /* Ultra light indigo */
    
    /* Secondary Colors */
    --color-secondary: #f59e0b;         /* Amber accent */
    --color-secondary-light: #fbbf24;   /* Light amber */
    --color-secondary-dark: #d97706;    /* Dark amber */
    
    /* Success & Status Colors */
    --color-success: #10b981;           /* Emerald green */
    --color-warning: #f59e0b;           /* Amber */
    --color-error: #ef4444;             /* Red */
    --color-info: #3b82f6;              /* Blue */
    
    /* Neutral Grays */
    --color-gray-50: #f9fafb;           /* Very light gray */
    --color-gray-100: #f3f4f6;          /* Light gray */
    --color-gray-200: #e5e7eb;          /* Medium light gray */
    --color-gray-300: #d1d5db;          /* Medium gray */
    --color-gray-400: #9ca3af;          /* Dark medium gray */
    --color-gray-500: #6b7280;          /* Dark gray */
    --color-gray-600: #4b5563;          /* Very dark gray */
    --color-gray-700: #374151;          /* Almost black */
    --color-gray-800: #1f2937;          /* Near black */
    --color-gray-900: #111827;          /* Black */
    
    /* Text Colors */
    --color-text-primary: #111827;      /* Main text */
    --color-text-secondary: #6b7280;    /* Secondary text */
    --color-text-muted: #9ca3af;        /* Muted text */
    --color-text-inverse: #ffffff;      /* White text */
    
    /* Background Colors */
    --color-bg-primary: #ffffff;        /* Main background */
    --color-bg-secondary: #f9fafb;      /* Secondary background */
    --color-bg-accent: #eef2ff;         /* Accent background */
    --color-bg-dark: #1f2937;           /* Dark background */
    
    /* Border Colors */
    --color-border-light: #e5e7eb;      /* Light borders */
    --color-border-medium: #d1d5db;     /* Medium borders */
    --color-border-dark: #6b7280;       /* Dark borders */
    
    /* Shadow Colors */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 0px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

/* ===========================================
   2. TYPOGRAPHY
   =========================================== */

/* Font Stack */
:root {
    --font-family-sans: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-family-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
}

/* Font Sizes */
:root {
    --text-xs: 0.75rem;     /* 12px */
    --text-sm: 0.875rem;    /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.5rem;     /* 24px */
    --text-3xl: 1.875rem;   /* 30px */
    --text-4xl: 2.25rem;    /* 36px */
    --text-5xl: 3rem;       /* 48px */
}

/* Font Weights */
:root {
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
}

/* Line Heights */
:root {
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
}

/* ===========================================
   3. SPACING & LAYOUT
   =========================================== */

:root {
    /* Spacing Scale */
    --space-0: 0;
    --space-1: 0.25rem;     /* 4px */
    --space-2: 0.5rem;      /* 8px */
    --space-3: 0.75rem;     /* 12px */
    --space-4: 1rem;        /* 16px */
    --space-5: 1.25rem;     /* 20px */
    --space-6: 1.5rem;      /* 24px */
    --space-8: 2rem;        /* 32px */
    --space-10: 2.5rem;     /* 40px */
    --space-12: 3rem;       /* 48px */
    --space-16: 4rem;       /* 64px */
    --space-20: 5rem;       /* 80px */
    --space-24: 6rem;       /* 96px */
    
    /* Border Radius */
    --radius-sm: 0.125rem;  /* 2px */
    --radius-md: 0.375rem;  /* 6px */
    --radius-lg: 0.5rem;    /* 8px */
    --radius-xl: 0.75rem;   /* 12px */
    --radius-2xl: 1rem;     /* 16px */
    --radius-full: 9999px;  /* Full rounded */
    
    /* Max Widths */
    --max-width-xs: 20rem;    /* 320px */
    --max-width-sm: 24rem;    /* 384px */
    --max-width-md: 28rem;    /* 448px */
    --max-width-lg: 32rem;    /* 512px */
    --max-width-xl: 36rem;    /* 576px */
    --max-width-2xl: 42rem;   /* 672px */
    --max-width-3xl: 48rem;   /* 768px */
    --max-width-4xl: 56rem;   /* 896px */
    --max-width-5xl: 64rem;   /* 1024px */
    --max-width-6xl: 72rem;   /* 1152px */
    --max-width-7xl: 80rem;   /* 1280px */
}

/* ===========================================
   4. COMPONENT LIBRARY
   =========================================== */

/* Modern Card Component */
.sg-card {
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease-in-out;
    overflow: hidden;
}

.sg-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--color-primary-light);
}

.sg-card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--color-border-light);
    background: var(--color-bg-secondary);
}

.sg-card-body {
    padding: var(--space-6);
}

.sg-card-footer {
    padding: var(--space-6);
    border-top: 1px solid var(--color-border-light);
    background: var(--color-bg-secondary);
}

/* Product Card Specific */
.sg-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition: all 0.3s ease;
}

.sg-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.sg-product-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--color-bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.sg-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.sg-product-card:hover .sg-product-image img {
    transform: scale(1.05);
}

.sg-product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-3);
}

.sg-product-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--color-text-primary);
    line-height: var(--leading-tight);
    margin: 0;
}

.sg-product-description {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: var(--leading-relaxed);
    margin: 0;
}

.sg-product-price {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--color-primary);
    margin: var(--space-2) 0;
}

.sg-product-badge {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    z-index: 10;
}

/* Score/Rating Component */
.sg-score {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.sg-score-badge {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    min-width: 3rem;
    text-align: center;
}

.sg-score-bar {
    flex: 1;
    height: 6px;
    background: var(--color-gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.sg-score-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: var(--radius-full);
    transition: width 1s ease-out;
}

/* ===========================================
   5. MODERN BUTTON SYSTEM
   =========================================== */

.sg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    box-sizing: border-box;
}

.sg-btn-primary {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
}

.sg-btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.sg-btn-secondary {
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    border-color: var(--color-border-medium);
}

.sg-btn-secondary:hover {
    background: var(--color-bg-secondary);
    border-color: var(--color-border-dark);
}

.sg-btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.sg-btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-text-inverse);
}

/* Button Sizes */
.sg-btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

.sg-btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

/* ===========================================
   6. COMPARISON TABLE STYLES
   =========================================== */

.sg-comparison-grid {
    display: grid;
    gap: var(--space-6);
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.sg-comparison-feature {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.sg-comparison-feature:last-child {
    border-bottom: none;
}

.sg-feature-label {
    font-weight: var(--font-medium);
    color: var(--color-text-primary);
}

.sg-feature-value {
    color: var(--color-text-secondary);
    text-align: right;
}

/* ===========================================
   7. FILTER & SEARCH COMPONENTS
   =========================================== */

.sg-filter-bar {
    background: var(--color-bg-secondary);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
}

.sg-search-input {
    flex: 1;
    min-width: 250px;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    background: var(--color-bg-primary);
    transition: border-color 0.2s ease;
}

.sg-search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-50);
}

.sg-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    background: var(--color-primary-100);
    color: var(--color-primary-dark);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
}

.sg-filter-remove {
    background: none;
    border: none;
    color: var(--color-primary-dark);
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sg-filter-remove:hover {
    background: var(--color-primary-dark);
    color: var(--color-text-inverse);
}

/* ===========================================
   8. RESPONSIVE GRID SYSTEM
   =========================================== */

.sg-container {
    width: 100%;
    max-width: var(--max-width-7xl);
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.sg-grid {
    display: grid;
    gap: var(--space-6);
}

.sg-grid-1 { grid-template-columns: 1fr; }
.sg-grid-2 { grid-template-columns: repeat(2, 1fr); }
.sg-grid-3 { grid-template-columns: repeat(3, 1fr); }
.sg-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Responsive Grid */
@media (max-width: 768px) {
    .sg-grid-2,
    .sg-grid-3,
    .sg-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .sg-comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .sg-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sg-search-input {
        min-width: auto;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .sg-grid-3,
    .sg-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===========================================
   9. ANIMATIONS & TRANSITIONS
   =========================================== */

.sg-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.sg-slide-up {
    animation: slideUp 0.5s ease-out;
}

.sg-scale-in {
    animation: scaleIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===========================================
   10. UTILITY CLASSES
   =========================================== */

/* Text Utilities */
.sg-text-center { text-align: center; }
.sg-text-left { text-align: left; }
.sg-text-right { text-align: right; }

.sg-font-light { font-weight: var(--font-light); }
.sg-font-normal { font-weight: var(--font-normal); }
.sg-font-medium { font-weight: var(--font-medium); }
.sg-font-semibold { font-weight: var(--font-semibold); }
.sg-font-bold { font-weight: var(--font-bold); }

/* Spacing Utilities */
.sg-m-0 { margin: 0; }
.sg-m-1 { margin: var(--space-1); }
.sg-m-2 { margin: var(--space-2); }
.sg-m-3 { margin: var(--space-3); }
.sg-m-4 { margin: var(--space-4); }
.sg-m-6 { margin: var(--space-6); }
.sg-m-8 { margin: var(--space-8); }

.sg-p-0 { padding: 0; }
.sg-p-1 { padding: var(--space-1); }
.sg-p-2 { padding: var(--space-2); }
.sg-p-3 { padding: var(--space-3); }
.sg-p-4 { padding: var(--space-4); }
.sg-p-6 { padding: var(--space-6); }
.sg-p-8 { padding: var(--space-8); }

/* Margin/Padding directions */
.sg-mt-4 { margin-top: var(--space-4); }
.sg-mb-4 { margin-bottom: var(--space-4); }
.sg-ml-4 { margin-left: var(--space-4); }
.sg-mr-4 { margin-right: var(--space-4); }

.sg-pt-4 { padding-top: var(--space-4); }
.sg-pb-4 { padding-bottom: var(--space-4); }
.sg-pl-4 { padding-left: var(--space-4); }
.sg-pr-4 { padding-right: var(--space-4); }

/* Display Utilities */
.sg-hidden { display: none; }
.sg-block { display: block; }
.sg-inline { display: inline; }
.sg-inline-block { display: inline-block; }
.sg-flex { display: flex; }
.sg-grid { display: grid; }

/* Flex Utilities */
.sg-flex-col { flex-direction: column; }
.sg-flex-row { flex-direction: row; }
.sg-justify-center { justify-content: center; }
.sg-justify-between { justify-content: space-between; }
.sg-items-center { align-items: center; }
.sg-items-start { align-items: flex-start; }
.sg-items-end { align-items: flex-end; }

/* Background Utilities */
.sg-bg-white { background-color: var(--color-bg-primary); }
.sg-bg-gray { background-color: var(--color-bg-secondary); }
.sg-bg-primary { background-color: var(--color-primary); }

/* Border Utilities */
.sg-rounded { border-radius: var(--radius-md); }
.sg-rounded-lg { border-radius: var(--radius-lg); }
.sg-rounded-xl { border-radius: var(--radius-xl); }
.sg-rounded-full { border-radius: var(--radius-full); }

/* Shadow Utilities */
.sg-shadow { box-shadow: var(--shadow-md); }
.sg-shadow-lg { box-shadow: var(--shadow-lg); }
.sg-shadow-xl { box-shadow: var(--shadow-xl); }

/* ===========================================
   END OF STYLE GUIDE
   =========================================== */

/*
===========================================
PRODUCT GEMINI PAGE - MODERN DESIGN
===========================================
Based on Gemini sketch design
Factorz Style Guide Implementation
===========================================
*/

/* ===========================================
   FACTORZ STYLE GUIDE VARIABLES
   =========================================== */

:root {
    /* Primary Brand Colors */
    --color-primary: #6366f1;
    --color-primary-light: #a5b4fc;
    --color-primary-dark: #4338ca;
    --color-primary-50: #eef2ff;
    --color-primary-100: #e0e7ff;

    /* Secondary Colors */
    --color-secondary: #f59e0b;
    --color-secondary-light: #fbbf24;
    --color-secondary-dark: #d97706;

    /* Success & Status Colors */
    --color-success: #10b981;
    --color-error: #ef4444;

    /* Neutral Grays */
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;

    /* Text & Background */
    --color-text-primary: #111827;
    --color-text-secondary: #6b7280;
    --color-text-inverse: #ffffff;
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #f3f4f6;
    --color-border-light: #e5e7eb;

    /* Spacing & Radius */
    --space-0: 0;
    --space-1: 0.25rem;     /* 4px */
    --space-2: 0.5rem;      /* 8px */
    --space-3: 0.75rem;    /* 12px */
    --space-4: 1rem;       /* 16px */
    --space-5: 1.25rem;    /* 20px */
    --space-6: 1.5rem;     /* 24px */
    --space-8: 2rem;       /* 32px */
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-full: 9999px;
    
    /* Typography */
    --text-xs: 0.75rem;     /* 12px */
    --text-sm: 0.875rem;    /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg: 1.125rem;    /* 18px */
    --text-xl: 1.25rem;     /* 20px */
    --text-2xl: 1.5rem;     /* 24px */
    --text-3xl: 1.875rem;   /* 30px */
    --text-4xl: 2.25rem;    /* 36px */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;
    --leading-tight: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 0px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.linkhover:hover, .nav-link:hover, .nav-link, .link, a
{
    color:initial;
}

.sg-btn{
    text-decoration: none;
}

/* ===========================================
   CONTAINER & GLOBAL STYLES
   =========================================== */

amain{
    background-color: var(--color-bg-secondary);
}

.product-gemini-container {
    /* font-family: 'Inter', sans-serif; */
    /*  */
    color: var(--color-text-primary);
    line-height: 1.5;
    min-height: 100vh;
    padding: 1rem var(--space-1);  /* Reduced side padding on mobile (8px) */
}

@media (min-width: 768px) {
    .product-gemini-container {
        padding: 2rem;
    }
}

.sg-container {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;  /* Remove extra padding on mobile */
    padding-right: 0;
}

@media (min-width: 768px) {
    .sg-container {
        padding-left: var(--space-4);
        padding-right: var(--space-4);
    }
}

/* ===========================================
   H2 HEADING STYLES (Consistent across all sections)
   =========================================== */

.product-gemini-container h2 {
    font-size: var(--text-3xl);  /* 30px */
    font-weight: var(--font-extrabold);  /* 800 */
    margin-bottom: 2rem;  /* mb-8 */
    padding-bottom: 0.75rem;  /* pb-3 */
    border-bottom: 1px solid var(--color-gray-200);
    color: var(--color-text-primary);
    line-height: var(--leading-tight);
}

/* ===========================================
   H4 HEADING STYLES (Consistent across all sections)
   =========================================== */

.product-gemini-container h4 {
    font-size: var(--text-xl);  /* 20px */
    font-weight: var(--font-bold);  /* 700 */
    color: var(--color-text-primary);
    margin: 0;
    line-height: var(--leading-tight);
}

section + h2 {
    margin-top: 2rem;  /* Reduced on mobile */
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    section + h2 {
        margin-top: 4rem;
    }
}

/* ===========================================
   BASE CARD STYLING
   =========================================== */

.sg-card {
    background: var(--color-bg-primary);
    /* border: 1px solid var(--color-border-light); */
    border-radius: var(--radius-2xl);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 0px 4px -2px rgb(0 0 0 / 0.05);
    overflow: hidden;
    transition: all 0.2s ease-in-out;
}

.factor-card {
    width: 100%;
    max-width: 100%;
    /* No min-width on mobile - cards take full width */
}

/* Apply min-width only on screens 768px and above */
@media (min-width: 768px) {
    .factor-card {
        min-width: 320px;  /* Minimum width before breaking to fewer columns */
        max-width: 450px;   /* Maximum width to prevent cards from stretching too wide */
    }
}

/* ===========================================
   ACCESSIBILITY UTILITIES
   =========================================== */

/* Screen reader only - visually hidden but accessible to screen readers */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
}

/* Focus styles for keyboard navigation */
.badge-circle:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-full);
}

.badge-circle:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .badge-circle {
        transition: none;
    }
    
    .badge-circle:hover {
        transform: none;
    }
    
    .radial-progress {
        transition: none;
    }
}

/* ===========================================
   KEY SPECS CIRCULAR BADGES
   =========================================== */

.badge-circle {
    text-align: center;
    /* On mobile: fixed size that fits 3 badges */
    width: 4.5rem;
    height: 4.5rem;
    min-width: 4.5rem;
    min-height: 4.5rem;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 1px solid var(--color-gray-300);
    background-color: var(--color-bg-primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;  /* Don't shrink on mobile */
    font-size: 0.85rem;  /* Slightly smaller text on mobile */
}

.badge-circle > span:first-child {
    font-size: 1rem;  /* Main value */
    line-height: 1.2;
}

.badge-circle > span:last-child {
    font-size: 0.7rem;  /* Label text */
    margin-top: 0.25rem;
}

@media (min-width: 640px) {
    .badge-circle {
        width: 5.5rem;
        height: 5.5rem;
        min-width: 5.5rem;
        min-height: 5.5rem;
        max-width: 5.5rem;
        max-height: 5.5rem;
        flex-shrink: 0;  /* Fixed size on larger screens */
        font-size: 0.9rem;
    }
}

@media (min-width: 768px) {
    .badge-circle {
        width: 6rem;
        height: 6rem;
        min-width: 6rem;
        min-height: 6rem;
        max-width: 6rem;
        max-height: 6rem;
        font-size: 1rem;
    }
    
    .badge-circle > span:first-child {
        font-size: 1.125rem;
    }
    
    .badge-circle > span:last-child {
        font-size: 0.75rem;
    }
}

.badge-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
    border-color: var(--color-primary);
}

.badge-circle:active {
    transform: scale(0.98);
}

/* ===========================================
   RADIAL PROGRESS BAR (Dynamic Implementation)
   =========================================== */

.radial-progress {
    position: relative;
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.2rem;
}

/* Feature Like/Unlike Badge */
.feature-badge {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.feature-badge .feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: white;
    font-weight: 900;
    line-height: 1;
}

.feature-liked {
    background-color: var(--color-success);
    border: 2px solid var(--color-success);
}

.feature-liked:hover {
    background-color: #059669;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.feature-unliked {
    background-color: var(--color-error);
    border: 2px solid var(--color-error);
}

.feature-unliked:hover {
    background-color: #dc2626;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Feature Unknown Badge */
.feature-unknown {
    background-color: var(--color-gray-300);
    /* border: 2px solid var(--color-gray-400); */
}

.feature-unknown:hover {
    background-color: #9ca3af;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(156, 163, 175, 0.3);
}

/* Compact Feature Card Styling */
.feature-card-compact {
    min-height: auto !important;
    padding: 1rem !important;
    justify-content: space-between;
}

.factor-title-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.factor-icon-container-compact {
    color: var(--color-secondary);
}

.factor-icon-img-compact {
    width: 24px;
    height: 24px;
}

.factor-name-compact {
    color: var(--color-text-primary);
    margin: 0;
    font-size: 1rem;
}

.feature-status-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
}

.feature-badge-compact {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    font-size: 1.25rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.feature-badge-compact .feature-icon-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: white;
    font-weight: 900;
    line-height: 1;
}

.feature-status-text {
    color: var(--color-text-primary);
}

/* Break between feature groups - add spacing */
.factor-group:has(.feature-card-compact) {
    margin-bottom: 3rem;
}

.factor-group:has(.feature-card-compact) + .factor-group {
    margin-top: 3rem;
    padding-top: 2rem;
    /* border-top: 2px solid var(--color-gray-200); */
}

/* Compact grid for features - more items per row */
/* Feature cards are smaller, so use smaller min-width (200px) */
.factor-group:has(.feature-card-compact) section {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
}

@media (min-width: 768px) {
    .factor-group:has(.feature-card-compact) section {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    }
}

@media (min-width: 1024px) {
    .factor-group:has(.feature-card-compact) section {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    }
}

/* Large radial for weighted score */
.radial-progress.large {
    width: 100px;
    height: 100px;
}

.radial-progress.large .score-text {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

.radial-progress::before,
.radial-progress::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.radial-progress::before {
    width: 100%;
    height: 100%;
    background: var(--color-gray-200);
}

.radial-progress::after {
    width: 100%;
    height: 100%;
    background: conic-gradient(var(--score-color) var(--progress),
            var(--color-gray-200) 0deg);
}

/* The inner circle to hide the center of the conic gradient */
.radial-progress .score-text {
    position: relative;
    z-index: 10;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--color-bg-primary);
    display: grid;
    place-items: center;
}

/* ===========================================
   FACTOR CARD HOVER EFFECT
   =========================================== */

.factor-card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    transform: translateY(-2px);
    border-color: var(--color-primary-light);
}


/* ===========================================
   UTILITY CLASSES (Tailwind-like)
   =========================================== */

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mb-10 {
    margin-bottom: var(--space-6);  /* Reduced on mobile */
}

@media (min-width: 768px) {
    .mb-10 {
        margin-bottom: 2.5rem;
    }
}

.mb-20 {
    margin-bottom: 5rem;
}

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

.mb-6 {
    margin-bottom: var(--space-4);  /* Reduced on mobile */
}

@media (min-width: 768px) {
    .mb-6 {
        margin-bottom: 1.5rem;
    }
}

.mb-8 {
    margin-bottom: var(--space-6);  /* Reduced on mobile */
}

@media (min-width: 768px) {
    .mb-8 {
        margin-bottom: 2rem;
    }
}

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

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

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

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

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

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: var(--space-4);  /* Reduced on mobile */
}

@media (min-width: 768px) {
    .p-6 {
        padding: 1.5rem;
    }
}

.p-8 {
    padding: var(--space-4);  /* Reduced on mobile */
}

@media (min-width: 768px) {
    .p-8 {
        padding: 2rem;
    }
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

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

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

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

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

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

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

.pb-3 {
    padding-bottom: 0.75rem;
}

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

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

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

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-6xl {
    font-size: 3.75rem;
    line-height: 1;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.font-black {
    font-weight: 900;
}

.font-bold {
    font-weight: 700;
}

.font-extrabold {
    font-weight: 800;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.font-normal {
    font-weight: 400;
}

.block {
    display: block;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.hidden {
    display: none !important;
}

.flex-col {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-start {
    align-items: flex-start;
}

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

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

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

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: var(--space-4);  /* Reduced on mobile */
}

@media (min-width: 768px) {
    .gap-6 {
        gap: 1.5rem;
    }
}

.gap-8 {
    gap: 2rem;
}

.space-y-3 > :not([hidden]) ~ :not([hidden]) {
    margin-top: calc(0.75rem * calc(1 - 0));
    margin-bottom: calc(0.75rem * 0);
}

.self-start {
    align-self: flex-start;
}

.overflow-hidden {
    overflow: hidden;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-full {
    border-radius: 9999px;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.border-b {
    border-bottom-width: 1px;
}

.border-gray-200 {
    border-color: rgb(229 231 235);
}

.bg-gray-50 {
    background-color: rgb(249 250 251);
}

.bg-indigo-600 {
    background-color: rgb(79 70 229);
}

.text-white {
    color: rgb(255 255 255);
}

.bg-white {
    background-color: rgb(255 255 255);
}

.bg-gray-100 {
    background-color: rgb(243 244 246);
}

.bg-gray-200 {
    background-color: rgb(229 231 235);
}

.object-contain {
    object-fit: contain;
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.ring-4 {
    box-shadow: 0 0 0 calc(4px + 0px) var(--tw-ring-color);
}

.ring-offset-4 {
    --tw-ring-offset-width: 4px;
}

.drop-shadow-2xl {
    filter: drop-shadow(0 25px 25px rgb(0 0 0 / 0.15));
}

.transition {
    transition-property: color, background-color, border-color, fill, stroke, opacity, box-shadow, transform, filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-300 {
    transition-duration: 300ms;
}

.duration-500 {
    transition-duration: 500ms;
}

.hover\:bg-indigo-700:hover {
    background-color: rgb(67 56 202);
}

.hover\:bg-gray-100:hover {
    background-color: rgb(243 244 246);
}

.hover\:bg-gray-300:hover {
    background-color: rgb(209 213 219);
}

.hover\:opacity-90:hover {
    opacity: 0.9;
}

.hover\:scale-\[1\.05\]:hover {
    transform: scale(1.05);
}

.max-w-7xl {
    max-width: 80rem;
}

.w-full {
    width: 100%;
}

.h-64 {
    height: 16rem;
}

.h-96 {
    height: 24rem;
}

.max-h-full {
    max-height: 100%;
}

.h-full {
    height: 100%;
}

.w-full {
    width: 100%;
}

.min-h-\[16rem\] {
    min-height: 16rem;
}

.last\:border-b-0:last-child {
    border-bottom-width: 0px;
}

/* ===========================================
   RESPONSIVE GRID CLASSES
   =========================================== */

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

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

/* Hero Image Container - Take full height */
section.grid.items-stretch {
    align-items: stretch;
}

section.grid.items-stretch > * {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Hero Section - Reduced gap on mobile */
section.grid.grid-cols-1.lg\:grid-cols-2 {
    gap: var(--space-4);  /* Reduced gap on mobile */
    margin-bottom: var(--space-6);  /* Reduced margin on mobile */
}

@media (min-width: 768px) {
    section.grid.grid-cols-1.lg\:grid-cols-2 {
        gap: var(--space-6);
        margin-bottom: var(--space-10);
    }
}

@media (min-width: 1024px) {
    section.grid.grid-cols-1.lg\:grid-cols-2 {
        gap: var(--space-8);
    }
}

#hero-content {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
}

.tech-specs-container {
    flex: 1;
}

.hero-price {
    margin-top: auto;
}

#hero-image-link {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 16rem;
    flex: 1;
    padding: var(--space-4);  /* Reduced padding on mobile */
}

@media (min-width: 768px) {
    #hero-image-link {
        padding: var(--space-8);
    }
}

#hero-image-link img {
    max-width: 100%;
    max-height: calc(45vh - 2rem);
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Price and Vendor Name Alignment */
.hero-price #product-price {
    line-height: 1;
    display: inline-block;
}

.hero-price .flex.items-end > div > span {
    vertical-align: bottom;
    display: inline-block;
    padding-bottom: 0.25rem;
    line-height: 1;
}

@media (min-width: 1024px) {
    #hero-image-link {
        min-height: 24rem;
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:flex-row {
        flex-direction: row;
    }

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

    .md\:justify-end {
        justify-content: flex-end;
    }

    .md\:p-8 {
        padding: 2rem;
    }

    .md\:p-6 {
        padding: 1.5rem;
    }

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

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

    .md\:text-3xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }

    .md\:text-4xl {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }

    .md\:text-5xl {
        font-size: 3rem;
        line-height: 1;
    }
}

@media (min-width: 1024px) {
    .lg\:col-span-3 {
        grid-column: span 3 / span 3;
    }

    .lg\:col-span-1 {
        grid-column: span 1 / span 1;
    }

    .lg\:h-\[700px\] {
        height: 700px;
    }

    .lg\:min-h-\[24rem\] {
        min-height: 24rem;
    }

    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:gap-16 {
        gap: 4rem;
    }

    .lg\:self-center {
        align-self: center;
    }

    .lg\:p-0 {
        padding: 0px;
    }

    .lg\:text-6xl {
        font-size: 3.75rem;
        line-height: 1;
    }
}

/* ===========================================
   ALTER VARIANTS STYLING
   =========================================== */

.alter-variants {
    margin-top: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding-top: 0.75rem;
}

.alter-variants > label {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.alter-variants .variants {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
}

.alter-variants .variants > * {
    border: 1px solid var(--color-border-light);
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.alter-variants .variants > * > :first-child {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}

.alter-variants .variants a {
    text-decoration: none;
    color: var(--color-text-primary);
}

.alter-variants .variants > div:not(.active) {
    display: flex;
    align-items: baseline;
    background: var(--color-bg-primary);
}

.alter-variants .variants > div:not(.active):hover {
    background: var(--color-primary-50);
    border-color: var(--color-primary);
    transform: translateY(-1px);
}

.alter-variants .variants > div.active {
    background: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.alter-variants .variants > div .btn {
    font-size: 0.75rem;
    margin-left: -0.5rem;
}

/* ===========================================
   TECH SPECS TRUNCATION
   =========================================== */

.techs-container {
    width: 100%;
    overflow: hidden;
}

.tech-item {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: '';
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    padding-left: 0;
}

.tech-item.techs-truncated {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: '' !important;
    max-width: 100%;
    display: inline-block;
    vertical-align: middle;
    position: relative;
    padding-left: 1.5rem; /* Space for "עוד..." */
}

.tech-item.techs-truncated::after {
    content: 'עוד...';
    color: var(--color-primary);
    font-weight: 500;
    position: absolute;
    left: 0;
    top: 0;
    background: var(--color-bg-primary);
    padding-right: 0.25rem;
    white-space: nowrap;
    height: 100%;
    display: inline-flex;
    align-items: center;
    line-height: inherit;
}

.tech-item.techs-expanded {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    width: 100%;
    flex-basis: 100%;
    max-width: none;
    display: block;
    cursor: pointer;
    padding-left: 0 !important;
}

.tech-item.techs-expanded::after {
    display: none;
}

.tech-item.techs-long {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    flex: 1 1 100%;
    width: 100%;
    display: block;
    position: relative;
    padding-left: 0;
    word-break: break-word;
}

.tech-item.techs-long::after {
    display: none;
}

.tech-separator {
    color: var(--color-text-secondary);
    margin: 0 0.15rem;
    flex-shrink: 0;
    opacity: 0;
}

/* ===========================================
   INLINE STYLES MOVED TO CSS
   =========================================== */

/* Hero Content */
.hero-content {
    background: linear-gradient(180deg, var(--color-primary-50) 0%, var(--color-bg-primary) 50%, var(--color-bg-primary) 100%);
    padding: var(--space-4);  /* Reduced on mobile */
}

@media (min-width: 768px) {
    .hero-content {
        padding: 2rem;
    }
}

/* Product Name & Subtitle */
#product-name {
    color: var(--color-text-primary);
}

#product-subtitle {
    color: var(--color-text-secondary);
}

/* Tech Specs Container */
.tech-specs-container {
    cursor: pointer;
    display: flex;
    justify-content: center;
    padding: var(--space-2);  /* Minimal padding on mobile */
    align-items: center;  /* Center align items */
    gap: var(--space-2);  /* Smaller gap on mobile */
    width: 100%;
    margin-top: 1rem;
    box-sizing: border-box;
}

@media (min-width: 640px) {
    .tech-specs-container {
        gap: var(--space-5);
    }
}

@media (min-width: 768px) {
    .tech-specs-container {
        padding: var(--space-4);
        gap: var(--space-6);
        justify-content: space-between;  /* Space between badges and score */
        align-items: flex-start;
    }
}

@media (min-width: 1024px) {
    .tech-specs-container {
        gap: var(--space-8);
    }
}

/* Main Specs Badges - Fit 3 badges on mobile without cutting */
#main-specs-badges {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--space-2) !important;
    overflow-x: hidden;  /* No scroll on mobile - fit exactly 3 */
    overflow-y: hidden;
    align-items: center;
    justify-content: space-between;  /* Distribute evenly on mobile */
    min-width: 0;
    flex: 1;
    max-width: 100%;
    width: 100%;
}

#main-specs-badges::-webkit-scrollbar {
    display: none;
}

@media (min-width: 640px) {
    #main-specs-badges {
        gap: var(--space-3);
        justify-content: center;
    }
}

@media (min-width: 768px) {
    #main-specs-badges {
        overflow-x: visible;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: var(--space-4);
        flex: 1;
    }
}

@media (min-width: 1024px) {
    #main-specs-badges {
        gap: var(--space-5);
    }
}

/* Weighted Score Container */
.weighted-score-container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;  /* Prevent shrinking */
    margin-right: 0;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .weighted-score-container {
        margin-right: 0;
        margin: 0;
    }
}

.weighted-score-label {
    color: var(--color-primary-dark);
}

/* Price Section */
.hero-price-label {
    color: var(--color-text-secondary);
}

.price-container {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

#product-price {
    color: var(--color-primary);
    line-height: 1;
}

/* Factors Title */
#factors-title {
    color: var(--color-text-primary);
    margin-bottom: var(--space-6);  /* Reduced on mobile */
}

@media (min-width: 768px) {
    #factors-title {
        margin-bottom: var(--space-10);
    }
}

/* Factor Group Styling */
.factor-group {
    margin-bottom: 2rem;  /* Reduced on mobile */
}

@media (min-width: 768px) {
    .factor-group {
        margin-bottom: 3rem;
    }
}

/* Factor group grid - responsive columns */
/* On mobile: use regular grid columns (no min-width constraint) */
.factor-group > section.grid {
    /* Mobile: regular grid, cards take full width */
}

/* On tablet and above: apply min-width constraint */
@media (min-width: 768px) {
    .factor-group > section.grid {
        /* Uses auto-fit to automatically break to fewer columns when cards would be < 320px */
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    }
}

.factor-group-title {
    color: var(--color-primary-dark);
    font-weight: 700;
    margin-bottom: 1rem;  /* Reduced on mobile */
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-gray-300);
    position: relative;
}

@media (min-width: 768px) {
    .factor-group-title {
        margin-bottom: 1.5rem;
    }
}

.factor-group-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 60px;
    height: 2px;
    background-color: var(--color-primary);
}


.factor-title{
    /* display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem; */
}

.factor-title > h3{
    margin: 0;
}

/* Factor Card Elements */
.factor-icon-container {
    color: var(--color-secondary);
}

.factor-icon-img {
    width: 32px;
    height: 32px;
}

.factor-name {
    color: var(--color-text-primary);
}

.factor-value {
    color: var(--color-primary);
}

.main-level-text {
    color: var(--color-text-secondary);
}

/* AI Description Section - Visual Separation */
.ai-description-section {
    /* margin-top: 2rem; */
    /* padding-top: 1.5rem; */
    /* border-top: 1px solid var(--color-gray-200); */
}

.ai-description-content {
    background-color: var(--color-primary-50);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--color-primary);
    line-height: 1.7;
}

.techs-container {
    color: var(--color-text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

.tech-label {
    font-weight: 500;
}


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

/* AI Summary */
.ai-summary summary {
    color: var(--color-primary);
    list-style: none;
    cursor: pointer;
}

/* ===========================================
   VENDORS SECTION - REDESIGNED
   =========================================== */

#vendors {
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);  /* Reduced on mobile */
}

@media (max-width: 768px) {
    .vendor-item{
        border-radius: var(--radius-2xl);
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 0px 4px -2px rgb(0 0 0 / 0.05);
        overflow: hidden;
        transition: all 0.2s ease-in-out;
        border: none;
    }
}

.vendor-section {
   
}

@media (min-width: 768px) {
    #vendors {
        margin-bottom: var(--space-6);
    }

    .vendor-section {
        padding: var(--space-4);  /* Reduced on mobile */
        background: var(--color-bg-primary);
        border-radius: var(--radius-2xl);
        box-shadow: var(--shadow-sm);
        padding: var(--space-8);
    }

    .vendor-item{
        box-shadow: none;
    }
}

.vendor-list-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.vendor-item {
    display: block;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.vendor-item:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
}

.vendor-item-featured {
    background: linear-gradient(135deg, var(--color-primary-50) 0%, var(--color-bg-primary) 50%);
    border-color: var(--color-primary-light);
    border-width: 1.5px;
}

.vendor-item-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);  /* Reduced gap on mobile */
    padding: var(--space-4);  /* Reduced padding on mobile */
}

@media (min-width: 768px) {
    .vendor-item-content {
        flex-direction: row;
        align-items: center;
        gap: var(--space-6);
        padding: var(--space-6);
    }
}

.vendor-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.vendor-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

@media (min-width: 768px) {
    .vendor-header {
        flex-direction: row;
        align-items: center;
        gap: var(--space-3);
    }
}

.vendor-logo {
    height: 28px;  /* Reduced on mobile */
    width: 100px;  /* Reduced on mobile */
    object-fit: contain;
    flex-shrink: 0;
    align-self: flex-start;
}

@media (min-width: 768px) {
    .vendor-logo {
        height: 40px;
        width: 150px;
        align-self: center;
    }
}

.vendor-item-featured .vendor-logo {
    height: 30px;  /* Reduced on mobile */
    width: 110px;  /* Reduced on mobile */
}

@media (min-width: 768px) {
    .vendor-item-featured .vendor-logo {
        height: 44px;
        width: 160px;
    }
}

.vendor-name {
    /* Inherits base h4 styles (text-xl, font-bold) */
    font-weight: var(--font-semibold);  /* Keep semibold for vendor names */
    display: none;
}

@media (min-width: 768px) {
    .vendor-name {
        font-size: var(--text-2xl);  /* Larger on desktop: 24px instead of 20px */
        display: block;
    }
}

.vendor-item-featured .vendor-name {
    /* color: var(--color-primary-dark); */
}

.vendor-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    line-height: var(--leading-normal);
    align-self: flex-start;
}

.vendor-details {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: var(--leading-normal);
}

@media (min-width: 768px) {
    .vendor-details {
        font-size: var(--text-lg);
    }
}

.vendor-detail-item {
    display: inline-block;
}

.vendor-detail-separator {
    color: var(--color-gray-300);
    margin: 0 var(--space-1);
}

.vendor-notes {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--color-gray-200);
}

.vendor-notes-text {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-style: italic;
    line-height: var(--leading-relaxed);
    opacity: 0.85;
}

.vendor-price-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    min-width: fit-content;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .vendor-price-section {
        align-items: flex-end;
        text-align: right;
    }
}

.vendor-price {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-text-primary);
    line-height: var(--leading-tight);
}

@media (min-width: 768px) {
    .vendor-price {
        font-size: var(--text-3xl);
    }
}

.vendor-item-featured .vendor-price {
    color: var(--color-primary-dark);
}

.vendor-link {
    display: inline-block;
    padding: var(--space-2) var(--space-5);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    line-height: var(--leading-normal);
    border: 1px solid transparent;
}

.vendor-link-primary {
    background-color: var(--color-primary);
    color: var(--color-text-inverse);
    border-color: var(--color-primary);
}

.vendor-link-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.vendor-link-secondary {
    background-color: var(--color-gray-100);
    color: var(--color-text-primary);
    border-color: var(--color-gray-200);
}

.vendor-link-secondary:hover {
    background-color: var(--color-gray-200);
    border-color: var(--color-gray-300);
}

.vendor-link i,
.vendor-link app-icon {
    margin-right: var(--space-2);
    font-size: 0.875em;
    transition: transform 0.2s ease-in-out;
}

.vendor-link:hover i,
.vendor-link:hover app-icon {
    transform: translateX(-2px);
}

.no-results-text {
    color: var(--color-text-secondary);
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
}

/* Warranty Colors */
.warranty-low {
    color: var(--color-text-secondary);
}

.warranty-ok {
    color: var(--color-text-secondary);
}

.techs-text.techs-expanded {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word;
}

/* ===========================================
   HERO COLORS SECTION
   =========================================== */

.hero-colors {
    margin-bottom: var(--space-4);
}

.hero-color-item {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 1px solid var(--color-border-light);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
}

.hero-color-item:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Color definitions - matching variants.css */
.hero-color-item[data-color="red"] {
    background-color: #E55981;
}

.hero-color-item[data-color="blue"] {
    background-color: #4148df;
}

.hero-color-item[data-color="teal"] {
    background-color: #5D81E5;
}

.hero-color-item[data-color="green"] {
    background-color: #60E581;
}

.hero-color-item[data-color="yellow"] {
    background-color: #EFE581;
}

.hero-color-item[data-color="purple"] {
    background-color: #A081E5;
}

.hero-color-item[data-color="pink"] {
    background-color: #EF5DA8;
}

.hero-color-item[data-color="cyan"] {
    background-color: #81E5E5;
}

.hero-color-item[data-color="white"] {
    background-color: #ffffff;
    border-color: var(--color-gray-300);
}

.hero-color-item[data-color="black"] {
    background-color: #000000;
}

.hero-color-item[data-color="brown"] {
    background-color: #A58273;
}

.hero-color-item[data-color="orange"] {
    background-color: #E59A60;
}

.hero-color-item[data-color="gray"] {
    background-color: #cdcdcd;
}

.hero-color-item[data-color="gold"] {
    background-color: #E5C173;
}

.hero-color-item[data-color="silver"] {
    background-color: #bdbdbd;
}

.hero-color-item[data-color="rose gold"] {
    background-color: #EFA5C2;
}

.hero-color-item[data-color="beige"] {
    background-color: #F5E5DC;
}

.hero-color-item[data-color="titanium"] {
    background-color: #6D6D93;
}

.hero-color-item[data-color="turquoise"] {
    background-color: #60D5E5;
}

.hero-color-item[data-color="peach"] {
    background-color: #F5A5A0;
}

.hero-color-item[data-color="bronze"] {
    background-color: #C18A60;
}

/* ===========================================
   RELATED PRODUCTS
   =========================================== */

.related-products {
    /* Section content - no special styling needed, matches vendor-section pattern */
}

.related-grid {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    align-content: stretch;
    gap: var(--space-6);
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: var(--space-4) var(--space-2);
}

.related-grid::-webkit-scrollbar {
    height: 8px;
}

.related-grid::-webkit-scrollbar-track {
    background: var(--color-gray-100);
    border-radius: var(--radius-full);
}

.related-grid::-webkit-scrollbar-thumb {
    background: var(--color-gray-300);
    border-radius: var(--radius-full);
}

.related-grid::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-400);
}

.related-grid .sg-product-card {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    height: auto !important;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    flex-shrink: 0;
    min-width: 320px;
    max-width: 350px;
    width: 350px;
    border: 1px solid var(--color-border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    background: linear-gradient(to bottom, #ffffff 0%, #fafafa 100%);
}

.related-grid .sg-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    border-color: var(--color-primary-light);
}

.related-grid .sg-product-card .sg-product-image {
    aspect-ratio: 1;
    width: 100%;
    height: auto;
    min-height: 200px;
    max-height: 300px;
    overflow: hidden;
    background: var(--color-bg-primary);
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: relative;
}

.related-grid .sg-product-card .sg-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: var(--space-4);
}


.related-products-loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sg-product-image-link {
    text-decoration: none;
    color: inherit;
    display: block;
    flex-shrink: 0;
}

.sg-product-image-link:hover {
    text-decoration: none;
}

.sg-product-title-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.sg-product-title-link:hover {
    text-decoration: none;
}

.related-grid .sg-product-card .sg-product-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: var(--space-6);
    gap: var(--space-3);
    text-align: right;
    background-color: var(--color-gray-50);
    justify-content: space-between;
}

.related-grid .sg-product-card .sg-product-title-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: var(--space-3);
    margin: 0 0 var(--space-2) 0;
}

.related-grid .sg-product-card .sg-product-title {
    /* Inherits base h4 styles, override only what's needed */
    font-weight: var(--font-extrabold);  /* Keep extrabold for product titles */
    text-align: right;
    flex: 1;
}

.related-grid .sg-product-card .sg-product-title-row .radial-progress {
    flex-shrink: 0;
    width: 45px;
    height: 45px;
    margin: 0;
}

.related-grid .sg-product-card .sg-product-title-row .radial-progress .score-text {
    width: 35px;
    height: 35px;
    font-size: 0.75rem;
    font-weight: var(--font-extrabold);
}

.related-grid .sg-product-card .sg-product-description {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    text-align: right;
    margin: 0 0 var(--space-3) 0;
    line-height: var(--leading-normal);
}

.related-grid .sg-product-card .sg-product-price {
    font-size: var(--text-2xl);
    font-weight: var(--font-extrabold);
    color: var(--color-text-primary);
    text-align: right;
    margin: var(--space-2) 0;
}

.related-grid .sg-product-card .sg-product-price span {
    font-size: var(--text-sm);
    font-weight: var(--font-normal);
    color: var(--color-text-secondary);
}

.related-grid .sg-product-card .sg-product-price b {
    font-weight: var(--font-extrabold);
}

.related-grid .sg-product-card .sg-score {
    justify-content: flex-end;
}

.sg-product-actions {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    margin-top: auto;
    flex-shrink: 0;
    border-top: 1px solid var(--color-border-light);
}

.sg-product-actions .sg-btn {
    flex: 1;
    text-align: center;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .related-grid .sg-product-card {
        min-width: 280px;
        max-width: 320px;
        width: 280px;
    }
    
    /* Reduce padding and spacing on mobile for better fit */
    .related-grid .sg-product-card .sg-product-content {
        padding: var(--space-4);  /* Reduced from var(--space-6) = 24px to 16px */
        gap: var(--space-2);  /* Reduced from var(--space-3) = 12px to 8px */
    }
    
    .related-grid .sg-product-card .sg-product-title-row {
        margin: 0 0 var(--space-1) 0;  /* Reduced from var(--space-2) = 8px to 4px */
        gap: var(--space-2);  /* Reduced from var(--space-3) = 12px to 8px */
    }
    
    .related-grid .sg-product-card .sg-product-title {
        font-size: var(--text-base);  /* Smaller on mobile: 18px instead of 20px */
    }
    
    .related-grid .sg-product-card .sg-product-price {
        margin: var(--space-1) 0;  /* Reduced from var(--space-2) = 8px to 4px */
        font-size: var(--text-xl);  /* Slightly smaller on mobile: 20px instead of 24px */
    }
    
    .sg-product-actions {
        flex-direction: column;
        padding: var(--space-3) var(--space-4);  /* Reduced from var(--space-4) var(--space-6) = 16px 24px to 12px 16px */
        gap: var(--space-2);  /* Keep at 8px */
    }
    
    .sg-product-actions .sg-btn {
        width: 100%;
        padding: var(--space-2) var(--space-3);  /* Reduced from var(--space-2) var(--space-4) = 8px 16px to 8px 12px */
    }
    
    .related-title {
        font-size: var(--text-2xl);
    }
    
    .related-subtitle {
        font-size: var(--text-base);
    }

    .techs-container{
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .tech-separator{
        display: none;
    }
}


