/* =====================================================================
   EASTPRESSO CUSTOM FOOTER — v1.0
   Design: matches header premium language (same CSS variables)
   Rollback: delete footer.php from child theme → Elementor restores
   ===================================================================== */

/* ── Footer wrapper ─────────────────────────────────────────────────── */
#ep-footer {
    direction: rtl;
    font-family: "Rubik", sans-serif;
}

/* ══════════════════════════════════════════════════════════════════════
   BEANS STRIP
   Background image injected via inline style from PHP (Customizer).
   CSS handles only sizing/position.
   ══════════════════════════════════════════════════════════════════════ */
.ep-footer-beans {
    height: 140px;
    background-color: var(--ep-top-bg);
    background-position: bottom center;
    background-size: 30% auto;
    background-repeat: no-repeat;
}

/* ══════════════════════════════════════════════════════════════════════
   MAIN DARK SECTION
   ══════════════════════════════════════════════════════════════════════ */
.ep-footer-main {
    background-color: var(--ep-top-bg);
    position: relative;
    overflow: hidden;
}

/* Overlay image (10% opacity, cover) */
.ep-footer-overlay {
    position: absolute;
    inset: 0;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

/* ── Grid (4 columns) ───────────────────────────────────────────────── */
.ep-footer-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 30% 20% 25% 25%;
    padding-top: 5em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

/* ── Columns ────────────────────────────────────────────────────────── */
.ep-footer-col {
    padding: 0 2em 2em;
}

.ep-footer-col--brand {
    padding-top: 0;
}

/* Column heading */
.ep-footer-col__title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff !important;
    margin: 0 0 1.2em;
    font-family: "Rubik", sans-serif;
    letter-spacing: 0.03em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid var(--ep-accent);
    display: inline-block;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.50);
}

/* ── Brand col: logo ────────────────────────────────────────────────── */
.ep-footer-logo {
    display: inline-block;
    line-height: 0;
}

.ep-footer-logo img {
    width: 200px;
    max-width: 100%;
    height: auto;
    display: block;
}

/* Brand tagline */
.ep-footer-tagline {
    color: rgba(255, 255, 255, 0.60);
    font-size: 13px;
    line-height: 1.75;
    margin: 1.2em 0 0;
    font-family: "Rubik", sans-serif;
    font-weight: 400;
}

/* Payment badges */
.ep-footer-payment {
    display: block;
    margin-top: 1.5em;
    max-width: 160px;
    height: auto;
    opacity: 0.85;
    filter: brightness(1.05);
}

/* Loyalty button — gold gradient + shimmer (reuses ep-shimmer keyframe from style.css) */
.ep-footer-loyalty-btn {
    margin-top: 1.8em;
    position: relative;
    overflow: hidden;
    background: linear-gradient(100deg, #9A7A42 0%, #C9A96E 45%, #9A7A42 100%);
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 24px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.20);
    box-shadow: 0 2px 10px rgba(154, 122, 66, 0.40);
    transition: box-shadow 0.25s, transform 0.18s;
}

.ep-footer-loyalty-btn:hover {
    box-shadow: 0 4px 20px rgba(201, 169, 110, 0.65);
    transform: translateY(-1px);
}

.ep-footer-loyalty-btn:focus-visible {
    outline: 2px solid var(--ep-accent);
    outline-offset: 3px;
}

/* Shimmer sweep — reuses @keyframes ep-shimmer defined in style.css */
.ep-footer-loyalty-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0)    0%,
        rgba(255, 255, 255, 0.30) 50%,
        rgba(255, 255, 255, 0)    100%
    );
    transform: skewX(-18deg);
    animation: ep-shimmer 2.8s ease-in-out infinite;
    pointer-events: none;
}

/* ── Nav link lists ─────────────────────────────────────────────────── */
.ep-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ep-footer-links li {
    line-height: 1;
}

.ep-footer-links li + li {
    margin-top: 10px;
}

.ep-footer-links li a {
    color: rgba(255, 255, 255, 0.82) !important;
    text-decoration: none;
    font-size: 14px;
    font-family: "Rubik", sans-serif;
    font-weight: 400;
    transition: color 0.2s, padding-right 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ep-footer-links li a::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid var(--ep-accent);
    border-bottom: 1.5px solid var(--ep-accent);
    transform: rotate(-45deg);
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.ep-footer-links li a:hover {
    color: var(--ep-accent);
}

.ep-footer-links li a:hover::before {
    opacity: 1;
}

/* ── Contact list ───────────────────────────────────────────────────── */
.ep-footer-contact {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ep-footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 14px;
    line-height: 1.5;
    font-family: "Rubik", sans-serif;
}

.ep-footer-contact li + li {
    margin-top: 14px;
}

.ep-footer-contact li svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--ep-accent);
}

.ep-footer-contact li a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.ep-footer-contact li a:hover {
    color: var(--ep-accent);
}

/* ══════════════════════════════════════════════════════════════════════
   BOTTOM BAR
   ══════════════════════════════════════════════════════════════════════ */
.ep-footer-bottom {
    background: rgba(0, 0, 0, 0.35);
    padding: 1em 0;
    direction: rtl;
    position: relative;
    z-index: 1;
}

.ep-footer-bottom__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ep-footer-copy {
    color: rgba(255, 255, 255, 0.42);
    font-size: 13px;
    font-family: "Rubik", sans-serif;
    font-weight: 400;
    margin: 0;
}

/* ── Social icons ───────────────────────────────────────────────────── */
.ep-footer-social {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ep-footer-social__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.60);
    text-decoration: none;
    transition: background 0.22s, color 0.22s, border-color 0.22s, transform 0.18s;
}

.ep-footer-social__link:hover {
    background: var(--ep-accent);
    border-color: var(--ep-accent);
    color: #fff;
    transform: translateY(-2px);
}

.ep-footer-social__link:focus-visible {
    outline: 2px solid var(--ep-accent);
    outline-offset: 3px;
}

/* ══════════════════════════════════════════════════════════════════════
   WHATSAPP FLOATING BUTTON
   Aligned with Pojo A11Y accessibility button:
   — same left: 5px position
   — same 58px size
   — desktop: bottom: 20px
   — mobile: bottom: 90px (above sticky add-to-cart bar)
   ══════════════════════════════════════════════════════════════════════ */
.ep-whatsapp-fab {
    position: fixed;
    bottom: 20px;
    left: 5px;
    z-index: 9997;
    width: 58px;
    height: 58px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
    transition: transform 0.22s, box-shadow 0.22s;
}

.ep-whatsapp-fab:hover {
    transform: scale(1.10) translateY(-2px);
    box-shadow: 0 7px 28px rgba(37, 211, 102, 0.62);
    color: #fff;
}

.ep-whatsapp-fab:focus-visible {
    outline: 3px solid #25D366;
    outline-offset: 3px;
}

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (768px – 1099px)
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1099px) {
    .ep-footer-grid {
        grid-template-columns: 34% 33% 33%;
    }

    /* Brand col full-width on tablet, with separator */
    .ep-footer-col--brand {
        grid-column: 1 / -1;
        padding-bottom: 2em;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        margin-bottom: 0.5em;
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 2em;
    }

    .ep-footer-col--brand .ep-footer-tagline {
        margin-top: 0;
        flex: 1 1 220px;
    }

    .ep-footer-col--brand .ep-footer-payment {
        margin-top: 0;
    }

    .ep-footer-col--brand .ep-footer-loyalty-btn {
        margin-top: 0;
        align-self: flex-end;
    }
}

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (max 767px)
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {

    .ep-footer-beans {
        height: 50px;
        background-size: auto 50px;
        background-repeat: repeat-x;
    }

    .ep-footer-grid {
        grid-template-columns: 1fr 1fr;
        padding-top: 2em;
    }

    .ep-footer-col--brand {
        grid-column: 1 / -1;
        padding: 0 1em 1.8em;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        margin-bottom: 0.25em;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .ep-footer-col {
        padding: 1em 1em;
    }

    .ep-footer-col__title {
        font-size: 16px;
        margin-bottom: 0.9em;
    }

    .ep-footer-logo img {
        width: 158px;
    }

    .ep-footer-bottom__inner {
        flex-direction: column-reverse;
        text-align: center;
        gap: 12px;
    }

    /* WhatsApp: above sticky add-to-cart bar, aligned with a11y button */
    .ep-whatsapp-fab {
        bottom: 90px;
        left: 5px;
        width: 58px;
        height: 58px;
    }

    /* Pojo A11Y button: coordinate left position to match WhatsApp */
    .pojo-a11y-toolbar-toggle-link {
        left: 5px !important;
        width: 58px !important;
        height: 58px !important;
    }
}

/* ══════════════════════════════════════════════════════════════════════
   PRINT
   ══════════════════════════════════════════════════════════════════════ */
@media print {
    .ep-footer-beans  { display: none; }
    .ep-footer-overlay { display: none; }
    .ep-footer-bottom { background: none; }
    .ep-whatsapp-fab  { display: none; }
}
