/*
Theme Name: Bavarian Motorwerks
Theme URI: https://bavarianmotorwerks.com
Author: Bavarian Motorwerks
Author URI: https://bavarianmotorwerks.com
Description: A premium WordPress/WooCommerce theme for selling BMW performance parts and accessories. Features a modern design with BMW M color scheme, responsive layout, and full WooCommerce integration.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bavarian-motorwerks
Tags: e-commerce, woocommerce, custom-menu, featured-images, threaded-comments, translation-ready

This theme, like WordPress, is licensed under the GPL.
Use it to make something cool, have fun, and share what you've learned with others.
*/

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bmw-blue: #16588E;
    --bmw-dark-blue: #003d7a;
    --bmw-m-red: #E7222E;
    --bmw-light-blue: #81C4FF;
    --bmw-m-purple: #7b2cbf;
    --accent-color: #f1faee;
    --dark-bg: #0a0e14;
    --text-primary: #ffffff;
    --text-secondary: #8b949e;
    --border-color: #1a2332;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--dark-bg);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

a {
    color: var(--bmw-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--bmw-light-blue);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: #000000;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Top Bar */
.header-top-bar {
    background: #000000;
    padding: 0.75rem 0;
}

.header-top-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-shield {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-shield svg {
    width: 100%;
    height: 100%;
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Primary Navigation */
.primary-navigation ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.primary-navigation a {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.primary-navigation a:hover {
    color: var(--bmw-blue);
}

.primary-navigation a.highlight-red {
    color: var(--bmw-m-red);
}

.primary-navigation a.highlight-red:hover {
    color: #ff1a3d;
}

/* Header Search */
.header-search {
    flex: 1;
    max-width: 400px;
    position: relative;
    display: flex;
    align-items: center;
}

.header-search form {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 0.625rem 2.75rem 0.625rem 1rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition);
    line-height: 1.5;
}

.search-input:focus {
    border-color: var(--bmw-blue);
    background: #222;
}

.search-input::placeholder {
    color: #666;
}

.search-icon {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: var(--transition);
}

.search-icon:hover {
    color: var(--bmw-blue);
}

/* Header Utilities */
.header-utilities {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.utility-item {
    color: var(--text-primary);
    font-size: 1.25rem;
    text-decoration: none;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.utility-item:hover {
    color: var(--bmw-blue);
}

.currency-selector {
    font-size: 0.875rem;
    font-weight: 500;
}

.flag {
    font-size: 1rem;
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--bmw-m-red);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: bold;
    min-width: 18px;
}

/* Secondary Navigation Bar */
.header-secondary-bar {
    background: #000000;
    padding: 0.75rem 0;
}

.secondary-navigation ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.secondary-navigation a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: capitalize;
    padding: 0.5rem 0;
    transition: var(--transition);
    position: relative;
}

.secondary-navigation a:hover {
    color: var(--text-primary);
}

.secondary-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bmw-blue);
    transition: var(--transition);
}

.secondary-navigation a:hover::after {
    width: 100%;
}

.secondary-navigation.mobile-nav {
    transition: var(--transition);
}

/* BMW M3 Colors Bar - Under logo/logo text */
.header-m-stripe-container {
    background: #000000;
    padding: 0;
    height: 4px;
    width: 100%;
    border-bottom: 1px solid #1a1a1a;
}

.header-m-stripe-container .container {
    padding: 0 20px;
    height: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.bmw-m-colors-bar {
    display: flex;
    height: 100%;
    width: auto;
    max-width: 100%;
}

.color-stripe {
    flex: 0 0 auto;
    width: 80px;
    height: 100%;
}

.color-stripe.color-blue {
    background: #16588E;
}

.color-stripe.color-purple {
    background: #7b2cbf;
}

.color-stripe.color-red {
    background: #E7222E;
}

/* Revolution Slider Section */
.rev-slider-section {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    margin-bottom: 0;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-slide {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    animation: fadeIn 0.5s;
}

.slider-slide.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-background {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.slide-content {
    text-align: center;
    z-index: 2;
    padding: 2rem;
    max-width: 800px;
}

.slide-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-subtitle {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.slide-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 10;
}

.slider-prev,
.slider-next {
    background: rgba(22, 88, 142, 0.8);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 5px;
    transition: var(--transition);
}

.slider-prev:hover,
.slider-next:hover {
    background: var(--bmw-blue);
    transform: scale(1.1);
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active,
.dot:hover {
    background: var(--bmw-blue);
    transform: scale(1.2);
}

/* Brands Carousel Section */
.brands-carousel-section {
    padding: 4rem 0;
    background: #0a0e14;
    overflow: hidden;
}

.brands-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 2rem;
}

.brands-track {
    display: flex;
    animation: scrollBrands 30s linear infinite;
    gap: 3rem;
    align-items: center;
}

.brand-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    max-width: 200px;
    width: 180px;
    padding: 1.5rem;
    background: #161b22;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
}

.brand-item:hover {
    transform: translateY(-5px);
    border-color: var(--bmw-blue);
    box-shadow: 0 10px 30px rgba(22, 88, 142, 0.3);
}

.brand-item img {
    width: 100%;
    max-width: 150px;
    max-height: 60px;
    height: auto;
    object-fit: contain;
    object-position: center;
    margin-bottom: 1rem;
    filter: brightness(0.8);
    transition: var(--transition);
    display: block;
}

.brand-item:hover img {
    filter: brightness(1);
}

.brand-item span {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes scrollBrands {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.brands-carousel:hover .brands-track {
    animation-play-state: paused;
}

/* Categories Section */
.categories-section {
    padding: 4rem 0;
    background: #161b22;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 100%;
}

@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.category-card {
    background: #0a0e14;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    max-width: 100%;
    width: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(22, 88, 142, 0.3);
    border-color: var(--bmw-blue);
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--dark-bg);
    width: 100%;
    max-height: 200px;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.category-info {
    padding: 1.5rem;
    text-align: center;
}

.category-info h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.category-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Products Grid */
.products-section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--bmw-blue), var(--bmw-m-red));
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.product-card {
    background: #161b22;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(22, 88, 142, 0.3);
    border-color: var(--bmw-blue);
}

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--dark-bg);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--bmw-m-red);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 2;
}

.product-badge.bmw-m {
    background: linear-gradient(135deg, var(--bmw-blue), var(--bmw-m-red));
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.product-title a {
    color: var(--text-primary);
}

.product-title a:hover {
    color: var(--bmw-blue);
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bmw-blue);
    margin-bottom: 1rem;
}

.product-price del {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-right: 0.5rem;
}

.add-to-cart-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--bmw-blue);
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.add-to-cart-btn:hover {
    background: var(--bmw-light-blue);
    transform: translateY(-2px);
}

/* BMW M Section */
.bmw-m-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--bmw-dark-blue) 0%, var(--dark-bg) 100%);
    position: relative;
    overflow: hidden;
}

.bmw-m-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(22,88,142,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

.bmw-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(22, 88, 142, 0.1);
    border: 1px solid var(--bmw-blue);
    border-radius: 5px;
    color: var(--bmw-blue);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Footer */
.site-footer {
    background: #0a0e14;
    background-image: url('https://images.unsplash.com/photo-1555215695-3004980ad54e?w=1920&h=1080&fit=crop');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    position: relative;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    background: rgba(10, 14, 20, 0.85);
    z-index: 0;
    margin: 0;
    padding: 0;
}

.site-footer .container {
    position: relative;
    z-index: 1;
    padding-top: 4px;
}

.footer-top-border {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    margin: 0;
    padding: 0;
}

.footer-top-border,
.footer-bottom-border {
    width: 100%;
    height: 4px;
    display: flex;
    margin: 0;
    padding: 0;
}

.footer-top-border .color-stripe,
.footer-bottom-border .color-stripe {
    flex: 1;
    height: 100%;
}

.footer-top-border .color-stripe.color-blue,
.footer-bottom-border .color-stripe.color-blue {
    background: #16588E;
}

.footer-top-border .color-stripe.color-purple,
.footer-bottom-border .color-stripe.color-purple {
    background: #7b2cbf;
}

.footer-top-border .color-stripe.color-red,
.footer-bottom-border .color-stripe.color-red {
    background: #E7222E;
}

.footer-content {
    padding: 3rem 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    color: var(--bmw-blue);
    margin-bottom: 1rem;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget ul li {
    margin-bottom: 0.5rem;
}

.footer-widget a {
    color: var(--text-secondary);
}

.footer-widget a:hover {
    color: var(--bmw-m-red);
    transition: var(--transition);
}

.footer-widget p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--bmw-blue);
    color: white;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    margin: 0.5rem;
    font-size: 1rem;
}

.btn:hover {
    background: var(--bmw-light-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(22, 88, 142, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--bmw-blue);
    color: var(--bmw-blue);
}

.btn-secondary:hover {
    background: var(--bmw-blue);
    color: white;
}

.btn-m-red {
    background: var(--bmw-m-red);
}

.btn-m-red:hover {
    background: #ff1a3d;
    box-shadow: 0 5px 20px rgba(231, 34, 46, 0.4);
}

/* WooCommerce Overrides */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce ul.products li.product {
    background: #161b22;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(22, 88, 142, 0.3);
    border-color: var(--bmw-blue);
}

.woocommerce ul.products li.product .price {
    color: var(--bmw-blue);
    font-weight: 700;
    font-size: 1.5rem;
}

.woocommerce ul.products li.product .button {
    background: var(--bmw-blue);
    color: white;
    border-radius: 5px;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
}

.woocommerce ul.products li.product .button:hover {
    background: var(--bmw-light-blue);
}

/* Responsive */
@media (max-width: 1024px) {
    .header-top-wrapper {
        flex-wrap: wrap;
    }
    
    .menu-toggle {
        display: flex;
        order: 1;
    }
    
    .site-branding {
        order: 0;
    }
    
    .header-search {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin-top: 1rem;
    }
    
    .primary-navigation {
        order: 4;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .primary-navigation.active {
        max-height: 500px;
        margin-top: 1rem;
    }
    
    .primary-navigation ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        width: 100%;
    }
    
    .secondary-navigation.mobile-nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .secondary-navigation.mobile-nav.active {
        max-height: 1000px;
    }
    
    .secondary-navigation.mobile-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem 0;
    }
}

@media (max-width: 768px) {
    .header-top-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-utilities {
        width: 100%;
        justify-content: space-between;
    }
    
    .hero-title,
    .slide-title {
        font-size: 2rem;
    }

    .products-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .rev-slider-section {
        height: 400px;
    }

    .slide-content {
        padding: 1rem;
    }

    .slide-title {
        font-size: 2rem;
    }

    .slide-subtitle {
        font-size: 1rem;
    }

    .slider-controls {
        padding: 0 1rem;
    }

    .slider-prev,
    .slider-next {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

