/* ========== CSS RESET ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* ========== VARIABLES ========== */
:root {
    --primary-red: #8A0A1E;
    --primary-red-dark: #6D0019;
    --primary-red-light: #F9E8EA;
    --accent-gold: #FFD700;
    --dark-gray: #2C2C2C;
    --medium-gray: #555;
    --light-gray: #F5F5F5;
    --border-color: #E0E0E0;
    --success-green: #28a745;
    --warning-orange: #ff9800;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

/* ========== UTILITY CLASSES ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-red);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-red);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-red-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: white;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
}

.btn-secondary:hover {
    background: var(--primary-red-light);
    transform: translateY(-2px);
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.badge-discount {
    background: var(--primary-red);
    color: white;
}

.badge-new {
    background: var(--success-green);
    color: white;
}

.badge-best {
    background: var(--accent-gold);
    color: var(--dark-gray);
}

.badge-stock {
    background: var(--warning-orange);
    color: white;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
    padding: 20px 0;
    margin-bottom: 10px;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--medium-gray);
}

.breadcrumb-nav a {
    color: var(--medium-gray);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-nav a:hover {
    color: var(--primary-red);
}

.breadcrumb-nav i {
    font-size: 12px;
}

/* ========== PARTS HERO ========== */
.parts-hero {
    margin-bottom: 40px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
}

@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
}

/* Image Gallery */
.image-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image {
    width: 100%;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.main-image:hover img {
    transform: scale(1.03);
}

.image-badges {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.thumbnail {
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
}

.thumbnail:hover {
    border-color: var(--primary-red);
    transform: translateY(-3px);
}

.thumbnail.active {
    border-color: var(--primary-red);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Parts Info */
.parts-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.parts-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.parts-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark-gray);
    line-height: 1.3;
}

.parts-subtitle {
    font-size: 16px;
    color: var(--medium-gray);
    margin-top: 5px;
}

.parts-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stars {
    color: var(--accent-gold);
    font-size: 20px;
}

.rating-text {
    font-size: 15px;
    color: var(--medium-gray);
}

.rating-text strong {
    color: var(--primary-red);
}

.parts-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: var(--light-gray);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--medium-gray);
}

.tag.featured {
    background: var(--primary-red-light);
    color: var(--primary-red);
}

.parts-description {
    color: var(--medium-gray);
    line-height: 1.8;
    font-size: 15px;
}

/* Price Section */
.price-section {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 25px;
    margin: 15px 0;
}

.price-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.price-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-gray);
}

.price-amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-red);
}

.price-old {
    font-size: 20px;
    color: #999;
    text-decoration: line-through;
    margin-right: 10px;
}

.price-note {
    font-size: 14px;
    color: var(--medium-gray);
    margin-top: 10px;
}

/* Quantity Selector */
.quantity-selector {
    margin: 15px 0;
}

.quantity-selector label {
    font-weight: 600;
    margin-right: 15px;
}

.quantity-controls {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-controls button {
    padding: 8px 15px;
    background: var(--light-gray);
    border: none;
    cursor: pointer;
}

.quantity-controls input {
    width: 60px;
    text-align: center;
    border: none;
    padding: 8px;
    font-weight: 600;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
}

.btn-lg {
    padding: 16px 32px;
    flex: 1;
    min-width: 200px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 25px;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-red-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--primary-red);
    flex-shrink: 0;
}

.feature-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--dark-gray);
}

.feature-content p {
    font-size: 14px;
    color: var(--medium-gray);
}

/* ========== ADDITIONAL SECTIONS ========== */
.section-spacing {
    margin-bottom: 50px;
}

/* Parts Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.category-card {
    text-align: center;
    padding: 25px 20px;
    border-radius: 12px;
    background: white;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-red-light);
}

.category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1;
}

.category-icon {
    font-size: 40px;
    color: var(--primary-red);
    margin-bottom: 15px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-gray);
}

.category-desc {
    font-size: 14px;
    color: var(--medium-gray);
    margin-bottom: 15px;
    min-height: 60px;
}

.category-count {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 15px;
}

/* Top Selling Parts */
.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.part-card {
    border-radius: 12px;
    overflow: hidden;
    background: white;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
}

.part-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.part-card-image {
    height: 200px;
    overflow: hidden;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.part-card-image img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    transition: transform 0.5s;
}

.part-card:hover .part-card-image img {
    transform: scale(1.1);
}

.part-card-content {
    padding: 20px;
}

.part-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-gray);
}

.part-card-category {
    font-size: 14px;
    color: var(--primary-red);
    margin-bottom: 10px;
}

.part-card-sku {
    font-size: 12px;
    color: var(--medium-gray);
    margin-bottom: 10px;
}

.part-card-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-red);
    margin-bottom: 15px;
}

.part-card-actions {
    display: flex;
    gap: 10px;
}

/* Brands Section */
.brands-section {
    background: var(--light-gray);
    padding: 40px;
    border-radius: 16px;
    margin: 50px 0;
}

.brands-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
}

.brand-logo {
    height: 80px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    transition: var(--transition);
}

.brand-logo:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.brand-logo img {
    max-width: 100%;
    max-height: 100%;
    filter: grayscale(100%);
    transition: var(--transition);
}

.brand-logo:hover img {
    filter: grayscale(0%);
}

/* Compatibility Section */
.compatibility-section {
    background: linear-gradient(135deg, var(--primary-red-light) 0%, #fff5f7 100%);
    padding: 40px;
    border-radius: 16px;
    margin: 50px 0;
}

.compatibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.compatibility-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.compatibility-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.compatibility-list {
    list-style: none;
}

.compatibility-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.compatibility-list li i {
    color: var(--success-green);
}

/* Specifications */
.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.spec-label {
    font-weight: 600;
    color: var(--dark-gray);
}

.spec-value {
    color: var(--medium-gray);
}

/* Reviews */
.reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.review-card {
    padding: 25px;
    border-radius: 12px;
    background: white;
    border-left: 4px solid var(--primary-red);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.reviewer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-red-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary-red);
}

.reviewer-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.reviewer-info span {
    font-size: 14px;
    color: var(--medium-gray);
}

.review-content {
    color: var(--medium-gray);
    line-height: 1.7;
    font-size: 15px;
}

/* Contact & Location */
.contact-section {
    background: var(--dark-gray);
    color: white;
    border-radius: 16px;
    overflow: hidden;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-icon {
    font-size: 24px;
    color: var(--primary-red);
    margin-top: 5px;
    flex-shrink: 0;
}

.contact-text h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.contact-text p {
    color: #ccc;
    font-size: 15px;
    line-height: 1.6;
}

.contact-section .contact-links .contact-link {
    color: #e0e0e0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    transition: color 0.2s ease;
}

.contact-section .contact-links .contact-link:hover {
    color: #ffffff;
}

.contact-section .contact-links .contact-link i {
    color: inherit;
}

.map-container {
    height: 300px;
    background: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 16px;
}

/* Similar Parts */
.similar-parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .hero-content {
        gap: 30px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-lg {
        width: 100%;
    }

    .thumbnail-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .compatibility-section,
    .brands-section {
        padding: 25px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}