/* =====================================================================
   Explore Recipes — /discover/recipes/
   Range pills, goal collections, image recipe cards, heart button.
   ===================================================================== */

:root {
    --ex-black:       #0E0E0E;
    --ex-surface:     #161616;
    --ex-card:        #141414;
    --ex-gold:        #E8B400;
    --ex-deep-gold:   #C99700;
    --ex-bone:        #F5F3EE;
    --ex-steel:       #9A9A9A;
    --ex-border:      rgba(255, 255, 255, 0.06);
}

/* --- Page wrapper --- */
.ex-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    color: var(--ex-bone);
    font-family: 'Space Grotesk', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    background: var(--ex-black);
}

/* =====================================================================
   FILTER BAR (range pills + search + sort)
   ===================================================================== */
.ex-filter-bar {
    padding-top: 56px;
}

/* Range pills — Beast product lines */
.ex-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 44px;
}
.ex-pill {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--ex-steel);
    padding: 11px 18px;
    font-family: 'Space Grotesk', Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.ex-pill:hover {
    color: var(--ex-bone);
    border-color: rgba(255, 255, 255, 0.32);
}
.ex-pill.active {
    background: var(--ex-bone);
    color: var(--ex-black);
    border-color: var(--ex-bone);
}

/* Search + sort row */
.ex-search-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 52px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ex-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 13px 18px;
    flex: 1;
    max-width: 440px;
}
.ex-search-icon {
    width: 16px;
    height: 16px;
    color: var(--ex-steel);
    flex-shrink: 0;
    stroke-width: 1.5;
}
.ex-search-input {
    background: transparent;
    border: none;
    color: var(--ex-bone);
    font-family: 'Space Grotesk', Arial, sans-serif;
    font-size: 14px;
    outline: none;
    width: 100%;
}
.ex-search-input::placeholder { color: var(--ex-steel); }

.ex-sort-select {
    background: var(--ex-black);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--ex-bone);
    padding: 13px 36px 13px 18px;
    font-family: 'Space Grotesk', Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23E8B400' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.ex-sort-select option { background: var(--ex-black); color: var(--ex-bone); }

/* =====================================================================
   GOAL COLLECTIONS
   ===================================================================== */
.ex-collections { margin-bottom: 72px; }

.ex-collections-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    color: var(--ex-steel);
    margin-bottom: 22px;
}
.ex-collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}
.ex-collection {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 26px 22px;
    cursor: pointer;
    transition: all 0.25s;
    background: transparent;
    text-decoration: none;
    display: block;
}
.ex-collection:hover  { border-color: var(--ex-gold); background: rgba(232,180,0,0.04); }
.ex-collection.active { border-color: var(--ex-gold); background: rgba(232,180,0,0.06); }

.ex-collection-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--ex-gold);
    margin-bottom: 10px;
}
.ex-collection-name {
    font-family: 'Anton', 'Impact', sans-serif;
    font-size: 26px;
    text-transform: uppercase;
    letter-spacing: 0.015em;
    color: var(--ex-bone);
    line-height: 1;
}

/* =====================================================================
   RECIPE GRID — image cards
   ===================================================================== */
.ex-recipes-section { margin-bottom: 80px; }

.ex-recipes-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 32px;
}
.ex-recipes-count {
    font-size: 11px;
    color: var(--ex-steel);
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-weight: 600;
}

.ex-recipe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ── Card ── */
.ex-recipe-card {
    background: var(--ex-card);
    border: 1px solid var(--ex-border);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: border-color 0.25s, transform 0.25s;
    position: relative;
    overflow: hidden;
}
.ex-recipe-card:hover {
    border-color: var(--ex-gold);
    transform: translateY(-3px);
}

/* Gold corner brackets on hover */
.ex-recipe-card::before,
.ex-recipe-card::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid var(--ex-gold);
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
    z-index: 2;
}
.ex-recipe-card::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.ex-recipe-card::after  { bottom: 8px; right: 8px; border-left: none; border-top: none; }
.ex-recipe-card:hover::before,
.ex-recipe-card:hover::after { opacity: 1; }

/* ── Card image ── */
.ex-card-img-wrap {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1a1a;
}
.ex-card-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.ex-recipe-card:hover .ex-card-img { transform: scale(1.04); }

/* Placeholder when no image */
.ex-card-img-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1c1a14 0%, #0e0e0e 100%);
}
.ex-card-ph-icon {
    width: 40px;
    height: 40px;
    color: rgba(232,180,0,0.25);
    stroke-width: 1;
}

/* ── Card body ── */
.ex-card-body {
    padding: 28px 26px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ex-recipe-range {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    color: var(--ex-gold);
    margin-bottom: 16px;
}
.ex-card-title-link {
    text-decoration: none;
    color: inherit;
}
.ex-recipe-title {
    font-family: 'Anton', 'Impact', sans-serif;
    font-size: 32px;
    line-height: 0.92;
    text-transform: uppercase;
    color: var(--ex-bone);
    letter-spacing: 0.005em;
    flex-grow: 1;
    margin-bottom: 0;
}
.ex-recipe-divider {
    width: 32px;
    height: 2px;
    background: var(--ex-gold);
    margin: 22px 0 14px;
    flex-shrink: 0;
}
.ex-recipe-meta {
    font-size: 11px;
    color: var(--ex-steel);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 20px;
}
.ex-recipe-meta strong { color: var(--ex-bone); font-weight: 600; }

.ex-recipe-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--ex-border);
    margin-top: auto;
}
.ex-recipe-time {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ex-bone);
    font-weight: 600;
    letter-spacing: 0.06em;
}
.ex-clock-icon {
    width: 14px;
    height: 14px;
    stroke-width: 1.5;
    flex-shrink: 0;
}

/* ── Heart / like button ── */
.ex-heart-btn {
    background: transparent;
    border: none;
    color: var(--ex-steel);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.15s;
    flex-shrink: 0;
}
.ex-heart-btn:hover { color: var(--ex-gold); transform: scale(1.15); }
.ex-heart-btn.liked { color: var(--ex-gold); }
.ex-heart-btn.liked .ex-heart-icon { fill: var(--ex-gold); }

.ex-heart-icon {
    width: 18px;
    height: 18px;
    stroke-width: 1.75;
    transition: fill 0.2s;
}

/* Empty state */
.ex-no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--ex-steel);
    grid-column: 1 / -1;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* =====================================================================
   GOLD BANNER
   ===================================================================== */
.ex-banner {
    background: var(--ex-gold);
    color: var(--ex-black);
    padding: 72px 40px;
    margin: 0 -40px;
    text-align: center;
}
.ex-banner-inner { max-width: 800px; margin: 0 auto; }
.ex-banner-title {
    font-family: 'Anton', 'Impact', sans-serif;
    font-size: clamp(36px, 6vw, 60px);
    line-height: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.008em;
    margin-bottom: 18px;
}
.ex-banner-sub {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.32em;
    font-weight: 600;
}

/* =====================================================================
   BACK LINK
   ===================================================================== */
.ex-back-wrap { padding: 56px 0 96px; }
.ex-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ex-steel);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    transition: color 0.2s;
}
.ex-back-link:hover { color: var(--ex-gold); }
.ex-back-icon { width: 16px; height: 16px; stroke-width: 1.75; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1100px) {
    .ex-recipe-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .ex-page          { padding: 0 24px; }
    .ex-filter-bar    { padding-top: 36px; }
    .ex-recipe-grid   { grid-template-columns: 1fr; }
    .ex-collections-grid { grid-template-columns: repeat(2, 1fr); }
    .ex-search-row    { flex-direction: column; align-items: stretch; }
    .ex-search-box    { max-width: none; }
    .ex-banner        { padding: 52px 24px; margin: 0 -24px; }
    .ex-banner-title  { font-size: 36px; }
}
