/* Homepage Sections Styles */

/* Categories Grid Section */
.categories-grid-section {
    padding: 60px 0;
    background: #fff;
}

.section-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 40px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 200px;
}

.category-card:hover {
    border-color: #0066ff;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
    transform: translateY(-4px);
}

.category-image {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    overflow: hidden;
}

.category-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all 0.3s;
}

.category-card:hover .category-image img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.category-dot {
    width: 6px;
    height: 6px;
    background: #ff6b00;
    border-radius: 50%;
    margin: 0 auto 12px;
    flex-shrink: 0;
}

.category-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin: 0;
    line-height: 1.3;
    text-align: center;
}

/* Car Brands Section */
.car-brands-section {
    padding: 60px 0;
    background: #f5f7fa;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.brand-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 140px;
}

.brand-card:hover {
    border-color: #0066ff;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
    transform: translateY(-2px);
}

.brand-image-wrapper {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
}

.brand-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
}

.brand-card:hover .brand-image {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.brand-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
    text-align: center;
    word-break: break-word;
}

.brand-card:hover .brand-name {
    color: #0066ff;
}

/* Legacy support */
.brand-link {
    background: #fff;
    padding: 20px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 120px;
}

.brand-link:hover {
    background: #0066ff;
    color: #fff;
    border-color: #0066ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.2);
}

/* Manufacturers Slider */
.manufacturers-slider {
    margin: 40px 0;
    position: relative;
}

.manufacturers-slider .item {
    padding: 0 10px;
}

.manufacturers-slider .car_c_item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s;
    height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
}

.manufacturers-slider .car_c_item:hover {
    border-color: #0066ff;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
    transform: translateY(-2px);
}

.manufacturers-slider .car_c_item a {
    text-decoration: none;
    display: block;
    width: 100%;
}

.manufacturers-slider .brand-image-wrapper {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.manufacturers-slider .car_c_item img,
.manufacturers-slider .brand-image {
    max-width: 100%;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
    display: block;
}

.manufacturers-slider .car_c_item > a > img {
    margin: 0 auto 10px;
}

.manufacturers-slider .car_c_item:hover img,
.manufacturers-slider .car_c_item:hover .brand-image {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.manufacturers-slider .car_c_item h5 {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
    word-break: break-word;
    transition: color 0.3s;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.6em;
    flex-shrink: 0;
    width: 100%;
}

.manufacturers-slider .car_c_item:hover h5 {
    color: #0066ff;
}

.manufacturer-placeholder {
    width: 80px;
    height: 80px;
    background: #e8f0fe;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #0066ff;
    margin: 0 auto 10px;
    flex-shrink: 0;
}

.manufacturers-slider .manufacturer-placeholder {
    margin: 0 auto 10px;
    flex-shrink: 0;
}

/* Slider Navigation */
.manufacturers-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.manufacturers-nav .owl-prev,
.manufacturers-nav .owl-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #0066ff;
    background: #fff;
    color: #0066ff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
    position: static;
    margin: 0;
}

.manufacturers-nav .owl-prev:hover,
.manufacturers-nav .owl-next:hover {
    background: #0066ff;
    color: #fff;
    transform: scale(1.1);
}

.manufacturers-nav .owl-prev.disabled,
.manufacturers-nav .owl-next.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Features Bar */
.features-bar {
    padding: 40px 0;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

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

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: #e8f0fe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0066ff;
    font-size: 24px;
}

.feature-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.feature-text strong {
    font-weight: 600;
}

/* Parts Brands Section */
.parts-brands-section {
    padding: 60px 0;
    background: #fff;
}

.parts-brands-slider {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.brand-logo-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    min-height: 80px;
}

.brand-logo-item:hover {
    border-color: #0066ff;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.15);
    transform: translateY(-2px);
}

.brand-logo-item img {
    max-width: 100%;
    max-height: 50px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s;
}

.brand-logo-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Latest Products Section */
.latest-products-section {
    padding: 60px 0;
    background: #f5f7fa;
}

.latest-products-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.latest-products-heading h2 {
    margin: 8px 0 6px 0;
    font-size: 28px;
    font-weight: 700;
    color: #1f2933;
}

.latest-products-subtitle {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.section-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: #e8f0fe;
    color: #0f4bff;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.section-pill img {
    width: 22px;
    height: 22px;
}

.lp-header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f6fff 0%, #2563eb 100%);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(15, 111, 255, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lp-header-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(15, 111, 255, 0.3);
    color: #fff;
}

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

.product-card-modern {
    background: #fff;
    border: 1px solid #e5e7ef;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.product-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: radial-gradient(circle at 10% 20%, rgba(15, 111, 255, 0.08), transparent 35%),
        radial-gradient(circle at 90% 0, rgba(37, 99, 235, 0.06), transparent 40%),
        #f8fafc;
    min-height: 180px;
    border-bottom: 1px solid #eef2f7;
}

.product-media img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card-modern:hover .product-media img {
    transform: scale(1.03);
}

.product-badge {
    position: absolute;
    left: 14px;
    top: 14px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #ff7a18 0%, #af002d 85%);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: 0.3px;
}

.product-chip {
    position: absolute;
    right: 14px;
    top: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    border: 1px solid transparent;
}

.product-chip.in-stock {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #15803d;
}

.product-chip.out-of-stock {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.product-card-body {
    padding: 14px 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.product-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title:hover {
    color: #0f6fff;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #6b7280;
}

.product-label {
    background: #eef2ff;
    color: #3730a3;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.3px;
}

.product-pricing {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 2px;
}

.price-current {
    font-size: 18px;
    font-weight: 800;
    color: #0f6fff;
}

.price-old {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
}

.price-unavailable {
    color: #6b7280;
    font-weight: 700;
}

.product-card-actions {
    padding: 0 18px 18px 18px;
}

.product-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 8px;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid #0f6fff;
    color: #0f6fff;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.product-action-btn:hover {
    background: #0f6fff;
    color: #fff;
    box-shadow: 0 12px 24px rgba(15, 111, 255, 0.25);
}

.latest-products-footer {
    margin-top: 30px;
}

/* Section CTA */
.section-cta {
    text-align: center;
}

.cta-button {
    display: inline-block;
    padding: 12px 32px;
    border: 2px solid #0066ff;
    border-radius: 4px;
    color: #0066ff;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.cta-button:hover {
    background: #0066ff;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

/* Load More Button */
.load-more-wrapper {
    text-align: center;
    margin: 30px 0;
}

.load-more-btn {
    background: #fff;
    border: 2px solid #0066ff;
    color: #0066ff;
    padding: 12px 32px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

.load-more-btn:hover:not(:disabled) {
    background: #0066ff;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Styles */
@media (max-width: 1400px) {
    .parts-brands-slider {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .brands-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 12px;
    }

    .brand-card {
        padding: 12px;
        min-height: 120px;
    }

    .brand-image-wrapper {
        height: 60px;
        margin-bottom: 8px;
    }

    .brand-name {
        font-size: 12px;
    }

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

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .latest-products-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .latest-products-section {
        padding: 60px 0;
    }

    .parts-brands-slider {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .category-card {
        padding: 15px 10px;
        min-height: 160px;
    }

    .category-image {
        height: 100px;
        margin-bottom: 10px;
    }

    .category-name {
        font-size: 13px;
    }

    .section-title {
        font-size: 20px;
    }

    .brands-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .brand-card {
        padding: 10px 8px;
        min-height: 110px;
    }

    .brand-image-wrapper {
        height: 50px;
        margin-bottom: 6px;
    }

    .brand-name {
        font-size: 11px;
    }

    .manufacturer-placeholder {
        width: 60px;
        height: 60px;
        font-size: 16px;
    }

    .brand-link {
        padding: 15px 10px;
        font-size: 14px;
    }

    .car-brands-section,
    .categories-grid-section,
    .parts-brands-section {
        padding: 40px 0;
    }

    .features-bar {
        padding: 30px 0;
    }

    .features-grid {
        gap: 20px;
    }

    .latest-products-section {
        padding: 50px 0;
    }

    .latest-products-heading h2 {
        font-size: 24px;
    }

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

    .product-media {
        min-height: 190px;
    }

    .product-card-body {
        padding: 16px 16px 12px;
    }

    .product-action-btn {
        padding: 11px 12px;
    }

    .feature-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .feature-text {
        font-size: 13px;
    }

    .parts-brands-slider {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .brand-logo-item {
        padding: 15px;
        min-height: 70px;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .categories-grid-section {
        padding: 40px 0;
    }

    .category-card {
        padding: 12px 8px;
        min-height: 140px;
    }

    .category-image {
        height: 80px;
        margin-bottom: 8px;
    }

    .category-name {
        font-size: 12px;
    }

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

    .brand-card {
        padding: 8px 6px;
        min-height: 100px;
    }

    .brand-image-wrapper {
        height: 45px;
        margin-bottom: 5px;
    }

    .brand-name {
        font-size: 10px;
    }

    .manufacturer-placeholder {
        width: 50px;
        height: 50px;
        font-size: 14px;
    }

    .brand-link {
        font-size: 13px;
    }

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

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

    .lp-header-cta {
        width: 100%;
    }

    .latest-products-heading h2 {
        font-size: 22px;
    }

    .parts-brands-slider {
        grid-template-columns: repeat(2, 1fr);
    }
}