/* Howo.ge E-commerce Platform Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --price-color: #32CD32;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --white: #ffffff;
    --border-color: #bdc3c7;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

/* Prevent any section or main content from causing horizontal scroll */
section, main, .hero, .why-us {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
}

/* Header Styles */
header.header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    background: #f8f9fa !important; /* Temporary visual indicator */
}

.header-main {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

header.header.scrolled .header-main {
    padding: 8px 0 !important;
    background: rgba(52, 152, 219, 0.1) !important; /* Temporary visual indicator */
}

header.header.scrolled .header-main .logo {
    font-size: 24px !important;
}

header.header.scrolled .header-center {
    display: none !important;
}

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

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 30px;
    transition: all 0.3s ease;
}

.contact-info {
    display: flex;
    gap: 25px;
    align-items: center;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-dark);
}

.contact-item i {
    color: var(--secondary-color);
}

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

.compact-nav {
    display: none;
    gap: 8px;
    margin-right: 15px;
}

header.header.scrolled .compact-nav {
    display: flex !important;
}

.compact-nav-item {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.compact-nav-item:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

header.header.scrolled .social-links {
    display: none !important;
}

.social-links {
    display: flex;
    gap: 8px;
}

.social-link {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: var(--white);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 18px;
}

.cart-link:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--warning-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    min-width: 20px;
}

.cart-badge:empty {
    display: none;
}

/* Navigation */
.navigation {
    background: var(--primary-color);
    padding: 12px 0;
    transition: all 0.3s ease;
    overflow: hidden;
    max-height: 60px;
}

header.header.scrolled .navigation {
    max-height: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    justify-content: center;
}

.nav-item a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-item a:hover {
    color: var(--white);
    background: rgba(255,255,255,0.1);
}

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

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: #2980b9;
}

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

.btn-accent:hover {
    background: #c0392b;
}

.btn-secondary {
    background: var(--text-light);
    color: var(--white);
}

.btn-secondary:hover {
    background: #6c757d;
}

/* Why Us Section */
.why-us {
    padding: 60px 0;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--primary-color);
}

/* Global fixes to prevent horizontal scrolling */
.features-grid, .product-grid, .parts-grid {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* Brand section specific grid - 4 cards per row */
.brand-section .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Ensure exactly 4 cards per row on larger screens */
@media (min-width: 1200px) {
    .brand-section .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .brand-section .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .brand-section .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--secondary-color);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
    justify-content: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 450px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    height: 200px;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    flex-shrink: 0;
}

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

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

.product-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
    line-height: 1.3;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

.product-code {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 10px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-current {
    font-size: 20px;
    font-weight: bold;
    color: var(--price-color);
}

.price-original {
    font-size: 16px;
    color: var(--text-light);
    text-decoration: line-through;
}

.sale-badge {
    background: var(--accent-color);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.stock-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 15px;
}

.stock-in {
    background: var(--success-color);
    color: var(--white);
}

.stock-low {
    background: var(--warning-color);
    color: var(--white);
}

.stock-out {
    background: var(--accent-color);
    color: var(--white);
}

/* Filters */
.filters {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-weight: 500;
    color: var(--primary-color);
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    min-width: 150px;
}

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

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* Part Groups Grid */
.filter-section {
    width: 100%;
}

.filter-title {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-title i {
    color: var(--secondary-color);
}

.part-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.part-group-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    text-decoration: none;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.part-group-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    text-decoration: none;
    color: var(--text-dark);
}

.part-group-card.active {
    border-color: var(--secondary-color);
    background: rgba(52, 152, 219, 0.1);
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.group-image {
    width: 80px;
    height: 60px;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-color);
    border: 1px solid var(--border-color);
}

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

.group-image i {
    font-size: 1.8rem;
    color: var(--text-light);
}

.part-group-card.active .group-image i {
    color: var(--secondary-color);
}

.group-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
    line-height: 1.3;
}

.group-count {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.part-group-card.active .group-count {
    color: var(--secondary-color);
}

.filter-actions {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/* Cart */
.cart-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    background: var(--light-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-code {
    color: var(--text-light);
    font-size: 14px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 5px;
    cursor: pointer;
}

.quantity-input {
    width: 60px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 5px;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

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

.footer-section h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.footer-section p,
.footer-section a {
    color: var(--light-color);
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: var(--light-color);
}

/* Footer delivery options alignment */
.footer-delivery {
    justify-content: flex-start;
}

/* Footer mobile centering */
@media (max-width: 768px) {
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-section { text-align: center; }
    .footer .social-links { justify-content: center; }
    .footer-delivery { justify-content: center; }
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .header-center {
        margin: 0;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .contact-item {
        font-size: 13px;
    }
    
    .header-actions {
        justify-content: center;
        gap: 12px;
    }
    
    /* On mobile, show compact icons and hide social icons to save space */
    .compact-nav { display: flex !important; gap: 8px; margin-right: 10px; }
    .social-links { display: none !important; }
    
    .social-link {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .cart-link {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .nav-item a {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    /* Slightly tighter nav padding on mobile */
    .navigation { padding: 8px 0; }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Part Groups Grid - Mobile */
    .part-groups-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .part-group-card {
        padding: 12px 8px;
    }
    
    .group-image {
        width: 60px;
        height: 45px;
        margin-bottom: 8px;
    }
    
    .group-info h4 {
        font-size: 0.9rem;
    }
    
    .group-count {
        font-size: 0.8rem;
    }
    
    .filter-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
    
    .header-actions {
        flex-direction: row;
        gap: 8px;
    }
    
    .header-actions .btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Extra top space for non-home pages on mobile */
@media (max-width: 768px) {
    body.page-is-not-home .main-content { padding-top: 8px; }
}

/* Search Page */
.search-form {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.search-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-input {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-decoration: none;
    color: var(--primary-color);
}

.pagination .active {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.pagination a:hover {
    background: var(--light-color);
}

/* Sale Page Styles */
.sale-catalog {
    padding: 2rem 0;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    color: #dc3545;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-header h1 i {
    color: #ff6b35;
    animation: fire-pulse 2s infinite;
}

.page-header .subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    margin: 0;
}

.sale-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #ff6b35, #dc3545);
    border-radius: 10px;
    color: white;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.2);
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.sale-items .product-card {
    position: relative;
    border: 2px solid #dc3545;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.15);
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

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

.sale-items .product-actions {
    margin-top: auto;
    padding-top: 15px;
}

.sale-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    z-index: 10;
}

.discount-percent {
    background: #dc3545;
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    font-weight: bold;
    font-size: 1.1rem;
    display: block;
    width: 60px;
    height: 60px;
    line-height: 50px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

.sale-label {
    background: #ff6b35;
    color: white;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    font-weight: bold;
    display: block;
    text-align: center;
    margin-top: 0.2rem;
    border-radius: 3px;
}

.price-section {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    border-left: 4px solid #dc3545;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 1rem;
    display: block;
}

.sale-price {
    color: #dc3545;
    font-size: 1.5rem;
    font-weight: bold;
    display: block;
    margin: 0.5rem 0;
}

.savings {
    color: var(--price-color);
    font-weight: bold;
    font-size: 0.9rem;
    display: block;
}

.urgency-indicator {
    background: #ffc107;
    color: #856404;
    padding: 0.5rem;
    border-radius: 5px;
    text-align: center;
    margin: 1rem 0;
    font-weight: bold;
    animation: pulse 3s infinite;
    border: 1px solid rgba(133, 100, 4, 0.2);
}

.btn-sale {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border: none;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-sale:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
    color: white;
}

.product-brand, .product-category {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-brand i, .product-category i {
    color: var(--secondary-color);
}

.product-description {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.product-actions .btn {
    flex: 1;
    font-size: 0.9rem;
}

.no-sale-items {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.no-sale-items i {
    color: #dc3545;
    margin-bottom: 1rem;
}

.browse-alternatives {
    margin-top: 2rem;
}

.category-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.category-link {
    padding: 0.8rem 1.5rem;
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    text-align: center;
}

.category-link:hover {
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

/* Home Page Brand Cards */
.brand-card {
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.brand-card-link {
    text-decoration: none;
    color: inherit;
}

.brand-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.brand-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.brand-logo-container {
    width: 80px;
    height: 60px;
    margin: 0 auto 15px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    overflow: hidden;
}

.brand-logo-display {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 10px;
}

.brand-icon-fallback {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.brand-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-content h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.brand-content p {
    flex: 1;
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.brand-stats {
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.brand-stats .text-muted {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(52, 152, 219, 0.1);
    padding: 5px 12px;
    border-radius: 15px;
    display: inline-block;
}

@keyframes fire-pulse {
    0% { transform: scale(1); color: #ff6b35; }
    50% { transform: scale(1.1); color: #ff4500; }
    100% { transform: scale(1); color: #ff6b35; }
}

/* Additional Mobile Responsive Styles */
@media (max-width: 768px) {
    .brand-section .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .brand-logo-container {
        width: 70px;
        height: 50px;
        margin-bottom: 12px;
    }
    
    .brand-icon-fallback {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .brand-content h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .brand-content p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }
    
    .brand-stats .text-muted {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
}

/* Responsive Design for Sale Page */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .sale-stats {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    .discount-percent {
        width: 50px;
        height: 50px;
        line-height: 40px;
        font-size: 1rem;
    }
    
    .sale-catalog {
        padding: 1rem 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Smart Header Mobile Styles */
    .header-main {
        padding: 12px 0;
    }
    
    .header.scrolled .header-main {
        padding: 8px 0;
    }

    .logo {
        font-size: 24px;
    }
    
    .header.scrolled .logo {
        font-size: 20px;
    }

    .contact-info {
        display: none;
    }

    .header-center {
        display: none;
    }

    .social-links {
        gap: 6px;
    }
    
    .header.scrolled .social-links {
        display: none;
    }

    .compact-nav {
        gap: 6px;
        margin-right: 10px;
    }

    .compact-nav-item {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .nav-menu {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-item a {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .product-card {
        min-height: auto;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        width: 100%;
    }
    
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* Search Results Page Styles */
.search-results {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.search-header {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    text-align: center;
}

.search-header h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 2rem;
}

.search-info p {
    color: var(--text-light);
    margin: 5px 0;
}

.search-info strong {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Search Filters */
.search-filters {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.search-filters h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.filter-group select {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: var(--white);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Parts Grid */
.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.part-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.part-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.part-image {
    height: 200px;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.part-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
}

.part-info {
    padding: 20px;
}

.part-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.3;
}

.part-number {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
    background: var(--light-color);
    padding: 5px 10px;
    border-radius: 5px;
    display: inline-block;
}

.part-brand, .part-category {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.part-brand i, .part-category i {
    color: var(--secondary-color);
    width: 14px;
}

.part-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-color);
    margin: 15px 0;
}

.part-description {
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.part-actions {
    display: flex;
    gap: 10px;
}

.part-actions .btn {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-size: 0.9rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.no-results i {
    color: var(--text-light);
    margin-bottom: 20px;
}

.no-results h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.no-results p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.suggested-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.category-suggestion {
    background: var(--secondary-color);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.category-suggestion:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.search-tips {
    background: var(--light-color);
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.search-tips h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.search-tips ul {
    color: var(--text-light);
    line-height: 1.6;
    padding-left: 20px;
}

.search-tips li {
    margin-bottom: 5px;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .search-results {
        padding: 20px 15px;
    }
    
    .search-header {
        padding: 20px;
    }
    
    .search-header h2 {
        font-size: 1.5rem;
    }
    
    .search-filters {
        padding: 20px;
    }
    
    .filter-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .parts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .part-actions {
        flex-direction: column;
    }
    
    .suggested-categories {
        flex-direction: column;
        align-items: center;
    }
}

/* Additional fixes for horizontal scrolling */
@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
        min-width: 0;
    }
    
    .brand-section .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
        min-width: 0;
    }
    
    .container {
        padding: 0 10px;
    }
    
    /* Fix any elements that might extend beyond viewport */
    * {
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
}

    /* Product Detail Page */
    .product-page {
        padding: 40px 0;
    }

    /* Breadcrumbs */
    .product-page .breadcrumbs {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        margin-bottom: 16px;
        font-size: 14px;
        color: var(--text-light);
    }
    .product-page .breadcrumbs a {
        color: var(--secondary-color);
        text-decoration: none;
    }
    .product-page .breadcrumbs a:hover { text-decoration: underline; }
    .product-page .breadcrumbs .sep { color: #c0c7cf; }
    .product-page .breadcrumbs .current { color: var(--text-dark); font-weight: 600; }

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

    @media (max-width: 992px) {
        .product-layout {
            grid-template-columns: 1fr;
            gap: 20px;
        }
    }

    .product-gallery .main-image {
        height: 400px;
        background: var(--light-color);
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        overflow: hidden;
        position: relative;
    }

    @media (max-width: 768px) {
        .product-gallery .main-image {
            height: 280px;
        }
    }

    .product-gallery .main-image img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    /* On-image badges */
    .product-gallery .main-image .badge {
        position: absolute;
        top: 12px;
        left: 12px;
        background: var(--secondary-color);
        color: #fff;
        border-radius: 14px;
        padding: 4px 10px;
        font-size: 12px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }
    .product-gallery .main-image .badge + .badge { left: auto; right: 12px; background: var(--success-color); }
    .badge-sale { background: var(--accent-color) !important; }
    .badge-stock.in { background: var(--success-color) !important; }
    .badge-stock.low { background: var(--warning-color) !important; }
    .badge-stock.out { background: var(--accent-color) !important; }

    .product-gallery .thumbs {
        display: flex;
        gap: 10px;
        padding: 15px 0;
        flex-wrap: wrap;
    }

    .product-gallery .thumbs img {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 5px;
        cursor: pointer;
        border: 2px solid var(--border-color);
        transition: border-color 0.2s ease, transform 0.2s ease;
        background: var(--white);
    }

    .product-gallery .thumbs img:hover {
        transform: translateY(-1px);
    }

    .product-gallery .thumbs img.active {
        border-color: var(--secondary-color);
    }

    .product-gallery .thumb-badge {
        position: absolute;
        top: -6px;
        right: -6px;
        background: var(--accent-color);
        color: #fff;
        border-radius: 50%;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    }

    .product-gallery .image-counter {
        text-align: center;
        padding: 10px;
        color: var(--text-light);
        font-size: 14px;
    }

    @media (max-width: 768px) {
        .product-gallery .thumbs img {
            width: 60px;
            height: 60px;
        }
    }

    .product-info .product-title-row { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
    .product-info .product-title { font-size: 32px; color: var(--primary-color); margin-bottom: 8px; line-height: 1.2; }
    .product-info .product-badges { display: flex; gap: 8px; }
    .product-info .product-meta-line { color: var(--text-light); display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
    .product-info .product-meta-line span { display: inline-flex; align-items: center; gap: 6px; background: var(--white); border: 1px solid var(--border-color); padding: 4px 10px; border-radius: 16px; font-size: 13px; }

    @media (max-width: 768px) {
        .product-info h1 {
            font-size: 24px;
        }
    }

    /* Mobile paddings for back button and title row on product page */
    @media (max-width: 768px) {
        .product-page .back-row,
        .product-page .product-title-row {
            padding-left: 12px;
            padding-right: 12px;
        }
        .product-page .breadcrumbs {
            padding-left: 12px;
            padding-right: 12px;
        }
    }

    .product-attrs { background: var(--white); padding: 20px; border-radius: 10px; margin-bottom: 20px; border: 1px solid var(--border-color); }

    .product-attrs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

    @media (max-width: 768px) {
        .product-attrs-grid {
            grid-template-columns: 1fr;
        }
    }

    /* ID & Spec sections */
    .id-section .section-heading, .spec-section .section-heading { font-weight: 700; color: var(--primary-color); margin-bottom: 10px; }
    .id-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
    .id-item dt { font-size: 12px; text-transform: uppercase; color: var(--text-light); letter-spacing: .3px; }
    .id-item dd { margin-left: 0; }
    .chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
    .chip { background: var(--light-color); border: 1px solid var(--border-color); border-radius: 14px; padding: 4px 10px; font-size: 12px; }
    .mono { font-family: 'Courier New', monospace; background: var(--light-color); padding: 2px 6px; border-radius: 6px; }

    .spec-list { list-style: none; display: grid; grid-template-columns: 1fr; gap: 8px; }
    .spec-list li { display: flex; align-items: center; justify-content: space-between; background: var(--light-color); border: 1px solid var(--border-color); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
    .spec-list li span { color: var(--text-light); }

    .price-box {
        background: var(--white);
        padding: 20px;
        border-radius: 10px;
        margin-bottom: 20px;
        border: 1px solid var(--border-color);
        box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    }

    .price-row {
        display: flex;
        align-items: center;
        gap: 20px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }

    .price-big {
        font-size: 32px;
        font-weight: bold;
        color: var(--price-color);
    }

    @media (max-width: 768px) {
        .price-big {
            font-size: 26px;
        }
    }

    .qty-row {
        display: flex;
        gap: 20px;
        align-items: center;
        flex-wrap: wrap;
    }

    .qty-row .btn {
        flex: 1;
        min-width: 240px;
    }

    @media (max-width: 480px) {
        .qty-row {
            flex-direction: column;
            align-items: stretch;
        }
        .qty-row .btn {
            width: 100%;
            min-width: 0;
        }
    }

    /* Product page: refine price box controls on mobile/tablet */
    @media (max-width: 768px) {
        .product-page .price-box .qty-row { gap: 12px; justify-content: center; }
        .product-page .price-box .qty-row .btn { flex: 0 0 auto; min-width: 170px; padding: 10px 12px; font-size: 14px; border-radius: 8px; margin: 0 auto; }
        .product-page .price-box .quantity-control { gap: 8px; }
        .product-page .price-box .quantity-btn { width: 32px; height: 32px; }
        .product-page .price-box .quantity-input { width: 52px; padding: 6px; }
    }

    /* Between 481px and 768px: keep in one row and center the button */
    @media (min-width: 481px) and (max-width: 768px) {
        .product-page .price-box .qty-row { display: grid; grid-template-columns: auto 1fr; align-items: center; }
        .product-page .price-box .qty-row .btn { justify-self: center; width: 100%; max-width: 220px; }
    }

    .description-section {
        background: var(--white);
        padding: 30px;
        border-radius: 10px;
        margin-bottom: 40px;
        border: 1px solid var(--border-color);
        box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    }

    /* Recommended grid on product page */
    .recommended-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
    }

    .recommended-card {
        width: 280px;
        flex: 0 0 280px;
        cursor: pointer;
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .recommended-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
    }

    .recommended-grid.collapsed .recommended-card:nth-child(n+13) {
        display: none;
    }

    @media (max-width: 640px) {
        .recommended-card {
            width: 100%;
            flex: 1 1 280px;
        }
    }

    /* Sale banner under gallery */
    .sale-banner { background: var(--accent-color); color: var(--white); padding: 12px; border-radius: 10px; text-align: center; font-weight: 600; box-shadow: 0 4px 12px rgba(231,76,60,0.25); }

    /* Sticky Add-to-Cart (mobile) */
    .sticky-atc { position: fixed; left: 0; right: 0; bottom: 0; transform: translateY(110%); transition: transform .25s ease; z-index: 999; width: 100vw; overflow-x: hidden; }
    .sticky-atc.show { transform: translateY(0); }
    .sticky-atc__content { background: rgba(255,255,255,0.95); backdrop-filter: blur(6px); border-top: 1px solid var(--border-color); padding: 10px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; box-shadow: 0 -6px 20px rgba(0,0,0,0.08); max-width: 100%; }
    .sticky-atc__price strong { color: var(--price-color); font-size: 18px; }
    .sticky-atc__price .was { color: var(--text-light); text-decoration: line-through; font-size: 12px; margin-left: 8px; }
    .sticky-atc__controls { display: grid; grid-auto-flow: column; gap: 8px; align-items: center; }
    .sticky-atc__controls > * { min-width: 0; }
    .sticky-atc__btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .qty-btn { width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--border-color); background: var(--white); }
    .qty-input { width: 56px; text-align: center; border: 1px solid var(--border-color); border-radius: 6px; padding: 6px; }
    .safe-area { height: env(safe-area-inset-bottom); background: rgba(255,255,255,0.95); }

    @media (min-width: 769px) {
        .sticky-atc { display: none; }
    }

    /* Slightly reduce ATC button width on mobile to avoid overflow */
    @media (max-width: 768px) {
        .sticky-atc__btn { max-width: 180px; padding-left: 12px; padding-right: 12px; font-size: 15px; }
    }

    /* Extra-small screens: stack sticky ATC and shrink controls */
    @media (max-width: 420px) {
        .sticky-atc__content { grid-template-columns: 1fr; gap: 8px; padding: 8px; }
        .sticky-atc__controls { grid-template-columns: auto auto auto 1fr; grid-auto-flow: row; gap: 6px; }
        .sticky-atc__btn { justify-self: stretch; font-size: 14px; padding: 10px 12px; }
        .qty-btn { width: 30px; height: 30px; }
        .qty-input { width: 48px; padding: 5px; }
    }

    /* Hide spinners for number inputs to save width */
    .qty-input, .quantity-input { -moz-appearance: textfield; appearance: textfield; }
    .qty-input::-webkit-outer-spin-button,
    .qty-input::-webkit-inner-spin-button,
    .quantity-input::-webkit-outer-spin-button,
    .quantity-input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
