/*
Theme Name: BROPARTS Child
Theme URI: https://broparts.ge  
Description: Child theme for BROPARTS Tesla parts store
Author: BROPARTS
Author URI: https://broparts.ge  
Template: storefront
Version: 1.0.0
Text Domain: broparts-child
*/
/* Import parent theme styles */
@import url("../storefront/style.css");

/* BROPARTS Custom Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #38383b;
    color: #1f2937;
}

.container {
    width: 90%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(204, 0, 0, 0.3);
}

/* Branding - Tesla Red Accent */
.site-branding a {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-decoration: none;
    position: relative;
}

.site-branding a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #CC0000, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.site-branding a:hover::after {
    opacity: 1;
}

.site-branding a span {
    color: #CC0000;
    text-shadow: 0 0 10px rgba(204, 0, 0, 0.3);
}

.main-navigation ul li a {
    color: white !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.main-navigation ul li a:hover {
    color: #CC0000 !important;
    text-shadow: 0 0 8px rgba(204, 0, 0, 0.4);
}


/* Model Selection */
.model-selection {
    background: #D9DDDC;
    padding: 40px 0;
    margin: 30px 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    color: #1f2937;
    font-weight: 700;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

model-card {
    position: relative;
    transition: box-shadow 0.3s ease;
}

.model-card:hover {
    /* Tesla Red Glow Border on Hover - cards only */
    box-shadow: 0 0 0 2px #CC0000, 0 0 15px rgba(204, 0, 0, 0.3) !important;
}

.model-card.active {
    /* Tesla Red Glow on Selection - cards only */
    box-shadow: 0 0 0 3px #CC0000, 0 0 20px rgba(204, 0, 0, 0.4) !important;
}


.model-image {
    width: 220px;
    height: 100px;
    background: linear-gradient(45deg, #fffff);
    border-radius: 8px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.model-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #1f2937;
}

.model-card p {
    color: #6b7280;
    font-size: 14px;
}

/* ============ Product Section: Desktop Layout ============ */
.product-section {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Desktop Filters Container — Sticky Ready */
.desktop-filters {
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
    height: fit-content;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    z-index: 99;
    transition: all 0.3s ease;
}

.desktop-filters:hover {
    box-shadow: 0 6px 25px rgba(204, 0, 0, 0.15);
    border: 1px solid #CC0000;
}

/* Filter styling */
.filter-group {
    margin-bottom: 25px;
}

.filter-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1f2937;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
    position: relative;
}

.filter-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #CC0000;
    transition: width 0.3s ease;
}

.desktop-filters:hover .filter-title::after {
    width: 50px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

.filter-option:hover {
    color: #CC0000;
}

.filter-option input {
    margin: 0;
}

/* Checked filter highlight */
.filter-option input:checked + span {
    color: #CC0000;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(204, 0, 0, 0.3);
}

/* Clear Filters Button */
.clear-filters {
    background: #CC0000;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.2);
}

.clear-filters:hover {
    background: #990000;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(204, 0, 0, 0.3);
}

/* Filter count */
#filter-count {
    font-size: 14px;
    color: #CC0000;
    margin-bottom: 15px;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(204, 0, 0, 0.2);
}

/* ============ Mobile Floating Filters ============ */
#mobileFilters {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 12px 16px;
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: 0 -2px 12px rgba(204, 0, 0, 0.2);
    z-index: 1000;
    border-top: 2px solid #CC0000;
}

#mobileFilters.active {
    display: flex;
}

.filter-dropdown {
    background: #f8f9fa;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 110px;
    flex: 1;
    text-align: left;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.filter-dropdown:hover {
    border-color: #CC0000;
    background: #fff5f5;
}

.dropdown-content {
    position: absolute;
    bottom: 60px;
    left: 16px;
    right: 16px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(204, 0, 0, 0.25);
    padding: 16px;
    display: none;
    z-index: 1001;
    max-height: 200px;
    overflow-y: auto;
    border: 2px solid #CC0000;
}

.dropdown-content.active {
    display: block;
}

.dropdown-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dropdown-option {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.dropdown-option:hover {
    background: #fff5f5;
}

.dropdown-option input {
    margin: 0;
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding: 0 15px;
    }

    .product-section {
        grid-template-columns: 1fr;
        margin-top: 80px;
        padding-bottom: 100px;
    }

    .desktop-filters {
        display: none !important;
    }

    #mobileFilters {
        display: none;
    }

    #mobileFilters.active {
        display: flex;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .product-card {
        margin: 0 2px;
        height: 90%;
    }

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

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 360px; /* ← Set a fixed minimum height */
    max-height: 360px; /* ← Prevent stretching beyond this */
    position: relative;
}

/* Optional: Ensure content doesn't overflow */
.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Prevent text from overflowing */
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1f2937;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(204, 0, 0, 0.2); /* Tesla red glow */
    border: 1px solid #CC0000;
}

.product-image {
    height: 200px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.badge-oem {
    background: #dcfce7;
    color: #166534;
}

.badge-aftermarket {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1f2937;
    flex-grow: 1;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: #E82127;
    margin: 1px 0;
    text-shadow: 0 0 5px rgba(204, 0, 0, 0.2);
}

.product-oe {
    color: #6b7280;
    font-size: 14px;
    margin-top: 8px;
    font-weight: 500;
}
/* Override WooCommerce price styling inside product cards */
.product-price .woocommerce-Price-amount,
.product-price .woocommerce-Price-currencySymbol {
    font-size: 20px !important;       
    font-weight: 700 !important;
    color: #E82127  !important;
}

/* Optional: Remove extra spacing/margin from WooCommerce */
.product-price .amount {
    display: inline-block;
}
/* Add to Cart - Tesla Red */
.add-to-cart {
    background: #CC0000;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    width: 100%;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    margin-top: auto;
    text-decoration: none;
    text-align: center;
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.2);
}

.add-to-cart:hover {
    background: #990000;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(204, 0, 0, 0.3);
}

/* Loading and Error States */
.loading, .error, .no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #CC0000;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-shadow: 0 0 5px rgba(204, 0, 0, 0.2);
}

.loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid #6b7280;
    border-top: 3px solid #CC0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 8px rgba(204, 0, 0, 0.3);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer - Tesla Red Consistency */
.footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #ffffff;
    padding: 60px 0 30px;
    margin-top: 40px;
    border-top: 2px solid #CC0000;
}

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

.footer-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: #FFFFFF;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: #CC0000;
    box-shadow: 0 0 8px rgba(204, 0, 0, 0.3);
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 12px;
}

.contact-info i {
    color: #CC0000;
    font-size: 16px;
    min-width: 20px;
    text-shadow: 0 0 8px rgba(204, 0, 0, 0.3);
}

/* Footer animation */
.footer-section {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to Top Button - Tesla Red */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #CC0000;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.4);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop:hover {
    background: #E31937;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(204, 0, 0, 0.5);
}

/* Custom 3-column footer layout */
.footer-grid-custom {
    display: grid;
    grid-template-columns: 65% 25% 10%;
    gap: 24px;
    margin-bottom: 40px;
}

.footer-grid-custom .footer-social {
    padding-top: 32px !important;
    align-items: center;
}

.footer-grid-custom .footer-social a {
    margin-bottom: 12px !important;
    background: #333333;
    transition: all 0.3s ease;
}

.footer-grid-custom .footer-social a:hover {
    background: #CC0000;
    box-shadow: 0 0 12px rgba(204, 0, 0, 0.4);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .footer-grid-custom {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .footer-grid-custom .footer-social {
        padding-top: 20px !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 12px;
    }
    .footer-grid-custom .footer-social a {
        margin: 0 !important;
    }
}
/* Custom Header Search Input – High Visibility */
.header-search-input {
    background: #2d2d2d !important;         /* Slightly lighter than header */
    color: #ffffff !important;               /* White text for readability */
    border: 1px solid #444444 !important;    /* Visible border */
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    width: 280px !important;
    outline: none !important;
}

.header-search-input::placeholder {
    color: #aaaaaa !important;               /* Gray placeholder */
    opacity: 1 !important;
}

.header-search-input:focus {
    border-color: #CC0000 !important;        /* Tesla red on focus */
    box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.2) !important;
}
/* Header Logo */
.header-logo {
    max-width: 300px;
    height: auto;
    transition: transform 0.3s ease;
    
}

@media (min-width: 1024px) {
    .desktop-header .site-logo {
        margin-left: 80px;
    }
}


.site-logo a {
    display: block;
    padding: 0;
    margin: 0;
}

/* Ensure logo fits on mobile */
@media (max-width: 768px) {
    .header-logo {
        max-width: 200px;
    }
}
.header-logo:hover {
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.4));
}
/* ----- GLOBAL WIDTH ADJUSTMENT ----- */
.container {
    max-width: 1450px !important;
    padding: 0 20px;
}

/* ----- MODEL CARDS ----- */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
}

.model-card {
    background: #ffffff;
    padding: 30px 25px;
    border-radius: 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid #eaeaea;
}

.model-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
    border-color: #d0d0d0;
}

.section-title {
    font-size: 32px;
    margin-bottom: 25px;
    font-weight: 600;
}



/* ----- FILTER SECTION ----- */

.desktop-filters,
.mobile-filters {
    background: #ffffff;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0px 4px 14px rgba(0,0,0,0.06);
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

.filter-group {
    flex: 1 1 250px;
}

/* Titles */
.filter-title {
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 600;
}

/* Dropdowns */
.filter-dropdown {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid #d8d8d8;
    background-color: #fafafa;
    font-size: 16px;
    transition: all 0.2s ease;
}

.filter-dropdown:hover {
    border-color: #bfbfbf;
}

.filter-dropdown:focus {
    border-color: #3d7dff;
    background-color: #ffffff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(61,125,255,0.25);
}

/* Filter count */
#filter-count {
    width: 100%;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

/* Clear filters */
.clear-filters {
    background: #f44336;
    color: #fff;
    padding: 12px 22px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
    height: 48px;
    align-self: flex-end;
}

.clear-filters:hover {
    background: #d9362c;
}

@media (max-width: 768px) {
    #desktopFilters {
        display: none !important;
    }

    #mobileFilters {
        display: flex !important;
        flex-direction: column;
        gap: 20px;
    }
}

/* Light, Elegant Background for Entire Site */
body {
    background: linear-gradient(135deg, #f9f9f9 0%, #f0f4f8 100%);
    color: #333;
}

/* Set white background for product images */ 
.product-image { 
   background: white !important; 
   display: flex; 
   align-items: center; 
   justify-content: center; 
} 
 
.product-image img { 
   width: 100%; 
   height: 100%; 
   object-fit: contain; /* This ensures the image fits nicely without stretching */ 
   display: block; 
}
