/* CSS Variables */
:root {
    --pricing-border: #transparent;
    --pricing-bg: #ffffff;
    --pricing-header-bg: transparent;
    --pricing-text: #000;
    --pricing-text-light: #000;
    --pricing-price-color: #000;
}

.wp-block-pricing-table {
    margin-top: 0;
    margin-bottom: 0;
}

.pricing-container {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
    margin: 0 auto;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
}
.pricing-container span{
	padding-bottom: 0;
}

/* HEADER TEMPORADAS */
.pricing-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 0;
    background-color: var(--pricing-header-bg);
    border-bottom: 2px solid var(--pricing-border);
    margin-bottom: 3rem;
}

.header-cell {
    /* padding: 20px; */
    text-align: center;
    border-right: 1px solid var(--pricing-border);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.header-cell:last-child {
    border-right: none;
}

.header-cell h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--pricing-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
}

/* FILAS */
.pricing-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 0;
    border-bottom: 1px solid var(--pricing-border);
}

.pricing-row:last-child {
    border-bottom: none;
}

.pricing-cell {
    /* padding: 18px 20px; */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-right: 1px solid var(--pricing-border);
    min-height: 50px;
}

.pricing-cell:last-child {
    border-right: none;
}

/* PRIMERA CELDA (ETIQUETA) */
.pricing-row .pricing-cell:first-child {
    /* background-color: var(--pricing-bg);
    font-weight: 600;
    color: var(--pricing-text);
    font-size: 13px; */
    text-align: left;
    align-items: flex-start;
    /* padding-top: 20px;
    padding-bottom: 20px; */
}

/* CELDAS DE PRECIO */
.pricing-row .pricing-cell:not(:first-child) {
    text-align: center;
    /* font-size: 16px;
    font-weight: 700;
    color: var(--pricing-price-color); */
}

.pricing-row .pricing-cell.numeric {
    flex-direction: row;
    gap: 2px;
}

.price-currency {
    font-size: 14px;
    font-weight: 600;
}

/* SECCIÓN IVA */
.services-section {
    background-color: transparent;
    padding: 2rem 20px;
    color: var(--pricing-text-light);
	text-align: center;
}

.services-section strong {
    display: block;
}

* ============================
   RESPONSIVE - TABLET (769px a 1024px)
   ============================ */

@media screen and (min-width: 481px) and (max-width: 1024px) {
    .pricing-header,
    .pricing-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-cell,
    .pricing-cell {
        padding: 15px;
        min-height: 70px;
        border-right: none;
        border-bottom: 1px solid var(--pricing-border);
    }

    /* Bordes verticales en posiciones impares */
    .pricing-header .header-cell:nth-child(odd):not(:nth-child(1)),
    .pricing-row .pricing-cell:nth-child(odd):not(:nth-child(1)) {
        border-left: 1px solid var(--pricing-border);
    }

    .header-cell h3,
    .pricing-row .pricing-cell:first-child {
        font-size: 12px;
    }

    .header-cell p {
        font-size: 11px;
    }

    .pricing-row .pricing-cell:not(:first-child) {
        font-size: 14px;
    }

    .pricing-row .pricing-cell:first-child {
        grid-column: 1 / -1;
        background-color: var(--pricing-bg);
        border-bottom: 2px solid var(--pricing-border);
    }
}

/* ============================
   RESPONSIVE - MOBILE (480px)
   ============================ */

@media (max-width: 480px) {
    .pricing-container {
        border-radius: 0;
        box-shadow: none;

    }

    .pricing-header,
    .pricing-row {
        grid-template-columns: 1fr;
    }

    .header-cell,
    .pricing-cell {
        border-right: none;
        border-bottom: 1px solid var(--pricing-border);
        padding: 12px 15px;
    }

    .header-cell {
        min-height: auto;
        text-align: left;
    }

    .header-cell h3 {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .pricing-row .pricing-cell:first-child {
        text-align: left;
    }

    
    .pricing-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
    }

    [role="rowheader"] {
        flex-basis: 100%; /* ocupa todo el ancho disponible */
        padding-bottom: 0;
    }

    [role="cell"] {
        flex: 1; /* los 3 celdas se distribuyen equitativamente */
        padding-top: 0;
    }
    .pricing-row[data-type=room] .pricing-cell[role=cell],
    .pricing-row[data-type=extra] .pricing-cell[role=cell],
    .pricing-row[data-type=breakfast] .pricing-cell[role=cell]{
        flex-direction: column;
        justify-content: start;
        align-items: flex-start;
        text-align: left;
    }
    .pricing-row[data-type=room] .pricing-cell[role=cell]:nth-of-type(2):before{
        content: "T.ALTA";
        font-size: .625rem;
    }
    .pricing-row[data-type=room] .pricing-cell[role=cell]:nth-of-type(3):before{
        content: "T.MEDIA";
        font-size: .625rem;
    }
    .pricing-row[data-type=room] .pricing-cell[role=cell]:nth-of-type(4):before{
        content: "T.BAJA";
        font-size: .625rem;
    }

    .services-section {
        font-size: 11px;
        padding: 12px 15px;
    }
}

/* ============================
   ALINEACIONES
   ============================ */

.wp-block-pricing-table.alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
}

.wp-block-pricing-table.alignwide {
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

/* Editor de Gutenberg - vista previa */
.wp-block-pricing-table .components-placeholder {
    padding: 20px;
    text-align: center;
    background: #f5f5f5;
    border: 1px dashed #ccc;
}