/*--------------------------------------------------------------
# Destacados — Featured Events Horizontal Carousel
# A scrollable row of featured event cards displayed on the
# front page between the hero and the main event listing.
#
# @package TicketSystemTango
--------------------------------------------------------------*/


/* ==========================================================================
   §1  SECTION WRAPPER
   Full-bleed dark section with subtle top/bottom borders.
   ========================================================================== */

.tev-destacados {
    background-color: var(--ts-black);
    padding: 48px 0 56px;
    border-top: 1px solid var(--ts-border-color);
    position: relative;
    overflow: hidden;
}

.tev-destacados__inner {
    max-width: min(90vw, 1600px);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px);
}


/* ==========================================================================
   §2  SECTION TITLE
   Playfair Display, gold accent, with a star icon.
   ========================================================================== */

.tev-destacados__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    gap: 16px;
}

.tev-destacados__title {
    font-family: var(--font-headings);
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.tev-destacados__title-icon {
    color: var(--ts-gold);
    font-size: 0.85em;
    line-height: 1;
}

.tev-destacados__title-text {
    color: #ffffff;
}

/* Native browsing controls remain available whenever the rail overflows. */
.tev-destacados__nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tev-destacados__hint {
    margin: -8px 0 16px;
    color: var(--ts-on-surface-muted);
    font-size: var(--ts-fs-sm);
    line-height: var(--ts-lh-normal);
}

.tev-destacados__hint[hidden] {
    display: none;
}

.tev-destacados__nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--ts-border-color);
    background: var(--ts-surface-1);
    color: var(--ts-lightgrey);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color var(--ts-transition-fast) var(--ts-ease-out),
                border-color var(--ts-transition-fast) var(--ts-ease-out),
                color var(--ts-transition-fast) var(--ts-ease-out);
    padding: 0;
    box-shadow: none;
    flex-shrink: 0;
}

.tev-destacados__nav-btn:hover {
    background: var(--ts-surface-4);
    border-color: var(--ts-gold);
    color: var(--ts-gold);
    transform: none;
    box-shadow: none;
}

.tev-destacados__nav-btn:disabled,
.tev-destacados__nav-btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: default;
}

.tev-destacados__nav-btn:focus-visible,
.tev-destacados__track:focus-visible {
    outline: 2px solid var(--ts-gold);
    outline-offset: 3px;
}

.tev-destacados__nav-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}


/* §2b — the card anatomy lives in components/listing-cards.css (.tev-card) */


/* ==========================================================================
   §2c ESTA SEMANA — compact list of the next seven days (Home artboard)
   ========================================================================== */

.tev-week {
    background-color: var(--ts-black);
    padding: 8px 0 40px;
}

.tev-week__inner {
    max-width: min(90vw, 1600px);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px);
}

.tev-week__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.tev-week__title {
    font-family: var(--font-headings);
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    color: var(--ts-gold);
    margin: 0;
}

.tev-week__all {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ts-gold);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px; /* MOE-2-109: tap target + contrast */
    padding: 0 4px;
}

.tev-week__all:hover,
.tev-week__all:focus-visible {
    color: var(--ts-gold);
}

.tev-week__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

@media (min-width: 768px) {
    .tev-week__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .tev-week__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.tev-week__item {
    margin: 0;
    min-width: 0; /* grid items default to min-width:auto and refuse to shrink → text ran past the card on phones */
}

/* Agenda: the image occupies one column; metadata and price share the other.
   Reserving a separate price column clipped dates and names on both devices. */
.tev-week__link {
    display: grid;
    grid-template-columns: var(--ts-thumb-agenda) minmax(0, 1fr);
    align-items: start;
    column-gap: var(--ts-space-3);
    row-gap: 6px;
    min-width: 0;
    min-height: var(--ts-tap);
    padding: var(--ts-space-3);
    border: 1px solid var(--ts-border-color);
    border-radius: 12px;
    background: #191919;
    color: var(--ts-on-surface);
    text-decoration: none;
    transition: border-color var(--ts-transition-fast) var(--ts-ease-out);
}

.tev-week__link:hover,
.tev-week__link:focus-visible {
    border-color: var(--ts-gold);
    color: var(--ts-on-surface);
    opacity: 1;
}

.tev-week__thumb {
    grid-column: 1;
    grid-row: 1 / 3;
    flex: none;
    width: var(--ts-thumb-agenda, 96px);
    height: var(--ts-thumb-agenda, 96px);
    border-radius: var(--ts-radius);
    overflow: hidden;
    background: var(--ts-surface-2);
}

.tev-week__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tev-week__body {
    grid-column: 2;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-family: var(--font-body);
}

.tev-week__name {
    font-size: var(--ts-fs-md);
    font-weight: var(--ts-fw-semibold);
    color: var(--ts-on-surface);
    display: block;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

.tev-week__when {
    order: -1; /* date first, like the cards */
    font-size: var(--ts-fs-sm);
    font-weight: var(--ts-fw-semibold);
    color: var(--ts-gold);
    white-space: normal;
    overflow-wrap: anywhere;
}

/* MOE-3-097: the JS sets [hidden] when every card fits, but display:flex won */
.tev-destacados__nav[hidden] {
    display: none;
}

/* MOE-3-093/099: the event browser had no heading — the page jumped from
   "Esta semana" to a bare PAÍS select */
.ts-event-browser__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.5rem, 1rem + 1.8vw, 2rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px;
    text-wrap: balance;
}

/* MOE-3-096 / MOE-4-103: the country select was a 56px pill next to 44px
   square chips — country-selector.css pins the inline variant to 56px/999px
   with, so this has to shout too (until the S4b sweep) */
.ts-event-browser .tev-country-selector--inline .tev-country-selector__select,
.ts-event-browser .tev-country-selector__select {
    height: 44px;
    min-height: 44px;
    padding-top: 0;
    padding-bottom: 0;
    border-radius: 4px;
    background-color: #232323;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.9rem;
}

/* MOE-3-053: no orphaned "pasos." on the empty-cart line */
.tev-empty-cart__text,
.tev-empty-cart p {
    text-wrap: pretty;
}

.tev-week__venue {
    font-size: var(--ts-fs-sm);
    color: var(--ts-on-surface-muted);
    white-space: normal;
    overflow-wrap: anywhere;
}

/* Price: muted, never the loudest thing on the row */
.tev-week__price {
    grid-column: 2;
    flex: none;
    font-family: var(--font-body);
    font-size: var(--ts-fs-sm);
    font-weight: var(--ts-fw-regular);
    color: var(--ts-mediumgrey-text);
    white-space: nowrap;
}

.tev-week__price .woocommerce-Price-amount,
.tev-week__price bdi {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}


/* ==========================================================================
   §2d CARD GRID + EMPTY CART (MOE-1-011): the same event card in a grid
   ========================================================================== */

.tev-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 640px) {
    .tev-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .tev-card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.tev-card-grid .tev-destacados__card {
    width: auto;
    min-width: 0;
    flex: none;
}

.tev-empty-cart {
    max-width: calc(var(--ts-container) - 2 * var(--ts-gutter));
    margin-inline: auto;
    padding: 8px 0 32px;
}

.tev-empty-cart__panel {
    max-width: 560px;
    margin: 0 auto 36px;
    padding: 28px 20px;
    text-align: center;
    border: 1px solid var(--ts-border-color);
    border-radius: 12px;
    background: var(--ts-surface-1, #1a1a1a);
}

.tev-empty-cart__title {
    font-family: var(--font-headings);
    font-size: clamp(1.5rem, 3vw, 1.75rem);
    color: #ffffff;
    margin: 0 0 8px;
}

.tev-empty-cart__copy {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--ts-mediumgrey-text, rgba(255, 255, 255, 0.6));
    margin: 0 0 18px;
}

/* Qualified to (0,2,1): Storefront's .hentry .entry-content a paints underline
   at the same specificity — this sheet loads later, so the tie goes to us (S4b). */
.tev-empty-cart a.tev-empty-cart__cta,
.tev-empty-cart__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 28px;
    border-radius: 6px;
    background: var(--ts-gold);
    color: var(--ts-black);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}

.tev-empty-cart__cta:hover,
.tev-empty-cart__cta:focus-visible {
    background: #E8C37E;
}

.tev-empty-cart__heading {
    font-family: var(--font-headings);
    font-size: clamp(1.25rem, 2.5vw, 1.6rem);
    color: var(--ts-gold);
    margin: 0 0 16px;
}


/* ==========================================================================
   §3  SCROLL TRACK
   Horizontal overflow with snap points and hidden scrollbar.
   ========================================================================== */

.tev-destacados__track-wrapper {
    position: relative;
}

.tev-destacados__track {
    display: flex;
    gap: var(--ts-space-6);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding-bottom: 8px; /* breathing room for shadow overflow */

    /* Hide scrollbar — all browsers */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.tev-destacados__track::-webkit-scrollbar {
    display: none; /* Chrome / Safari */
}

/* A partial next cover and the explicit controls replace text-obscuring fades. */
@media (max-width: 599px) {
    .tev-destacados__track {
        gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tev-destacados__track {
        scroll-behavior: auto;
    }
}

/* ==========================================================================
   §4  EVENT CARD — components/listing-cards.css (.tev-card, visual system
   2026-09): cover 1:1 · date · title · venue · price; rail widths there too.
   ========================================================================== */


/* ==========================================================================
   §5  RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 768px) {
    .tev-destacados {
        padding: 36px 0 42px;
    }

    .tev-destacados__inner {
        max-width: 100%;
        padding: 0 clamp(12px, 4vw, 24px);
    }

    .tev-destacados__header {
        margin-bottom: 20px;
    }

    .tev-week__link {
        grid-template-columns: 80px minmax(0, 1fr);
    }

    .tev-week__thumb {
        width: 80px;
        height: 80px;
    }
}

/* The phone page wrapper owns the gutter; nested section wrappers must not
   shrink the weekly rows or offset the catalogue controls a second time. */
@media (max-width: 767px) {
    .home .tev-week__inner,
    .home .tev-destacados__inner,
    .home .ts-event-browser > .col-full {
        box-sizing: border-box;
        width: 100%;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }
}


/* Desktop sections align with the catalogue, without a second inset. */
@media (min-width: 1024px) {
    .home .ts-event-browser {
        scroll-margin-top: calc(var(--ts-header-h) + var(--ts-space-4));
    }

    .home .tev-destacados__inner,
    .home .tev-week__inner,
    .home .ts-event-browser > .col-full {
        width: 100%;
        max-width: none;
        margin: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .home .tev-destacados {
        padding-top: var(--ts-space-8);
        padding-bottom: var(--ts-space-8);
    }

    .tev-week__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--ts-space-4);
    }

    /* The footer already opens with the shared section gap; a bottom pad here doubled it (MOE-6-172/178). */
    .home .ts-newsletter {
        padding: var(--ts-space-16) 0 0;
    }

    .home .ts-newsletter__inner {
        max-width: 720px;
    }

    .home .ts-newsletter__title {
        margin-bottom: var(--ts-space-8);
        font-size: var(--ts-fs-2xl);
        letter-spacing: 0;
        text-transform: none;
    }

    .home .ts-newsletter__wrapper {
        padding: var(--ts-space-8);
    }
}
