/* ===========================================
   Pièces Auto - Home Page Styles
   Mobile-First (Instagram traffic)
   =========================================== */

/* Reset body grid for home page */
.home-page {
    display: flex;
    flex-direction: column;
    background: var(--dark);
}

/* ===========================================
   HEADER TRANSPARENT
   =========================================== */
.header-transparent {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    box-shadow: none;
    transition: all 0.3s ease;
    padding: 14px 16px;
    z-index: 100;
}

.header-transparent.header-scrolled {
    background: rgba(29, 53, 87, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 16px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-transparent .logo {
    gap: 10px;
}

.logo-text-home {
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.header-transparent .logo-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1rem;
    font-weight: 800;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-transparent .nav {
    display: none;
    gap: 8px;
    align-items: center;
}

.header-transparent .nav a {
    color: rgba(255,255,255,0.85);
    padding: 8px 18px;
    font-weight: 500;
    font-size: 0.9rem;
}

.header-transparent .nav a:hover {
    color: white;
}

.btn-nav {
    background: white !important;
    color: var(--dark) !important;
    padding: 8px 20px !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    margin-left: 8px;
    min-height: 40px !important;
}

.btn-nav:hover {
    background: var(--primary) !important;
    color: white !important;
}

/* Menu Toggle */
.home-page .menu-toggle {
    display: flex;
}

/* Mobile Menu */
.home-page .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.home-page .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.home-page .mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 88%;
    max-width: 340px;
    height: 100vh;
    height: 100dvh;
    background: var(--dark);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.home-page .mobile-menu.active {
    right: 0;
}

.home-page .mobile-menu-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    font-size: 1.6rem;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.home-page .mobile-menu-close:hover {
    background: var(--primary);
}

.home-page .mobile-menu-nav {
    padding: 65px 20px 15px;
    display: flex;
    flex-direction: column;
}

.home-page .mobile-menu-nav a {
    color: white;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: block;
    -webkit-tap-highlight-color: transparent;
}

.home-page .mobile-menu-nav a:hover {
    color: var(--primary-light);
}

.home-page .mobile-menu-cta {
    padding: 20px;
    margin-top: auto;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.home-page .mobile-menu-cta .btn {
    width: 100%;
    text-align: center;
}

/* ===========================================
   HERO SECTION - Mobile optimized
   =========================================== */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 80px 20px 40px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(160deg, var(--dark) 0%, #0f1f33 60%, var(--dark-light) 100%);
    z-index: 0;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    background: rgba(230, 57, 70, 0.15);
    color: var(--primary-light);
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 20px;
    border: 1px solid rgba(230, 57, 70, 0.25);
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-title span {
    display: block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.65);
    margin-bottom: 32px;
    line-height: 1.6;
    padding: 0 10px;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    padding: 0 10px;
}

.hero .btn {
    padding: 16px 28px;
    font-size: 0.95rem;
    min-height: 52px;
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.25);
    color: white;
    box-shadow: none;
}

.btn-outline:hover {
    background: white;
    border-color: white;
    color: var(--dark);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
}

.hero-stat-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===========================================
   FEATURES SECTION
   =========================================== */
.features {
    background: var(--light);
    padding: 50px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--gray);
    font-size: 0.9rem;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    padding: 24px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
}

.feature-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: var(--primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
    color: white;
}

.feature-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.feature-desc {
    color: var(--gray);
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ===========================================
   CATEGORIES SECTION
   =========================================== */
.categories-section {
    background: white;
    padding: 50px 20px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-width: 1000px;
    margin: 0 auto;
}

.category-card {
    background: var(--light);
    padding: 20px 16px;
    border-radius: var(--radius-md);
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
    border: 2px solid transparent;
    -webkit-tap-highlight-color: transparent;
}

.category-card:active {
    transform: scale(0.97);
}

.category-card:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.category-card-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.category-card-count {
    font-size: 0.75rem;
    color: var(--gray);
}

/* ===========================================
   LATEST PIECES SECTION
   =========================================== */
.latest-section {
    background: var(--light);
    padding: 50px 20px;
}

.latest-section .pieces-grid {
    max-width: 1000px;
    margin: 0 auto;
}

.section-footer {
    text-align: center;
    margin-top: 30px;
}

/* ===========================================
   CTA SECTION
   =========================================== */
.cta-section {
    background: var(--primary);
    padding: 50px 20px;
    text-align: center;
}

.cta-content {
    max-width: 500px;
    margin: 0 auto;
}

.cta-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.cta-text {
    color: rgba(255,255,255,0.85);
    margin-bottom: 24px;
    font-size: 0.95rem;
    line-height: 1.6;
}

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

.cta-section .btn:hover {
    background: var(--dark);
    color: white;
}

/* ===========================================
   FOOTER HOME
   =========================================== */
.home-page .footer {
    background: #0d1b2a;
    padding: 40px 20px 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.footer-brand {
    text-align: center;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.footer-brand p {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

.footer-info {
    text-align: center;
}

.footer-info p {
    color: rgba(255,255,255,0.6);
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.3);
    font-size: 0.75rem;
}

/* ===========================================
   RESPONSIVE - TABLET (768px+)
   =========================================== */
@media (min-width: 768px) {
    .header-transparent {
        padding: 18px 30px;
    }

    .header-transparent .nav {
        display: flex;
    }

    .home-page .menu-toggle {
        display: none;
    }

    .hero {
        padding: 100px 40px 70px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .hero-stat-value {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .feature-card {
        flex-direction: column;
        text-align: center;
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
    }

    .footer-brand,
    .footer-info {
        text-align: left;
    }
}

/* ===========================================
   RESPONSIVE - DESKTOP (1024px+)
   =========================================== */
@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .hero-stat-value {
        font-size: 2.5rem;
    }

    .features {
        padding: 70px 40px;
    }

    .categories-section {
        padding: 70px 40px;
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .latest-section {
        padding: 70px 40px;
    }

    .cta-section {
        padding: 70px 40px;
    }

    .cta-title {
        font-size: 2rem;
    }
}
