/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.top-bar {
    background: #1e293b;
    color: #cbd5e1;
    font-size: 0.85rem;
    padding: 8px 0;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ef4444; /* Automotive Red */
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-container form {
    display: flex;
    width: 500px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.search-container input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    outline: none;
    font-size: 1rem;
}

.search-container button {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-container button:hover {
    background: #dc2626;
}

.nav-icons {
    display: flex;
    gap: 25px;
}

.nav-icons a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.9rem;
    color: #475569;
    position: relative;
}

.nav-icons i {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: 5px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
}

/* Category Nav */
.category-nav {
    background: white;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.category-nav ul {
    display: flex;
    gap: 30px;
}

.category-nav a {
    display: block;
    padding: 15px 0;
    font-weight: 600;
    color: #1e293b;
    transition: color 0.3s;
}

.category-nav a:hover {
    color: #ef4444;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 80px 40px;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 30px;
    max-width: 500px;
}

.btn-primary {
    background: #ef4444;
    color: white;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: bold;
    display: inline-block;
    transition: background 0.3s, transform 0.2s;
}

.btn-primary:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

/* Products Section */
.featured-products {
    margin-bottom: 60px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-title h2 {
    font-size: 1.8rem;
    color: #1e293b;
}

.section-title a {
    color: #ef4444;
    font-weight: 600;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

.product-image {
    position: relative;
    height: 200px;
    background: #f1f5f9;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(30, 41, 59, 0.8);
    color: white;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-info h3 {
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 15px;
    flex: 1;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.price {
    font-size: 1.25rem;
    font-weight: bold;
    color: #ef4444;
}

.add-to-cart {
    background: #f1f5f9;
    color: #1e293b;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.3s, color 0.3s;
}

.add-to-cart:hover {
    background: #1e293b;
    color: white;
}

/* Footer */
.main-footer {
    background: #1e293b;
    color: #cbd5e1;
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: white;
}

.footer-bottom {
    background: #0f172a;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* --- Product Page --- */
.product-page-main { padding: 30px 20px 80px; }
.breadcrumb { margin-bottom: 30px; font-size: 0.9rem; color: #64748b; }
.breadcrumb a { color: #1e293b; font-weight: 500; }
.breadcrumb a:hover { color: #ef4444; }

.product-details-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: white;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.product-gallery img { width: 100%; border-radius: 8px; background: #f1f5f9; }
.category-tag { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: #ef4444; font-weight: 700; }
.product-info-detailed h1 { font-size: 2.2rem; color: #1e293b; margin: 10px 0 20px; }
.price-large { font-size: 2rem; color: #1e293b; font-weight: bold; margin-bottom: 25px; }
.description { font-size: 1.1rem; line-height: 1.6; color: #475569; margin-bottom: 25px; }
.stock-status { color: #10b981; font-weight: 600; margin-bottom: 30px; display: flex; align-items: center; gap: 8px; }
.add-to-cart-action { display: flex; gap: 15px; margin-bottom: 40px; }
.qty-input { width: 80px; padding: 10px; border: 2px solid #e2e8f0; border-radius: 6px; font-size: 1.1rem; text-align: center; }
.btn-large { padding: 15px 40px; font-size: 1.1rem; }
.product-meta { padding-top: 20px; border-top: 1px solid #e2e8f0; color: #64748b; line-height: 1.8; }

/* --- Cart Page --- */
.cart-page-main { padding: 40px 20px 80px; }
.cart-page-main h1 { margin-bottom: 30px; color: #1e293b; }
.cart-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }

.cart-table { width: 100%; border-collapse: collapse; background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.cart-table th { background: #f8fafc; padding: 15px; text-align: left; color: #475569; border-bottom: 1px solid #e2e8f0; }
.cart-table td { padding: 20px 15px; border-bottom: 1px solid #e2e8f0; vertical-align: middle; }
.cart-img-col { width: 100px; }
.cart-img-col img { width: 80px; height: 80px; border-radius: 6px; object-fit: cover; }
.remove-btn { color: #ef4444; font-size: 0.85rem; margin-top: 10px; display: inline-block; }
.qty-input-small { width: 60px; padding: 8px; border: 1px solid #cbd5e1; border-radius: 4px; text-align: center; }

.summary-box { background: white; padding: 30px; border-radius: 10px; border: 1px solid #e2e8f0; }
.summary-box h3 { margin-bottom: 25px; color: #1e293b; border-bottom: 1px solid #e2e8f0; padding-bottom: 15px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 15px; color: #475569; }
.summary-box hr { border: none; border-top: 1px solid #e2e8f0; margin: 20px 0; }
.total-row { font-size: 1.3rem; font-weight: bold; color: #1e293b; }
.btn-block { width: 100%; text-align: center; margin-top: 20px; }

/* --- Account Page --- */
.account-page-main { padding: 40px 20px 80px; }
.account-layout { display: grid; grid-template-columns: 280px 1fr; gap: 40px; }

.account-sidebar { background: white; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; }
.user-profile-brief { padding: 30px 20px; text-align: center; background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.user-profile-brief .avatar { font-size: 3rem; color: #cbd5e1; margin-bottom: 10px; }
.user-profile-brief h3 { color: #1e293b; font-size: 1.1rem; }
.user-profile-brief p { color: #64748b; font-size: 0.9rem; }
.account-nav a { display: block; padding: 15px 20px; color: #475569; border-bottom: 1px solid #f1f5f9; transition: all 0.2s; }
.account-nav a:hover, .account-nav a.active { background: #ef4444; color: white; border-color: #ef4444; }
.account-nav a i { width: 25px; }

.account-content { background: white; padding: 40px; border: 1px solid #e2e8f0; border-radius: 10px; }
.account-content h2 { margin-bottom: 15px; color: #1e293b; }
.account-content p { color: #475569; line-height: 1.6; }
.mt-40 { margin-top: 40px; margin-bottom: 20px; }

.orders-table { width: 100%; border-collapse: collapse; text-align: left; }
.orders-table th { padding: 12px 15px; background: #f8fafc; color: #475569; border-bottom: 2px solid #e2e8f0; }
.orders-table td { padding: 15px; border-bottom: 1px solid #e2e8f0; color: #1e293b; }
.status-badge.success { background: #d1fae5; color: #065f46; padding: 4px 10px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.btn-outline-small { border: 1px solid #e2e8f0; padding: 6px 12px; border-radius: 4px; font-size: 0.85rem; transition: background 0.2s; }
.btn-outline-small:hover { background: #f1f5f9; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-details-container, .cart-layout, .account-layout { grid-template-columns: 1fr; }
}