:root {
    --cyv-red: #c8102e;
    --cyv-red-dark: #a60d26;

    --cyv-text: #1e1e1e;
    --cyv-muted: #6b6b6b;

    --cyv-border: #e6e6e6;
    --cyv-background: #f7f7f7;

    --cyv-radius: 14px;
}


.cyv-detail {
    background: #fff;
    color: var(--cyv-text);
    padding: 34px 20px 60px;
}


.cyv-detail__container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}


/* =========================================================
   CABECERA
========================================================= */

.cyv-detail__brand-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;

    padding: 15px 20px 30px;

    text-align: left;
}


.cyv-detail__brand-logo img {
    display: block;

    width: 150px;
    height: auto;
}


.cyv-detail__brand-message {
    max-width: 600px;
}


.cyv-detail__brand-intro {
    margin: 0;

    font-size: clamp(1rem, 2vw, 1.35rem);
    font-weight: 500;
}


.cyv-detail__brand-highlight {
    margin: 3px 0 0;

    color: var(--cyv-red);

    font-size: clamp(1.7rem, 4vw, 2.8rem);
    font-weight: 800;

    line-height: 1.05;
}


/* =========================================================
   FICHA / REFERENCIA
========================================================= */

.cyv-detail__sheet-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 18px 0;

    border-top: 3px solid var(--cyv-red);
    border-bottom: 1px solid var(--cyv-border);
}


.cyv-detail__sheet-label {
    font-size: 1.15rem;
    font-weight: 800;

    letter-spacing: .08em;
}


.cyv-detail__reference {
    display: flex;
    align-items: center;

    gap: 10px;
}


.cyv-detail__reference span {
    color: var(--cyv-muted);

    font-size: .72rem;
    font-weight: 700;

    letter-spacing: .08em;
}


.cyv-detail__reference strong {
    color: var(--cyv-red);

    font-size: 1rem;
}


/* =========================================================
   HERO
========================================================= */

.cyv-detail__hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;

    gap: 30px;

    padding: 32px 0 25px;
}


.cyv-detail__hero-info {
    flex: 1;
}


.cyv-detail__hero h1 {
    margin: 0 0 10px;

    font-size: clamp(1.7rem, 4vw, 2.6rem);
    line-height: 1.15;
}


.cyv-detail__location {
    display: flex;
    align-items: center;

    gap: 7px;

    margin: 0;

    color: var(--cyv-muted);
}


.cyv-detail__location-icon {
    display: inline-flex;

    width: 20px;

    color: var(--cyv-red);
}


.cyv-detail__location-icon svg {
    width: 100%;

    fill: currentColor;
}


.cyv-detail__price {
    text-align: right;
}


.cyv-detail__price span,
.cyv-detail__price small {
    display: block;

    color: var(--cyv-muted);
}


.cyv-detail__price strong {
    display: block;

    color: var(--cyv-red);

    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.05;
}


/* =========================================================
   GALERÍA
========================================================= */

.cyv-detail__gallery {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 8px;

    margin: 0 0 42px;
}


.cyv-detail__gallery img {
    display: block;

    width: 100%;

    aspect-ratio: 4 / 3;

    object-fit: cover;

    border-radius: 8px;
}


.cyv-detail__gallery img:first-child {
    grid-column: span 2;
    grid-row: span 2;
}


/* =========================================================
   SECCIONES
========================================================= */

.cyv-detail__section {
    margin-top: 48px;
}


.cyv-detail__section-title {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 22px;
}


.cyv-detail__section-title > span {
    width: 5px;
    height: 28px;

    background: var(--cyv-red);

    border-radius: 5px;
}


.cyv-detail__section-title h2 {
    margin: 0;

    font-size: 1.55rem;
}


/* =========================================================
   DATOS PRINCIPALES
========================================================= */

.cyv-detail__facts {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 12px;
}


.cyv-detail__fact {
    padding: 18px;

    background: var(--cyv-background);

    border: 1px solid var(--cyv-border);

    border-radius: var(--cyv-radius);
}


.cyv-detail__fact span {
    display: block;

    margin-bottom: 5px;

    color: var(--cyv-muted);

    font-size: .82rem;
}


.cyv-detail__fact strong {
    display: block;

    font-size: 1rem;
}


/* =========================================================
   CARACTERÍSTICAS
========================================================= */

.cyv-detail__characteristics {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 12px;
}


.cyv-detail__characteristic {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 14px 16px;

    border: 1px solid var(--cyv-border);

    border-radius: 10px;
}


.cyv-detail__check {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 25px;

    width: 25px;
    height: 25px;

    color: #fff;
    background: var(--cyv-red);

    border-radius: 50%;

    font-size: .8rem;
    font-weight: 800;
}


/* =========================================================
   UBICACIÓN
========================================================= */

.cyv-detail__location-box {
    display: flex;
    align-items: center;

    gap: 18px;

    padding: 22px;

    background: var(--cyv-background);

    border-radius: var(--cyv-radius);
}


.cyv-detail__location-big-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 54px;

    width: 54px;
    height: 54px;

    color: #fff;
    background: var(--cyv-red);

    border-radius: 50%;
}


.cyv-detail__location-big-icon svg {
    width: 25px;

    fill: currentColor;
}


.cyv-detail__location-box p {
    margin: 0 0 12px;
}


.cyv-detail__maps-button {
    display: inline-flex;
    align-items: center;

    gap: 7px;

    color: var(--cyv-red);

    font-weight: 700;

    text-decoration: none;
}


.cyv-detail__maps-button:hover {
    color: var(--cyv-red-dark);
}


.cyv-detail__maps-button svg {
    width: 17px;

    fill: currentColor;
}


/* =========================================================
   SITIOS DE INTERÉS
========================================================= */

.cyv-detail__interest-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}


.cyv-detail__interest-card {
    overflow: hidden;

    border: 1px solid var(--cyv-border);

    border-radius: var(--cyv-radius);

    background: #fff;
}


.cyv-detail__interest-card header {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 16px 18px;

    background: var(--cyv-background);
}


.cyv-detail__interest-card h3 {
    margin: 0;

    font-size: 1.05rem;
}


.cyv-detail__interest-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    color: var(--cyv-red);

    background: #fff;

    border-radius: 50%;
}


.cyv-detail__interest-icon svg {
    width: 21px;
    height: 21px;

    fill: currentColor;
}


.cyv-detail__interest-card ul {
    margin: 0;
    padding: 8px 18px;

    list-style: none;
}


.cyv-detail__interest-card li {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 11px 0;

    border-bottom: 1px solid var(--cyv-border);
}


.cyv-detail__interest-card li:last-child {
    border-bottom: 0;
}


.cyv-detail__interest-card li > span {
    min-width: 0;
}


.cyv-detail__interest-card li strong {
    flex: 0 0 auto;

    color: var(--cyv-red);

    font-size: .85rem;

    white-space: nowrap;
}


/* =========================================================
   DESCRIPCIÓN
========================================================= */

.cyv-detail__description {
    margin-bottom: 45px;
}


.cyv-detail__description-content {
    max-width: 900px;

    color: #444;

    font-size: 1rem;

    line-height: 1.75;
}


.cyv-detail__description-content p:first-child {
    margin-top: 0;
}


/* =========================================================
   FOOTER
========================================================= */

.cyv-detail__footer {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-top: 55px;
    padding-top: 22px;

    border-top: 1px solid var(--cyv-border);
}


.cyv-detail__footer img {
    width: 55px;
    height: auto;
}


.cyv-detail__footer p {
    margin: 0;

    font-weight: 700;
}


.cyv-detail__footer span {
    margin-left: auto;

    color: var(--cyv-muted);

    font-size: .85rem;
}


/* =========================================================
   TABLET
========================================================= */

@media ( max-width: 850px ) {

    .cyv-detail__facts {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .cyv-detail__characteristics {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .cyv-detail__gallery {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   MÓVIL
========================================================= */

@media ( max-width: 600px ) {

    .cyv-detail {
        padding: 20px 14px 40px;
    }


    .cyv-detail__brand-header {
        flex-direction: column;

        gap: 10px;

        text-align: center;
    }


    .cyv-detail__brand-logo img {
        width: 120px;
    }


    .cyv-detail__sheet-heading {
        align-items: flex-start;
    }


    .cyv-detail__reference {
        display: block;

        text-align: right;
    }


    .cyv-detail__reference span,
    .cyv-detail__reference strong {
        display: block;
    }


    .cyv-detail__hero {
        display: block;
    }


    .cyv-detail__price {
        margin-top: 22px;

        text-align: left;
    }


    .cyv-detail__facts,
    .cyv-detail__characteristics,
    .cyv-detail__interest-grid {
        grid-template-columns: 1fr;
    }


    .cyv-detail__gallery {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }


    .cyv-detail__gallery img:first-child {
        grid-column: span 2;
    }


    .cyv-detail__location-box {
        align-items: flex-start;
    }


    .cyv-detail__interest-card li {
        display: block;
    }


    .cyv-detail__interest-card li strong {
        display: block;

        margin-top: 4px;
    }


    .cyv-detail__footer {
        flex-wrap: wrap;
    }


    .cyv-detail__footer span {
        width: 100%;
        margin-left: 67px;
    }

}
/* Ajustes de la ficha: precio, iconos y detalles. */
.cyv-detail__price--below-gallery { margin: 0 0 38px; text-align: left; }
.cyv-detail__price--below-gallery strong { color: #000; font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); }
.cyv-detail__fact--with-icon { display: flex; align-items: center; gap: 10px; }
.cyv-detail__fact--with-icon > div { min-width: 0; overflow-wrap: anywhere; }
.cyv-detail__fact .cyv-detail__fact-icon { display: flex; flex: 0 0 28px; align-items: center; margin: 0; color: var(--cyv-red); }
.cyv-detail__fact-icon svg, .cyv-detail__walk-time svg { width: 24px; height: 24px; flex-shrink: 0; fill: none; }
.cyv-detail__details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; }
.cyv-detail__detail-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--cyv-border); }
.cyv-detail__detail-row dt { color: var(--cyv-muted); }
.cyv-detail__detail-row dd { margin: 0; font-weight: 700; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.cyv-detail__interest-card li .cyv-detail__walk-time { display: inline-flex; align-items: center; gap: 5px; }
.cyv-detail__maps-button svg { flex-shrink: 0; }
@media (max-width: 600px) {
    .cyv-detail__details { grid-template-columns: 1fr; }
    .cyv-detail__price--below-gallery { margin-top: 0; }
}

/* Carrusel y visor ampliado de fotografías. */
.cyv-carousel { margin: 0 0 28px; }
.cyv-carousel__stage { background: #f4f4f4; border-radius: 12px; overflow: hidden; }
.cyv-carousel__slide { display: block; cursor: zoom-in; }
.cyv-carousel__slide[hidden] { display: none !important; }
.cyv-carousel__slide img { display: block; width: 100%; height: clamp(240px, 48vw, 530px); object-fit: contain; }
.cyv-carousel__controls { display: flex; justify-content: center; align-items: center; gap: 18px; padding: 12px 0; }
.cyv-carousel__controls button, .cyv-carousel__close { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 8px 14px; border: 1px solid #ddd; border-radius: 8px; background: #fff; color: #111; font-size: 24px; line-height: 1; cursor: pointer; }
.cyv-carousel__controls button:disabled { opacity: .35; cursor: default; }
.cyv-carousel__controls span { min-width: 65px; text-align: center; font-variant-numeric: tabular-nums; }
.cyv-carousel__hint { margin: 0; text-align: center; font-size: .85rem; color: #666; }
.cyv-carousel a:focus-visible, .cyv-carousel button:focus-visible { outline: 3px solid #c8102e; outline-offset: 3px; }
.cyv-carousel__dialog { width: 96vw; max-width: 1500px; max-height: 96vh; max-height: 96dvh; margin: auto; padding: 16px; box-sizing: border-box; border: 0; border-radius: 12px; background: #111; color: #fff; }
.cyv-carousel__dialog::backdrop { background: rgba(0,0,0,.88); }
.cyv-carousel__dialog-header { display: flex; justify-content: flex-end; padding-bottom: 8px; }
.cyv-carousel__close { font-size: 16px; gap: 8px; }
.cyv-carousel__large-stage img { display: block; width: 100%; height: 70vh; height: 70dvh; object-fit: contain; }
.cyv-carousel__dialog .cyv-carousel__controls { padding-bottom: 0; }
html.cyv-photo-open { overflow: hidden; }
@media (max-width: 600px) {
    .cyv-carousel__dialog { padding: 10px; width: 98vw; }
    .cyv-carousel__large-stage img { height: 65vh; height: 65dvh; }
}

/* Precio y acción para compartir la URL canónica de la ficha. */
.cyv-detail__price-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 38px; }
.cyv-detail__price-actions .cyv-detail__price { margin: 0; }
.cyv-detail__share { max-width: 100%; }
.cyv-detail__share-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 12px 20px; background: var(--cyv-red); color: #fff; border: 0; border-radius: 9px; cursor: pointer; font: inherit; font-weight: 700; }
.cyv-detail__share-button:hover { background: var(--cyv-red-dark); }
.cyv-detail__share-button:focus-visible { outline: 3px solid var(--cyv-red); outline-offset: 3px; }
.cyv-detail__share-button:disabled { opacity: .65; cursor: wait; }
.cyv-detail__share-button svg { width: 20px; height: 20px; flex-shrink: 0; }
.cyv-detail__share-status { display: block; margin-top: 6px; font-size: .85rem; color: var(--cyv-muted); }
.cyv-detail__share-status:empty { display: none; }
.cyv-detail__share-link { display: block; box-sizing: border-box; width: 100%; min-width: 0; margin-top: 8px; padding: 8px; }
.cyv-detail__share [hidden] { display: none !important; }
@media (max-width: 600px) {
    .cyv-detail__share { width: 100%; }
    .cyv-detail__share-button { width: 100%; }
}

/* Presentación corporativa: Oxford, blanco y rojo C&V. */
.cyv-detail {
    --cyv-oxford: #30363d;
    background: #eef0f2;
    padding: 36px 20px 60px;
}

.cyv-detail__container {
    box-sizing: border-box;
    padding: 28px 32px 32px;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(25, 32, 40, .07);
}

.cyv-detail__brand-header {
    position: relative;
    gap: 30px;
    padding: 32px;
    background: var(--cyv-oxford);
    color: #fff;
    border-left: 5px solid var(--cyv-red);
    border-radius: 12px 12px 0 0;
}

.cyv-detail__brand-logo {
    flex: 0 0 auto;
    padding: 10px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
}

.cyv-detail__brand-logo img {
    width: 138px;
    height: auto;
}

.cyv-detail__brand-message { min-width: 0; }

.cyv-detail__brand-intro {
    color: #e0e4e8;
    font-size: clamp(.95rem, 1.8vw, 1.15rem);
    line-height: 1.5;
}

.cyv-detail__brand-highlight {
    margin-top: 7px;
    color: #fff;
    font-size: clamp(1.65rem, 3.4vw, 2.55rem);
    line-height: 1.12;
    font-weight: 800;
    text-wrap: balance;
}

.cyv-detail__brand-highlight::after {
    content: '';
    display: block;
    width: 64px;
    height: 4px;
    margin-top: 18px;
    background: var(--cyv-red);
    border-radius: 2px;
}

.cyv-detail__sheet-heading {
    padding: 16px 24px;
    background: #f5f6f7;
    border-top: 3px solid var(--cyv-red);
    border-bottom: 1px solid #e1e4e8;
    border-radius: 0 0 10px 10px;
}

.cyv-detail__sheet-label { color: var(--cyv-oxford); }
.cyv-detail__footer { border-top: 2px solid #e1e4e8; }

@media (max-width: 850px) {
    .cyv-detail__container { padding: 20px; }
    .cyv-detail__brand-header { padding: 28px 22px; gap: 22px; }
}

@media (max-width: 600px) {
    .cyv-detail { padding: 16px 10px 32px; }
    .cyv-detail__container { padding: 12px; border-radius: 14px; }
    .cyv-detail__brand-header {
        flex-direction: column;
        padding: 24px 16px;
        gap: 18px;
        text-align: center;
        border-left: 0;
        border-top: 4px solid var(--cyv-red);
    }
    .cyv-detail__brand-logo img { width: 112px; }
    .cyv-detail__brand-highlight::after { margin: 16px auto 0; }
    .cyv-detail__sheet-heading { padding: 14px 12px; gap: 10px; flex-wrap: wrap; }
    .cyv-detail__sheet-label { font-size: .95rem; }
    .cyv-detail__reference { margin-left: auto; }
    .cyv-detail__reference strong { overflow-wrap: anywhere; }
}

@media print {
    .cyv-detail { background: #fff; padding: 0; }
    .cyv-detail__container { border: 0; box-shadow: none; padding: 0; }
    .cyv-detail__brand-header { background: #fff; color: #30363d; }
    .cyv-detail__brand-intro, .cyv-detail__brand-highlight { color: #30363d; }
}
