/* ============================================================
   ZAKIE - Main Stylesheet
   ============================================================ */

/* ── CSS Custom Properties ── */
:root {
    --zakie-color: #E31C3D;
    --zakie-dark: #c41834;
    --zakie-light: #ff3d5a;
}

/* ── Base Styles ── */
body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ── Zakie Brand Utilities ── */
.bg-zakie {
    background-color: var(--zakie-color);
}

.text-zakie {
    color: var(--zakie-color);
}

.border-zakie {
    border-color: var(--zakie-color);
}

.gradient-zakie-light {
    background: linear-gradient(135deg, #fff5f6 0%, #ffffff 100%);
}

/* ============================================================
   BUTTON DESIGN SYSTEM
   ============================================================ */

/* ── Base Button ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: 0.75rem;
    transition: background-color 0.2s ease, transform 0.15s ease,
        box-shadow 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    user-select: none;
    text-decoration: none;
    line-height: 1;
}

.btn:active {
    transform: scale(0.97);
}

.btn:focus-visible {
    outline: 3px solid var(--zakie-color);
    outline-offset: 3px;
}

/* ── Primary (Red) Button ── */
.btn-zakie {
    background-color: var(--zakie-color);
    color: #ffffff;
    box-shadow: 0 8px 24px -4px rgba(227, 28, 61, 0.35);
}

.btn-zakie:hover {
    background-color: var(--zakie-dark);
    box-shadow: 0 12px 28px -4px rgba(196, 24, 52, 0.45);
    transform: translateY(-1px);
}

.btn-zakie:active {
    background-color: var(--zakie-dark);
    transform: scale(0.97) translateY(0);
    box-shadow: 0 4px 12px -2px rgba(196, 24, 52, 0.3);
}

/* ── White Button (on red backgrounds) ── */
.btn-white {
    background-color: #ffffff;
    color: var(--zakie-color);
    box-shadow: 0 6px 20px -4px rgba(0, 0, 0, 0.15);
}

.btn-white:hover {
    background-color: #f3f4f6;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -4px rgba(0, 0, 0, 0.2);
}

.btn-white:active {
    background-color: #e5e7eb;
    transform: scale(0.97) translateY(0);
}

/* ── Ghost/Outline Button ── */
.btn-ghost {
    background-color: #f3f4f6;
    color: #374151;
}

.btn-ghost:hover {
    background-color: #e5e7eb;
    color: #111827;
    transform: translateY(-1px);
}

.btn-ghost:active {
    background-color: #d1d5db;
    transform: scale(0.97) translateY(0);
}

/* ── Ghost Active (region filter) ── */
.btn-ghost.btn-active,
.btn-ghost[data-active="true"] {
    background-color: var(--zakie-color);
    color: #ffffff;
    box-shadow: 0 8px 24px -4px rgba(227, 28, 61, 0.35);
}

.btn-ghost.btn-active:hover,
.btn-ghost[data-active="true"]:hover {
    background-color: var(--zakie-dark);
}

/* ── Dark Button ── */
.btn-dark {
    background-color: #1f2937;
    color: #ffffff;
}

.btn-dark:hover {
    background-color: #111827;
    transform: translateY(-1px);
}

/* ── Icon Button (arrow nav) ── */
.btn-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: #f3f4f6;
    color: #9ca3af;
    font-size: 1.25rem;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    padding: 0;
}

.btn-icon:hover {
    background-color: #111827;
    color: #ffffff;
    transform: scale(1.08);
}

.btn-icon:active {
    transform: scale(0.95);
}

/* ── Order Now (mini pill inside card) ── */
.btn-pill {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background-color: #f3f4f6;
    color: #6b7280;
    padding: 0.375rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
    margin-top: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.btn-pill:hover {
    background-color: var(--zakie-color);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-pill:active {
    transform: scale(0.95);
}

/* ── Size Modifiers ── */
.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.8125rem;
}

.btn-md {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

.btn-xl {
    padding: 1.1rem 2.5rem;
    font-size: 1.125rem;
    border-radius: 1rem;
}

/* Legacy hover-bg-zakie compatibility */
.hover-bg-zakie:hover {
    background-color: var(--zakie-dark);
}

/* ── Infinite Scroll Animation ── */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-33.333%);
    }
}

@keyframes scroll-reverse {
    0% {
        transform: translateX(-33.333%);
    }

    100% {
        transform: translateX(0);
    }
}

.animate-infinite {
    display: flex;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.animate-infinite.reverse {
    animation: scroll-reverse 40s linear infinite;
}

.animate-infinite:hover {
    animation-play-state: paused;
}

/* ── Slider Edge Mask ── */
.slider-mask {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* ── Hover Scale Utility ── */
.hover-scale {
    transition: transform 0.2s;
}

.hover-scale:hover {
    transform: scale(1.03);
}

/* ── City Card Active State ── */
.city-card.active {
    border-color: var(--zakie-color);
    background-color: white;
    box-shadow: 0 10px 25px -5px rgba(227, 28, 61, 0.1);
}

.city-card.active .icon-box {
    background-color: var(--zakie-color);
    color: white;
}

/* ============================================================
   DOWNLOAD MODAL — Split Banner (visual left + text right)
   ============================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 10, 20, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay:not([hidden]) {
    opacity: 1;
}

.modal-overlay[hidden] {
    display: none !important;
}

/* Card: left visual panel + right text panel */
.modal-card {
    position: relative;
    display: grid;
    grid-template-columns: 52% 48%;
    width: 100%;
    max-width: 980px;
    min-height: 385px;
    border-radius: 1.75rem;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
    transform: translateY(28px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    background-image: url("images/donwload-banner.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.modal-overlay:not([hidden]) .modal-card {
    transform: translateY(0) scale(1);
}

/* ── Close button ── */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 30;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #333;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: background 0.2s, transform 0.2s;
    font-family: 'Poppins', sans-serif;
    line-height: 1;
}

.modal-close:hover {
    background: #fff;
    transform: rotate(90deg);
}

/* ── LEFT visual panel ── */
.bm-visual {
    position: relative;
    background: transparent;
}

.bm-visual-img {
    display: block;
    /* Scale image so its width = card-width / 0.52 → image fills full visual */
    width: 192%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: left center;
}

/* ── RIGHT text panel ── */
.bm-content {
    display: flex;
    flex-direction: column;
    font-family: 'Poppins', sans-serif;
}

/* Top half — light pink background */
.bm-top {
    flex: 1;
    background: transparent;
    padding: 1.5rem 1.75rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Bottom half — Zakie red */
.bm-bottom {
    flex: 1;
    background: transparent;
    padding: 2rem 1.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 0;
}

/* ── Typography — matching the image exactly ── */

/* "Download Zakie App for" */
.bm-label {
    font-size: clamp(0.72rem, 1.1vw, 0.92rem);
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.3em;
    letter-spacing: -0.01em;
}

.bm-label strong {
    font-weight: 800;
    color: #111827;
}

/* "The Best Offers" headline */
.bm-headline {
    font-size: clamp(1.5rem, 3.4vw, 2.75rem);
    font-weight: 900;
    line-height: 1.05;
    color: #111827;
    margin: 0;
    letter-spacing: -0.03em;
}

/* "Best" pill — white text on red rounded box */
.bm-best {
    display: inline-block;
    background: #E31C3D;
    color: #fff;
    padding: 0.04em 0.3em 0.1em;
    border-radius: 0.42rem;
}

/* Body text on red background */
.bm-body-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.bm-body {
    font-size: clamp(0.65rem, 1vw, 0.82rem);
    font-weight: 500;
    color: #fff;
    line-height: 1.65;
    margin: 0;
}

/* Download Now pill button */
.bm-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    background: #fff;
    color: #E31C3D;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.65rem, 1vw, 0.84rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 0.6em 1.4em;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
    transition: background 0.2s, transform 0.18s, box-shadow 0.2s;
    align-self: flex-start;
}

.bm-btn:hover {
    background: #fff0f0;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.bm-btn:active {
    transform: scale(0.97);
}

/* QR box */
.bm-qr-box {
    flex-shrink: 0;
    width: clamp(150px, 10vw, 150px);
    background: transparent;
    border-radius: 0.75rem;
    padding: 0.4rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bm-qr-box img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.4rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .modal-card {
        display: flex;
        flex-direction: column;
        border-radius: 1.5rem;
        /* Slightly rounder to match image */
        max-height: 90vh;
        overflow-y: auto;
        background-image: none;
        background-color: #fff;
    }

    .bm-content {
        order: 1;
        /* Text details on top */
    }

    .bm-visual {
        order: 2;
        /* Image on the bottom */
        height: 250px;
        overflow: hidden;
        border-radius: 0 0 1.5rem 1.5rem;
        /* Rounded bottom corners */
    }

    /* Center the character */
    .bm-visual-img {
        width: 180%;
        height: 100%;
        display: block;
        max-width: none;
        object-fit: cover;
        object-position: 22% center;
        /* Shift focus to the mascot */
    }

    /* Solid backgrounds so text is readable when stacked */
    .bm-top {
        background: #FFFEFE;
        padding: 2.25rem 1.5rem 1rem;
        /* Extra top padding for close button */
    }

    .bm-bottom {
        background: #ffffff;
        flex-wrap: nowrap;
        /* Keep it side by side */
        align-items: center;
        padding: 1.5rem;
        gap: 1rem;
    }

    .bm-body-wrap {
        gap: 1rem;
    }

    .bm-body {
        font-size: 0.75rem;
        line-height: 1.5;
        color: #333333;
    }

    .bm-headline {
        font-size: 1.7rem;
        color: #111827;
    }

    .bm-label {
        color: #374151;
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }

    /* QR Code styling in mobile to match the dual-box look */
    .bm-qr-box {
        width: 120px;
        background: #E31C3D;
        /* Darker inset background */
        border-radius: 0.8rem;
        padding: 0.5rem;
        /* Padding creates the dark red border effect */
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .bm-qr-inner {
        background: transparent;
        /* Exactly the color requested */
        border-radius: 0.4rem;
        padding: 0.4rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.2rem;
    }

    .bm-qr-inner img {
        width: 100%;
        display: block;
        background: transparent;
    }

    .bm-qr-text {
        color: #000000;
        font-size: 0.7rem;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-align: center;
    }

    .bm-btn {
        padding: 0.5em 1.2em;
        font-size: 0.8rem;
    }
}

/* ── Hero Floating Food Animations ── */
@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0) rotate(-4deg);
    }

    50% {
        transform: translateY(-15px) rotate(2deg);
    }
}

@keyframes float-medium {

    0%,
    100% {
        transform: translateY(0) rotate(5deg);
    }

    50% {
        transform: translateY(-12px) rotate(-2deg);
    }
}

@keyframes float-fast {

    0%,
    100% {
        transform: translateY(0) rotate(8deg);
    }

    50% {
        transform: translateY(-20px) rotate(4deg);
    }
}

@keyframes float-phone {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

.animate-float-slow {
    animation: float-slow 6s ease-in-out infinite;
}

.animate-float-medium {
    animation: float-medium 5s ease-in-out infinite;
}

.animate-float-fast {
    animation: float-fast 4s ease-in-out infinite;
}

.animate-float-phone {
    animation: float-phone 7s ease-in-out infinite;
}

/* ── Mobile Hero Perfect Match ── */
@media (max-width: 640px) {
    #hero-visual-container {
        height: 460px !important;
        min-height: auto !important;
        margin-top: 1rem;
        align-items: flex-end;
    }

    #hero-orb {
        width: 100vw !important;
        height: 155vw !important;
        top: 220px !important;
        /* Starts higher than phone top to enclose it cleanly */
        bottom: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        border-width: 25px !important;
    }

    #hero-phone {
        height: 380px !important;
        max-height: none !important;
        margin-bottom: -30px !important;
        /* Forces the very bottom curved cutoff */
        z-index: 20 !important;
    }

    /* Absolute overlap tuning relative to the phone center */
    #food-pizza {
        width: 150px !important;
        top: 180px !important;
        left: 40% !important;
        margin-left: -160px !important;
        /* Snug overlap left edge */
        right: auto !important;
        z-index: 30 !important;
    }

    #food-hotdog {
        width: 150px !important;
        bottom: 5px !important;
        left: 50% !important;
        margin-left: -180px !important;
        /* Overlap bottom-left */
        right: auto !important;
        z-index: 30 !important;
    }

    #food-milkshake {
        width: 150px !important;
        top: 180px !important;
        left: 45% !important;
        margin-left: 80px !important;
        /* Top-right overlap */
        right: auto !important;
        z-index: 30 !important;
    }

    #food-burger {
        width: 150px !important;
        bottom: 10px !important;
        left: 50% !important;
        margin-left: 60px !important;
        /* Bottom-right overlap */
        right: auto !important;
        z-index: 30 !important;
    }
}