/* Lafinda category landing page — Phase 8 */

.category-landing {
    background: #f4f6fa;
    min-height: auto;
}

.category-landing__hero {
    background: linear-gradient(135deg, #0b1b3c 0%, #1a2b4a 100%);
    color: #fff;
    padding: 1rem 0 1.15rem;
}

.category-landing__hero .container {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.category-landing__breadcrumb {
    margin: 0;
    font-size: 0.8125rem;
}

.category-landing__breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
}

.category-landing__breadcrumb .breadcrumb-item a:hover {
    color: #fff;
}

.category-landing__breadcrumb .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.72);
}

.category-landing__breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.45);
}

.category-landing__heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.category-landing__title {
    margin: 0;
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    font-weight: 700;
    line-height: 1.2;
}

.category-landing__meta {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.78);
}

.category-landing__browse-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.category-landing__browse-trigger:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.category-landing__subcategories {
    background: #fff;
    border-bottom: 1px solid #eef0f3;
    padding: 0.85rem 0 1rem;
}

.category-landing__subcategories-title {
    margin: 0 0 0.65rem;
    padding: 0 0.25rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0b1b3c;
}

.category-nav-grid--landing {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem 0.55rem;
    padding: 0;
}

.category-nav-card--landing.is-active {
    background: #fef3e7;
}

.category-nav-card--landing.is-active .category-nav-card__media {
    box-shadow: 0 0 0 2px rgba(254, 106, 7, 0.35);
}

.category-landing__body {
    padding: 0.65rem 0 1.25rem;
}

.category-landing__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.category-landing__toolbar--compact {
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.category-landing__count {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.category-landing__filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.95rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.category-landing__filter-btn:hover {
    border-color: #fe6a07;
    color: #0b1b3c;
}

.category-landing__filters .card {
    border: 1px solid #eef0f3;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(11, 27, 60, 0.06);
}

.category-landing__empty {
    padding: 1.25rem 0.85rem;
    text-align: center;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #eef0f3;
}

.category-landing__empty .empty-state-icon {
    margin-bottom: 0.65rem !important;
}

.category-landing__empty .empty-state-icon i {
    font-size: 2.5rem !important;
}

.category-landing__empty h2 {
    font-size: 1rem;
    margin-bottom: 0.35rem !important;
}

.category-landing__empty p.text-muted {
    font-size: 0.8125rem;
    margin-bottom: 0.85rem !important;
}

.category-landing__related-title {
    margin: 0 0 0.65rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0b1b3c;
}

@media (min-width: 576px) {
    .category-nav-grid--landing {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .category-landing__hero {
        padding: 1.15rem 0 1.35rem;
    }

    .category-nav-grid--landing {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 0.75rem 0.6rem;
    }

    .category-nav-card--landing .category-nav-card__media {
        width: 3.25rem;
        height: 3.25rem;
    }
}

@media (min-width: 992px) {
    .category-nav-grid--landing {
        grid-template-columns: repeat(8, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .category-landing__browse-trigger.d-lg-none {
        display: none !important;
    }
}

@media (min-width: 1200px) {
    .category-nav-grid--landing {
        grid-template-columns: repeat(10, minmax(0, 1fr));
    }
}

/* Product list category touchpoints — Phase 11 */
.category-list--plain {
    background: #f4f6fa;
    min-height: auto;
}

.category-list__header {
    padding: 0.65rem 0 0.25rem;
}

.category-list__heading {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
}

.category-list__intro {
    min-width: 0;
}

.category-list__actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.category-list__title {
    margin: 0;
    font-size: clamp(1.05rem, 3vw, 1.45rem);
    font-weight: 700;
    color: #0b1b3c;
    line-height: 1.15;
}

.category-list__meta {
    margin: 0.2rem 0 0;
    font-size: 0.8125rem;
    color: #6b7280;
}

.category-list__browse-trigger,
.category-list__filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #0b1b3c;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    flex: 1 1 auto;
    min-width: 0;
}

.category-list__filter-btn {
    flex: 0 0 auto;
}

.category-list__browse-trigger:hover,
.category-list__filter-btn:hover {
    border-color: #fe6a07;
    color: #fe6a07;
}

.category-list__chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    margin-bottom: 0.85rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-list__chips::-webkit-scrollbar {
    display: none;
}

.category-list__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex: 0 0 auto;
    padding: 0.35rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    color: #374151;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.category-list__chip:hover {
    border-color: #fe6a07;
    color: #0b1b3c;
}

.category-list__chip.is-active {
    background: #fef3e7;
    border-color: rgba(254, 106, 7, 0.35);
    color: #0b1b3c;
}

.category-list__chip--clear {
    color: #6b7280;
    font-weight: 500;
}

@media (min-width: 576px) {
    .category-list__heading {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 0.75rem 1rem;
    }

    .category-list__actions {
        flex: 0 0 auto;
        flex-wrap: nowrap;
    }

    .category-list__browse-trigger {
        flex: 0 0 auto;
    }
}

/* Marketplace product listing — centred max-width grid (desktop) */
.category-landing__product-container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
}

.category-landing__product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

.category-landing__product-grid > * {
    min-width: 0;
}

@media (min-width: 768px) {
    .category-landing__product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 992px) {
    .category-landing__hero .container {
        max-width: 1240px;
    }

    .category-landing__body {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-top: 1rem;
        padding-bottom: 1.5rem;
    }

    .category-landing__product-container--listing {
        background: #fff;
        border: 1px solid #eef0f3;
        border-radius: 14px;
        padding-top: 1rem;
        padding-bottom: 1.25rem;
        box-shadow: 0 8px 24px rgba(11, 27, 60, 0.05);
    }

    .category-landing__product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (min-width: 1200px) {
    .category-landing__product-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 18px;
    }
}

/* Legacy aliases — keep templates/cache-safe during rollout */
.product-container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
}

.category-landing .product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

.category-landing .product-grid > * {
    min-width: 0;
}

@media (min-width: 768px) {
    .category-landing .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 992px) {
    .category-landing .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (min-width: 1200px) {
    .category-landing .product-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 18px;
    }
}
