/* ==========================================================================
   Shop footer (Artemis)

   Mobile-first. Below 768px the three link columns become accordions, the
   contact rows and social icons get 44px tap targets, and the bottom bar
   stacks. Above it, a four-column grid: brand + three link lists.

   Scoped under .am-* so it does not collide with the eshop template CSS —
   note custom.css sets `color: white !important` on every a/p/li under
   `.footer`, which is why the wrapper no longer carries that class.

   Width comes from Bootstrap's .container in the markup (custom.css widens it
   to 1360px above 1400px viewport, 1560px above 1600px); the footer owns
   vertical rhythm only.

   Paired with:
     resources/views/project/layouts/shop/includes/sections/footer.blade.php
   ========================================================================== */

.am-footer {
    --am-footer-bg: #141416;
    --am-footer-bar: #0d0d0e;
    --am-footer-text: #b9b9bd;
    --am-footer-strong: #fff;
    --am-footer-line: rgba(255, 255, 255, .1);

    background: var(--am-footer-bg);
    color: var(--am-footer-text);
    font-size: 14px;
    line-height: 1.6;
}

/* ------------------------------------------------------------- Base ------ */

.am-footer a,
.am-footer a:visited {
    color: var(--am-footer-text);
    text-decoration: none;
    transition: color .18s ease;
}

.am-footer a:hover,
.am-footer a:focus {
    color: var(--am-footer-strong);
}

.am-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Keyboard focus has to stay visible on a dark ground */
.am-footer a:focus-visible,
.am-footer button:focus-visible {
    outline: 2px solid var(--artemis-red, #ff325a);
    outline-offset: 3px;
    border-radius: 3px;
}

/* -------------------------------------------------- Layout (mobile) ------ */

/* Single column by default; the grid arrives at 768px. */
.am-footer__top {
    padding-top: 34px;
    padding-bottom: 8px;
}

/* -------------------------------------------------------- Brand ---------- */

.am-footer__logo {
    display: inline-block;
    margin-bottom: 18px;
}

.am-footer__logo img {
    display: block;
    width: auto;
    height: 38px;
    max-width: 100%;
}

.am-footer__contact {
    margin-bottom: 18px;
}

.am-footer__contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 7px 0;
    font-size: 13.5px;
}

.am-footer__contact i {
    flex: 0 0 16px;
    margin-top: 4px;
    font-size: 14px;
    text-align: center;
    color: var(--artemis-red, #ff325a);
}

/* Phone and email are tapped, not read — give them a real target */
.am-footer__contact a {
    display: inline-block;
    min-height: 30px;
    word-break: break-word;
}

/* -------------------------------------------------------- Social --------- */

.am-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.am-footer__social a,
.am-footer__social a:visited {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--am-footer-line);
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    color: var(--am-footer-strong);
    font-size: 16px;
    transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.am-footer__social a:hover,
.am-footer__social a:focus {
    background: var(--artemis-red, #ff325a);
    border-color: var(--artemis-red, #ff325a);
    color: #fff;
    transform: translateY(-2px);
}

/* ---------------------------------------------- Link columns (mobile) ---- */

/* Below 768px each column is an accordion row with a full-width divider. */
.am-footer__col {
    border-top: 1px solid var(--am-footer-line);
}

.am-footer__coltitle {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

.am-footer__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--artemis-red, #ff325a);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    text-align: left;
    cursor: pointer;
}

.am-footer__caret {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-right: 4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-25%, -25%);
    transition: transform .2s ease;
}

.am-footer__col.is-open .am-footer__caret {
    transform: rotate(225deg) translate(-15%, -15%);
}

/* Collapsed by default on a phone. `display` rather than max-height so the
   links are not tab-reachable while hidden. */
.am-footer__links {
    display: none;
    padding-bottom: 10px;
}

.am-footer__col.is-open .am-footer__links {
    display: block;
}

.am-footer__links a {
    display: block;
    padding: 9px 0;      /* ~40px rows — comfortable to tap, still compact */
    font-size: 13.5px;
}

/* ------------------------------------------------------ Bottom bar ------- */

.am-footer__bottom {
    margin-top: 22px;
    border-top: 1px solid var(--am-footer-line);
    background: var(--am-footer-bar);
}

.am-footer__bottom-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-top: 18px;
    padding-bottom: 18px;
    text-align: center;
}

.am-footer__copy {
    margin: 0;
    font-size: 12.5px;
    color: #8b8b90;
}

.am-footer__copy a {
    color: #8b8b90;
}

.am-footer__payments {
    display: block;
    width: auto;
    max-width: 100%;
    height: 22px;
    opacity: .85;
}

/* --------------------------------------------------------- >= 768px ------ */

@media (min-width: 768px) {
    .am-footer__top {
        display: grid;
        grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
        gap: 0 32px;
        padding-top: 52px;
        padding-bottom: 36px;
    }

    .am-footer__brand {
        padding-right: 24px;
    }

    .am-footer__social {
        margin-bottom: 0;
    }

    /* The accordion chrome is mobile-only: no divider, no caret, always open. */
    .am-footer__col {
        border-top: 0;
    }

    .am-footer__toggle {
        min-height: 0;
        margin-bottom: 14px;
        cursor: default;
        pointer-events: none;
    }

    .am-footer__caret {
        display: none;
    }

    .am-footer__links {
        display: block;
        padding-bottom: 0;
    }

    .am-footer__links a {
        padding: 5px 0;
    }

    .am-footer__bottom {
        margin-top: 0;
    }

    .am-footer__bottom-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }
}

/* At tablet width four columns are cramped — brand spans the full row. */
@media (min-width: 768px) and (max-width: 991px) {
    .am-footer__top {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 34px 28px;
    }

    .am-footer__brand {
        grid-column: 1 / -1;
        padding-right: 0;
        margin-bottom: 4px;
    }
}

/* ------------------------------------------------------- Small phones ---- */

@media (max-width: 400px) {
    .am-footer__top {
        padding-top: 26px;
    }

    .am-footer__logo img {
        height: 32px;
    }

    .am-footer__social a {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .am-footer__payments {
        height: 18px;
    }
}
