/* ============================================================
   plp.css | Produktliste (PLP) + Aussteller-Seiten + Anfrage-Modal.
   Aufgerufen in:
     templates/plp.php, templates/exhibitor.php,
     templates/exhibitor-overview.php  (+ assets/js/plp.js)
   Die .inquiry-form-Regeln (Anfrage-Formular) werden zusätzlich in
     templates/_inquiry-modal.php (PLP) und
     templates/_configure-modal.php (PDP, via $extraCss ['plp','pdp']) genutzt.
   Nur Klassen, die im aktuellen Stand tatsächlich verwendet werden.
   ============================================================ */

/* ── Kopf der PLP ───────────────────────────────────────────────── */
.plp-head { padding: 1.5rem 0 .5rem; }
.plp-title { font-size: 1.6rem; margin: 0 0 .2rem; }
.plp-subtitle { color: var(--c-mid); font-size: 1.05rem; margin: .1rem 0 .3rem; }
.plp-count { color: var(--c-muted); font-size: .9rem; margin: 0; }

/* ── Grid-Section + Leerzustand ─────────────────────────────────── */
.plp-grid-section { padding: 1.5rem 0 3rem; }
.no-results { text-align: center; color: var(--c-muted); padding: 3rem 0 .5rem; }

/* ── Gruppierung des Gesamtsortiments nach Kategorie ────────────── */
.plp-group { margin-bottom: 2.5rem; }
.plp-group-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 1rem; margin: 0 0 1.2rem;
}

#main-content .plp-group-title {
    font-size: 1.35rem; margin: 1.5rem 0 0 0 !important; padding: 0 0 .45rem; position: relative;
    letter-spacing: .01em;
}
#main-content .plp-group-title::before {
    content: ""; position: absolute; left: 0; right: 0; top: auto; bottom: 0;
    width: auto; height: 2px; border-radius: 0;
    background: var(--c-border); transform: none; transition: none;
}
.plp-group-title::after {
    content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 34px;
    background: linear-gradient(90deg, var(--c-accent), var(--c-accent-dark));
    transition: width .38s cubic-bezier(.6,.1,.2,1);
}
.plp-group:hover .plp-group-title::after { width: 100%; }

.plp-group-link { color: var(--c-accent); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.plp-group-link:hover { text-decoration: underline; }

.product-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.product-list .product-card--h { display: flex; flex-direction: column; }
.product-list .product-card--h .card-header { width: 100%; aspect-ratio: 4 / 3; }
.product-list .product-card--h .card-body { flex: 1 1 auto; }

.product-card--h {
    position: relative;
    display: grid; grid-template-columns: 285fr 317fr;
    background: var(--c-white); border: 1px solid var(--c-border);
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .35s ease, transform .35s ease, border-color .35s ease;
}
.product-card--h:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); border-color: #cfd3d8; }

.product-card--h .card-header { background: var(--c-smoke); overflow: hidden; position: relative; }
.product-card--h .card-header img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .6s cubic-bezier(.2,.6,.2,1);
}
.product-card--h:hover .card-header img { transform: scale(1.06); }

.product-card--h .card-body { padding: 1.15rem 1.25rem; display: flex; flex-direction: column; position: relative; }

.card-state-chip {
    position: absolute; top: .7rem; left: .7rem; z-index: 2;
    padding: .18rem .55rem; border-radius: 999px;
    background: var(--c-smoke); color: var(--c-mid);
    border: 1px solid var(--c-border);
    font-family: var(--font-head); font-size: .64rem; font-weight: 600;
    letter-spacing: .06em; text-transform: uppercase; line-height: 1.4; white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,.28);
}

#main-content .product-card--h .card-vendor {
    display: block; font-family: var(--font-head);
    font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--c-muted); margin: 0 0 .28rem; padding-right: 6rem;
}
#main-content .product-card--h .card-title { font-family: var(--font-head); font-size: 1.18rem; line-height: 1.25; margin: 0 0 .18rem; font-weight: 600; color: var(--c-darker); }

#main-content .product-card--h .card-subcat {
    color: var(--c-mid); font-size: .72rem;
    letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .55rem;
}
#main-content .product-card--h .card-sku { position: absolute; top: 1.15rem; right: 1.25rem; z-index: 1; margin: 0; color: var(--c-mid); font-size: .75em; }

.product-card--h .card-specs { list-style: none; margin: 0; padding: 0; }
.product-card--h .card-specs li {
    display: flex; justify-content: space-between; gap: .5rem;
    font-size: .82rem; padding: .32rem 0; border-top: 1px solid var(--c-border);
}
.product-card--h .card-specs li:first-child { border-top: 0; }
.product-card--h .card-specs .spec-label { color: var(--c-muted); }
.product-card--h .card-specs .spec-value { font-weight: 600; color: var(--c-darker); text-align: right; }

.card-overlay {
    position: absolute; inset: 0; z-index: 5;
    display: block; width: 100%; height: 100%;
    padding: 0; border: 0; background: transparent; cursor: pointer;
    -webkit-appearance: none; appearance: none;
}
.card-overlay:focus-visible { outline: 2px solid var(--c-accent); outline-offset: -3px; }

.card-cta {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
    display: flex; align-items: center; justify-content: center; gap: .55rem;
    padding: .95rem 1rem;
    border: 0;
    background: var(--c-mid);
    color: #fff;
    font-family: var(--font-head); font-weight: 600; font-size: .92rem; letter-spacing: .02em;
    text-align: center; text-decoration: none;
    pointer-events: none;
    transform: translateY(100%);
    transition: transform .38s cubic-bezier(.5,.05,.2,1), background var(--transition);
}
.card-cta .card-cta-icon { transition: transform .3s ease; }
.product-card--h:hover .card-cta,
.product-card--h:focus-within .card-cta { transform: translateY(0); background: var(--c-darker); }
.product-card--h:hover .card-cta-icon,
.product-card--h:focus-within .card-cta-icon { transform: translateX(4px); }

@media (max-width: 1024px) { .product-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .product-list { grid-template-columns: 1fr; } }

@media (hover: none) {
    .product-list .product-card--h { height: auto; }
    .product-card--h .card-body { padding-bottom: 3.6rem; }
    .card-cta { position: static; transform: none; grid-column: 1 / -1; }
}

/* ── Redaktioneller Textblock (aus dem Backend) ─────────────────── */
.plp-content-block { padding: 1rem 0 3rem; }
.plp-content-text { max-width: 1020px; margin: 0 auto; font-size: .95rem; color: var(--c-mid); line-height: 1.7; }
.plp-content-text h2, .plp-content-text h3 { color: var(--c-darker); margin-top: 1.4rem; }

/* ── Anfrage-Modal (öffnet aus der Produktkarte, siehe plp.js) ──── */
.inquiry-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1.2rem; }
.inquiry-modal[hidden] { display: none; }
.inquiry-modal-backdrop { position: absolute; inset: 0; background: rgba(20,22,24,.62); backdrop-filter: blur(2px); }
.inquiry-modal-dialog { position: relative; z-index: 1; width: 100%; max-width: 1280px; max-height: 92vh; overflow: auto; }

.inquiry-modal-card { grid-template-columns: 40% minmax(0, 1fr); border: 0; box-shadow: var(--shadow-hover); }
.inquiry-modal-card .card-header { min-height: 320px; }
.inquiry-modal-card .card-body { padding: 1.8rem 2rem; position: relative; min-width: 0; }
.inquiry-modal-card .card-title { font-size: 1.4rem; }
.inquiry-modal-card .card-subcat { font-size: .95rem; margin-bottom: 1.2rem; }

.inquiry-modal-close { position: absolute; top: .6rem; right: .9rem; background: none; border: 0; font-size: 1.8rem; line-height: 1; color: var(--c-muted); cursor: pointer; }
.inquiry-modal-close:hover { color: var(--c-darker); }

.inquiry-form .inq-field { margin-bottom: .65rem; display: flex; flex-direction: column; min-width: 0; }
.inquiry-form label { font-size: .8rem; font-weight: 600; color: var(--c-mid); margin-bottom: .25rem; }
.inquiry-form .req { color: var(--c-accent); }
.inquiry-form input, .inquiry-form select {
    font-family: var(--font-body); font-size: .88rem; line-height: 1.2;
    height: 2.35rem; padding: .4rem .65rem; border: 1px solid var(--c-border);
    border-radius: var(--radius); background: var(--c-white); color: var(--c-darker);
    -webkit-appearance: none; -moz-appearance: none; appearance: none; box-sizing: border-box;
    width: 100%; min-width: 0; max-width: 100%;
}
.inquiry-form textarea {
    font-family: var(--font-body); font-size: .88rem; line-height: 1.35;
    min-height: 5.5rem; padding: .5rem .65rem; border: 1px solid var(--c-border);
    border-radius: var(--radius); background: var(--c-white); color: var(--c-darker);
    box-sizing: border-box; resize: vertical; width: 100%;
}
.inquiry-form textarea:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(214,7,92,.12); }
.inquiry-form select {
    padding-right: 1.9rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='%23666'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .65rem center;
}
.inquiry-form input:focus, .inquiry-form select:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(214,7,92,.12); }
.inq-row { display: grid; gap: .8rem; }
.inq-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inq-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.inq-row--zipland { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); }
.inq-consent { font-size: .85em; color: var(--c-muted); margin: .5rem 0 .2rem; }
.inq-consent a { color: inherit; text-decoration: underline; }
.inq-field--error input, .inq-field--error select { border-color: var(--c-accent-dark); box-shadow: 0 0 0 3px rgba(214,7,92,.12); }
.inq-field-error { display: block; margin-top: .25rem; color: var(--c-accent-dark); font-size: .78rem; font-weight: 600; }
.inq-captcha { margin: .4rem 0 .2rem; }
.inq-hp { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }
.inquiry-form .btn--request { margin-top: .6rem; padding: .85rem 2rem; font-size: 1.02rem; font-weight: 700; }

@media (max-width: 680px) {
    .inquiry-modal { padding: .75rem; }
    .inquiry-modal-card { grid-template-columns: minmax(0, 1fr); }
    .inquiry-modal-card .card-header { min-height: 180px; }
    .inquiry-modal-card .card-body { padding: 1.4rem 1.2rem; }
    .inq-row--2, .inq-row--3, .inq-row--zipland { grid-template-columns: minmax(0, 1fr); }
}

.product-list .product-card--h { height: auto; }

.product-card--reserved .card-header img { filter: grayscale(1); }
.product-card--reserved .card-body { padding-bottom: 3.4rem; }
.card-reserved {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
    padding: .9rem 1rem;
    background: var(--c-muted);
    color: #fff;
    font-family: var(--font-head); font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .8rem;
}

.product-card--h.product-card--highlight {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 2px var(--c-accent), var(--shadow-hover);
}

