/* Resets & Base */
:root {
    --bg-dark: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --success: #22c55e;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    background-color: var(--bg-dark);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

/* Layout Grid */
.main-container {
    display: grid;
    height: 100%;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1px;
    background-color: #ffffff;
    /* Divider lines */
}

/* Mobile Layout: 4 stacked rows */
@media (max-width: 768px) {

    /* STRICT SINGLE PAGE - NO SCROLLING */
    html,
    body {
        height: 100%;
        overflow: hidden;
        /* Prevent scrolling completely */
        position: fixed;
        /* Lock body in place for iOS */
        width: 100%;
    }

    .main-container {
        display: flex;
        /* Use flex column to stack perfectly */
        flex-direction: column;
        height: 100%;
        width: 100%;
        overflow: hidden;
    }

    .branch-card {
        width: 100%;
        flex: 1;
        /* Each card takes exactly equal space (1/4) */
        height: auto;
        /* Let flex handle the height */
        min-height: 0;
        /* Remove safety limit so it fits exactly */
        border-bottom: 1px solid #fff;
        overflow: hidden;
        /* Cut off anything that doesn't fit */
    }

    /* Shrink content to fit in restricted height */
    .card-right-panel {
        padding: 4px 0.5rem 6px 0.5rem !important;
        /* Added bottom padding to lift address up */
        justify-content: space-between;
        /* distribute space evenly */
        gap: 0;
    }

    .logo-circle {
        width: 42px;
        /* Shrink logo slightly more */
        height: 42px;
    }

    .main-title {
        font-size: 0.8rem;
    }

    .sub-title {
        font-size: 0.6rem;
    }

    .card-header {
        margin-bottom: 0;
        gap: 6px;
    }

    /* Buttons need to be slimmer */
    .card-actions {
        gap: 4px;
        margin: 1px 0;
    }

    /* Ultra slim buttons to save vertical space */
    .btn {
        height: 30px;
        padding: 0;
        border-radius: 4px;
    }

    .btn i {
        font-size: 0.8rem;
        margin-bottom: 0;
    }

    .btn span {
        font-size: 0.45rem;
    }

    .card-footer {
        gap: 0;
    }

    .promo-text {
        font-size: 0.45rem;
        margin-bottom: 1px;
        line-height: 1;
    }

    .branch-address {
        font-size: 0.45rem;
        line-height: 1.1;
        white-space: normal;
        padding-bottom: 2px;
        /* Extra safety */
    }
}

/* Individual Card Styling */
.branch-card {
    background: var(--bg-dark);
    position: relative;
    display: flex;
    flex-direction: row;
    /* Horizontal layout by default */
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Ensure image doesn't spill out */
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
}

.branch-card:nth-child(even) {
    background: radial-gradient(circle at center, #172033 0%, #0b1120 100%);
}

/* Left Panel: Full Height Image */
.card-left-panel {
    flex: 0 0 38%;
    /* Takes up ~40% of width */
    height: 100%;
    position: relative;
}

.shop-image-full {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Optional: Border right to separate panels? */
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* Right Panel: Content */
.card-right-panel {
    flex: 1;
    display: flex;
    /* Flex column for Header / Buttons / Footer */
    flex-direction: column;
    justify-content: space-evenly;
    /* Spread items vertically */
    padding: 0.5rem 0.75rem;
    min-width: 0;
}

/* Header: Logo + Title */
.card-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.header-logo {
    flex: 0 0 auto;
}

.logo-circle {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.header-titles {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-title {
    font-family: 'Inter', sans-serif;
    /* Make current font like the other (Inter) */
    font-size: 1rem;
    font-weight: 500;
    /* Regular/Medium instead of Extra Bold */
    text-transform: uppercase;
    line-height: 1;
    color: #fff;
    margin-bottom: 2px;
}

.sub-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Buttons */
.card-actions {
    display: flex;
    width: 100%;
    gap: 8px;
    /* Space between buttons */
}

/* Footer: Address */
.card-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Align left */
    justify-content: flex-end;
    gap: 2px;
}

.promo-text {
    font-size: 0.55rem;
    color: var(--success);
    font-weight: 700;
    margin-bottom: 1px;
}

.branch-address {
    font-size: 0.5rem;
    color: var(--text-muted);
    line-height: 1.2;
    max-width: 100%;
}

/* Button Styles - Keeping consistent but adapting size */
.btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 4px;
    border-radius: 6px;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 44px;
    /* Squarish look */
}

.btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.1);
}

.btn i {
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.btn span {
    font-size: 0.55rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Button Colors */
.btn-call {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
}

.btn-wp {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
}

.btn-loc {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Responsive adjustments for really small screens */
@media (max-width: 380px) {
    .card-left-panel {
        flex: 0 0 32%;
    }

    .logo-circle {
        width: 50px;
        height: 50px;
    }

    .main-title {
        font-size: 1rem;
    }

    .sub-title {
        font-size: 0.6rem;
    }

    .btn {
        height: 45px;
    }
}