/* SWITCH-N-GO PRODUCT CATALOG - STYLES */
/* Version: 4.0.0 with Parameterized Colors - BLUE THEME */

/* =============================================
   CSS CUSTOM PROPERTIES (COLOR SYSTEM)
   Change these values to update colors site-wide
   ============================================= */
:root {
    /* ===== PRIMARY BRAND COLORS (BLUE) ===== */
    --primary-color: #2196F3;           /* Bright blue */
    --primary-light: rgba(33, 150, 243, 0.1);
    --primary-dark: #1976D2;            /* Darker blue */
    
    /* ===== NEUTRAL COLORS ===== */
    --background-cream: #f5f7fa;        /* Light blue-gray background */
    --background-white: #ffffff;
    --background-gray-light: #f8f9fa;
    --background-gray: #e9ecef;
    
    /* ===== TEXT COLORS ===== */
    --text-dark: #1a1a1a;               /* Near black */
    --text-medium: #4a4a4a;             /* Dark gray */
    --text-light: #6a6a6a;              /* Medium gray */
    --text-muted: #888888;              /* Light gray */
    --text-white: #ffffff;
    
    /* ===== ACCENT COLORS ===== */
    --accent-blue: #0d47a1;             /* Dark blue */
    --accent-blue-light: #1565c0;       /* Medium blue */
    --accent-blue-hover: #1976d2;       /* Light blue */
    
    /* ===== STATE COLORS ===== */
    --success-color: #4CAF50;
    --error-color: #d32f2f;
    --warning-color: #ff9800;
    --info-color: #2196F3;
    
    /* ===== BORDER COLORS ===== */
    --border-light: #e0e0e0;
    --border-medium: #bdbdbd;
    --border-dark: #9e9e9e;
    --border-primary: var(--primary-color);
    
    /* ===== SHADOW COLORS ===== */
    --shadow-sm: rgba(0, 0, 0, 0.1);
    --shadow-md: rgba(0, 0, 0, 0.15);
    --shadow-lg: rgba(0, 0, 0, 0.3);
    --shadow-primary: rgba(33, 150, 243, 0.3);
    --shadow-blue: rgba(13, 71, 161, 0.3);
    
    /* ===== OVERLAY COLORS ===== */
    --overlay-dark: rgba(0, 0, 0, 0.7);
    --overlay-white: rgba(255, 255, 255, 0.9);
    
    /* ===== BUTTON COLORS ===== */
    --btn-primary-bg: var(--primary-color);
    --btn-primary-hover: var(--primary-dark);
    --btn-secondary-bg: var(--background-gray);
    --btn-secondary-hover: #dee2e6;
    
    /* ===== LINK COLORS ===== */
    --link-color: var(--primary-color);
    --link-hover: var(--primary-dark);
    --link-visited: var(--primary-dark);
    
    /* ===== FORM COLORS ===== */
    --input-border: var(--border-medium);
    --input-focus-border: var(--primary-color);
    --input-focus-shadow: var(--primary-light);
    --input-bg: var(--background-white);
    --input-disabled-bg: var(--background-gray-light);
    
    /* ===== SELECTION/COMPARISON COLORS ===== */
    --selection-bar-bg-start: var(--accent-blue);
    --selection-bar-bg-end: var(--accent-blue-light);
    --selection-bar-text: var(--text-white);
    --comparison-header-bg: var(--background-gray-light);
    
    /* ===== TRANSITIONS ===== */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* ===== SPACING (Optional - for consistency) ===== */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* ===== BORDER RADIUS ===== */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-full: 50px;
    
    /* ===== FONT WEIGHTS ===== */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background-color: var(--background-cream);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== HEADER & NAVIGATION ===== */
.site-header {
    background: var(--background-white);
    border-bottom: 1px solid var(--primary-light);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px var(--shadow-sm);
}

/* Push page content below the fixed header */
body {
    padding-top: 80px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.site-logo {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.main-nav > ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 500;
    transition: var(--transition-normal);
    padding: 0.5rem 0;
    display: block;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 0.75rem;
    transition: var(--transition-normal);
}

.dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--background-white);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--shadow-sm);
    min-width: 250px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-normal);
    list-style: none;
    padding: 0;
    margin-top: 0.5rem;
}

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

.dropdown-menu li {
    margin: 0;
}

/* Category Menu Header */
.dropdown-menu .menu-header {
    padding: 1rem 1.5rem 0.5rem;
    font-family: 'Libre Baskerville', serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 0.5rem;
}

.dropdown-menu a {
    padding: 0.75rem 1.5rem;
    display: block;
    color: var(--text-medium);
    white-space: nowrap;
    border-left: 3px solid transparent;
    transition: var(--transition-normal);
}

.dropdown-menu a:hover {
    background: var(--background-cream);
    color: var(--text-dark);
    border-left-color: var(--primary-color);
    padding-left: 1.75rem;
}

/* Special styling for "All Products" */
.dropdown-menu a[data-category="all"] {
    font-weight: 600;
    color: var(--text-dark);
}

.dropdown-menu a[data-category="all"]:hover {
    background: var(--primary-color);
    color: var(--background-white);
}

/* Catalog switcher dropdown — company list */
.catalog-menu {
    min-width: 200px;
}

.catalog-menu a.active {
    font-weight: 700;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    background: var(--background-cream);
}

/* ── Hamburger button (hidden on desktop) ─────────── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    min-width: 44px;   /* WCAG touch target */
    min-height: 44px;
    transition: background 0.2s;
}
.nav-toggle:hover { background: var(--background-cream); }
.hamburger-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
    transform-origin: center;
}
/* Animate to X when open */
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--text-medium) 100%);
    color: var(--background-white);
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 300;
}

.hero-description {
    font-size: 1rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 1.5rem;
    font-weight: 300;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Highlight pills row */
.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.hero-highlight {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

/* Search Container */
.search-container {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    flex: 1;
    min-width: 0;
    padding: 1rem 1.25rem;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-family: 'Work Sans', sans-serif;
    background: var(--background-white);
    color: var(--text-dark);
    transition: var(--transition-normal);
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.search-button {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: var(--text-dark);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-normal);
}

.search-button:hover {
    background: var(--text-light);
    color: var(--background-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-md);
}

.clear-search {
    padding: 1rem 1.5rem;
    background: var(--background-white);
    color: var(--text-medium);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
}

.clear-search:hover {
    background: var(--primary-color);
    color: var(--text-dark);
}

/* Search Info */
.search-info {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-light);
    border-radius: 50px;
    display: inline-block;
}

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 3rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-medium);
}

.category-select {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    background: var(--background-white);
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition-normal);
    min-width: 200px;
}

.category-select:focus {
    outline: none;
    border-color: var(--text-dark);
}

.product-count {
    font-size: 1.125rem;
    color: var(--text-medium);
    font-weight: 600;
}

.product-count span {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* ===== PRODUCTS SECTION ===== */
.products-section {
    padding: 3rem 0 6rem;
}

.category-section {
    margin-bottom: 4rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.category-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 2rem;
    color: var(--text-dark);
}

.category-count {
    background: var(--primary-color);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.875rem;
}

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

/* Product Cards */
.product-card {
    background: var(--background-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-sm);
    transition: var(--transition-normal);
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px var(--shadow-md);
}

.product-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--background-cream);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-normal);
}

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

.product-content {
    padding: 1.5rem;
}

.product-part-number {
    display: inline-block;
    background: var(--background-cream);
    color: var(--text-medium);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.product-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.product-description {
    color: var(--text-medium);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.product-specs {
    list-style: none;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--background-cream);
    border-radius: 8px;
}

.product-specs li {
    padding: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--text-medium);
}

.product-specs strong {
    color: var(--text-dark);
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--background-cream);
}

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

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.no-results h3 {
    font-family: 'Libre Baskerville', serif;
    font-size: 2rem;
    color: var(--text-dark);
}

.no-results p {
    color: var(--text-medium);
    font-size: 1.125rem;
}

.btn-reset {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: var(--text-dark);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
}

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

/* ===== PAGE HERO (About/Contact) ===== */
.page-hero {
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--text-medium) 100%);
    color: var(--background-white);
    padding: 4rem 0;
    text-align: center;
}

.page-hero h2 {
    font-family: 'Libre Baskerville', serif;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-hero .subtitle {
    font-size: 1.25rem;
    color: var(--primary-color);
}

/* ===== ABOUT PAGE ===== */
.about-content {
    padding: 4rem 0;
}

.content-section {
    margin-bottom: 4rem;
}

.content-section h3 {
    font-family: 'Libre Baskerville', serif;
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.content-section p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-medium);
    margin-bottom: 1rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--background-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-sm);
}

.feature-card h4 {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.product-lines {
    list-style: none;
    padding: 0;
}

.product-lines li {
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--background-white);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
}

.cta-section {
    text-align: center;
    padding: 3rem;
    background: var(--background-white);
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-sm);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition-normal);
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-dark);
    border: 2px solid var(--primary-color);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--primary-color);
}

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

/* ===== CONTACT PAGE ===== */
.contact-content {
    padding: 4rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-card {
    background: var(--background-white);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-sm);
}

.info-card h3,
.info-card h4 {
    font-family: 'Libre Baskerville', serif;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.info-card p {
    color: var(--text-medium);
    line-height: 1.6;
}

.info-card a {
    color: var(--primary-color);
    text-decoration: none;
}

.info-card a:hover {
    text-decoration: underline;
}

/* Contact Form */
.contact-form-container {
    background: var(--background-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-sm);
}

.contact-form h3 {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    transition: var(--transition-normal);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-dark);
}

.form-note {
    font-size: 0.875rem;
    color: var(--text-medium);
    margin-top: 1rem;
}

.form-success {
    text-align: center;
    padding: 3rem;
}

.form-success h3 {
    font-family: 'Libre Baskerville', serif;
    color: var(--text-dark);
    margin: 1rem 0;
}

.additional-info {
    margin-top: 4rem;
}

.additional-info h3 {
    font-family: 'Libre Baskerville', serif;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.info-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.info-box {
    background: var(--background-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-sm);
}

.info-box h4 {
    font-family: 'Libre Baskerville', serif;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--text-dark);
    color: var(--background-white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    font-family: 'Libre Baskerville', serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--background-white);
    text-decoration: none;
    transition: var(--transition-normal);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--shadow-primary);
    color: rgba(var(--background-white), 0.7);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    /* Show hamburger, hide nav by default */
    .nav-toggle {
        display: flex;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background-white);
        border-top: 1px solid var(--primary-light);
        box-shadow: 0 8px 24px var(--shadow-sm);
        z-index: 999;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main-nav.nav-open {
        display: block;
    }

    /* Stack nav items vertically with large touch targets */
    .main-nav > ul {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0;
    }

    .main-nav > ul > li > a,
    .main-nav > ul > li > .dropdown-toggle {
        padding: 1rem 1.5rem;
        min-height: 44px;
        border-bottom: 1px solid var(--border-light);
        font-size: 1rem;
    }

    /* Dropdowns expand inline on mobile */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        border-top: 1px solid var(--border-light);
        background: var(--background-cream);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        margin-top: 0;
    }

    .dropdown.active .dropdown-menu {
        max-height: 400px;
    }

    .dropdown-menu a {
        padding: 0.875rem 2rem;
        min-height: 44px;
        white-space: normal;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 0;
        position: relative;
    }

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

    .search-container {
        flex-direction: column;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* =============================================
   PRODUCT SELECTION & COMPARISON
   ============================================= */

/* Product Selection Checkbox */
.product-select-wrapper {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.product-select-checkbox {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--primary-color);
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px var(--shadow-md);
}

.product-select-checkbox:checked {
    background: var(--primary-color);
}

.product-select-label {
    display: none;
}

.product-card {
    position: relative;
}

/* Selection Bar - Floating at bottom */
.selection-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 8px 24px var(--shadow-lg);
    z-index: 1000;
    white-space: nowrap;
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Animation only fires when .visible class is added by JS */
.selection-bar.visible {
    animation: slideUp 0.3s ease forwards;
}

.selection-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.selection-info {
    font-weight: 600;
    font-size: 1rem;
}

.selection-count {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.selection-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-selection {
    background: var(--overlay-white);
    color: var(--accent-blue);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.btn-selection:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-md);
}

.btn-selection svg {
    width: 18px;
    height: 18px;
}

.btn-clear {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-clear:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--accent-blue);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

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

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

/* Comparison Table */
.comparison-table-wrapper {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.comparison-table thead th {
    background: var(--background-gray-light);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.comparison-label {
    background: var(--background-gray-light) !important;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    left: 0;
    z-index: 5;
}

.comparison-product-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.comparison-product-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--accent-blue);
}

.comparison-part {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
}

.comparison-company {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.comparison-price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.comparison-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 250px;
}

.comparison-table tr:hover {
    background: var(--background-gray-light);
}

/* Email Modal */
.email-modal {
    max-width: 700px;
}

.email-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid var(--border-medium);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
    font-family: 'Courier New', monospace;
    resize: vertical;
    line-height: 1.6;
}

.email-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.95rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-primary);
}

.btn-secondary {
    background: var(--background-gray);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
    .selection-bar {
        min-width: auto;
        left: 1rem;
        right: 1rem;
        transform: none;
        padding: 1rem;
    }
    
    .selection-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .selection-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-selection {
        width: 100%;
        justify-content: center;
    }
    
    .comparison-table {
        font-size: 0.85rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 95vh;
    }
    
    .email-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

/* =============================================
   CONTACT FORM SECURITY ELEMENTS
   ============================================= */

/* Honeypot field - invisible to users, catches bots */
.honeypot-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Character counter */
.char-count {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: right;
}

/* Captcha group styling */
.captcha-group {
    background: var(--background-gray-light);
    padding: 1.25rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.captcha-group label {
    font-weight: 600;
    color: var(--accent-blue);
}

.captcha-group span {
    display: inline-block;
    background: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0 0.25rem;
    border: 1px solid var(--border-medium);
}

.captcha-group input {
    max-width: 100px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.captcha-group small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Submit button states */
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--text-muted);
}

/* Security indicators */
.security-indicator {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--success-color);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Rate limit warning */
.rate-limit-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.rate-limit-warning strong {
    display: block;
    margin-bottom: 0.5rem;
}

/* Input validation states */
input:invalid:not(:focus):not(:placeholder-shown),
textarea:invalid:not(:focus):not(:placeholder-shown),
input.touched:invalid:not(:focus),
textarea.touched:invalid:not(:focus),
select.touched:invalid:not(:focus) {
    border-color: var(--error-color);
    box-shadow: 0 0 0 2px rgba(var(--error-rgb, 211,47,47), 0.15);
}

input:valid:not(:focus):not(:placeholder-shown),
textarea:valid:not(:focus):not(:placeholder-shown),
select.touched:valid:not(:focus) {
    border-color: var(--success-color);
}

/* Prevent autocomplete styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px white inset;
    box-shadow: 0 0 0 1000px white inset;
}

/* =============================================
   SELECTION INSTRUCTIONS BOX
   ============================================= */

.selection-instructions {
    background: linear-gradient(135deg, #fff9f0 0%, #fffbf5 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg) var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    display: flex;
    gap: var(--spacing-lg);
    align-items: flex-start;
    box-shadow: 0 2px 8px var(--shadow-sm);
}

.instructions-icon {
    font-size: 3rem;
    line-height: 1;
    flex-shrink: 0;
}

.instructions-content h3 {
    margin: 0 0 var(--spacing-sm) 0;
    color: var(--text-dark);
    font-size: 1.25rem;
    font-weight: var(--font-semibold);
}

.instructions-content p {
    margin: var(--spacing-sm) 0;
    color: var(--text-medium);
    line-height: 1.6;
}

.instructions-list {
    list-style: none;
    padding: 0;
    margin: var(--spacing-md) 0;
}

.instructions-list li {
    padding: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
    position: relative;
    color: var(--text-medium);
    line-height: 1.6;
}

.instructions-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: var(--font-bold);
    font-size: 1.2rem;
}

.instructions-list li strong {
    color: var(--primary-color);
    font-weight: var(--font-semibold);
}

.instructions-note {
    background: var(--background-white);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary-color);
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-top: var(--spacing-md);
}

/* Responsive design for instructions */
@media (max-width: 768px) {
    .selection-instructions {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-md);
    }
    
    .instructions-icon {
        font-size: 2.5rem;
    }
    
    .instructions-content h3 {
        font-size: 1.1rem;
    }
    
    .instructions-list {
        text-align: left;
    }
}

/* Hide instructions after user makes first selection */
.selection-instructions.dismissed {
    display: none;
}

/* Instructions close button */
.instructions-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.instructions-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
    transform: rotate(90deg);
}

.selection-instructions {
    position: relative;
}

@media (max-width: 768px) {
    .instructions-close {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
    }
}

/* =============================================
   COMPARISON MODAL - CHECKBOXES & ACTIONS
   ============================================= */

.comparison-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem;
    background: var(--background-gray-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.9rem;
    font-weight: var(--font-medium);
}

.comparison-checkbox-label:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.comparison-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.comparison-checkbox-label span {
    color: var(--text-medium);
    user-select: none;
}

.comparison-checkbox:checked + span {
    color: var(--primary-color);
    font-weight: var(--font-semibold);
}

.comparison-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-light);
}

.comparison-actions button {
    min-width: 200px;
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

/* Disabled state for the "Add Selected" button */
.comparison-actions .btn-primary:disabled {
    background: var(--background-gray);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Per-column "Add to Quote" checkbox in comparison header */
.comparison-quote-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.45rem 0.75rem;
    background: var(--background-gray-light);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.85rem;
    font-weight: var(--font-medium);
    user-select: none;
    justify-content: center;
}

.comparison-quote-label:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.comparison-quote-cb {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.comparison-quote-cb:checked + span {
    color: var(--primary-color);
    font-weight: var(--font-semibold);
}

/* Highlight the whole column when its checkbox is checked */
.comparison-table thead th:has(.comparison-quote-cb:checked) {
    background: var(--primary-light);
}

/* Notification styles */
.notification {
    animation: slideIn 0.3s ease;
}

@media (max-width: 768px) {
    .comparison-actions {
        flex-direction: column;
    }
    
    .comparison-actions button {
        width: 100%;
    }
    
    .comparison-checkbox-label {
        font-size: 0.85rem;
    }
}

/* =============================================
   REVIEW QUOTE MODAL
   ============================================= */

.review-quote-modal {
    max-width: 800px;
    max-height: 90vh;
}

.review-instructions {
    background: var(--background-gray-light);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    color: var(--text-medium);
}

.review-quote-list {
    max-height: 50vh;
    overflow-y: auto;
    padding: 0.5rem;
}

.review-quote-item {
    margin-bottom: 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.review-quote-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px var(--shadow-sm);
}

.review-quote-checkbox {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    cursor: pointer;
    align-items: flex-start;
}

.review-quote-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 0.25rem;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.review-quote-details {
    flex: 1;
}

.review-quote-details h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.review-part-number {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.review-category {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.review-price {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: var(--font-semibold);
    margin: 0.5rem 0;
}

.review-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.review-spec {
    background: var(--background-gray-light);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-medium);
}

.review-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-light);
    flex-wrap: wrap;
}

.review-actions button {
    min-width: 180px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.review-actions .btn-primary:disabled {
    background: var(--background-gray);
    color: var(--text-muted);
    cursor: not-allowed;
    border: 2px solid var(--border-medium);
}

.review-actions .btn-clear {
    background: transparent;
    color: var(--error-color);
    border: 2px solid var(--error-color);
}

.review-actions .btn-clear:hover {
    background: var(--error-color);
    color: white;
}

/* Unchecked items appear faded */
.review-quote-checkbox:has(input:not(:checked)) {
    opacity: 0.5;
}

.review-quote-checkbox:has(input:not(:checked)) .review-quote-details {
    text-decoration: line-through;
}

@media (max-width: 768px) {
    .review-quote-modal {
        max-width: 95vw;
    }
    
    .review-actions {
        flex-direction: column;
    }
    
    .review-actions button {
        width: 100%;
    }
    
    .review-quote-checkbox {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* =============================================
   PRODUCT CARD - CLICKABLE SELECTION
   ============================================= */

/* Make entire card interactive */
.product-card {
    position: relative;
    transition: all 0.3s ease;
    user-select: none;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-md);
    border-color: var(--primary-color);
}

/* =============================================
   PRODUCT CARD SELECTION STATE
   Border-only highlight — no background gradient
   so the product image is never affected.
   ============================================= */

/* Selected state — border + shadow only, NO background change */
.product-card-selected {
    border: 3px solid var(--primary-color) !important;
    box-shadow: 0 4px 16px var(--shadow-primary) !important;
    cursor: pointer;
}

.product-card-selected:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-primary) !important;
}

/* Pulse animation — applied as a SEPARATE class by JS, removed after 500ms.
   Never put animation on .product-card-selected itself because it would
   conflict with the card's .fadeInUp entrance animation (opacity: 0 start). */
@keyframes selectPulse {
    0%   { outline: 3px solid rgba(33,150,243,0.8); outline-offset: 0px;  }
    100% { outline: 3px solid rgba(33,150,243,0);   outline-offset: 6px; }
}
.product-card-pulse {
    animation: selectPulse 0.4s ease-out;
}

/* Price stays blue when selected */
.product-card-selected .product-price {
    color: var(--primary-color);
    font-weight: var(--font-bold);
}

/* Light blue tint on the CONTENT area only — image is untouched */
.product-card-selected::before {
    content: '';
    position: absolute;
    top: 250px;          /* below the 250px image */
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-light);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

/* Keep text content above the tint */
.product-card-selected .product-content {
    position: relative;
    z-index: 1;
}

/* Visual feedback for active clicking */
.product-card:active {
    transform: translateY(-2px) scale(0.98);
}

/* Selection indicator (checkmark circle) */
.product-select-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: var(--background-white);
    border: 2px solid var(--border-medium);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 2px 8px var(--shadow-sm);
}
.product-select-indicator svg {
    width: 24px;
    height: 24px;
    color: var(--border-medium);
    transition: all 0.3s ease;
}
.product-card:hover .product-select-indicator {
    border-color: var(--primary-color);
    transform: scale(1.1);
}
.product-card:hover .product-select-indicator svg {
    color: var(--primary-color);
}
.product-select-indicator.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}
.product-select-indicator.selected svg { color: var(--background-white); }
.product-select-indicator .indicator-check {
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}
.product-select-indicator.selected .indicator-check {
    opacity: 1;
    transform: scale(1);
}

/* Remove old checkbox styling */
.product-select-wrapper,
.product-select-checkbox,
.product-select-label { display: none !important; }

@media (max-width: 768px) {
    .product-select-indicator {
        width: 36px;
        height: 36px;
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .product-select-indicator svg {
        width: 20px;
        height: 20px;
    }
}

/* =============================================
   INSTRUCTIONS BOX - AUTO-HIDE ON SCROLL
   ============================================= */

.selection-instructions {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    box-shadow: 0 4px 12px var(--shadow-sm);
    transition: all 0.4s ease;
    position: relative;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.selection-instructions.dismissed,
.selection-instructions.auto-hidden {
    opacity: 0;
    transform: translateY(-20px);
    max-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    border-width: 0;
}

.instructions-icon {
    font-size: 2rem;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.instructions-content {
    flex: 1;
}

.instructions-content h3 {
    margin: 0 0 0.75rem 0;
    color: var(--text-dark);
    font-size: 1.2rem;
}

.instructions-content p {
    margin: 0 0 0.75rem 0;
    color: var(--text-medium);
    line-height: 1.6;
}

.instructions-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
}

.instructions-list li {
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
    color: var(--text-medium);
}

.instructions-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: var(--font-bold);
}

.instructions-list li strong {
    color: var(--primary-color);
}

.instructions-note {
    margin: 0.75rem 0 0 0 !important;
    font-size: 0.95rem;
    color: var(--text-medium);
    font-style: italic;
}

.instructions-close {
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-medium);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.instructions-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
    transform: rotate(90deg);
}

/* Help Button */
.btn-help {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: var(--font-medium);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.btn-help:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-primary);
}

.btn-help:active {
    transform: translateY(0);
}

.btn-help svg {
    flex-shrink: 0;
}

/* Filter bar adjustments for help button */
.filter-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-bar .filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .selection-instructions {
        flex-direction: column;
        padding: 1rem;
    }
    
    .instructions-icon {
        font-size: 1.5rem;
    }
    
    .instructions-content h3 {
        font-size: 1.1rem;
    }
    
    .instructions-list li {
        padding-left: 1.25rem;
        font-size: 0.9rem;
    }
    
    .btn-help {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .filter-bar {
        gap: 0.5rem;
    }
}

/* =============================================
   QUOTE CART DRAWER
   Persistent panel — slides in from the right
   ============================================= */

/* Cart toggle button — always visible in bottom-right */
.cart-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 6px 20px rgba(13,71,161,.35);
    z-index: 900;
    transition: all 0.2s ease;
}
.cart-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(13,71,161,.45);
}
.cart-toggle.has-items {
    animation: cartBounce 0.4s ease;
}
@keyframes cartBounce {
    0%,100% { transform: translateY(0); }
    40%      { transform: translateY(-6px); }
    70%      { transform: translateY(-3px); }
}

.cart-badge {
    background: white;
    color: var(--accent-blue);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* Drawer overlay */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 950;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.cart-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Drawer panel */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -440px;
    width: 420px;
    max-width: 95vw;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 24px rgba(0,0,0,.15);
    z-index: 960;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-drawer.open {
    right: 0;
}

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--border-light);
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 100%);
    color: white;
    flex-shrink: 0;
}
.cart-drawer-title {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cart-drawer-close {
    background: rgba(255,255,255,.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.cart-drawer-close:hover { background: rgba(255,255,255,.35); }

/* Cart item list — scrollable */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--border-medium) transparent;
}
.cart-items::-webkit-scrollbar { width: 4px; }
.cart-items::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 2px;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    gap: 1rem;
    padding: 2rem;
    text-align: center;
}
.cart-empty-icon { font-size: 3rem; opacity: 0.3; }

/* Individual cart item */
.cart-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: start;
    background: var(--background-gray-light);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    transition: border-color 0.2s;
}
.cart-item:hover { border-color: var(--primary-color); }

.cart-item-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--background-gray);
    flex-shrink: 0;
}

.cart-item-info { min-width: 0; }
.cart-item-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
}
.cart-item-part {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
    margin-bottom: 0.35rem;
}
.cart-item-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Quantity control */
.cart-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
}
.qty-control {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: white;
    border: 1px solid var(--border-medium);
    border-radius: 20px;
    padding: 0.15rem 0.35rem;
}
.qty-btn {
    background: none;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    font-weight: 700;
}
.qty-btn:hover { background: var(--primary-light); }
.qty-input {
    width: 32px;
    text-align: center;
    border: none;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-dark);
    background: transparent;
    outline: none;
    -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.cart-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    transition: all 0.15s;
    white-space: nowrap;
}
.cart-item-remove:hover { color: var(--error-color); background: #fce8e8; }

/* Cart footer */
.cart-drawer-footer {
    padding: 1.25rem 1.5rem;
    border-top: 2px solid var(--border-light);
    background: var(--background-gray-light);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.btn-cart-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 100%);
    color: white;
    border: none;
    padding: 0.85rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}
.btn-cart-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13,71,161,.3);
}
.btn-cart-secondary {
    background: white;
    color: var(--text-medium);
    border: 1px solid var(--border-medium);
    padding: 0.6rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-align: center;
}
.btn-cart-secondary:hover { border-color: var(--primary-color); color: var(--primary-color); }

/* "Added to cart" flash on product card */
.cart-add-flash { animation: flashGreen 0.5s ease; }
@keyframes flashGreen {
    0%,100% { box-shadow: 0 4px 12px var(--shadow-sm); }
    40%      { box-shadow: 0 0 0 4px rgba(76,175,80,.4); }
}


@media (max-width: 768px) {
    .cart-drawer { width: 100%; max-width: 100%; right: -100%; }
    .cart-toggle { bottom: 1rem; right: 1rem; padding: 0.75rem 1.1rem; font-size: 0.85rem; }
}
