/* ========== HOMEPAGE PREMIUM OVERHAUL ========== */

/* 3-Column Best Sellers Grid */
#home-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    #home-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    #home-product-grid {
        grid-template-columns: 1fr;
    }
}

/* Center All Homepage Text */
.hero-content,
.products-section,
.info-section {
    text-align: center;
}

.section-title {
    text-align: center;
}

/* Polished Chrome Car Paint Effect for Title */
.chrome-title {
    background: linear-gradient(180deg,
            #ffffff 0%,
            #b8b8b8 20%,
            #505050 40%,
            #d4d4d4 50%,
            #404040 60%,
            #c0c0c0 80%,
            #ffffff 100%);
    background-size: 100% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: chromeShine 4s ease-in-out infinite;

    /* Chrome reflections */
    filter:
        drop-shadow(0 0 20px rgba(255, 255, 255, 0.6)) drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3)) contrast(1.2) brightness(1.1);

    text-shadow: none;
    position: relative;
}

.chrome-title::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.4) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(0, 0, 0, 0.1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(8px);
}

@keyframes chromeShine {

    0%,
    100% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 0% 100%;
    }
}

/* Magnetic Button Effect */
.btn-magnetic {
    position: relative;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
}

.btn-magnetic::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(211, 19, 19, 0.2) 0%,
            transparent 60%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: -1;
}

.btn-magnetic:hover::after {
    opacity: 1;
}

/* Eye-Catching Entrance Animation */
.page-loader {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: loaderFadeOut 0.8s ease 2s forwards;
}

@keyframes loaderFadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.loader-content {
    text-align: center;
    animation: loaderPulse 1.5s ease infinite;
}

@keyframes loaderPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

.loader-logo {
    width: 220px;
    height: 220px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logoSpin 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.loader-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@keyframes logoSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

.loader-text {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    opacity: 0;
    animation: textFadeIn 1s ease 0.5s forwards;
}

@keyframes textFadeIn {
    to {
        opacity: 1;
    }
}

.loader-bar {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    margin: 1.5rem auto 0;
    border-radius: 2px;
    overflow: hidden;
}

.loader-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-red), var(--accent-gold));
    animation: progressBar 2s ease forwards;
}

@keyframes progressBar {
    from {
        width: 0%;
    }

    to {
        width: 100%;
    }
}

/* Hero Section Refinement */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    padding: 4rem 2rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 2rem auto;
    max-width: 700px;
    font-weight: 300;
    letter-spacing: 0.05em;
    line-height: 1.8;
}

/* Enhanced Button Styles */
.btn {
    position: relative;
    padding: 1.2rem 3rem;
    font-size: 1rem;
    border-radius: 60px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    overflow: hidden;
    border: 2px solid transparent;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%,
            rgba(255, 255, 255, 0.1) 100%);
    background-size: 200% 200%;
    animation: buttonShine 3s infinite;
}

@keyframes buttonShine {

    0%,
    100% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }
}

.btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px) scale(1.05);
}

/* Section Spacing */
.products-section {
    padding: 7rem 2rem;
}

.info-section {
    padding: 6rem 2rem;
}

/* Retailer Cards Centered */
.retailers-container {
    justify-content: center !important;
    text-align: center;
}

.retailer-card {
    text-align: center;
}

/* Floating Animation for Elements */
@keyframes gentleFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    33% {
        transform: translateY(-10px) rotate(1deg);
    }

    66% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

.floating-element {
    animation: gentleFloat 6s ease-in-out infinite;
}

/* Spotlight Effect on Hero */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle,
            rgba(211, 19, 19, 0.15) 0%,
            transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: spotlightPulse 8s ease-in-out infinite;
}

@keyframes spotlightPulse {

    0%,
    100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Product Card Enhancement for Homepage */
#home-product-grid .product-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
}

#home-product-grid .product-card:hover {
    transform: translateY(-20px) scale(1.03) rotate(1deg);
}

/* Section Title Enhancement */
.section-title {
    font-size: 3.5rem;
    margin-bottom: 4rem;
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--accent-gold));
    border-radius: 2px;
}