/* =========================================================
   /affiliate-products/ LANDING PAGE
   ========================================================= */

/* ---------------------------------------------------------
   Inline Specialty filter menu below the hero image. Each
   taxonomy child owns a real #specialty-{slug} anchor and
   filters the Specialty-only product grid in place.
   --------------------------------------------------------- */

.affiliate-products-shop-menu {
    border-bottom: 1px solid var(--tb-border);
}

.affiliate-products-shop-menu__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
}

.affiliate-products-shop-menu__label {
    color: var(--tb-heading);
    font-size: 14px;
    font-weight: 700;
}

.affiliate-products-shop-menu__options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.affiliate-products-shop-menu__option {
    display: inline-flex;
    padding: 7px 13px;
    color: var(--tb-text);
    border: 1px solid var(--tb-border);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--tb-transition), background var(--tb-transition), border-color var(--tb-transition);
}

.affiliate-products-shop-menu__option:hover,
.affiliate-products-shop-menu__option:focus-visible,
.affiliate-products-shop-menu__option.is-active {
    color: var(--tb-white);
    background: var(--tb-primary);
    border-color: var(--tb-primary);
}

/* ---------------------------------------------------------
   Vintage fashion hero
   --------------------------------------------------------- */

.affiliate-products-hero {
    background: #141414;
    padding: 48px 0;
}

.affiliate-products-hero__inner {
    display: flex;
    align-items: center;
    gap: 48px;
}

.affiliate-products-hero__text {
    flex: 0 1 380px;
}

.affiliate-products-hero__heading {
    margin: 0 0 16px;
    color: var(--tb-white);
    font-size: 40px;
    font-weight: 800;
    line-height: 1.15;
}

.affiliate-products-hero__description {
    margin: 0;
    color: #c7cdd6;
    font-size: 16px;
    line-height: 1.5;
}

.affiliate-products-hero__media {
    flex: 1 1 auto;
    min-width: 0;
}

.affiliate-products-hero__image {
    display: block;
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: var(--tb-radius-large);
}

.affiliate-products-hero__image--placeholder {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a 60%, #262626);
}

/* The widget area is also the slide track: every widget/block added
   in Appearance > Widgets occupies one full hero-width panel. */
.affiliate-products-hero__carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
}

.affiliate-products-hero__banners {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: var(--tb-radius-large);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.affiliate-products-hero__banners::-webkit-scrollbar {
    display: none;
}

.specialty-banner-card {
    position: relative;
    width: 100%;
    height: 100%;
}

.specialty-banner-card__image,
.specialty-banner-card__shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.specialty-banner-card__image {
    object-fit: cover;
}

.specialty-banner-card__shade {
    background: linear-gradient(90deg, rgba(5, 8, 12, 0.82), rgba(5, 8, 12, 0.12) 72%);
}

.specialty-banner-card__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: min(70%, 420px);
    height: 100%;
    padding: clamp(24px, 5vw, 52px);
    color: var(--tb-white);
}

.specialty-banner-card__eyebrow {
    margin: 0 0 8px;
    color: #d9eee9;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.specialty-banner-card__title {
    margin: 0 0 10px;
    color: inherit;
    font-size: clamp(24px, 3vw, 38px);
    line-height: 1.08;
}

.specialty-banner-card__description {
    margin: 0 0 18px;
    line-height: 1.45;
}

.specialty-banner-card__button {
    display: inline-flex;
    padding: 9px 17px;
    color: var(--tb-white);
    background: var(--tb-primary);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.affiliate-products-hero__arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: var(--tb-white);
    background: rgba(0, 0, 0, 0.48);
    border: 0;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transform: translateY(-50%);
}

.affiliate-products-hero__arrow--prev { left: 12px; }
.affiliate-products-hero__arrow--next { right: 12px; }

.affiliate-products-hero__dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    z-index: 3;
    display: flex;
    gap: 7px;
    transform: translateX(-50%);
}

.affiliate-products-hero__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    background: rgba(255, 255, 255, 0.52);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.affiliate-products-hero__dot.is-active {
    width: 22px;
    background: var(--tb-white);
    border-radius: 999px;
}

.affiliate-products-hero__banners > .tebarato-widget {
    min-width: 0;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #202020;
    scroll-snap-align: start;
}

.affiliate-products-hero__banners > .tebarato-widget,
.affiliate-products-hero__banners .wp-block-image,
.affiliate-products-hero__banners .wp-block-cover {
    border-radius: inherit;
}

.affiliate-products-hero__banners .wp-block-image,
.affiliate-products-hero__banners .wp-block-cover,
.affiliate-products-hero__banners .wp-block-image a {
    width: 100%;
    height: 100%;
    margin: 0;
}

.affiliate-products-hero__banners .wp-block-image img,
.affiliate-products-hero__banners .wp-block-cover__image-background {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.affiliate-products-hero__banners .tebarato-widget__title {
    margin: 16px 20px 0;
    color: var(--tb-white);
}

/* ---------------------------------------------------------
   Page body layout - main column (currently empty, see
   page-affiliate-products.php's own comment). Used to be a
   two-column grid with a "Shop by category" sidebar in the
   second column; that sidebar has been removed, so this is
   back to a single column until the next section is designed.
   --------------------------------------------------------- */

.affiliate-products-page__body {
    padding: 40px 0 56px;
}

.affiliate-products-grid-section__empty {
    color: var(--tb-text-light);
}

/* ---------------------------------------------------------
   Product grid (flexbox, not CSS grid - wraps card by card
   rather than snapping to fixed columns) - originally built
   for "Featured products" (removed), now powers the "Shop
   Specialty" section instead. See page-affiliate-products.php.
   --------------------------------------------------------- */

.affiliate-products-grid-section {
    padding: 40px 0 56px;
}

.affiliate-products-grid-section__title {
    margin: 0 0 20px;
    color: var(--tb-heading);
    font-size: 26px;
    font-weight: 800;
}

.affiliate-products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.affiliate-products-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 220px;
    max-width: 280px;
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-medium);
    overflow: hidden;
    background: var(--tb-white);
    transition: box-shadow var(--tb-transition);
}

.affiliate-products-card[hidden] {
    display: none;
}

.affiliate-products-card:hover {
    box-shadow: var(--tb-shadow-medium);
}

.affiliate-products-card__media {
    position: relative;
    aspect-ratio: 1/1;
    background: var(--tb-background-soft);
}

.affiliate-products-card__media-link {
    display: block;
    width: 100%;
    height: 100%;
}

.affiliate-products-card__media img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.affiliate-products-card__media img.is-active {
    position: absolute;
    inset: 0;
    display: block;
}

.affiliate-products-card__media-placeholder {
    display: block;
    width: 100%;
    height: 100%;
}

/* In-card image gallery - prev/next controls only rendered
   (server-side) on cards with more than one photo; see the inline
   script at the bottom of page-affiliate-products.php. */

.affiliate-products-card__gallery-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(20, 20, 20, 0.55);
    color: var(--tb-white);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background var(--tb-transition);
}

.affiliate-products-card__gallery-nav:hover,
.affiliate-products-card__gallery-nav:focus-visible {
    background: rgba(20, 20, 20, 0.8);
}

.affiliate-products-card__gallery-nav--prev {
    left: 8px;
}

.affiliate-products-card__gallery-nav--next {
    right: 8px;
}

.affiliate-products-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 9px;
    background: var(--tb-alert);
    color: var(--tb-white);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.affiliate-products-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px 16px;
}

.affiliate-products-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}

.affiliate-products-card__title a {
    color: var(--tb-heading);
    text-decoration: none;
}

.affiliate-products-card__title a:hover,
.affiliate-products-card__title a:focus-visible {
    color: var(--tb-primary);
}

.affiliate-products-card__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
}

.affiliate-products-card__price-current {
    color: var(--tb-heading);
    font-size: 16px;
    font-weight: 700;
}

.affiliate-products-card__price-regular {
    color: var(--tb-text-light);
    font-size: 13px;
    text-decoration: line-through;
}

.affiliate-products-card__cta {
    display: inline-block;
    margin-top: 4px;
    padding: 9px 16px;
    background: var(--tb-primary);
    color: var(--tb-white);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: background var(--tb-transition);
}

.affiliate-products-card__cta:hover,
.affiliate-products-card__cta:focus-visible {
    background: var(--tb-secondary);
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {
    .affiliate-products-shop-menu__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .affiliate-products-hero__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }

    .affiliate-products-hero__text {
        flex-basis: auto;
    }

    .affiliate-products-hero__heading {
        font-size: 30px;
    }
}
