/**
 * Walker Scientific Quote System - Styles
 *
 * Redesigned layout: Left sidebar (filters, search, cart) + Right main content (products/details)
 * SEO-friendly with semantic HTML structure preserved.
 */

/* ===========================================
   CSS CUSTOM PROPERTIES
   =========================================== */
:root {
    /* Colors - Walker Scientific branding */
    --color-primary: #181818;
    --color-primary-light: #2a2a2a;
    --color-accent: #c23329;
    --color-accent-hover: #a52a21;
    --color-link: #1a6bb5;
    --color-link-hover: #0d4a7a;

    /* Backgrounds */
    --bg-page: #f5f5f5;
    --bg-sidebar: #ffffff;
    --bg-content: #ffffff;
    --bg-input: #ffffff;
    --bg-hover: #f0f0f0;
    --bg-selected: #e8f0f8;
    --bg-card: #ffffff;

    /* Text */
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #888888;
    --text-inverse: #ffffff;

    /* Borders */
    --border-color: #e0e0e0;
    --border-light: #e8e8e8;

    /* Typography */
    --font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-xs: 11px;
    --font-size-sm: 13px;
    --font-size-base: 15px;
    --font-size-lg: 17px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 32px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Layout - Sidebar left, main content right */
    --sidebar-width: 320px;
    --header-height: 56px;
    --footer-height: 48px;
    --min-tap-target: 44px;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --max-content-width: 1400px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.1);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
}

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

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-page);
    height: 100vh;
    overflow: hidden;
}

/* ===========================================
   TYPOGRAPHY
   =========================================== */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
}

h2 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-top: var(--space-xl);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--border-light);
}

h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--color-link);
    text-decoration: underline;
    transition: color var(--transition-fast);
}

a:hover, a:focus {
    color: var(--color-link-hover);
}

a:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

ul, ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

li {
    margin-bottom: var(--space-xs);
}

/* ===========================================
   LAYOUT - HEADER
   =========================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--color-primary);
    color: var(--text-inverse);
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-inner {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-inverse);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.site-logo:hover {
    color: var(--text-inverse);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* ===========================================
   LAYOUT - PAGE WRAPPER (Sidebar Left + Main Right)
   =========================================== */
.page-wrapper {
    display: flex;
    max-width: var(--max-content-width);
    margin: 0 auto;
    height: calc(100vh - var(--header-height) - var(--footer-height) - 190px);
    margin-bottom: calc(var(--footer-height) + var(--space-md));
    background-color: var(--bg-page);
    overflow: hidden;
}

/* ===========================================
   LAYOUT - LEFT SIDEBAR (Filters, Search, Cart)
   =========================================== */
.sidebar {
    position: relative;
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    max-height: 100%;
    background-color: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 50;
    flex-shrink: 0;
    padding-left: var(--space-lg);
}

.sidebar-section {
    padding: var(--space-md);
    padding-right: 0;
    flex-shrink: 0;
}

.sidebar-section:first-child {
    padding-top: var(--space-md);
}

.sidebar-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-sm);
    display: block;
}

/* ===========================================
   SEARCH BOX
   =========================================== */
.search-box {
    position: relative;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.search-icon {
    flex-shrink: 0;
    color: var(--text-muted);
    margin-left: var(--space-xs);
}

.search-input {
    width: 100%;
    padding: var(--space-xs) var(--space-sm);
    padding-left: 0;
    font-size: var(--font-size-sm);
    font-family: inherit;
    border: none;
    border-radius: var(--border-radius);
    background-color: transparent;
    transition: none;
}

.search-input:focus {
    outline: none;
}

.search-box:focus-within {
    border-color: var(--color-link);
    box-shadow: 0 0 0 3px rgba(26, 107, 181, 0.15);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* ===========================================
   CATEGORY FILTERS
   =========================================== */
.filter-section {
    flex-shrink: 0;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: var(--space-sm);
    margin: 0 0 0 var(--space-md);
}

.filter-group {
    margin-bottom: 2px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 2px var(--space-sm);
    cursor: pointer;
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
    transition: background-color var(--transition-fast);
}

.filter-label:hover {
    background-color: var(--bg-hover);
}

.filter-label input[type="checkbox"],
.filter-label input[type="radio"] {
    accent-color: var(--color-accent);
    width: 16px;
    height: 16px;
}

.filter-count {
    margin-left: auto;
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    background-color: var(--bg-hover);
    padding: 2px 6px;
    border-radius: 10px;
}

/* ===========================================
   CART / QUOTE TROLLEY (Sidebar)
   =========================================== */
.cart-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    margin-top: var(--space-md);
    padding: 0;
    flex: 1;
}

.cart-items {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    flex: 1;
    margin: var(--space-md) 0 var(--space-md) var(--space-md);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
}

.cart-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: var(--space-md);
    flex-shrink: 0;
    border-bottom: 1px solid var(--border-light);
    background-color: var(--bg-hover);
}

.cart-items-list {
    overflow-y: auto;
    flex: 1;
    padding: 0 var(--space-sm) var(--space-md) var(--space-sm);
}

.cart-empty {
    padding: var(--space-md);
    text-align: center;
    color: var(--text-muted);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

.cart-empty-cta {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    opacity: 0.8;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-light);
}

.cart-item .btn-remove {
    order: -1;
    flex-shrink: 0;
}

.cart-item .qty-pill {
    margin-left: auto;
    flex-shrink: 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: var(--font-size-sm);
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    line-height: 1.3;
}

.cart-item-code {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

/* Compact quantity control */
.qty-pill {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.qty-btn {
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background-color: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.qty-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.qty-btn:active {
    background-color: var(--border-color);
}

.qty-value {
    min-width: 18px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

.btn-remove {
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
    font-size: var(--font-size-base);
    line-height: 1;
    cursor: pointer;
    border-radius: var(--border-radius);
}

.btn-remove:hover {
    color: var(--color-accent);
    background-color: rgba(194, 51, 41, 0.1);
}

/* Cart footer */
.cart-footer {
    padding: var(--space-md);
    padding-right: 0;
    background-color: var(--bg-sidebar);
    flex-shrink: 0;
}

/* ===========================================
   BUTTONS
   =========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    min-height: var(--min-tap-target);
    padding: var(--space-sm) var(--space-md);
    font-family: inherit;
    font-size: var(--font-size-sm);
    font-weight: 500;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--text-inverse);
    border-color: var(--color-accent);
}

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

.btn-secondary {
    background-color: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-hover);
    border-color: var(--text-secondary);
}

.btn-small {
    min-height: 32px;
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
}

.btn-full {
    width: 100%;
}

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

#request-quote-btn:not(:disabled) {
    box-shadow: 0 4px 12px rgba(185, 73, 61, 0.35);
}

/* ===========================================
   MAIN CONTENT - Right Panel
   =========================================== */
.main-content {
    flex: 1;
    padding: var(--space-md);
    padding-bottom: 0;
    padding-right: var(--space-xl);
    background-color: var(--bg-content);
    min-width: 0;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.content-inner {
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* ===========================================
   LANDING INTRO (Static Header)
   =========================================== */
.landing-intro {
    flex-shrink: 0;
    margin-bottom: var(--space-md);
}


/* ===========================================
   PRODUCT GRID CONTAINER (Scrollable)
   =========================================== */
.product-grid-container {
    flex: 1;
    overflow-y: scroll;
    overflow-x: hidden;
    padding-bottom: var(--space-xl);
}

/* Scrollbar styling for product grid */
.product-grid-container::-webkit-scrollbar {
    width: 10px;
}

.product-grid-container::-webkit-scrollbar-track {
    background: transparent;
}

.product-grid-container::-webkit-scrollbar-thumb {
    background: rgba(200, 200, 200, 0.4);
    border-radius: 5px;
    transition: background 0.2s ease;
}

.product-grid-container:hover::-webkit-scrollbar-thumb {
    background: var(--border-color);
}

.product-grid-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Firefox scrollbar */
.product-grid-container {
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 200, 200, 0.4) transparent;
}

.product-grid-container:hover {
    scrollbar-color: var(--border-color) transparent;
}

/* ===========================================
   VIEW TOGGLE
   =========================================== */
.results-info {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.view-toggle {
    display: flex;
    gap: var(--space-xs);
    background-color: var(--bg-hover);
    padding: 4px;
    border-radius: var(--border-radius);
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.view-toggle-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-content);
}

.view-toggle-btn.active {
    color: var(--text-primary);
    background-color: var(--bg-content);
    box-shadow: var(--shadow-sm);
}

/* ===========================================
   PRODUCT GRID (Index Page)
   =========================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

/* List View */
.product-grid.list-view {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: 0 var(--space-lg);
    width: 100%;
}

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

.product-card:hover {
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
}

.product-card-image {
    position: relative;
    aspect-ratio: 4/3;
    background-color: var(--bg-page);
    overflow: hidden;
}

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

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

.product-card-badge {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    background-color: var(--color-accent);
    color: var(--text-inverse);
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.product-card-body {
    padding: var(--space-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-category {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-xs);
}

.product-card-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--space-xs);
    line-height: 1.3;
}

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

.product-card-title a:hover {
    color: var(--color-link);
}

.product-card-code {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-family: monospace;
    margin-bottom: var(--space-sm);
}

.product-card-description {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-footer {
    padding: var(--space-md);
    padding-top: 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-add-to-quote {
    flex: 1;
    background-color: var(--color-accent);
    color: var(--text-inverse);
    border: none;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-add-to-quote:hover {
    background-color: var(--color-accent-hover);
}

.btn-add-to-quote.added {
    background-color: #2e7d32;
}

.btn-view-details {
    padding: var(--space-sm) var(--space-md);
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-view-details:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

/* ===========================================
   LIST VIEW CARD STYLES
   =========================================== */
.list-view .product-card {
    flex-direction: row;
    align-items: stretch;
    width: 100%;
}

.list-view .product-card-image {
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    aspect-ratio: unset;
    background-color: #ffffff;
    position: relative;
    border-right: 1px solid var(--border-light);
}

.list-view .product-card-image a {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
}

.list-view .product-card-image img {
    display: block;
    width: auto;
    height: auto;
    max-width: 74px;
    max-height: 74px;
    object-fit: contain;
}

.list-view .product-card-badge {
    display: none;
}

.list-view .product-card-body {
    flex: 1;
    padding: var(--space-md) var(--space-md) 4px var(--space-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.list-view .product-card-category {
    display: none;
}

.list-view .product-card-title {
    margin-bottom: 2px;
}

.list-view .product-card-code {
    margin-bottom: var(--space-xs);
}

.list-view .product-card-description {
    -webkit-line-clamp: 2;
    font-size: var(--font-size-sm);
    flex: none;
    max-width: none;
}

.list-view .product-card-footer {
    padding: var(--space-xs) var(--space-md);
    padding-right: var(--space-lg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-xs);
    min-width: 130px;
    max-width: 130px;
}

.list-view .product-card-footer .btn-add-to-quote,
.list-view .product-card-footer .btn-view-details {
    width: 100%;
    flex: none;
    text-align: center;
    padding: 6px var(--space-sm);
    font-size: var(--font-size-xs);
    line-height: 1.2;
}

/* ===========================================
   CATEGORY SECTIONS (Index Page)
   =========================================== */
.category-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-accent);
}

.category-header h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.category-count {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* ===========================================
   LANDING PAGE INTRO
   =========================================== */
.landing-intro {
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: var(--space-lg) var(--space-xl);
    padding-top: calc(var(--header-height) + var(--space-lg));
    padding-left: calc(var(--sidebar-width) + var(--space-2xl) + 40px);
    background-color: var(--bg-content);
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.landing-intro-featured {
    position: absolute;
    left: calc(var(--space-lg) + var(--space-md));
    top: calc(50% + var(--header-height) / 2);
    transform: translateY(-50%);
    width: var(--sidebar-width);
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-product-image {
    max-width: 78.75%;
    max-height: 283px;
    object-fit: contain;
}

.landing-intro-inner {
    max-width: 800px;
}

.landing-intro h1 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-md);
}

.landing-intro p {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Results count */
.results-info {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-left: auto;
}

/* ===========================================
   PRODUCT DETAIL PAGE
   =========================================== */
.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-lg);
}

.product-code {
    font-family: monospace;
    background-color: var(--bg-hover);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius);
}

.product-image {
    max-width: 500px;
    margin-bottom: var(--space-lg);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.product-image img {
    display: block;
    width: 100%;
    height: auto;
}

/* Add to quote section */
.add-to-quote {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background-color: var(--bg-hover);
    border-radius: var(--border-radius-lg);
    margin: var(--space-xl) 0;
}

.add-to-quote label {
    font-weight: 500;
}

.add-to-quote .qty-input {
    width: 64px;
}

.add-to-quote-hint {
    width: 100%;
    margin: var(--space-sm) 0 0 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* ===========================================
   SPECIFICATIONS TABLE
   =========================================== */
.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-lg);
}

.specs-table th,
.specs-table td {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.specs-table th {
    font-weight: 500;
    color: var(--text-secondary);
    width: 40%;
    background-color: var(--bg-hover);
}

.specs-table td {
    color: var(--text-primary);
}

.specs-table tr:last-child th,
.specs-table tr:last-child td {
    border-bottom: none;
}

/* ===========================================
   FEATURE LIST
   =========================================== */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    position: relative;
    padding-left: var(--space-lg);
    margin-bottom: var(--space-sm);
}

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: bold;
}

/* ===========================================
   RELATED PRODUCTS
   =========================================== */
.related-products-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.related-products-list li {
    margin: 0;
}

.related-products-list a {
    display: block;
    padding: var(--space-sm) var(--space-md);
    background-color: var(--bg-hover);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: background-color var(--transition-fast);
}

.related-products-list a:hover {
    background-color: var(--bg-selected);
}

/* ===========================================
   DOCUMENTATION LINK
   =========================================== */
.doc-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background-color: var(--bg-hover);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: background-color var(--transition-fast);
}

.doc-link:hover {
    background-color: var(--bg-selected);
}

.doc-link::before {
    content: "📄";
}

/* ===========================================
   MODAL
   =========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: var(--bg-content);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background-color: var(--color-primary);
    color: var(--text-inverse);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-inverse);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-inverse);
    font-size: var(--font-size-2xl);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: var(--space-lg);
}

/* ===========================================
   PRODUCT DETAIL MODAL
   =========================================== */
.product-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.product-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.product-modal {
    position: relative;
    background-color: var(--bg-content);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 700px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.product-modal-overlay.active .product-modal {
    transform: scale(1) translateY(0);
}

.product-modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 36px;
    height: 36px;
    background-color: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: var(--font-size-xl);
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    z-index: 10;
}

.product-modal-close:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--text-inverse);
}

.product-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-xl);
    padding-top: var(--space-lg);
}

/* Product modal content styling */
.product-modal-body .product-modal-image {
    max-width: 100%;
    margin-bottom: var(--space-lg);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background-color: #ffffff;
    padding: var(--space-lg);
}

.product-modal-body .product-modal-image img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 220px;
    margin: 0 auto;
    object-fit: contain;
}

.product-modal-body h1 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-sm);
    padding-right: var(--space-2xl);
}

.product-modal-body .product-meta {
    margin-bottom: var(--space-lg);
}

.product-modal-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background-color: var(--bg-hover);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.product-modal-actions label {
    font-weight: 500;
    font-size: var(--font-size-sm);
}

.product-modal-actions .qty-input {
    width: 60px;
}

.product-modal-actions .btn {
    flex: 1;
    min-width: 120px;
}

.product-modal-body section {
    margin-bottom: var(--space-lg);
}

.product-modal-body section:last-child {
    margin-bottom: 0;
}

.product-modal-body h2 {
    font-size: var(--font-size-lg);
    margin-top: 0;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 2px solid var(--border-light);
}

.product-modal-body h3 {
    font-size: var(--font-size-base);
    margin-top: var(--space-md);
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.product-modal-body p {
    margin-bottom: var(--space-sm);
}

/* Scrollbar styling for product modal */
.product-modal-body::-webkit-scrollbar {
    width: 8px;
}

.product-modal-body::-webkit-scrollbar-track {
    background: var(--bg-page);
}

.product-modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.product-modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Mobile responsive for product modal */
@media (max-width: 768px) {
    .product-modal-overlay {
        padding: var(--space-sm);
    }

    .product-modal {
        max-height: 95vh;
        border-radius: var(--border-radius);
    }

    .product-modal-body {
        padding: var(--space-md);
    }

    .product-modal-body h1 {
        font-size: var(--font-size-xl);
    }

    .product-modal-actions {
        flex-direction: column;
    }

    .product-modal-actions .btn {
        width: 100%;
    }
}

/* ===========================================
   FORM
   =========================================== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.form-group .required {
    color: var(--color-accent);
}

.form-group .optional {
    color: var(--text-muted);
    font-weight: normal;
    font-size: var(--font-size-sm);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-family: inherit;
    font-size: var(--font-size-base);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-link);
    box-shadow: 0 0 0 3px rgba(26, 107, 181, 0.15);
}

.form-group textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-family: inherit;
    font-size: var(--font-size-base);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    resize: vertical;
    min-height: 80px;
}

.form-products {
    background-color: var(--bg-hover);
    padding: var(--space-md);
    border-radius: var(--border-radius);
    font-size: var(--font-size-sm);
}

.form-products ul {
    margin: 0;
    padding-left: var(--space-md);
}

.form-success {
    text-align: center;
    padding: var(--space-xl);
}

.form-success h4 {
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
}

/* ===========================================
   FOOTER
   =========================================== */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-height);
    background-color: var(--color-primary);
    color: var(--text-inverse);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    z-index: 100;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: var(--text-inverse);
    opacity: 0.8;
}

.site-footer a:hover {
    opacity: 1;
}

/* ===========================================
   SIDEBAR PRODUCT LIST (for product pages)
   =========================================== */
.products-section {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.product-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.product-list-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    border-radius: var(--border-radius);
    background-color: transparent;
    border: 1px solid transparent;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.product-list-item:hover {
    background-color: var(--bg-hover);
}

.product-list-item.active {
    background-color: var(--bg-selected);
    border-color: var(--color-link);
}

.product-list-item.hidden {
    display: none;
}

.product-thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    background-color: var(--bg-page);
    border: 1px solid var(--border-light);
    object-fit: cover;
    flex-shrink: 0;
}

.product-list-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: var(--text-primary);
    min-width: 0;
}

.product-list-link:hover {
    color: var(--text-primary);
}

.product-list-text {
    flex: 1;
    min-width: 0;
}

.product-list-name {
    font-weight: 500;
    font-size: var(--font-size-sm);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-list-code {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    line-height: 1.2;
}

/* Quick add button - compact for sidebar */
.btn-quick-add {
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    background-color: var(--color-accent);
    color: var(--text-inverse);
    border: none;
    font-size: var(--font-size-sm);
    font-weight: 600;
    flex-shrink: 0;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-quick-add:hover {
    background-color: var(--color-accent-hover);
}

.btn-quick-add.added {
    background-color: #2e7d32;
}

/* ===========================================
   RESPONSIVE - TABLET
   =========================================== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 260px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

/* ===========================================
   RESPONSIVE - MOBILE
   =========================================== */
@media (max-width: 768px) {
    body {
        height: auto;
        overflow: auto;
    }

    .page-wrapper {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }

    .sidebar {
        position: relative;
        top: 0;
        width: 100%;
        min-width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .products-section {
        max-height: 200px;
    }

    .cart-section {
        max-height: 250px;
    }

    .cart-items {
        max-height: 120px;
    }

    .main-content {
        padding: var(--space-md);
        height: auto;
        overflow: visible;
        display: block;
    }

    .content-inner {
        display: block;
        height: auto;
        overflow: visible;
    }

    .product-grid-container {
        overflow: visible;
        height: auto;
    }

    .landing-intro h1 {
        font-size: var(--font-size-2xl);
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .site-header {
        position: sticky;
    }

    .site-footer {
        position: relative;
        margin-top: var(--space-lg);
    }

    .add-to-quote {
        flex-direction: column;
        align-items: stretch;
    }

    .product-meta {
        flex-direction: column;
        gap: var(--space-sm);
    }

    h1 {
        font-size: var(--font-size-xl);
    }

    h2 {
        font-size: var(--font-size-lg);
    }
}

/* ===========================================
   PRINT STYLES
   =========================================== */
@media print {
    .sidebar,
    .site-header,
    .site-footer,
    .add-to-quote,
    .btn,
    .product-card-footer {
        display: none;
    }

    .main-content {
        margin: 0;
        padding: 0;
    }

    .page-wrapper {
        display: block;
    }
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.no-results {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

.no-results p {
    margin: 0;
}
