/* css/main.css - Premium Dark Theme (Customer Catalog) */
:root {
    --bg-color: #0f1115;
    --page-bg: #16181d;
    --sidebar-bg: #1a1c23;
    --card-bg: #22252e;
    --accent: #f97316;
    --accent-hover: #ea580c;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --border: #333842;
    --box-border: #4b5563;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    display: flex;
    color: var(--text-main);
    scroll-behavior: smooth;
}

/* --- Login Overlay --- */
#login-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-color: var(--bg-color); z-index: 9999;
    display: flex; justify-content: center; align-items: center;
}
#login-box {
    background: var(--card-bg); padding: 40px; border-radius: 12px;
    border: 1px solid var(--border); box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    text-align: center; max-width: 350px; width: 100%;
}
#login-code {
    width: 100%; padding: 15px; background: #121419; border: 1px solid var(--border);
    border-radius: 6px; color: #fff; font-size: 16px; margin-bottom: 15px;
    box-sizing: border-box; text-align: center; text-transform: uppercase; letter-spacing: 2px;
}
#login-code:focus { outline: none; border-color: var(--accent); }
#login-error { color: #ef4444; font-size: 13px; margin-bottom: 15px; display: none; font-weight: bold;}

/* --- Sidebar (Cart & Nav) --- */
#sidebar { 
    width: 320px; background: var(--sidebar-bg); height: 100vh; position: fixed; top: 0; left: 0; 
    box-shadow: 4px 0 15px rgba(0,0,0,0.5); padding: 30px 20px; box-sizing: border-box; overflow-y: auto; 
    z-index: 100; border-right: 1px solid var(--border); display: flex; flex-direction: column;
}
#sidebar h2 { font-size: 22px; margin-top: 0; margin-bottom: 10px; color: #fff; }
.intro-text { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 20px; }

/* --- Search & Navigation --- */
.search-input {
    width: 100%; padding: 12px 15px; background: #121419; border: 1px solid var(--border);
    border-radius: 6px; color: var(--text-main); font-size: 14px; margin-bottom: 20px; box-sizing: border-box; transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15); }

.vehicle-nav { display: flex; flex-direction: column; gap: 8px; margin-bottom: 30px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.vehicle-nav a { color: var(--text-muted); text-decoration: none; font-size: 13px; font-weight: 600; transition: color 0.2s, padding-left 0.2s; }
.vehicle-nav a:hover { color: var(--accent); padding-left: 5px; }

#main-content { margin-left: 320px; padding: 40px; width: calc(100% - 320px); display: flex; flex-direction: column; align-items: center; box-sizing: border-box; }

/* --- Page Container --- */
.page { width: 100%; max-width: 950px; background: var(--page-bg); border-radius: 12px; margin-bottom: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); padding: 40px; border: 1px solid var(--border); }

/* --- Headers --- */
.header-container { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 40px; border-bottom: 2px solid var(--border); padding-bottom: 15px; }
.header-title { font-size: 28px; font-weight: 800; letter-spacing: 1px; color: #fff; }
.header-date { font-size: 13px; color: var(--accent); font-weight: 600; text-transform: uppercase; }

.vehicle-header { 
    background: linear-gradient(90deg, #2a2d39 0%, #1a1c23 100%); padding: 16px 20px; font-size: 18px; font-weight: 800; letter-spacing: 2px;
    margin: 50px 0 20px 0; color: #fff; border-radius: 8px; border-left: 4px solid var(--accent); box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    text-transform: uppercase; scroll-margin-top: 40px;
}

.category-header { 
    font-size: 13px; color: var(--accent); background: rgba(249, 115, 22, 0.1); border: 1px solid rgba(249, 115, 22, 0.2);
    padding: 8px 16px; margin: 20px 0 15px 0; border-radius: 6px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; display: inline-block;
}

/* --- Product Rows --- */
.product-row { 
    display: flex; background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 24px; 
    margin-bottom: 16px; align-items: center; gap: 30px; transition: transform 0.2s, box-shadow 0.2s;
}
.product-row:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(0,0,0,0.3); border-color: var(--box-border); }

.product-img-link { display: block; line-height: 0; border-radius: 6px; transition: box-shadow 0.2s; }
.product-img-link:hover .product-img { border-color: var(--accent); box-shadow: 0 0 12px rgba(249, 115, 22, 0.3); }

.product-img { width: 90px; height: 90px; object-fit: cover; border-radius: 6px; background: #fff; border: 2px solid var(--border); transition: border-color 0.2s;}
.product-img-col { display: flex; flex-direction: column; align-items: center; min-width: 90px; flex-shrink: 0; }

.product-details { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.product-title { font-weight: bold; font-size: 15px; margin-bottom: 6px; }
.product-title a { color: #fff; text-decoration: none; transition: color 0.2s; }
.product-title a:hover { color: var(--accent); }
.product-sku { font-size: 12px; color: var(--accent); font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;}
.product-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.product-fitment { font-size: 11px; color: #6b7280; margin-top: 8px; font-style: italic; }

/* --- Badges & Inputs --- */
.pricing-box { 
    background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 6px; padding: 12px 18px; 
    text-align: center; min-width: 85px; flex-shrink: 0; 
}
.price-msrp { font-size: 11px; color: var(--text-muted); text-transform: uppercase; margin-bottom: 4px; display: block;}
.price-val { font-size: 16px; font-weight: bold; color: #fff; }

.dist-box { background: rgba(16, 185, 129, 0.05); border-color: rgba(16, 185, 129, 0.3); }
.dist-box .price-msrp { color: #10b981; font-weight: bold; }
.dist-box .price-val { color: #34d399; }

.qty-input { 
    width: 60px; padding: 12px 10px; text-align: center; border: 1px solid var(--border); border-radius: 6px; 
    font-size: 14px; background: var(--bg-color); color: #fff; font-weight: bold;
}
.qty-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2); }

/* --- Buttons & Links --- */
button { 
    cursor: pointer; padding: 12px 15px; background: var(--accent); color: #fff; border: none; border-radius: 6px; 
    font-weight: bold; font-size: 14px; width: 100%; transition: 0.2s ease; box-shadow: 0 4px 10px rgba(249, 115, 22, 0.2);
}
button:hover { background: var(--accent-hover); transform: translateY(-1px); }

.asset-links { display: flex; gap: 12px; margin-top: 10px; font-size: 11px; text-transform: uppercase; font-weight: bold; }
.asset-links a { color: var(--text-muted); text-decoration: none; cursor: pointer; transition: color 0.2s;}
.asset-links a:hover { color: var(--accent); }

/* --- Cart Sidebar Elements --- */
#cart-summary { background: rgba(0,0,0,0.2); padding: 20px; border-radius: 8px; border: 1px solid var(--border); flex-grow: 1; overflow-y: auto;}
#cart-summary h3 { margin-top: 0; font-size: 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; border-bottom: 1px solid var(--border); padding-bottom: 10px;}
.cart-item { display: flex; justify-content: space-between; font-size: 12px; border-bottom: 1px dashed var(--border); padding: 10px 0; line-height: 1.4;}
.cart-total { font-size: 14px; font-weight: bold; margin-top: 15px; display: flex; justify-content: space-between; color: #fff;}

.cart-monetary-totals { margin-top: 15px; border-top: 1px solid var(--border); padding-top: 15px; display: flex; flex-direction: column; gap: 8px; }
.cart-monetary-totals .row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); }
.cart-monetary-totals .row.dist-total { color: #34d399; font-weight: bold; font-size: 15px; margin-top: 5px;}

/* --- Lightbox Modal --- */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); z-index: 2000; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.modal-box { background: var(--page-bg); padding: 25px; border-radius: 12px; max-width: 85vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; position: relative; border: 1px solid var(--border); box-shadow: 0 20px 50px rgba(0,0,0,0.6); }
.modal-close { position: absolute; top: -15px; right: -15px; background: var(--bg-color); color: var(--text-muted); border: 1px solid var(--border); border-radius: 50%; width: 35px; height: 35px; font-size: 20px; cursor: pointer; display: flex; justify-content: center; align-items: center; box-shadow: 0 4px 10px rgba(0,0,0,0.5); padding: 0;}
.modal-close:hover { background: var(--border); color: #fff; transform: none;}
.modal-image { max-width: 100%; max-height: 70vh; object-fit: contain; border-radius: 4px; background: #fff; }
.btn-download { margin-top: 20px; background: var(--card-bg); border: 1px solid var(--border); color: var(--text-main); padding: 10px 25px; text-decoration: none; border-radius: 6px; font-weight: bold; display: inline-flex; align-items: center; gap: 8px; width: auto; box-shadow: none;}
.btn-download:hover { background: var(--border); color: #fff; transform: none; }