/* =============================================================================
   FRONT PAGE — Homepage styles
   Loaded conditionally (front page only) via functions.php
   Sections: Hero | Brand Story | Best Sellers | Catégories | CTA | Location
   ============================================================================= */

/* ── CSS Variables & Base ── */
:root {
    --ap:      #f98c1f;        /* Brand orange */
    --dark:    #0f172a;        /* Near-black text */
    --muted:   #64748b;        /* Grey for secondary text */
    --light:   #f8f7f5;        /* Off-white background */
    --radius:  0.75rem;        /* Shared border-radius */
    --section: 8rem 1.5rem;    /* Default section padding (top/bottom left/right) */
    --max:     1280px;         /* Max content width */
    --btn-pad: 1rem 2.5rem;    /* Shared button padding */
    --btn-font: 0.9rem;        /* Shared button font size */
    --weight:  300;            /* Default font weight (light) */
}

/* ── Shared / Reusable Helpers ── */

/* Small orange uppercase label above section titles */
.ap-section-tag {
    display: block;
    color: var(--ap);
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.2em;
    margin-bottom: 1rem;
}

/* Large section heading */
.ap-h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: var(--weight); letter-spacing: -0.03em; line-height: 1.1;
    color: var(--dark); margin: 0 0 1.5rem;
}
.ap-h2 span { color: var(--ap); } /* Highlight a word in orange */

/* Short horizontal orange line used as a visual divider */
.ap-divider { width: 5rem; height: 3px; background: var(--ap); margin: 0 auto; }

/* ── Buttons (defined once, used in multiple sections) ── */
.ap-btn-primary, .ap-btn-outline {
    display: inline-block;
    padding: var(--btn-pad); border-radius: 0.5rem;
    font-size: var(--btn-font); font-weight: 200;
    text-transform: uppercase; letter-spacing: 0.1em;
    text-decoration: none; cursor: pointer; transition: transform 0.2s;
}
/* Solid orange button */
.ap-btn-primary { background: var(--ap); color: #000; border: none; }
.ap-btn-primary:hover { transform: scale(1.05); color: #000; }

/* Transparent button with white border (used on dark backgrounds) */
.ap-btn-outline  { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,0.2); }
.ap-btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; }


/* ── Hero Section ── */

/* Full-viewport hero wrapper */
.ap-hero {
    position: relative;
    height: 100vh; min-height: 600px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; text-align: center;
}

/* Background image container */
.ap-hero-bg {
    position: absolute; inset: 0; z-index: 0;
    overflow: hidden;
}
.ap-hero-bg img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    transform: scale(1); /* adjust to zoom in/out the burger */
    transform-origin: center center;
}

/* Dark gradient overlay on top of the image */
.ap-hero-gradient {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(rgba(0,0,0,0.35), rgba(10,10,10,0.75));
}

/* Text/button container centred over the image */
.ap-hero-content {
    position: relative; z-index: 2;
    max-width: 900px; padding: 0 1.5rem;
}

/* Small orange tagline above the H1 */
.ap-hero-tagline {
    display: inline-block; color: var(--ap);
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.3em;
    margin-bottom: 1.5rem;
}

/* Force Helvetica for all hero text */
.ap-hero,
.ap-hero h1,
.ap-hero p {
    font-size: clamp(1.8rem, 4.5vw, 3.8rem);
    font-weight: 300; line-height: 1;
    letter-spacing: -0.03em; color: #fff;
    margin: 0 0 1.5rem;
    text-shadow: 0 0 30px rgba(249,140,31,0.3);
}

/* Main hero headline */
.ap-hero h1 {
    font-size: clamp(1.8rem, 4.5vw, 3.8rem);
    font-weight: 300; line-height: 1;
    letter-spacing: -0.03em; color: #fff;
    margin: 0 0 1.5rem;
    text-shadow: 0 0 30px rgba(249,140,31,0.3);
}

/* Per-word colour control inside the H1 */
.ap-hero-t1 { color: #fff; }
.ap-hero-t2 { color: var(--ap); } /* "LE CRISPY" is orange */
.ap-hero-t3 { color: #fff; }
.ap-hero-t4 { color: #fff; }

/* Subtitle paragraph */
.ap-hero p {
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    color: #cbd5e1; max-width: 38rem;
    margin: 0 auto 2.5rem; line-height: 1.7;
    font-weight: 100;
}

/* CTA button row */
.ap-hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Subtle fade at the bottom of the hero, blending into the next section */
.ap-hero-bottom-fade {
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
    height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(248,247,245,0.35));
    pointer-events: none;
}

/* Bouncing arrow indicator at the bottom of the hero */
.ap-hero-arrow {
    position: absolute; bottom: 2.5rem; left: 50%;
    transform: translateX(-50%); z-index: 2;
    color: var(--ap); font-size: 2rem; animation: bounce 1.5s infinite;
}
@keyframes bounce {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(10px); }
}


/* ── Brand Story Section ── */

/* Side-by-side layout: image left, text right */
.ap-brand {
    padding: var(--section); background: var(--light);
    display: flex; gap: 5rem; align-items: center;
}
@media(max-width:900px) { .ap-brand { flex-direction: column; gap: 3rem; } }

/* Image wrapper with a subtle orange border frame behind it */
.ap-brand-img-wrap { position: relative; border-radius: var(--radius); overflow: hidden; }
.ap-brand-img-wrap::before {
    content: ''; position: absolute; inset: -1rem;
    border: 1px solid rgba(249,140,31,0.2);
    border-radius: 1rem; pointer-events: none; z-index: 0;
}
.ap-brand-img-wrap img { width: 100%; border-radius: var(--radius); display: block; position: relative; z-index: 1; }

/* Description text */
.ap-brand > div > p { color: #475569; font-size: 1.05rem; line-height: 1.8; margin-bottom: 2rem; }

/* Two-column badge grid (100% Halal / Frais & Local) */
.ap-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.ap-badge-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.ap-badge h4 { font-size: 1.1rem; font-weight: 700; color: var(--dark); margin: 0 0 0.3rem; }
.ap-badge p  { font-size: 0.85rem; color: var(--muted); margin: 0; line-height: 1.6; }

/* "Discover our story →" text link with animated arrow gap */
.ap-link-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: var(--ap); font-weight: 700; font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 0.1em;
    text-decoration: none; transition: gap 0.2s;
}
.ap-link-btn:hover { gap: 0.9rem; color: var(--ap); }


/* ── Best Sellers Section ── */

.ap-bestsellers { background: #fff; padding: var(--section); }
.ap-bestsellers-inner { max-width: var(--max); margin: 0 auto; }

/* Section header: title on the left, description on the right */
.ap-section-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 4rem; gap: 2rem; flex-wrap: wrap;
}
.ap-section-header h2 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: var(--weight); letter-spacing: -0.03em; margin: 0; color: var(--dark); }
.ap-section-header p  { color: var(--muted); max-width: 28rem; font-size: 0.95rem; line-height: 1.7; margin: 0; }

/* 3-column product card grid */
.ap-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
@media(max-width:900px) { .ap-cards { grid-template-columns: 1fr; } }
@media(min-width:600px) and (max-width:900px) { .ap-cards { grid-template-columns: 1fr 1fr; } }

/* Single product card */
.ap-card { cursor: pointer; }
.ap-card-img {
    position: relative; overflow: hidden;
    border-radius: var(--radius); margin-bottom: 1.5rem; aspect-ratio: 1/1;
    background-color: #ff9113cf !important;
}
.ap-card-img img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 0.5s; background-color: transparent !important; }
.ap-card:hover .ap-card-img img { transform: scale(1.1); } /* Zoom on hover */

/* "Populaire" badge overlaid on top-right of card image */
.ap-card-badge {
    position: absolute; top: 1rem; right: 1rem;
    background: var(--ap); color: #000;
    font-size: 0.65rem; font-weight: var(--weight);
    text-transform: uppercase; padding: 0.3rem 0.75rem;
    border-radius: 0.25rem; letter-spacing: 0.05em;
}
.ap-card h4 { font-size: 1.5rem; font-weight: 700; color: var(--dark); text-transform: uppercase; margin: 0 0 0.5rem; transition: color 0.2s; }
.ap-card:hover h4 { color: var(--ap); } /* Title turns orange on hover */
.ap-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.6; margin: 0; }


/* ── Catégories Section ── */

.ap-categories { padding: var(--section); background: var(--light); }
.ap-categories-inner { max-width: 900px; margin: 0 auto; }
.ap-categories-header { text-align: center; margin-bottom: 4rem; }
.ap-categories-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.75rem); font-weight: var(--weight);
    color: var(--dark); text-transform: uppercase; letter-spacing: -0.02em; margin: 0 0 1rem;
}
.ap-categories-header h2 span { color: var(--ap); } /* "Catégories" in orange */

/* 4-column grid of category tiles (2 columns on mobile) */
.ap-cat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; }
@media(max-width:700px) { .ap-cat-grid { grid-template-columns: repeat(2,1fr); } }

/* Individual category tile */
.ap-cat-tile {
    background: #fff; border: 1px solid #e2e8f0;
    padding: 2.5rem 1rem; border-radius: var(--radius);
    text-align: center; cursor: pointer; text-decoration: none; color: inherit;
    display: flex; flex-direction: column; align-items: center; gap: 1rem;
    transition: background 0.2s;
}
.ap-cat-tile:hover { background: rgba(249,140,31,0.1); color: inherit; }
.ap-cat-icon { font-size: 3rem; }
.ap-cat-tile h5 { font-size: 0.75rem; font-weight: 700; color: var(--dark); text-transform: uppercase; letter-spacing: 0.15em; margin: 0; }


/* ── CTA Section ── */

.ap-cta { padding: 5rem 1.5rem; }

/* Orange rounded box containing text on the left and image on the right */
.ap-cta-inner {
    max-width: var(--max); margin: 0 auto;
    background: var(--ap); border-radius: 1.25rem; padding: 5rem;
    display: flex; align-items: center; justify-content: space-between; gap: 3rem; flex-wrap: wrap;
}
@media(max-width:900px) { .ap-cta-inner { padding: 3rem 2rem; } }

.ap-cta-text { max-width: 36rem; }
.ap-cta-text h2 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: var(--weight); letter-spacing: -0.03em; line-height: 1.1; color: #000; margin: 0 0 1.25rem; }
.ap-cta-text p  { font-size: 1.05rem; color: rgba(0,0,0,0.75); margin: 0 0 2rem; line-height: 1.7; }
.ap-cta-btns { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }

/* Dark "order here" button inside the orange CTA box */
.ap-cta-btn-dark {
    background: #000; color: #fff;
    padding: 1rem 2rem; border-radius: 0.5rem;
    font-size: 0.85rem; font-weight: var(--weight);
    text-transform: uppercase; letter-spacing: 0.1em;
    text-decoration: none; display: flex; align-items: center; gap: 0.5rem;
    transition: transform 0.2s;
}
.ap-cta-btn-dark:hover { transform: scale(1.05); color: #fff; }

/* Opening hours pill next to the button */
.ap-cta-hours {
    display: flex; align-items: center; gap: 0.5rem;
    background: rgba(0,0,0,0.1); padding: 0.75rem 1.25rem; border-radius: 0.5rem;
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase; color: #000;
}

/* Decorative food image, slightly rotated, hidden below 1100px */
.ap-cta-image img { border-radius: var(--radius); max-width: 22rem; transform: rotate(3deg); box-shadow: 0 30px 60px rgba(0,0,0,0.3); }
@media(max-width:1100px) { .ap-cta-image { display: none; } }


/* ── Location Section ── */

.ap-location { background: #fff; padding: var(--section); }

/* Two-column grid: info left, map image right */
.ap-location-inner {
    max-width: var(--max); margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
@media(max-width:900px) { .ap-location-inner { grid-template-columns: 1fr; } }

.ap-location h2 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: var(--weight); color: var(--dark); letter-spacing: -0.03em; margin: 0.5rem 0 2rem; }
.ap-location h2 span { color: var(--ap); } /* City name in orange */

/* Each info row (address / phone / hours) with an icon on the left */
.ap-loc-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: flex-start; }
.ap-loc-item-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 0.1rem; }
.ap-loc-item p     { margin: 0; font-size: 1.05rem; font-weight: 700; color: var(--dark); }
.ap-loc-item small { color: var(--muted); font-size: 0.9rem; }

/* Single opening-hours row (day label + time value) */
.ap-loc-hours-row { display: flex; justify-content: space-between; width: 16rem; font-size: 0.9rem; margin-bottom: 0.3rem; color: #475569; }
.ap-loc-hours-row span:last-child { color: var(--dark); font-weight: 600; }

/* Map image block — greyscale by default, colour on hover */
.ap-loc-map {
    height: 450px; border-radius: 1rem; overflow: hidden;
    filter: grayscale(1) contrast(1.2) opacity(0.85); transition: filter 0.3s;
}
.ap-loc-map:hover { filter: none; }
.ap-loc-map img { width: 100%; height: 100%; object-fit: cover; display: block; }
