/* HyperBrake Motorsport - Business Theme */
:root {
    --primary: #c41e3a;
    --primary-dark: #9a1830;
    --secondary: #1a1a2e;
    --accent: #f5a623;
    --text: #333;
    --text-light: #666;
    --bg: #f8f9fa;
    --white: #fff;
    --border: #e0e0e0;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

a { color: var(--primary); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--primary-dark); }

.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header {
    background: var(--secondary);
    color: var(--white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-top {
    background: #0f0f1a;
    padding: 8px 0;
    font-size: 13px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-main { padding: 15px 0; }

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -1px;
    white-space: nowrap;
}

.logo span { color: var(--primary); }

/* Navigation */
.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--white);
    font-weight: 500;
    font-size: 14px;
    transition: color 0.3s;
    white-space: nowrap;
}

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

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.header-actions { display: flex; gap: 15px; align-items: center; }

.search-box {
    display: flex;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.search-box input {
    background: transparent;
    border: none;
    padding: 10px 15px;
    color: var(--white);
    width: 200px;
    font-size: 14px;
}

.search-box input::placeholder { color: rgba(255,255,255,0.5); }

.search-box button {
    background: var(--primary);
    border: none;
    padding: 10px 15px;
    color: var(--white);
    cursor: pointer;
    transition: background 0.3s;
    font-size: 14px;
}

.search-box button:hover { background: var(--primary-dark); }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #2d2d44 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero p {
    font-size: 18px;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero-search {
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 25px 30px;
    max-width: 700px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
}

.hero-search h3 {
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 500;
}

.hero-search-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-select {
    flex: 1;
    min-width: 160px;
    padding: 14px 18px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    color: white;
    font-size: 14px;
    cursor: pointer;
}

.hero-select option {
    color: #333;
    background: white;
}

.hero-search-form .btn {
    padding: 14px 30px;
}

.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(196, 30, 58, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

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

/* Categories */
.categories {
    padding: 50px 0;
    background: var(--white);
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 35px;
    color: var(--secondary);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.category-card {
    background: var(--white);
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.category-image {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg);
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.category-card h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--secondary);
    line-height: 1.3;
}

/* Vehicle Search */
.vehicle-search-box {
    background: linear-gradient(135deg, var(--secondary) 0%, #2d2d44 100%);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    color: white;
}

.vehicle-search-box h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.vehicle-search-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.vehicle-search-form .filter-select {
    flex: 1;
    min-width: 180px;
    padding: 14px 18px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 14px;
}

.vehicle-search-form .filter-select option {
    color: #333;
    background: white;
}

.vehicle-search-form .btn {
    padding: 14px 28px;
}

/* Products Grid */
.products-section { padding: 50px 0; }

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    font-size: 14px;
    cursor: pointer;
}

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

.product-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    position: relative;
    padding-top: 75%;
    background: var(--bg);
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.5s;
}

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.product-info { padding: 20px; }

.product-category {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-model {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.product-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
}

.product-price.quote {
    font-size: 13px;
    color: var(--primary);
}

.btn-add {
    background: var(--secondary);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

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

/* Product Detail */
.product-detail { padding: 30px 0; }

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.product-gallery { position: sticky; top: 100px; }

.main-image {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.main-image img {
    width: 100%;
    height: auto;
}

.product-details h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 15px;
    line-height: 1.3;
}

.product-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 13px;
    color: var(--text-light);
    flex-wrap: wrap;
}

.product-description {
    color: var(--text);
    margin-bottom: 25px;
    line-height: 1.8;
    font-size: 14px;
}

.product-description p {
    margin-bottom: 15px;
}

.product-description ul, .product-description ol {
    margin: 15px 0;
    padding-left: 25px;
}

.product-description li {
    margin-bottom: 8px;
}

.product-description strong, .product-description b {
    color: var(--secondary);
    font-weight: 600;
}

.product-description h1, .product-description h2, .product-description h3 {
    color: var(--secondary);
    margin: 20px 0 10px;
}

.product-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.product-description td, .product-description th {
    padding: 10px;
    border: 1px solid var(--border);
    text-align: left;
}

.option-group { margin-bottom: 20px; }

.option-label {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--secondary);
    font-size: 14px;
}

.option-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.option-btn {
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
}

.option-btn:hover, .option-btn.active {
    border-color: var(--primary);
    color: var(--primary);
}

.option-btn.active {
    background: rgba(196, 30, 58, 0.1);
}

.price-section {
    background: var(--bg);
    padding: 20px;
    border-radius: 12px;
    margin: 25px 0;
}

.price-label {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.price-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--secondary);
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    flex: 1;
    min-width: 140px;
    text-align: center;
}

/* Footer */
.footer {
    background: var(--secondary);
    color: var(--white);
    padding: 50px 0 25px;
    margin-top: 50px;
}

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

.footer-brand .logo { margin-bottom: 15px; display: block; }

.footer-brand p {
    opacity: 0.7;
    font-size: 13px;
    line-height: 1.8;
}

.footer-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    transition: color 0.3s;
}
.footer-links a:hover { color: var(--white); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 25px;
    text-align: center;
    font-size: 13px;
    opacity: 0.7;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 35px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.pagination a:hover, .pagination .active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .header-main .container { gap: 20px; }
    .nav { gap: 20px; }
    .nav a { font-size: 13px; }
    .search-box input { width: 150px; }

    .hero h1 { font-size: 36px; }
    .hero p { font-size: 16px; }

    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-gallery {
        position: static;
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    .header-top { display: none; }

    .header-main .container {
        flex-wrap: wrap;
        gap: 15px;
    }

    .logo { font-size: 22px; }

    .menu-toggle { display: block; }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--secondary);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .nav.active { display: flex; }

    .nav a {
        padding: 12px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 15px;
    }

    .nav a:last-child { border-bottom: none; }

    .header-actions {
        order: 2;
        width: 100%;
    }

    .search-box {
        flex: 1;
    }

    .search-box input {
        width: 100%;
    }

    .hero {
        padding: 40px 0;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 15px;
        padding: 0 10px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 25px;
    }

    .categories { padding: 40px 0; }

    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .category-card {
        padding: 20px 10px;
    }

    .category-card h3 { font-size: 13px; }

    .products-section { padding: 40px 0; }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .product-info { padding: 15px; }

    .product-details h1 {
        font-size: 22px;
    }

    .price-value { font-size: 28px; }

    .footer { padding: 40px 0 20px; }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .container { padding: 0 15px; }

    .logo { font-size: 20px; }

    .hero h1 { font-size: 24px; }
    .hero p { font-size: 14px; }

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

    .product-card { border-radius: 12px; }

    .product-image { padding-top: 70%; }

    .product-name { font-size: 14px; }

    .product-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn-add {
        width: 100%;
        text-align: center;
        margin-top: 5px;
    }

    .product-details h1 { font-size: 20px; }

    .main-image { padding: 20px; }

    .option-buttons { gap: 6px; }

    .option-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    .price-value { font-size: 24px; }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .pagination a, .pagination span {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    padding: 60px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
