/* Listing Intelligence — quick filter UX (3.6.9) */

.aef-intel-wrapper {
    margin: 1.5rem 0;
    box-sizing: border-box;
    max-width: 100%;
}

.aef-intel-wrapper--wide {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: clamp(0.75rem, 2vw, 1.5rem);
    padding-right: clamp(0.75rem, 2vw, 1.5rem);
}

.aef-intel-wrapper--contained {
    width: 100%;
    max-width: 100%;
}

.aef-intel-summary {
    margin: 0 0 1rem;
    color: #555;
    font-size: 0.92rem;
    line-height: 1.45;
}

.aef-intel-summary__counts {
    color: #222;
    font-weight: 700;
}

/* Filter bar */
.aef-intel-filter-bar {
    margin: 0 0 0.85rem;
    padding: 0.75rem 0.85rem;
    background: #f8f9fb;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
}

.aef-intel-filter-toggle {
    display: none;
    width: 100%;
    padding: 0.65rem 1rem;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    background: #fff;
    font-weight: 600;
    cursor: pointer;
}

.aef-intel-filter-panel {
    display: block;
}

.aef-intel-filter-panel.is-open {
    display: block;
}

.aef-intel-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.aef-intel-filter-group {
    flex: 1 1 130px;
    min-width: 0;
}

.aef-intel-filter-group--search {
    flex: 2 1 200px;
}

.aef-intel-filter-group--price {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 1.5 1 200px;
}

.aef-intel-price-field {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 90px;
    min-width: 0;
}

.aef-intel-price-field__prefix {
    position: absolute;
    left: 0.65rem;
    color: #666;
    font-size: 0.92rem;
    pointer-events: none;
    z-index: 1;
}

.aef-intel-filter-input,
.aef-intel-filter-select {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    font-size: 0.88rem;
    background: #fff;
    box-sizing: border-box;
}

.aef-intel-filter-input--price {
    padding-left: 1.55rem;
}

.aef-intel-price-separator {
    color: #888;
    flex: 0 0 auto;
}

.aef-intel-filter-status {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.aef-intel-filter-status[hidden] {
    display: none !important;
}

/* Buttons */
.aef-intel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    box-sizing: border-box;
}

.aef-intel-btn--primary {
    background: #0064d2;
    color: #fff;
    border-color: #0056b8;
}

.aef-intel-btn--primary:hover,
.aef-intel-btn--primary:focus {
    background: #0056b8;
    color: #fff;
}

.aef-intel-btn--secondary {
    background: #fff;
    color: #1a1a1a;
    border-color: #cfd8e3;
}

.aef-intel-btn--ghost {
    background: transparent;
    color: #444;
    border-color: #cfd8e3;
}

.aef-intel-browse-actions,
.aef-intel-section__actions {
    margin-top: 0.85rem;
    text-align: center;
}

.aef-intel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1rem;
    color: #666;
}

.aef-intel-loading[hidden] {
    display: none !important;
}

.aef-intel-loading__spinner {
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid #ddd;
    border-top-color: #0064d2;
    border-radius: 50%;
    animation: aef-intel-spin 0.8s linear infinite;
}

@keyframes aef-intel-spin {
    to { transform: rotate(360deg); }
}

/* Sections */
.aef-intel-section {
    margin: 1.75rem 0;
}

.aef-intel-section__header {
    margin-bottom: 0.85rem;
}

.aef-intel-section--featured {
    padding: 1.1rem 1.15rem 1.2rem;
    border: 1px solid #e2c76b;
    border-radius: 10px;
    background: linear-gradient(180deg, #faf9f5 0%, #fff 100%);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.aef-intel-section__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.aef-intel-section--featured .aef-intel-section__title {
    font-size: 1.4rem;
}

.aef-intel-section__subtitle {
    margin: 0.3rem 0 0;
    color: #666;
    font-size: 0.9rem;
}

.aef-intel-section__count {
    font-size: 0.85rem;
    color: #777;
}

/* Featured / browse grids */
.aef-intel-grid {
    display: grid;
    gap: 0.9rem;
    align-items: stretch;
}

.aef-intel-grid--featured {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.aef-intel-grid--browse {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
}

.aef-intel-section--more .aef-intel-section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Explore-by-type quick filters */
.aef-intel-section--quick-filters {
    margin: 1.25rem 0 1.5rem;
}

.aef-intel-section--quick-filters .aef-intel-section__title {
    font-size: 1.35rem;
}

.aef-intel-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0;
    padding: 0;
}

.aef-intel-quick-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0.55rem 0.85rem 0.55rem 0.7rem;
    border: 1px solid #cfd9e6;
    border-radius: 12px;
    background: #fff;
    color: #151515;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.aef-intel-quick-filter:hover,
.aef-intel-quick-filter:focus {
    border-color: #9db6d4;
    outline: none;
}

.aef-intel-quick-filter.is-active {
    background: #eaf3ff;
    border-color: #0875e1;
    border-width: 2px;
    padding: calc(0.55rem - 1px) calc(0.85rem - 1px) calc(0.55rem - 1px) calc(0.7rem - 1px);
    box-shadow: 0 1px 3px rgba(8, 117, 225, 0.12);
}

.aef-intel-quick-filter__marker {
    flex: 0 0 auto;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: #8fb4e0;
}

.aef-intel-quick-filter--group .aef-intel-quick-filter__marker {
    background: #d49bc2;
}

.aef-intel-quick-filter--trust .aef-intel-quick-filter__marker {
    background: #7eb892;
}

.aef-intel-quick-filter--offer .aef-intel-quick-filter__marker {
    background: #f0b95a;
}

.aef-intel-quick-filter--caution {
    background: #fff8f6;
    border-color: #f1b8ad;
}

.aef-intel-quick-filter--caution .aef-intel-quick-filter__marker {
    background: #e08a7a;
}

.aef-intel-quick-filter--caution.is-active {
    background: #fff3f0;
    border-color: #d96b58;
}

.aef-intel-quick-filter__text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.aef-intel-quick-filter__label {
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.aef-intel-quick-filter__count {
    font-size: 0.72rem;
    color: #657080;
    font-weight: 500;
}

.aef-intel-quick-filter.is-active .aef-intel-quick-filter__count {
    color: #3d5f86;
}

/* Cards */
.aef-intel-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    min-width: 0;
}

.aef-intel-card--caution {
    border-color: #e8b4b4;
    background: #fffdfd;
}

.aef-intel-card__image {
    position: relative;
    flex: 0 0 auto;
    height: 176px;
    background: #f5f5f5;
    overflow: hidden;
}

.aef-intel-card--compact .aef-intel-card__image {
    height: 108px;
}

.aef-intel-card__image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.aef-intel-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #f5f5f5;
}

.aef-intel-card__image-badges {
    position: absolute;
    left: 0.35rem;
    right: 0.35rem;
    bottom: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    z-index: 2;
    pointer-events: none;
}

.aef-intel-badge--overlay {
    font-size: 0.62rem;
    padding: 0.1rem 0.35rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
}

.aef-intel-card__body {
    padding: 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1 1 auto;
    min-width: 0;
}

.aef-intel-card--compact .aef-intel-card__body {
    padding: 0.5rem;
    gap: 0.28rem;
}

.aef-intel-card__title {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.35;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.aef-intel-card--compact .aef-intel-card__title {
    font-size: 0.76rem;
    min-height: 2.1em;
    font-weight: 600;
}

.aef-intel-card__price {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
}

.aef-intel-card__price--check {
    font-size: 0.78rem;
    font-weight: 600;
    color: #5b6573;
    line-height: 1.35;
}

.aef-intel-card--compact .aef-intel-card__price {
    font-size: 0.88rem;
}

.aef-intel-card--compact .aef-intel-card__price--check {
    font-size: 0.72rem;
}

.aef-intel-card__shipping,
.aef-intel-card__seller-line {
    font-size: 0.74rem;
    color: #666;
    line-height: 1.35;
}

.aef-intel-card__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem 0.45rem;
    margin: 0.1rem 0 0;
    font-size: 0.72rem;
}

.aef-intel-card__fact {
    margin: 0;
    min-width: 0;
}

.aef-intel-card__fact dt {
    margin: 0;
    color: #888;
    font-weight: 600;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.aef-intel-card__fact dd {
    margin: 0.08rem 0 0;
    color: #444;
    line-height: 1.3;
    word-break: break-word;
}

.aef-intel-card__fact--feedback dd {
    color: #1f6b31;
    font-weight: 700;
}

.aef-intel-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.1rem;
}

.aef-intel-card__badges--compact {
    margin-top: 0;
}

.aef-intel-badge {
    display: inline-block;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    font-size: 0.66rem;
    border: 1px solid transparent;
    line-height: 1.2;
}

.aef-intel-badge--trust {
    background: #edf8ef;
    color: #1f6b31;
    border-color: #c8e8cf;
}

.aef-intel-badge--info {
    background: #eef5ff;
    color: #1f4f8f;
    border-color: #cfe0fb;
}

.aef-intel-badge--offer {
    background: #fff8e8;
    color: #8a5a00;
    border-color: #f0dfa8;
}

.aef-intel-badge--caution {
    background: #fff1f1;
    color: #8a1f1f;
    border-color: #f0c7c7;
}

.aef-intel-card__cta {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-align: center;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}

.aef-intel-card__cta.aef-intel-btn--primary {
    padding: 0.5rem 0.65rem;
    margin-top: 0.45rem;
}

.aef-intel-card__cta--compact {
    width: 100%;
    padding: 0.38rem 0.4rem;
    margin-top: 0.25rem;
    font-size: 0.7rem;
    line-height: 1.15;
    border-radius: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aef-intel-card__cta--compact .aef-intel-card__cta-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.aef-intel-card__cta-icon {
    display: inline-flex;
    flex-shrink: 0;
    line-height: 0;
}

.aef-intel-card__cta--compact .aef-intel-card__cta-icon svg {
    width: 10px;
    height: 10px;
}

.aef-intel-empty {
    padding: 1.5rem;
    text-align: center;
    color: #666;
    border: 1px dashed #ccc;
    border-radius: 8px;
}

/* Footer information strip — quiet integrated reassurance row */
.aef-intel-footer {
    margin-top: 1.35rem;
    padding: 0.65rem 0 0;
    border: 0;
    border-top: 1px solid #e8edf3;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font-size: 0.74rem;
    color: #6b7280;
    line-height: 1.4;
}

.aef-intel-footer__items {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.aef-intel-footer__item {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    margin: 0;
    padding: 0.18rem 0.5rem 0.18rem 0.4rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #5b6573;
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.2;
    box-shadow: none;
}

.aef-intel-footer__item::before {
    content: "";
    flex: 0 0 auto;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: #c5d0de;
}

.aef-intel-footer__item:nth-child(1)::before {
    background: #8fb4e0;
}

.aef-intel-footer__item:nth-child(2)::before {
    background: #9bb8a8;
}

.aef-intel-footer__item:nth-child(3)::before {
    background: #c4b48a;
}

.aef-intel-footer__item:nth-child(4)::before {
    background: #a8aec0;
}

.aef-intel-footer__note {
    margin: 0.45rem 0 0;
    padding-top: 0;
    border-top: 0;
    color: #7a8494;
    font-size: 0.72rem;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 1100px) {
    .aef-intel-grid--featured {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .aef-intel-grid--browse {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .aef-intel-filter-toggle {
        display: block;
        margin-bottom: 0.65rem;
    }

    .aef-intel-filter-panel {
        display: none;
    }

    .aef-intel-filter-panel.is-open {
        display: block;
    }

    .aef-intel-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .aef-intel-filter-group,
    .aef-intel-filter-group--search,
    .aef-intel-filter-group--price {
        flex: 1 1 auto;
        width: 100%;
    }

    .aef-intel-grid--featured {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .aef-intel-grid--browse {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aef-intel-section--featured {
        padding: 0.85rem;
    }

    .aef-intel-quick-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.15rem;
    }

    .aef-intel-quick-filters::-webkit-scrollbar {
        display: none;
    }

    .aef-intel-quick-filter {
        flex: 0 0 auto;
        max-width: 220px;
    }

    .aef-intel-card__cta.aef-intel-btn--primary {
        min-height: 2.4rem;
    }

    .aef-intel-footer__items {
        gap: 0.3rem;
    }

    .aef-intel-footer__note {
        margin-top: 0.4rem;
    }
}

@media (max-width: 480px) {
    .aef-intel-grid--featured {
        grid-template-columns: 1fr;
    }
}
