/**
 * shops-directory.css
 * Public /shops directory, styled on the storefront design system
 * (see webroot/ui-kit.html and storefront.css):
 *   Inter type (inherited from body.storefront), --sf-* tokens,
 *   white cards on #EEF2F6, 6-10px radii, subtle shadows, blue/red accents.
 */

.shops-directory {
    position: relative;
    padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(2.5rem, 5vw, 4rem);
    color: var(--sf-text, #3F4B59);
}

/* ── Intro header ── */
.shops-directory__intro {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1240px;
    margin: 0 auto clamp(1.75rem, 3.5vw, 2.75rem);
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--sf-border, #DCE1E7);
}

.shops-directory__eyebrow,
.shop-directory-card__kicker {
    display: block;
    margin-bottom: 0.55rem;
    color: var(--sf-accent, #D03946);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.shops-directory__intro h1 {
    max-width: 760px;
    margin: 0;
    color: var(--sf-text, #3F4B59);
    font-size: clamp(1.9rem, 3.6vw, 3rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
}

.shops-directory__intro p {
    max-width: 650px;
    margin: 0.9rem 0 0;
    color: var(--sf-muted, #8B94A3);
    font-size: clamp(0.95rem, 1.4vw, 1.05rem);
    line-height: 1.65;
}

.shops-directory__count {
    display: grid;
    min-width: 130px;
    text-align: right;
}

.shops-directory__count strong {
    color: var(--sf-primary, #0075B2);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
}

.shops-directory__count span {
    margin-top: 0.3rem;
    color: var(--sf-muted, #8B94A3);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── Grid ── */
.shops-directory__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.1rem, 2.5vw, 1.75rem);
    max-width: 1240px;
    margin: 0 auto;
}

/* ── Card — matches sf-product-card conventions ── */
.shop-directory-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--sf-border, #DCE1E7);
    border-radius: 10px;
    background: var(--sf-card, #FFFFFF);
    box-shadow: var(--sf-shadow, 0 1px 3px rgba(0, 0, 0, 0.06));
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.shop-directory-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

/* ── Body ── */
.shop-directory-card__body {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.15rem 1.35rem 1.35rem;
}

.shop-directory-card__identity h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.shop-directory-card__identity h2 a {
    color: var(--sf-text, #3F4B59);
    text-decoration: none;
    transition: color 0.15s;
}

.shop-directory-card__identity h2 a:hover {
    color: var(--sf-primary, #0075B2);
}

.shop-directory-card__location,
.shop-directory-card__tagline {
    margin: 0.45rem 0 0;
    color: var(--sf-muted, #8B94A3);
    font-size: 0.85rem;
    line-height: 1.45;
}

.shop-directory-card__location i {
    margin-right: 0.3rem;
    color: var(--sf-accent, #D03946);
}

/* Coming-soon notice — sf-beta-notice palette */
.shop-directory-card__notice {
    display: grid;
    gap: 0.2rem;
    margin-top: 1.1rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid #FFECB5;
    border-left: 3px solid #E0A800;
    border-radius: 0 6px 6px 0;
    color: #856404;
    background: #FFF3CD;
}

.shop-directory-card__notice strong {
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.shop-directory-card__notice span,
.shop-directory-card__description {
    font-size: 0.88rem;
    line-height: 1.55;
}

.shop-directory-card__description {
    margin: 1.1rem 0 0;
    color: var(--sf-text, #3F4B59);
    opacity: 0.85;
}

/* Uniform middle zone: notice and description reserve the same height so
   every card matches, even when grid rows wrap and size independently. */
.shop-directory-card__notice,
.shop-directory-card__description {
    min-height: 106px;
}

/* ── Action row: Visit-shop link + owner flag, pinned to the card bottom ── */
.shop-directory-card__action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--sf-border, #DCE1E7);
    /* Match the taller badge variant so cards stay equal with or without badges */
    min-height: 40px;
}

/* Keep breathing room above the separator even on short cards */
.shop-directory-card__identity,
.shop-directory-card__description,
.shop-directory-card__notice {
    margin-bottom: 1.1rem;
}

.shop-directory-card__action {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--sf-primary, #0075B2);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-decoration: none;
    text-transform: uppercase;
}

.shop-directory-card__action span {
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 160ms ease;
}

.shop-directory-card__action:hover {
    color: var(--sf-primary-dark, #005A8B);
    text-decoration: none;
}

.shop-directory-card__action:hover span {
    transform: translateX(4px);
}

.shop-directory-card__badge {
    padding: 0.4rem 0.65rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.shop-directory-card__badge--owned {
    color: #fff;
    background: var(--sf-primary, #0075B2);
}

/* Admin-curated placement. Warm rather than brand-blue so it reads as an
   editorial pick and not as another owner/status chip. */
.shop-directory-card__badge--featured {
    color: #6B4B00;
    background: #FFE9A8;
}

/* A featured card gets a quiet outline so the promotion is legible even where
   the badge scrolls out of view on a narrow card. */
.shop-directory-card--featured {
    border-color: #E9C46A;
    box-shadow: 0 0 0 1px #E9C46A inset;
}

/* ── Empty state ── */
.shops-directory__empty {
    max-width: 760px;
    margin: 2rem auto 0;
    padding: 3.5rem 2rem;
    border: 1px solid var(--sf-border, #DCE1E7);
    border-radius: 10px;
    text-align: center;
    background: var(--sf-card, #FFFFFF);
    box-shadow: var(--sf-shadow, 0 1px 3px rgba(0, 0, 0, 0.06));
}

.shops-directory__empty-mark {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    color: #fff;
    background: var(--sf-accent, #D03946);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.shops-directory__empty h2 {
    margin: 1rem 0 0.5rem;
    color: var(--sf-text, #3F4B59);
    font-weight: 700;
}

.shops-directory__empty p {
    color: var(--sf-muted, #8B94A3);
}

/* Coming-soon cards use the same fixed three-column desktop layout. */
.coming-soon-shops .shops-directory__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .shops-directory__grid,
    .coming-soon-shops .shops-directory__grid {
        grid-template-columns: 1fr;
    }

    .shops-directory__intro {
        display: block;
    }

    .shops-directory__count {
        display: flex;
        align-items: baseline;
        gap: 0.6rem;
        margin-top: 1.25rem;
        text-align: left;
    }

    .shops-directory__count strong {
        font-size: 1.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .shop-directory-card,
    .shop-directory-card__action span {
        transition: none;
    }
}
