/* ══════════════════════════════════════════════════════════════
   PROVEEDORES — listado y detalle (estilo ExpoCasa3D)
   ══════════════════════════════════════════════════════════════ */

.proveedores-page,
.provdet-page {
    background: var(--bg);
    padding: 0 !important;
    overflow-x: hidden;
    max-width: 1400px !important;
    margin: 0 auto !important;
}

.proveedores-page *,
.provdet-page * { box-sizing: border-box; }

/* ═══════════════════════════════════════════
   /proveedores — HERO
   ═══════════════════════════════════════════ */
.prov-hero {
    position: relative;
    height: 320px;
    margin: 18px 24px 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg);
}

.prov-hero__bg {
    position: absolute; inset: 0;
    background-image: url('https://images.unsplash.com/photo-1600210492486-724fe5c67fb0?auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    filter: brightness(0.55) saturate(0.85);
    animation: provHeroZoom 14s ease forwards;
}
@keyframes provHeroZoom {
    from { transform: scale(1.10); }
    to   { transform: scale(1); }
}

.prov-hero__scrim {
    position: absolute; inset: 0;
    background: linear-gradient(90deg,
        rgba(8,8,8,0.85) 0%,
        rgba(8,8,8,0.55) 45%,
        rgba(8,8,8,0.20) 100%);
}

.prov-hero__content {
    position: relative;
    height: 100%;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 640px;
}

.prov-hero__eyebrow {
    color: var(--gold);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.18em;
    margin-bottom: 14px;
}

.prov-hero__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.4rem;
    line-height: 1.05;
    color: var(--text);
    margin: 0 0 14px 0;
    letter-spacing: -0.02em;
}

.prov-hero__lead {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: rgba(255,255,255,0.78);
    margin: 0;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════
   /proveedores — CONTROLES (search + tabs)
   ═══════════════════════════════════════════ */
.prov-controls {
    padding: 24px 24px 8px;
    position: sticky;
    top: 68px;
    z-index: 10;
    background: linear-gradient(to bottom, var(--bg) 0%, var(--bg) 80%, transparent 100%);
}

.prov-controls__inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.prov-search {
    position: relative;
    max-width: 440px;
}

.prov-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 18px !important;
}

.prov-search__input {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 11px 14px 11px 42px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.18s ease;
}
.prov-search__input::placeholder { color: rgba(255,255,255,0.4); }
.prov-search__input:focus { border-color: var(--gold); }

.prov-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.prov-tab {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text-2);
    padding: 8px 14px;
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.18s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.prov-tab:hover {
    color: var(--text);
    border-color: rgba(200, 169, 110, 0.35);
}
.prov-tab.is-active {
    background: rgba(200, 169, 110, 0.10);
    border-color: var(--gold);
    color: var(--gold);
}

.prov-tab__count {
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    color: inherit;
}
.prov-tab.is-active .prov-tab__count {
    background: rgba(200, 169, 110, 0.18);
}

/* ═══════════════════════════════════════════
   /proveedores — GRID
   ═══════════════════════════════════════════ */
.prov-grid-section {
    padding: 12px 24px 60px;
}

.prov-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.prov-loading,
.prov-empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--text-2);
}

.prov-empty h3 {
    font-family: var(--font-display);
    color: var(--text);
    margin: 16px 0 6px;
    font-size: 1.1rem;
}

.prov-empty p {
    font-family: var(--font-body);
    margin: 0;
    font-size: 0.88rem;
}

/* ── Card ── */
.prov-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}
.prov-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.prov-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.prov-card__photo {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}
.prov-card:hover .prov-card__photo { transform: scale(1.05); }

.prov-card__photo--placeholder {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    display: grid;
    place-items: center;
}

.prov-card__media::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.7) 100%);
    pointer-events: none;
}

.prov-card__badge {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--gold);
    color: #0a0a0a;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.66rem;
    letter-spacing: 0.10em;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
}

.prov-card__logo-wrap {
    position: absolute;
    bottom: 12px; left: 12px;
    width: 56px; height: 56px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 6px;
    display: grid;
    place-items: center;
    z-index: 2;
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.prov-card__logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.prov-card__body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.prov-card__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text);
    margin: 0;
    line-height: 1.2;
}

.prov-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.prov-card__tag {
    background: rgba(200, 169, 110, 0.10);
    color: rgba(200, 169, 110, 0.95);
    border: 1px solid rgba(200, 169, 110, 0.20);
    padding: 2px 8px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.7rem;
}

.prov-card__summary {
    font-family: var(--font-body);
    color: var(--text-2);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prov-card__location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--text-2);
}

.prov-card__location .mud-icon-root { color: var(--gold); }

.prov-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    gap: 10px;
}

.prov-card__social {
    display: flex;
    gap: 6px;
}

.prov-card__social a {
    width: 28px; height: 28px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text-2);
    transition: all 0.15s ease;
}
.prov-card__social a:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #0a0a0a;
}

.prov-card__cta {
    background: transparent;
    border: 1px solid rgba(200, 169, 110, 0.35);
    color: var(--gold);
    padding: 7px 12px;
    border-radius: 6px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.prov-card__cta:hover {
    background: var(--gold);
    color: #0a0a0a;
    border-color: var(--gold);
}

/* ═══════════════════════════════════════════
   /proveedor/{slug} — DETALLE
   ═══════════════════════════════════════════ */
.provdet-loading,
.provdet-notfound {
    text-align: center;
    padding: 120px 24px;
}

.provdet-notfound h2 {
    font-family: var(--font-display);
    color: var(--text);
    margin: 18px 0 8px;
}
.provdet-notfound p {
    font-family: var(--font-body);
    color: var(--text-2);
    margin: 0 0 20px;
}

.provdet-back-btn {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 10px 18px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}
.provdet-back-btn:hover {
    background: var(--gold);
    color: #0a0a0a;
}

/* Hero del detalle */
.provdet-hero {
    position: relative;
    margin: 18px 24px 0;
    border-radius: 14px;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.provdet-hero__bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.55) saturate(0.9);
    transform: scale(1.06);
}

.provdet-hero__bg--placeholder {
    background: linear-gradient(135deg, #181818 0%, #0a0a0a 100%);
}

.provdet-hero__scrim {
    position: absolute; inset: 0;
    background: linear-gradient(180deg,
        rgba(8,8,8,0.40) 0%,
        rgba(8,8,8,0.65) 60%,
        rgba(8,8,8,0.95) 100%);
}

.provdet-hero__content {
    position: relative;
    padding: 28px 36px;
    z-index: 2;
}

.provdet-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    margin-bottom: 24px;
    text-decoration: none;
    transition: color 0.15s ease;
}
.provdet-back:hover { color: var(--gold); }

.provdet-hero__head {
    display: flex;
    gap: 24px;
    align-items: flex-end;
}

.provdet-hero__logo {
    width: 100px; height: 100px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    padding: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.provdet-hero__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.provdet-hero__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 4px;
}

.provdet-badge {
    display: inline-flex;
    align-items: center;
    background: var(--gold);
    color: #0a0a0a;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.10em;
    padding: 4px 10px;
    border-radius: 4px;
    width: fit-content;
}

.provdet-hero__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.2rem;
    line-height: 1.1;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.02em;
}

.provdet-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.provdet-tag {
    background: rgba(200, 169, 110, 0.12);
    color: var(--gold);
    border: 1px solid rgba(200, 169, 110, 0.25);
    padding: 3px 10px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.74rem;
}

.provdet-hero__summary {
    font-family: var(--font-body);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    margin: 0;
    max-width: 600px;
}

/* Body grid */
.provdet-body {
    padding: 36px 24px 60px;
}

.provdet-body__inner {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
}

/* Bloques de contenido */
.provdet-block {
    margin-bottom: 32px;
}

.provdet-block__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
    margin: 0 0 14px;
    letter-spacing: -0.01em;
}

.provdet-block__text {
    font-family: var(--font-body);
    color: var(--text-2);
    font-size: 0.95rem;
    line-height: 1.65;
    margin: 0;
    white-space: pre-line;
}

/* Galería */
.provdet-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.provdet-gallery__item {
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: var(--surface);
    transition: transform 0.25s ease;
}
.provdet-gallery__item:hover { transform: scale(1.02); }

.provdet-gallery__item img {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* Mapa */
.provdet-map {
    width: 100%;
    height: 320px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
}

/* Sidebar */
.provdet-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 92px;
    align-self: start;
}

.provdet-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
}

.provdet-card__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 16px;
}

.provdet-contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition: opacity 0.15s ease;
}
.provdet-contact-row:last-child { border-bottom: none; padding-bottom: 0; }
.provdet-contact-row:first-of-type { padding-top: 0; }
.provdet-contact-row:hover { opacity: 0.85; }
.provdet-contact-row:hover .provdet-contact-row__value { color: var(--gold); }

.provdet-contact-row .mud-icon-root {
    color: var(--gold);
    font-size: 20px !important;
    flex-shrink: 0;
}

.provdet-contact-row__label {
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: var(--text-2);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.provdet-contact-row__value {
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--text);
    transition: color 0.15s ease;
    word-break: break-word;
}

/* Redes sociales */
.provdet-social {
    display: flex;
    gap: 8px;
}

.provdet-social a {
    width: 38px; height: 38px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text-2);
    transition: all 0.15s ease;
}
.provdet-social a:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #0a0a0a;
    transform: translateY(-2px);
}

/* Lightbox */
.provdet-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: zoom-out;
    animation: provdetFadeIn 0.2s ease;
}
@keyframes provdetFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.provdet-lightbox img {
    max-width: 95%;
    max-height: 92vh;
    border-radius: 8px;
    cursor: default;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.provdet-lightbox__close {
    position: absolute;
    top: 24px; right: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text);
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.15s ease;
}
.provdet-lightbox__close:hover {
    background: var(--gold);
    color: #0a0a0a;
    border-color: var(--gold);
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .provdet-body__inner {
        grid-template-columns: 1fr;
    }
    .provdet-side {
        position: static;
    }
}

@media (max-width: 700px) {
    .prov-hero               { height: auto; min-height: 240px; margin: 14px 12px 0; }
    .prov-hero__content      { padding: 32px 24px; }
    .prov-hero__title        { font-size: 1.7rem; }
    .prov-controls           { padding: 18px 12px 8px; top: 60px; }
    .prov-grid-section       { padding: 8px 12px 40px; }
    .prov-grid               { grid-template-columns: 1fr 1fr; gap: 12px; }

    .provdet-hero            { margin: 14px 12px 0; min-height: auto; }
    .provdet-hero__content   { padding: 24px 20px; }
    .provdet-hero__head      { flex-direction: column; align-items: flex-start; gap: 14px; }
    .provdet-hero__logo      { width: 80px; height: 80px; }
    .provdet-hero__title     { font-size: 1.5rem; }
    .provdet-body            { padding: 24px 12px 40px; }
    .provdet-gallery         { grid-template-columns: repeat(2, 1fr); }
    .provdet-map             { height: 260px; }
}

@media (max-width: 480px) {
    .prov-grid               { grid-template-columns: 1fr; }
    .prov-card__footer       { flex-direction: column; align-items: stretch; }
    .prov-card__cta          { justify-content: center; }
}
