/**
 * ArchFinishes Homepage Styles - Exact Mockup Layout
 * All image containers have LOCKED aspect ratios
 */

/* ========================================
   VARIABLES
   ======================================== */
:root {
    --af-terracotta: #C4704F;
    --af-terracotta-hover: #A85D40;
    --af-text: #1A1A1A;
    --af-text-muted: #6B7280;
    --af-bg-cream: #F5F0EB;
    --af-bg-light: #F9FAFB;
    --af-border: #E5E7EB;
    --af-radius: 12px;
    --af-radius-sm: 8px;
}

/* ========================================
   BASE LAYOUT
   ======================================== */
.af-homepage {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--af-bg-cream);
}

.af-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.af-section {
    padding: 96px 0;
}

.af-section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--af-text);
    margin: 0 0 40px 0;
}

.af-section-title--center {
    text-align: center;
}

.af-block-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--af-text);
    margin: 0 0 24px 0;
}

/* ========================================
   BUTTONS
   ======================================== */
.af-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 24px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.af-btn-terracotta {
    background: var(--af-terracotta);
    color: #FFFFFF;
}

.af-btn-terracotta:hover {
    background: var(--af-terracotta-hover);
    color: #FFFFFF;
}

.af-btn-outline-white {
    background: #FFFFFF;
    color: var(--af-text);
    border: 1px solid var(--af-border);
}

.af-btn-outline-white:hover {
    border-color: var(--af-terracotta);
    color: var(--af-terracotta);
}

/* ========================================
   PREMIUM ANIMATIONS
   ======================================== */

/* Scroll Reveal Animations */
.af-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.af-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Reveal for grids */
.af-stagger-reveal>* {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.af-stagger-reveal.is-visible>*:nth-child(1) {
    transition-delay: 0ms;
}

.af-stagger-reveal.is-visible>*:nth-child(2) {
    transition-delay: 60ms;
}

.af-stagger-reveal.is-visible>*:nth-child(3) {
    transition-delay: 120ms;
}

.af-stagger-reveal.is-visible>*:nth-child(4) {
    transition-delay: 180ms;
}

.af-stagger-reveal.is-visible>*:nth-child(5) {
    transition-delay: 240ms;
}

.af-stagger-reveal.is-visible>*:nth-child(6) {
    transition-delay: 300ms;
}

.af-stagger-reveal.is-visible>*:nth-child(7) {
    transition-delay: 360ms;
}

.af-stagger-reveal.is-visible>*:nth-child(8) {
    transition-delay: 420ms;
}

.af-stagger-reveal.is-visible>* {
    opacity: 1;
    transform: translateY(0);
}

/* Image Zoom on Hover */
.af-img-zoom:hover img {
    transform: scale(1.05);
}

.af-img-zoom img {
    transition: transform 0.4s ease-out;
}

/* Parallax Background */
.af-parallax {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

@supports (-webkit-overflow-scrolling: touch) {
    .af-parallax {
        background-attachment: scroll;
    }
}

/* Button Shine Effect */
.af-btn-shine {
    position: relative;
    overflow: hidden;
}

.af-btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease-out;
}

.af-btn-shine:hover::before {
    left: 100%;
}

/* Card Lift on Hover */
.af-card-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.af-card-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

/* Icon Bounce on Hover */
.af-icon-bounce:hover .material-symbols-outlined {
    animation: iconBounce 0.4s ease;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

/* Pulse Animation for CTA */
.af-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(196, 112, 79, 0.4);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(196, 112, 79, 0);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {

    .af-reveal,
    .af-stagger-reveal>*,
    .af-img-zoom img,
    .af-card-lift,
    .af-btn-shine::before {
        transition: none !important;
        animation: none !important;
    }

    .af-reveal,
    .af-stagger-reveal>* {
        opacity: 1 !important;
        transform: none !important;
    }

    .af-parallax {
        background-attachment: scroll !important;
    }
}

.af-category-bar {
    background: #FFFFFF;
    border-bottom: 1px solid var(--af-border);
    padding: 16px 0;
    overflow-x: auto;
}

.af-category-bar-scroll {
    display: flex;
    gap: 32px;
    padding: 0 24px;
    white-space: nowrap;
    max-width: 1280px;
    margin: 0 auto;
}

.af-cat-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--af-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.af-cat-link:hover {
    color: var(--af-text);
}

.af-cat-link .material-symbols-outlined {
    font-size: 16px;
}

/* Custom SVG Icons */
.af-cat-svg-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.af-cat-link:hover .af-cat-svg-icon {
    transform: scale(1.1);
}

/* ========================================
   HERO SECTION (Full-width background)
   ======================================== */
.af-hero {
    /* LOCKED: Height controlled by padding, bg covers */
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.af-hero-overlay {
    background: transparent;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.af-hero-content {
    max-width: 600px;
    padding: 48px 56px;
    background: rgba(245, 237, 228, 0.85);
    border-radius: 16px;
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.af-hero-headline {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--af-text);
    margin: 0 0 16px 0;
    text-align: center;
}

.af-hero-subheadline {
    font-size: 15px;
    color: var(--af-text-muted);
    margin: 0 0 24px 0;
    line-height: 1.6;
    text-align: center;
}

.af-hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ========================================
   HERO SLIDER (Crossfade)
   ======================================== */
.af-hero-slider {
    background: #1a1a1a;
}

.af-hero-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.af-hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.af-hero-slide.af-slide-active {
    opacity: 1;
}

.af-hero-slider .af-hero-overlay {
    position: relative;
    z-index: 1;
}

.af-hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.af-hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease;
}

.af-hero-dot.af-dot-active {
    background: #fff;
}

.af-hero-dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* ========================================
   TRUST BADGES (96px)
   ======================================== */
.af-trust-badges {
    background: #FFFFFF;
    padding: 24px 0;
}

.af-badges-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

.af-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #FFFFFF;
    border: 1px solid var(--af-border);
    border-radius: 24px;
    font-size: 13px;
    color: var(--af-text);
}

.af-badge .material-symbols-outlined {
    font-size: 18px;
    color: var(--af-text-muted);
}

/* ========================================
   SHOP BY ELEMENTS - 4x2 Image Grid
   ======================================== */
.af-elements {
    background: var(--af-bg-cream);
}

.af-elements-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.af-element-card {
    text-decoration: none;
    color: var(--af-text);
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border-radius: var(--af-radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.af-element-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Element Image - LOCKED 4:3 ASPECT RATIO */
.af-element-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #E8DFD5;
}

.af-element-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.af-element-label {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

/* ========================================
   FEATURED BUNDLES - 4 Cards
   ======================================== */
.af-bundles {
    background: var(--af-bg-cream);
}

.af-bundles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.af-bundle-card {
    text-decoration: none;
    color: var(--af-text);
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border-radius: var(--af-radius);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.af-bundle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* Bundle Image - LOCKED 4:3 ASPECT RATIO */
.af-bundle-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #E8DFD5;
    position: relative;
}

.af-bundle-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.af-bundle-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: var(--af-terracotta);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
}

.af-bundle-info {
    padding: 12px 16px;
    text-align: center;
}

.af-bundle-title {
    font-size: 13px;
    font-weight: 500;
}

/* ========================================
   BEST SELLERS - 8 Cards (scrollable)
   ======================================== */
.af-bestsellers {
    background: var(--af-bg-cream);
}

.af-bestsellers-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.af-bestseller-card {
    text-decoration: none;
    color: var(--af-text);
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border-radius: var(--af-radius-sm);
    overflow: hidden;
    min-width: 140px;
}

/* Bestseller Image - LOCKED 4:3 ASPECT RATIO */
.af-bestseller-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #E8DFD5;
    position: relative;
}

.af-bestseller-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.af-bs-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--af-text);
    font-size: 9px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 3px;
}

.af-bestseller-info {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.af-bestseller-title {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.af-bestseller-meta {
    font-size: 10px;
    color: var(--af-text-muted);
}

.af-bestseller-price {
    font-size: 11px;
    font-weight: 600;
    color: var(--af-text);
}

/* ========================================
   HOW IT WORKS + WHAT YOU GET (Side by Side)
   ======================================== */
.af-hiw-wyg {
    background: var(--af-bg-cream);
    padding: 60px 0;
}

.af-hiw-wyg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

/* How It Works - 3 Steps */
.af-hiw-block {
    background: #FFFFFF;
    padding: 32px;
    border-radius: var(--af-radius);
}

.af-hiw-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.af-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.af-step-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--af-bg-light);
    border-radius: 50%;
    flex-shrink: 0;
}

.af-step-icon .material-symbols-outlined {
    font-size: 24px;
    color: var(--af-text-muted);
}

.af-step-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.af-step-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--af-text);
}

.af-step-desc {
    font-size: 13px;
    color: var(--af-text-muted);
}

/* What You Get - 6 Items in 2 columns */
.af-wyg-block {
    background: #FFFFFF;
    padding: 32px;
    border-radius: var(--af-radius);
}

.af-deliverables-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.af-deliverable {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--af-text);
}

.af-deliverable .material-symbols-outlined {
    font-size: 20px;
    color: var(--af-text-muted);
}

/* ========================================
   TESTIMONIALS + LATEST BLOG (2 columns)
   ======================================== */
.af-social-proof {
    background: var(--af-bg-cream);
}

.af-social-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

/* Testimonials */
.af-testimonials-block {
    background: #FFFFFF;
    padding: 24px;
    border-radius: var(--af-radius);
}

.af-testimonials-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.af-testimonial {
    padding: 16px;
    background: var(--af-bg-light);
    border-radius: var(--af-radius-sm);
}

.af-test-header {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.af-test-avatar {
    width: 36px;
    height: 36px;
    background: var(--af-terracotta);
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.af-test-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.af-test-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--af-text);
}

.af-test-stars {
    display: flex;
    gap: 2px;
}

.af-test-stars .material-symbols-outlined {
    font-size: 14px;
    color: #FFC107;
}

.af-test-quote {
    font-size: 12px;
    color: var(--af-text-muted);
    margin: 0;
    line-height: 1.5;
    font-style: italic;
}

/* Latest from the Blog */
.af-latest-blog-block {
    background: #FFFFFF;
    padding: 24px;
    border-radius: var(--af-radius);
}

.af-latest-blog-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.af-latest-post {
    text-decoration: none;
    color: var(--af-text);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Latest Blog Image - LOCKED 16:9 ASPECT RATIO */
.af-latest-img {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--af-radius-sm);
    background: #E8DFD5;
}

.af-latest-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.af-latest-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.af-latest-title {
    font-size: 13px;
    font-weight: 600;
}

.af-latest-excerpt {
    font-size: 11px;
    color: var(--af-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   FINAL CTA (96px)
   ======================================== */
.af-final-cta {
    background: var(--af-bg-cream);
    padding: 96px 0;
}

.af-cta-content {
    text-align: center;
}

.af-cta-headline {
    font-size: 28px;
    font-weight: 600;
    color: var(--af-text);
    margin: 0 0 8px 0;
}

.af-cta-subtext {
    font-size: 15px;
    color: var(--af-text-muted);
    margin: 0 0 24px 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1200px) {
    .af-bestsellers-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .af-section {
        padding: 64px 0;
    }

    .af-elements-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .af-bundles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .af-bestsellers-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .af-hiw-wyg-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .af-social-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .af-section {
        padding: 48px 0;
    }

    .af-hero-content {
        margin-left: 0;
        padding: 32px 24px;
        width: 100%;
        box-sizing: border-box;
    }

    .af-hero-headline {
        font-size: 28px;
    }

    .af-elements-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .af-bundles-grid {
        grid-template-columns: 1fr;
    }

    .af-bestsellers-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .af-deliverables-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .af-container {
        padding: 0 16px;
    }

    .af-hero-headline {
        font-size: 24px;
    }

    .af-hero-subheadline {
        font-size: 14px;
    }

    .af-hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .af-hero-buttons .af-btn {
        width: 100%;
    }

    .af-section-title {
        font-size: 20px;
    }
}