/*
 * amp-archive.css — Artist Marketplace archive/category page styles
 * Loaded ONLY on archive + category pages, at priority 999 (after Elementor).
 * Uses body-class selectors for specificity; !important only where Elementor
 * is known to interfere.
 *
 * Covers:
 *   - Filter bar
 *   - Category banner / Swiper slider
 *   - Artist card grid (horizontal card layout)
 *   - Responsive breakpoints
 */

/* ─── Scope: every selector is prefixed with the WP body classes
       that Elementor/Hello theme cannot remove ───────────────────────── */

/* ════════════════════════════════════════════════════════════
   1. PAGE WRAPPER
════════════════════════════════════════════════════════════ */

.post-type-archive-artist_profile .amp-page,
.tax-artist_category .amp-page,
.tax-artist_city .amp-page {
    max-width: 1220px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 24px 16px 64px !important;
    color: #eaf2ff !important;
    box-sizing: border-box;
}

.post-type-archive-artist_profile .amp-archive-container,
.tax-artist_category .amp-archive-container,
.tax-artist_city .amp-archive-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}

.post-type-archive-artist_profile .amp-archive-container > h1,
.tax-artist_category .amp-archive-container > h1,
.tax-artist_city .amp-archive-container > h1 {
    color: #fff !important;
    font-size: clamp(28px, 4vw, 48px) !important;
    line-height: 1.1 !important;
    margin: 0 0 4px 0 !important;
}

/* ════════════════════════════════════════════════════════════
   2. FILTER BAR
════════════════════════════════════════════════════════════ */

.post-type-archive-artist_profile .amp-archive-filters,
.tax-artist_category .amp-archive-filters,
.tax-artist_city .amp-archive-filters {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr auto !important;
    gap: 10px !important;
    align-items: center;
    background: rgba(7, 18, 40, 0.92) !important;
    border: 1px solid rgba(59, 130, 246, 0.28) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 16px !important;
    padding: 12px 16px !important;
    position: sticky;
    top: 10px;
    z-index: 30;
    box-sizing: border-box;
}

.post-type-archive-artist_profile .amp-archive-filters select,
.post-type-archive-artist_profile .amp-archive-filters input,
.tax-artist_category .amp-archive-filters select,
.tax-artist_category .amp-archive-filters input,
.tax-artist_city .amp-archive-filters select,
.tax-artist_city .amp-archive-filters input {
    width: 100% !important;
    background: #0d1f3c !important;
    color: #eaf2ff !important;
    border: 1px solid rgba(148, 163, 184, 0.3) !important;
    border-radius: 10px !important;
    min-height: 42px !important;
    padding: 0 10px !important;
    font-size: 14px;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.post-type-archive-artist_profile .amp-archive-filters select option,
.tax-artist_category .amp-archive-filters select option,
.tax-artist_city .amp-archive-filters select option {
    background: #0d1f3c;
    color: #eaf2ff;
}

.post-type-archive-artist_profile .amp-archive-filters .amp-archive-btn,
.tax-artist_category .amp-archive-filters .amp-archive-btn,
.tax-artist_city .amp-archive-filters .amp-archive-btn {
    min-height: 42px !important;
    padding: 0 20px !important;
    white-space: nowrap;
    align-self: stretch;
}

/* ════════════════════════════════════════════════════════════
   3. CATEGORY BANNER SLIDER
════════════════════════════════════════════════════════════ */

.post-type-archive-artist_profile .amp-category-banner-wrap,
.tax-artist_category .amp-category-banner-wrap,
.tax-artist_city .amp-category-banner-wrap {
    display: block !important;
    width: 100% !important;
}

.post-type-archive-artist_profile .amp-category-banner-slider,
.tax-artist_category .amp-category-banner-slider,
.tax-artist_city .amp-category-banner-slider {
    display: block !important;
    width: 100% !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    border: 1px solid rgba(96, 165, 250, 0.22) !important;
    /* Explicit height prevents Swiper collapse before images load */
    min-height: 200px;
    background: #060e20;
}

.post-type-archive-artist_profile .amp-category-banner-slider .swiper-wrapper,
.tax-artist_category .amp-category-banner-slider .swiper-wrapper,
.tax-artist_city .amp-category-banner-slider .swiper-wrapper {
    align-items: stretch;
}

.post-type-archive-artist_profile .amp-category-banner-slider .swiper-slide,
.tax-artist_category .amp-category-banner-slider .swiper-slide,
.tax-artist_city .amp-category-banner-slider .swiper-slide {
    background: transparent;
    line-height: 0; /* removes gap under img */
}

.post-type-archive-artist_profile .amp-category-banner-img,
.tax-artist_category .amp-category-banner-img,
.tax-artist_city .amp-category-banner-img {
    display: block !important;
    width: 100% !important;
    height: clamp(190px, 28vw, 340px) !important;
    object-fit: cover !important;
    object-position: center top;
    /* Override lazy-loading collapse: give it explicit dimensions */
    min-height: 190px;
}

/* Swiper pagination dots */
.post-type-archive-artist_profile .amp-category-banner-slider .swiper-pagination-bullet,
.tax-artist_category .amp-category-banner-slider .swiper-pagination-bullet,
.tax-artist_city .amp-category-banner-slider .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.post-type-archive-artist_profile .amp-category-banner-slider .swiper-pagination-bullet-active,
.tax-artist_category .amp-category-banner-slider .swiper-pagination-bullet-active,
.tax-artist_city .amp-category-banner-slider .swiper-pagination-bullet-active {
    background: #fff;
}

/* ════════════════════════════════════════════════════════════
   4. ARTIST CARD GRID
════════════════════════════════════════════════════════════ */

.post-type-archive-artist_profile .amp-archive-grid,
.tax-artist_category .amp-archive-grid,
.tax-artist_city .amp-archive-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ════════════════════════════════════════════════════════════
   5. ARTIST CARD  (horizontal: image-left / info-right)
   Uses .amp-arc-card on the element to avoid article/hentry theme resets
════════════════════════════════════════════════════════════ */

.post-type-archive-artist_profile .amp-archive-card,
.tax-artist_category .amp-archive-card,
.tax-artist_city .amp-archive-card {
    /* Reset anything the theme or Elementor might set on <article> */
    all: unset;
    /* Now apply our layout */
    display: grid !important;
    grid-template-columns: 200px minmax(0, 1fr) !important;
    grid-template-rows: 1fr !important;
    align-items: stretch !important;
    background: linear-gradient(110deg, #060e20 0%, #0e1e38 100%) !important;
    border: 1px solid rgba(96, 165, 250, 0.22) !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box !important;
    min-height: 220px;
    width: 100% !important;
    position: relative;
}

.post-type-archive-artist_profile .amp-archive-card:hover,
.tax-artist_category .amp-archive-card:hover,
.tax-artist_city .amp-archive-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(59, 130, 246, 0.18) !important;
}

/* Image link wrapper — must fill the left column */
.post-type-archive-artist_profile .amp-archive-card > a,
.tax-artist_category .amp-archive-card > a,
.tax-artist_city .amp-archive-card > a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    line-height: 0;
    float: none !important;
    flex: none !important;
}

/* Thumbnail — fills the image column fully */
.post-type-archive-artist_profile .amp-archive-thumb,
.tax-artist_category .amp-archive-thumb,
.tax-artist_city .amp-archive-thumb {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 220px !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    object-position: center top;
    float: none !important;
    max-width: none !important;
}

/* Content panel — right column */
.post-type-archive-artist_profile .amp-archive-content,
.tax-artist_category .amp-archive-content,
.tax-artist_city .amp-archive-content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 18px 20px !important;
    box-sizing: border-box;
    min-width: 0; /* prevent overflow in grid cell */
    overflow: hidden;
}

/* Artist name */
.post-type-archive-artist_profile .amp-archive-content h3,
.tax-artist_category .amp-archive-content h3,
.tax-artist_city .amp-archive-content h3 {
    color: #ffffff !important;
    font-size: clamp(16px, 1.5vw, 22px) !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge */
.post-type-archive-artist_profile .amp-package-badge,
.tax-artist_category .amp-package-badge,
.tax-artist_city .amp-package-badge {
    display: inline-block !important;
    background: #fef3c7 !important;
    color: #92400e !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 3px 10px !important;
    width: fit-content !important;
    line-height: 1.4;
}

/* Meta list (duration / language / city) */
.post-type-archive-artist_profile .amp-artist-meta,
.tax-artist_category .amp-artist-meta,
.tax-artist_city .amp-artist-meta {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    color: #b8d0f8 !important;
    font-size: 12px !important;
}

.post-type-archive-artist_profile .amp-artist-meta li,
.tax-artist_category .amp-artist-meta li,
.tax-artist_city .amp-artist-meta li {
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Price */
.post-type-archive-artist_profile .amp-archive-price,
.tax-artist_category .amp-archive-price,
.tax-artist_city .amp-archive-price {
    color: #a8c4f0 !important;
    font-size: 13px !important;
    margin: 0 !important;
}

.post-type-archive-artist_profile .amp-archive-price strong,
.tax-artist_category .amp-archive-price strong,
.tax-artist_city .amp-archive-price strong {
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

/* CTA row */
.post-type-archive-artist_profile .amp-card-cta-row,
.tax-artist_category .amp-card-cta-row,
.tax-artist_city .amp-card-cta-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
    margin-top: auto !important;
    padding-top: 8px;
}

.post-type-archive-artist_profile .amp-card-cta-row .amp-archive-btn,
.tax-artist_category .amp-card-cta-row .amp-archive-btn,
.tax-artist_city .amp-card-cta-row .amp-archive-btn {
    flex: 1 1 0 !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 9px 10px !important;
    font-size: 13px !important;
    white-space: nowrap;
    border-radius: 35px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-block !important;
}

.post-type-archive-artist_profile .amp-card-cta-row .amp-book-now-btn,
.tax-artist_category .amp-card-cta-row .amp-book-now-btn,
.tax-artist_city .amp-card-cta-row .amp-book-now-btn {
    background: linear-gradient(90deg, #fb673a, #ff2f86) !important;
}

/* ════════════════════════════════════════════════════════════
   6. RESPONSIVE BREAKPOINTS
════════════════════════════════════════════════════════════ */

/* Tablet landscape — single column grid, keep horizontal card */
@media (max-width: 1100px) {
    .post-type-archive-artist_profile .amp-archive-filters,
    .tax-artist_category .amp-archive-filters,
    .tax-artist_city .amp-archive-filters {
        grid-template-columns: 1fr 1fr 1fr auto !important;
    }

    .post-type-archive-artist_profile .amp-archive-grid,
    .tax-artist_category .amp-archive-grid,
    .tax-artist_city .amp-archive-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .post-type-archive-artist_profile .amp-archive-filters,
    .tax-artist_category .amp-archive-filters,
    .tax-artist_city .amp-archive-filters {
        grid-template-columns: 1fr 1fr !important;
        position: static; /* unstick on mobile */
    }

    .post-type-archive-artist_profile .amp-archive-card,
    .tax-artist_category .amp-archive-card,
    .tax-artist_city .amp-archive-card {
        grid-template-columns: 160px minmax(0, 1fr) !important;
    }
}

/* Mobile — stack card vertically */
@media (max-width: 560px) {
    .post-type-archive-artist_profile .amp-archive-filters,
    .tax-artist_category .amp-archive-filters,
    .tax-artist_city .amp-archive-filters {
        grid-template-columns: 1fr !important;
    }

    .post-type-archive-artist_profile .amp-archive-filters .amp-archive-btn,
    .tax-artist_category .amp-archive-filters .amp-archive-btn,
    .tax-artist_city .amp-archive-filters .amp-archive-btn {
        width: 100% !important;
        text-align: center !important;
    }

    .post-type-archive-artist_profile .amp-archive-card,
    .tax-artist_category .amp-archive-card,
    .tax-artist_city .amp-archive-card {
        grid-template-columns: 1fr !important;
        min-height: auto;
    }

    .post-type-archive-artist_profile .amp-archive-thumb,
    .tax-artist_category .amp-archive-thumb,
    .tax-artist_city .amp-archive-thumb {
        min-height: 210px !important;
        height: 210px !important;
    }

    .post-type-archive-artist_profile .amp-card-cta-row,
    .tax-artist_category .amp-card-cta-row,
    .tax-artist_city .amp-card-cta-row {
        flex-direction: column !important;
    }

    .post-type-archive-artist_profile .amp-category-banner-img,
    .tax-artist_category .amp-category-banner-img,
    .tax-artist_city .amp-category-banner-img {
        height: clamp(140px, 48vw, 220px) !important;
        min-height: 140px !important;
    }
}
