/* ============================================================
   Champagne Exhibitors — Frontend Styles
   champagne-exhibitors v1.0.0
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
.ce-wrap *,
.ce-wrap *::before,
.ce-wrap *::after {
    box-sizing: border-box;
}
.ce-wrap {
    font-family: inherit;
    line-height: 1.5;
    color: inherit;
}

/* ── Search & Filters Area ────────────────────────────────── */
.ce-search-wrap {
    padding: 20px;
    background: #f8f5f0;
    border-radius: 8px;
    margin-bottom: 24px;
}

.ce-search-bar {
    margin-bottom: 14px;
}

.ce-search-input {
    width: 100%;
    padding: 12px 18px;
    font-size: 15px;
    border: 1.5px solid #e0d9ce;
    border-radius: 6px;
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    font-family: inherit;
    color: #333;
}
.ce-search-input:focus {
    border-color: #c9a84c;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, .18);
}
.ce-search-input::placeholder { color: #b0a090; }

/* Filters row */
.ce-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}
.ce-filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.ce-filter-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: #a09080;
    white-space: nowrap;
}
.ce-filter-btn {
    padding: 5px 13px;
    font-size: 12.5px;
    font-family: inherit;
    border: 1.5px solid #d5cdc0;
    border-radius: 20px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: background .18s, border-color .18s, color .18s;
    white-space: nowrap;
}
.ce-filter-btn:hover {
    border-color: #c9a84c;
    color: #c9a84c;
}
.ce-filter-btn.active {
    background: #c9a84c;
    border-color: #c9a84c;
    color: #fff;
    font-weight: 600;
}

/* ── Results counter ──────────────────────────────────────── */
.ce-results-info {
    margin-bottom: 16px;
    min-height: 22px;
    font-size: 13px;
    color: #a0907e;
}
.ce-loading { font-style: italic; }

/* ── Grid ─────────────────────────────────────────────────── */
.ce-grid {
    display: grid;
    gap: 24px;
}
.ce-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ce-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ce-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1100px) {
    .ce-cols-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
    .ce-cols-3,
    .ce-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
    .ce-cols-2,
    .ce-cols-3,
    .ce-cols-4 { grid-template-columns: 1fr; }
    .ce-search-wrap { padding: 14px; }
    .ce-filters { flex-direction: column; gap: 8px; }
}

/* ── Card ─────────────────────────────────────────────────── */
.ce-card {
    border: 1.5px solid #e8e0d0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: transform .22s ease, box-shadow .22s ease;
    cursor: pointer;
}
.ce-card:hover {
    transform: translateY(-3px);
}
.ce-card-shadow {
    box-shadow: 0 2px 14px rgba(0, 0, 0, .07);
}
.ce-card-shadow:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
}

/* Logo area */
.ce-card-logo {
    background: #fafaf8;
    border-bottom: 1px solid #f0ebe2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    height: 180px;
    overflow: hidden;
}
.ce-logo {
    max-height: 130px;
    max-width: 85%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

/* Card body */
.ce-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Title */
.ce-card-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    margin: 0 0 8px !important;
    color: #2c1810;
    line-height: 1.3;
}

/* Meta row (comune) */
.ce-card-meta {
    font-size: 13px;
    color: #888;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 3px;
}
.ce-card-meta .ce-icon { flex-shrink: 0; }

/* Tags */
.ce-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}
.ce-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 11px;
    border: 1.5px solid currentColor;
    line-height: 1.5;
    white-space: nowrap;
}
.ce-tag-zona      { color: #7b9e87; }
.ce-tag-tipologia { color: #9b7fb6; }
.ce-tag-stile     { color: #c9a84c; }

/* Biography excerpt */
.ce-card-bio {
    font-size: 14px;
    color: #666;
    line-height: 1.65;
    margin: 0 0 12px;
    flex: 1;
}

/* ── Accordion (Cuvée) ────────────────────────────────────── */
.ce-accordion {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0ebe2;
}
.ce-accordion-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    background: none;
    border: none;
    padding: 7px 0;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #c9a84c;
    cursor: pointer;
    text-align: left;
}
.ce-accordion-btn:hover { opacity: .8; }
.ce-accordion-arrow {
    margin-left: auto;
    font-size: 10px;
    transition: transform .2s ease;
    display: inline-block;
}
.ce-accordion-btn[aria-expanded="true"] .ce-accordion-arrow,
.ce-accordion-btn.open .ce-accordion-arrow {
    transform: rotate(180deg);
}
.ce-accordion-content {
    padding: 8px 0 4px;
}
.ce-cuvee-text {
    font-size: 13.5px;
    color: #555;
    line-height: 1.8;
    white-space: pre-line;
}

/* ── Card footer (scopri di più) ─────────────────────────── */
.ce-card-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f0ebe2;
}
.ce-btn-scopri {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 700;
    color: #c9a84c;
    text-decoration: none;
    transition: color .18s;
}
.ce-btn-scopri:hover { color: #a0782a; }
/* legacy alias */
.ce-btn-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 700;
    color: #c9a84c;
    text-decoration: none;
    transition: color .18s;
}
.ce-btn-link:hover { color: #a0782a; }

/* ── Pagination / Load More ───────────────────────────────── */
.ce-pagination {
    text-align: center;
    margin-top: 36px;
}
.ce-btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background: #c9a84c;
    color: #fff !important;
    border: 2px solid #c9a84c;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background .18s, border-color .18s, transform .18s;
    letter-spacing: .3px;
}
.ce-btn-primary:hover {
    background: #a8872a;
    border-color: #a8872a;
    transform: translateY(-1px);
}
.ce-btn-primary:disabled,
.ce-load-more.ce-loading-state {
    opacity: .6;
    cursor: default;
    transform: none;
}

/* ── Empty state ──────────────────────────────────────────── */
.ce-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 52px 20px;
    color: #b0a090;
    font-size: 16px;
}

/* ============================================================
   Single Espositore Page
   ============================================================ */
.ce-single-wrap {
    padding: 40px 16px 60px;
    max-width: 860px;
    margin: 0 auto;
    font-family: inherit;
}
.ce-single-inner { width: 100%; }

.ce-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #c9a84c;
    text-decoration: none;
    margin-bottom: 28px;
    transition: color .18s;
}
.ce-back-btn:hover { color: #a8872a; }

.ce-single-card {
    background: #fff;
    border: 1.5px solid #e8e0d0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,.08);
}

/* Header */
.ce-single-header {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    padding: 36px 36px 28px;
    border-bottom: 1px solid #f0ebe2;
    background: #fafaf8;
}
.ce-single-logo-wrap {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e8e0d0;
    border-radius: 8px;
    padding: 16px;
}
.ce-single-logo {
    max-width: 100%;
    max-height: 168px;
    width: auto;
    height: auto;
    object-fit: contain;
}
.ce-single-header-info { flex: 1; }

.ce-single-title {
    font-size: 26px !important;
    font-weight: 800 !important;
    margin: 0 0 10px !important;
    color: #2c1810;
    line-height: 1.2;
}
.ce-single-comune {
    font-size: 14px;
    color: #888;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ce-single-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}
.ce-single-site-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: #c9a84c;
    color: #fff !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 700;
    transition: background .18s;
}
.ce-single-site-btn:hover { background: #a8872a; }

/* Body */
.ce-single-body { padding: 32px 36px; }

.ce-single-section { margin-bottom: 36px; }
.ce-single-section:last-child { margin-bottom: 0; }

.ce-single-section-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #2c1810 !important;
    margin: 0 0 14px !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #f0ebe2 !important;
}
.ce-single-bio {
    font-size: 15px;
    color: #444;
    line-height: 1.8;
}
.ce-single-bio p { margin: 0 0 12px; }
.ce-single-bio p:last-child { margin-bottom: 0; }

.ce-cuvee-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ce-cuvee-list li {
    padding: 10px 0 10px 20px;
    border-bottom: 1px solid #f5f0ea;
    font-size: 14.5px;
    color: #444;
    position: relative;
}
.ce-cuvee-list li:last-child { border-bottom: none; }
.ce-cuvee-list li::before {
    content: '🍾';
    position: absolute;
    left: 0;
    font-size: 12px;
    top: 12px;
}

/* Responsive */
@media (max-width: 640px) {
    .ce-single-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px 20px 20px;
    }
    .ce-single-tags { justify-content: center; }
    .ce-single-body { padding: 24px 20px; }
    .ce-single-logo-wrap { width: 150px; height: 150px; }
}

/* ============================================================
   Single page topbar (search + zona filters)
   ============================================================ */
.ce-single-page-wrap { width: 100%; }

.ce-single-topbar {
    width: 100%;
    background: #f8f5f0;
    border-bottom: 1px solid #e8e0d0;
    padding: 20px 0;
}
.ce-single-topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}
/* Override: single topbar search has no bottom margin on the bar itself */
.ce-single-topbar .ce-search-wrap {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}
.ce-single-topbar .ce-search-input {
    background: #fff;
}

/* ============================================================
   Modal Lightbox
   ============================================================ */

/* Prevent body scroll when modal is open */
body.ce-modal-open {
    overflow: hidden;
}

/* Overlay backdrop */
.ce-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(20, 10, 5, .65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: ce-fade-in .18s ease;
}
@keyframes ce-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Modal box */
.ce-modal {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 80px rgba(0,0,0,.35);
    animation: ce-slide-up .22s ease;
    scrollbar-width: thin;
}
@keyframes ce-slide-up {
    from { transform: translateY(28px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Close button */
.ce-modal-close {
    position: sticky;
    top: 0;
    float: right;
    margin: 14px 14px 0 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f0ebe2;
    color: #555;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s, color .18s;
    z-index: 10;
}
.ce-modal-close:hover {
    background: #c9a84c;
    color: #fff;
}

/* Modal body */
.ce-modal-body {
    padding: 0 32px 32px;
    clear: both;
}

/* Loading state */
.ce-modal-loading {
    text-align: center;
    padding: 48px 20px;
    color: #aaa;
    font-size: 15px;
}

/* Modal header */
.ce-modal-header {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    padding: 8px 0 24px;
    border-bottom: 1px solid #f0ebe2;
    margin-bottom: 24px;
}

/* Logo inside modal */
.ce-modal-logo-wrap {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafaf8;
    border: 1px solid #e8e0d0;
    border-radius: 8px;
    padding: 14px;
    overflow: hidden;
}
.ce-modal-logo {
    max-width: 100%;
    max-height: 132px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Modal header info */
.ce-modal-header-info { flex: 1; }

.ce-modal-title {
    font-size: 22px !important;
    font-weight: 800 !important;
    margin: 0 0 8px !important;
    color: #2c1810;
    line-height: 1.2;
}
.ce-modal-comune {
    font-size: 13.5px;
    color: #888;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.ce-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 16px;
}

/* Sections */
.ce-modal-sections { }

/* Responsive modal */
@media (max-width: 600px) {
    .ce-modal-overlay { padding: 0; align-items: flex-end; }
    .ce-modal {
        border-radius: 16px 16px 0 0;
        max-height: 92vh;
        animation: ce-slide-up-mobile .25s ease;
    }
    @keyframes ce-slide-up-mobile {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }
    .ce-modal-header { flex-direction: column; align-items: center; text-align: center; }
    .ce-modal-tags   { justify-content: center; }
    .ce-modal-logo-wrap { width: 120px; height: 120px; }
    .ce-modal-body { padding: 0 20px 28px; }
}
