/* ==========================================================================
   Store-location page. Loaded only by front_end/stores_location/index.blade.php.
   Tokens come from css/design-system.css. Mobile-first: every query is min-width.

   The design's "Available shops": one card per outlet, two up from 901px —
   photo, name and address, contact pills, the order button, and the outlet's
   map across the foot — then the Get in Touch card.
   ========================================================================== */

.dh-shops {
    background: var(--dh-surface-sunken);
    font-family: var(--dh-font);
    color: var(--dh-text-primary);
}

.dh-shops__inner {
    padding-block: clamp(56px, 6vw, 96px);
}

/* .dh-section-title runs at 0.95 line-height, so the gap needs to be explicit. */
.dh-shops__title {
    margin: 0 0 clamp(32px, 4vw, 52px);
}

.dh-shops__empty {
    margin: 0;
    padding-block: clamp(24px, 4vw, 48px);
    text-align: center;
    font: var(--dh-weight-semibold) clamp(17px, 2vw, 21px)/1.5 var(--dh-font);
    color: var(--dh-text-secondary);
}

.dh-shops__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(22px, 2.6vw, 40px);
}

@media (min-width: 901px) {
    .dh-shops__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.dh-shops__pagination {
    display: flex;
    justify-content: center;
    margin-top: clamp(28px, 4vw, 44px);
}

/* --------------------------------------------------------------------------
   Outlet card
   -------------------------------------------------------------------------- */

/* Safe to lift on hover: the opening-times dialogs it opens are rendered by
   the footer, outside the card, so no transformed ancestor traps them. */
.dh-shop {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--dh-surface-card);
    border: 1px solid var(--dh-border-subtle);
    border-radius: var(--dh-radius-card);
    box-shadow: var(--dh-shadow-card);
    transition: transform var(--dh-duration-base) var(--dh-ease),
        box-shadow var(--dh-duration-base) var(--dh-ease);
}

.dh-shop:hover {
    transform: translateY(-2px);
    box-shadow: var(--dh-shadow-hover);
}

.dh-shop__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: clamp(22px, 2.2vw, 30px) clamp(20px, 2vw, 28px) clamp(20px, 2vw, 26px);
    text-align: center;
}

/* Outlet artwork is a logo as often as a photograph, and the ones on S3 are all
   different shapes. Both axes are capped and neither is forced, so a small logo
   is never blown up and a tall one never pushes the details off screen. */
.dh-shop__photo {
    width: auto;
    height: auto;
    max-width: min(100%, 400px);
    max-height: 200px;
    margin-bottom: 10px;
    border-radius: var(--dh-radius-card);
}

.dh-shop__name {
    margin: 0;
    font: var(--dh-weight-bold) clamp(24px, 2vw, 30px)/1.15 var(--dh-font);
    letter-spacing: var(--dh-tracking-tight);
    color: var(--dh-text-brand);
}

.dh-shop__address {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    font: var(--dh-weight-regular) 15px/1.4 var(--dh-font);
    color: var(--dh-text-secondary);
}

.dh-shop__address-icon {
    flex: none;
    width: 16px;
    height: 16px;
}

.dh-shop__contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

/* Tap targets first, decoration second: 44px tall, where the design has 40px.
   The tint is for :focus-visible, not :focus: the opening-times dialog hands
   focus back to its pill when it closes, which left a mouse user's pick lit. */
.dh-shop__pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 16px;
    background: var(--dh-surface-sunken);
    border: 1px solid var(--dh-border-subtle);
    border-radius: var(--dh-radius-pill);
    font: var(--dh-weight-semibold) 14px/1 var(--dh-font);
    color: var(--dh-text-primary);
    /* A number is published in groups; it must never break across them. */
    white-space: nowrap;
    cursor: pointer;
    transition: background-color var(--dh-duration-fast) var(--dh-ease),
        border-color var(--dh-duration-fast) var(--dh-ease),
        color var(--dh-duration-fast) var(--dh-ease);
}

.dh-shop__pill svg {
    flex: none;
    width: 15px;
    height: 15px;
    color: var(--dh-text-brand);
}

.dh-shop__pill:hover,
.dh-shop__pill:focus-visible {
    background: var(--dh-red-50);
    border-color: var(--dh-red-500);
    color: var(--dh-red-600);
    text-decoration: none;
}

/* Bootstrap's reboot rings a focused <button> after a mouse click too; the
   ring comes back for the keyboard below. */
.dh-shop__pill:focus {
    outline: none;
}

.dh-shop__pill:focus-visible {
    outline: 2px solid var(--dh-red-500);
    outline-offset: 2px;
}

.dh-shop__order {
    margin-top: 10px;
    white-space: nowrap;
}

.dh-shop__order svg {
    flex: none;
    width: 18px;
    height: 18px;
}

/* Pinned to the foot, so the maps of two cards side by side line up however
   much artwork each card carries. */
.dh-shop__map {
    width: 100%;
    height: clamp(260px, 24vw, 340px);
    margin-top: auto;
    background: var(--dh-surface-sunken);
}

/* Google paints its own type inside the info window; keep it in the brand face. */
.dh-shops .dh-map-info {
    max-width: 240px;
    font: var(--dh-weight-regular) 14px/1.5 var(--dh-font);
    color: var(--dh-ink-800);
}

.dh-shops .dh-map-info strong {
    display: block;
    font-weight: var(--dh-weight-bold);
    color: var(--dh-text-brand);
}
