/* ================================================================
   EU MEMBER HUB — Archive & Single Listing
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=Barlow+Condensed:wght@600;700;800&display=swap');

:root {
    --emh-gold:   #FDC902;
    --emh-navy:   #011D37;
    --emh-navy-l: #022a52;
    --emh-blue:   #0000FE;
    --emh-white:  #ffffff;
    --emh-muted:  #8a9bb5;
    --emh-border: rgba(253,201,2,0.12);
    --emh-radius: 12px;
    --emh-font:   'Barlow', sans-serif;
    --emh-cond:   'Barlow Condensed', sans-serif;
}

/* ── Archive wrap ── */
.emh-archive-wrap {
    font-family: var(--emh-font);
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.emh-archive-header {
    margin-bottom: 2rem;
}

.emh-archive-title {
    font-family: var(--emh-cond);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--emh-gold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.emh-archive-sub { color: var(--emh-muted); font-size: 0.9rem; }

/* ── Layout ── */
.emh-archive-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 2rem;
    align-items: start;
}

/* ================================================================
   SIDEBAR FILTERS
   ================================================================ */

.emh-archive-sidebar {
    background: var(--emh-navy);
    border: 1px solid var(--emh-border);
    border-radius: var(--emh-radius);
    overflow: hidden;
    position: sticky;
    top: 1.5rem;
}

.emh-filter-block {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--emh-border);
}

.emh-filter-block:last-child { border-bottom: none; }

.emh-filter-title {
    font-family: var(--emh-cond);
    font-size: 1rem;
    font-weight: 800;
    color: var(--emh-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.emh-filter-title svg { width: 14px; height: 14px; stroke: var(--emh-gold); flex-shrink: 0; }

.emh-filter-clear {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--emh-muted);
    text-decoration: none;
    font-family: var(--emh-font);
    text-transform: none;
    letter-spacing: 0;
    transition: color 0.15s ease;
}

.emh-filter-clear:hover { color: #ff6b6b; }

.emh-filter-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--emh-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.65rem;
}

.emh-filter-list { display: flex; flex-direction: column; gap: 0.2rem; }

.emh-filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--emh-muted);
    cursor: pointer;
    padding: 0.3rem 0.4rem;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}

.emh-filter-option input[type="radio"] { display: none; }

.emh-filter-option:hover { background: rgba(253,201,2,0.06); color: var(--emh-white); }

.emh-filter-option.is-active,
.emh-filter-option:has(input:checked) {
    color: var(--emh-gold);
    background: rgba(253,201,2,0.08);
}

.emh-filter-count {
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--emh-muted);
}

.emh-filter-group { display: flex; flex-direction: column; gap: 0.5rem; }

.emh-filter-select,
.emh-filter-input {
    width: 100%;
    background: var(--emh-navy-l);
    border: 1px solid var(--emh-border);
    border-radius: 6px;
    color: var(--emh-white);
    font-family: var(--emh-font);
    font-size: 0.83rem;
    padding: 0.5rem 0.75rem;
    outline: none;
    -webkit-appearance: none;
    transition: border-color 0.15s ease;
}

.emh-filter-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238a9bb5' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    padding-right: 2rem;
    cursor: pointer;
}

.emh-filter-select option { background: var(--emh-navy); }
.emh-filter-select:disabled { opacity: 0.4; cursor: not-allowed; }
.emh-filter-select:focus,
.emh-filter-input:focus { border-color: rgba(253,201,2,0.5); }
.emh-filter-input::placeholder { color: var(--emh-muted); }

.emh-filter-price {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.emh-filter-input--half { flex: 1; }
.emh-filter-price-sep { color: var(--emh-muted); font-size: 0.85rem; flex-shrink: 0; }

.emh-filter-submit {
    display: block;
    width: calc(100% - 2.5rem);
    margin: 1rem 1.25rem;
    background: var(--emh-gold);
    color: var(--emh-navy);
    border: none;
    border-radius: 6px;
    font-family: var(--emh-cond);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.65rem 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.emh-filter-submit:hover { background: #e0b000; }

/* ================================================================
   LISTINGS GRID
   ================================================================ */

.emh-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.emh-listing-card {
    display: flex;
    flex-direction: column;
    background: var(--emh-navy);
    border: 1px solid var(--emh-border);
    border-radius: var(--emh-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.emh-listing-card:hover {
    transform: translateY(-3px);
    border-color: rgba(253,201,2,0.35);
    box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}

.emh-listing-card__img {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--emh-navy-l);
}

.emh-listing-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.emh-listing-card:hover .emh-listing-card__img img { transform: scale(1.04); }

.emh-listing-card__img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.emh-listing-card__badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    backdrop-filter: blur(8px);
}

.emh-listing-card__badge--private  { background: rgba(0,0,254,0.75); color: #fff; }
.emh-listing-card__badge--business { background: rgba(253,201,2,0.9); color: var(--emh-navy); }

.emh-listing-card__body {
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.emh-listing-card__cat {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--emh-gold);
}

.emh-listing-card__title {
    font-family: var(--emh-font);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--emh-white);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.emh-listing-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-top: auto;
    padding-top: 0.4rem;
}

.emh-listing-card__price {
    font-family: var(--emh-cond);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--emh-gold);
}

.emh-listing-card__price small { font-size: 0.65rem; font-weight: 500; opacity: 0.8; margin-left: 0.2rem; }
.emh-listing-card__price--contact { font-size: 0.8rem; color: var(--emh-muted); }

.emh-listing-card__location {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--emh-muted);
}

.emh-listing-card__location svg { width: 11px; height: 11px; flex-shrink: 0; }

/* Empty state */
.emh-archive-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--emh-navy);
    border: 1px dashed var(--emh-border);
    border-radius: var(--emh-radius);
}

.emh-archive-empty__icon { font-size: 3rem; margin-bottom: 1rem; }

.emh-archive-empty h3 {
    font-family: var(--emh-cond);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--emh-white);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.emh-archive-empty p { color: var(--emh-muted); margin-bottom: 1.25rem; }

/* Pagination */
.emh-pagination {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.emh-pagination__btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--emh-muted);
    background: var(--emh-navy);
    border: 1px solid var(--emh-border);
    transition: all 0.15s ease;
}

.emh-pagination__btn:hover { border-color: var(--emh-gold); color: var(--emh-gold); }
.emh-pagination__btn.is-active { background: var(--emh-gold); color: var(--emh-navy); border-color: var(--emh-gold); }

/* ================================================================
   SINGLE LISTING
   ================================================================ */

.emh-single-wrap {
    font-family: var(--emh-font);
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.emh-single-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--emh-muted);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.emh-single-breadcrumb a { color: var(--emh-gold); text-decoration: none; }
.emh-single-breadcrumb a:hover { text-decoration: underline; }
.emh-single-breadcrumb span { color: var(--emh-muted); }

.emh-single-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

/* Gallery */
.emh-single-gallery { margin-bottom: 1.5rem; }

.emh-single-gallery__main {
    border-radius: var(--emh-radius);
    overflow: hidden;
    aspect-ratio: 16/10;
    background: var(--emh-navy);
    margin-bottom: 0.65rem;
}

.emh-single-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.emh-single-gallery__thumbs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.emh-gallery-thumb {
    width: 72px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color 0.15s ease;
    flex-shrink: 0;
}

.emh-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.emh-gallery-thumb.is-active { border-color: var(--emh-gold); }
.emh-gallery-thumb:hover { border-color: rgba(253,201,2,0.5); }

.emh-single-no-img {
    aspect-ratio: 16/10;
    background: var(--emh-navy);
    border-radius: var(--emh-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

/* Header */
.emh-single-header { margin-bottom: 1.5rem; }

.emh-single-header__top {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.emh-single-title {
    font-family: var(--emh-cond);
    font-size: 2rem;
    font-weight: 800;
    color: var(--emh-white);
    margin: 0;
    line-height: 1.15;
    flex: 1;
}

.emh-single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    align-items: center;
}

.emh-single-price {
    font-family: var(--emh-cond);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--emh-gold);
}

.emh-single-price small { font-size: 0.9rem; font-weight: 500; margin-left: 0.3rem; opacity: 0.8; }
.emh-single-price--contact { font-size: 1rem; color: var(--emh-muted); }

.emh-single-cat,
.emh-single-location,
.emh-single-date {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--emh-muted);
}

.emh-single-cat svg,
.emh-single-location svg,
.emh-single-date svg { width: 14px; height: 14px; flex-shrink: 0; }

.emh-single-cat { color: var(--emh-gold); }

/* Description */
.emh-single-description {
    background: var(--emh-navy);
    border: 1px solid var(--emh-border);
    border-radius: var(--emh-radius);
    padding: 1.5rem;
}

.emh-single-description h2 {
    font-family: var(--emh-cond);
    font-size: 1rem;
    font-weight: 800;
    color: var(--emh-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.emh-single-description__text {
    font-size: 0.92rem;
    color: var(--emh-muted);
    line-height: 1.7;
}

/* Sidebar cards */
.emh-single-seller,
.emh-single-contact,
.emh-single-share {
    background: var(--emh-navy);
    border: 1px solid var(--emh-border);
    border-radius: var(--emh-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.emh-single-seller h3,
.emh-single-contact h3,
.emh-single-share h3 {
    font-family: var(--emh-cond);
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--emh-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.85rem;
}

.emh-single-seller__profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.emh-single-seller__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--emh-gold);
    flex-shrink: 0;
}

.emh-single-seller__profile strong {
    display: block;
    font-size: 0.9rem;
    color: var(--emh-white);
    margin-bottom: 0.2rem;
}

.emh-single-seller__since {
    font-size: 0.72rem;
    color: var(--emh-muted);
    margin-top: 0.2rem;
}

.emh-badge--sm { font-size: 0.62rem !important; padding: 0.1rem 0.4rem !important; }

/* Contact */
.emh-single-contact__info { display: flex; flex-direction: column; gap: 0.6rem; }

.emh-contact-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.15s ease;
}

.emh-contact-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.emh-contact-btn--phone {
    background: rgba(34,197,94,0.1);
    color: #22c55e;
    border: 1px solid rgba(34,197,94,0.25);
}

.emh-contact-btn--phone:hover { background: rgba(34,197,94,0.18); }

.emh-contact-btn--email {
    background: rgba(253,201,2,0.08);
    color: var(--emh-gold);
    border: 1px solid rgba(253,201,2,0.2);
}

.emh-contact-btn--email:hover { background: rgba(253,201,2,0.15); }

/* Locked contact */
.emh-single-contact__locked {
    text-align: center;
    padding: 0.5rem 0;
}

.emh-contact-lock__icon { font-size: 2rem; margin-bottom: 0.6rem; }

.emh-single-contact__locked h4 {
    font-family: var(--emh-cond);
    font-size: 1rem;
    font-weight: 800;
    color: var(--emh-white);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.4rem;
}

.emh-single-contact__locked p {
    font-size: 0.82rem;
    color: var(--emh-muted);
    line-height: 1.55;
    margin-bottom: 1rem;
}

/* Share */
.emh-share-btns { display: flex; gap: 0.5rem; }

.emh-share-btn {
    flex: 1;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: var(--emh-font);
    transition: all 0.15s ease;
}

.emh-share-btn--fb { background: #1877f2; color: #fff; }
.emh-share-btn--fb:hover { background: #1464d8; }
.emh-share-btn--copy { background: var(--emh-navy-l); color: var(--emh-muted); border: 1px solid var(--emh-border); }
.emh-share-btn--copy:hover { color: var(--emh-white); border-color: var(--emh-gold); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .emh-archive-layout { grid-template-columns: 1fr; }
    .emh-archive-sidebar { position: static; }
    .emh-single-layout { grid-template-columns: 1fr; }
    .emh-single-sidebar { order: -1; }
}

@media (max-width: 600px) {
    .emh-listings-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .emh-single-title { font-size: 1.4rem; }
}

/* ── Category tree ── */
.emh-cat-item { width: 100%; }

.emh-cat-item--child { padding-left: 0.85rem; border-left: 1px solid var(--emh-border); margin-left: 0.5rem; }

.emh-cat-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.emh-cat-row .emh-filter-option { flex: 1; min-width: 0; }

.emh-cat-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emh-muted);
    flex-shrink: 0;
    transition: color 0.15s ease;
    border-radius: 4px;
}

.emh-cat-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.emh-cat-toggle.is-open svg { transform: rotate(180deg); }
.emh-cat-toggle:hover { color: var(--emh-gold); background: rgba(253,201,2,0.08); }

.emh-cat-children {
    display: none;
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

.emh-cat-children.is-open { display: block; }

/* ── Category header (image + description) ── */
.emh-cat-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: var(--emh-navy);
    border: 1px solid var(--emh-border);
    border-radius: var(--emh-radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.emh-cat-header__img {
    width: 280px;
    flex-shrink: 0;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.emh-cat-header__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.emh-cat-header__body {
    padding: 1.5rem 1.5rem 1.5rem 0;
    flex: 1;
    min-width: 0;
}

.emh-cat-header__body .emh-archive-title {
    margin-bottom: 0.5rem;
}

.emh-cat-header__desc {
    font-size: 0.9rem;
    color: var(--emh-muted);
    line-height: 1.65;
    margin-bottom: 0.75rem;
}

.emh-cat-header__desc p { margin: 0 0 0.5rem; }

@media (max-width: 700px) {
    .emh-cat-header { flex-direction: column; gap: 0; }
    .emh-cat-header__img { width: 100%; }
    .emh-cat-header__body { padding: 1.25rem; }
}



/* ── Breed Accordion ─────────────────────────────────────────── */
.emh-breed-accordion {
    margin-top: 0.75rem;
}

.emh-breed-accordion__toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(253,201,2,0.12);
    border: 1px solid rgba(253,201,2,0.35);
    border-radius: 7px;
    color: var(--emh-gold, #FDC902);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
    width: auto;
}

.emh-breed-accordion__toggle:hover {
    background: rgba(253,201,2,0.2);
}

.emh-breed-accordion__arrow {
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.emh-breed-accordion.is-open .emh-breed-accordion__arrow {
    transform: rotate(180deg);
}

.emh-breed-accordion__body {
    display: none;
    margin-top: 0.75rem;
}

.emh-breed-accordion.is-open .emh-breed-accordion__body {
    display: block;
}

.emh-breed-info__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}

.emh-breed-card {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 7px;
    padding: 0.7rem 0.85rem;
}

.emh-breed-card__icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1; margin-top: 1px; }

.emh-breed-card__body h4 {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--emh-gold, #FDC902);
    margin: 0 0 0.2rem;
}

.emh-breed-card__body p {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 600px) {
    .emh-breed-info__grid { grid-template-columns: 1fr; }
}
