/* ═══════════════════════════════════════════════════════════
   RBP — Redsys Booking Plugin — Estilos base
   ═══════════════════════════════════════════════════════════ */

/* ── Variables de color ─────────────────────────────────── */
:root {
    --rbp-primary:     #010432;
    --rbp-accent:      #e1332c;
    --rbp-text:        #333333;
    --rbp-text-light:  #666666;
    --rbp-bg:          #ffffff;
    --rbp-bg-light:    #f5f5f5;
    --rbp-border:      #dddddd;
    --rbp-radius:      8px;
    --rbp-shadow:      0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ── Carrusel ───────────────────────────────────────────── */
.rbp-carrousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--rbp-radius);
    background: var(--rbp-bg-light);
}

.rbp-carrousel__track {
    display: flex;
    transition: transform 0.4s ease;
}

.rbp-carrousel__slide {
    min-width: 100%;
    display: none;
}

.rbp-carrousel__slide--active {
    display: block;
}

.rbp-carrousel__img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

.rbp-carrousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(1, 4, 50, 0.6);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s;
    z-index: 10;
}

.rbp-carrousel__btn:hover       { background: var(--rbp-primary); }
.rbp-carrousel__btn--prev       { left: 12px; }
.rbp-carrousel__btn--next       { right: 12px; }

.rbp-carrousel__dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.rbp-carrousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.2s;
}

.rbp-carrousel__dot--active { background: #ffffff; }

/* ── Imagen del producto ────────────────────────────────── */
.rbp-product-image {
    width: 100%; 
    background-size: cover;
    background-position: 50%;
    padding-top: 39.1%;
}

.rbp-product-image__img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
}

/* ── Descripción con "Leer más" ─────────────────────────── */
.rbp-description__short {
    font-size: 1.05rem;
    color: var(--rbp-text);
    margin-bottom: 12px;
    line-height: 1.7;
}

.rbp-description__long {
    font-size: 0.97rem;
    color: var(--rbp-text-light);
    line-height: 1.7;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

/* Colapsado: muestra solo ~3 líneas */
.rbp-description__long--collapsed {
    max-height: 80px;
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

/* Expandido */
.rbp-description__long--expanded {
    max-height: 2000px;
    -webkit-mask-image: none;
    mask-image: none;
}

.rbp-description__toggle {
    background: none;
    border: none;
    color: var(--rbp-accent);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
    margin-top: 4px;
    text-decoration: underline;
}

/* ── Título ─────────────────────────────────────────────── */
.rbp-tittle-container {
    padding-top: 54px;
}

.rbp-container-background {
    padding: 27px 0;
    width: 80%;
    margin: auto;
    position: relative;
    max-width: 1080px;
}

.rbp-container-text {
    width: 30%;
    margin-right: 5.5%;
    margin-top: -350px !important;
    background-color: #233b4ecc;
    min-height: 1px;
    mix-blend-mode: unset !important;
    font-size: 30px;
    line-height: 1.2em;
    padding: 0 20px !important;
    text-align: center;
    height: 300px;
    align-content: center;
    vertical-align: middle;
    display: inline-grid;
}

.rbp-product-title {
    text-align: center;
    color: #fff;
}

@media screen and (max-width: 480px) {
  .tab-button {
    width: 26%;
  }
  .rbp-product-title {
    width: 100%;
    margin-top: -200px !important;
    margin-right: 0;
    margin-bottom: 30px;
    font-size: 30px;
    height: 200px;
  }
}

/* ── Tabs ───────────────────────────────────────────────── */
.rbp-tabs {
    margin-top: 20px;
    font-family: Arial, sans-serif;
    border: 1px solid #ccc;
}

.rbp-tabs__nav {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--rbp-border);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.rbp-tabs__btn {
    padding: 10px 20px;
    border: none;
    background: none;
    font-size: 0.95rem;
    color: var(--rbp-text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.rbp-tabs__btn:hover             { background-color: rgba(235, 190, 238, 0.2) !important; }
.rbp-tabs__btn--active           {
    color: rgb(145, 0, 115);
    border-bottom-color: solid rgb(145, 0, 115) !important;
    font-weight: 600;
}

.rbp-tabs__panel                 { display: none; }
.rbp-tabs__panel--active         { display: block; }

.rbp-tabs__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rbp-bg-light);
}

.rbp-tabs__item i {
    color: var(--rbp-accent);
    font-size: 1.1rem;
    margin-top: 3px;
    min-width: 20px;
}

.rbp-tabs__item-title {
    font-weight: 600;
    color: var(--rbp-primary);
    margin-bottom: 4px;
}

.rbp-tabs__item-text {
    color: var(--rbp-text);
    font-size: 0.93rem;
    line-height: 1.6;
}

/* ── Productos relacionados ─────────────────────────────── */
.rbp-related-title {
    text-align:left; 
	color: #000000; 
	font-size: 20px; 
	text-align: left;
}

.rbp-related__track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.rbp-related__track::-webkit-scrollbar       { height: 4px; }
.rbp-related__track::-webkit-scrollbar-track { background: var(--rbp-bg-light); }
.rbp-related__track::-webkit-scrollbar-thumb { background: var(--rbp-border); border-radius: 2px; }

.rbp-related__card {
    min-width: 220px;
    max-width: 220px;
    border-radius: var(--rbp-radius);
    overflow: hidden;
    box-shadow: var(--rbp-shadow);
    text-decoration: none;
    color: var(--rbp-text);
    scroll-snap-align: start;
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--rbp-bg);
    display: block;
}

.rbp-related__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.rbp-related__img-wrap {
    position: relative;
    height: 140px;
    overflow: hidden;
}

.rbp-related__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rbp-related__price {
    position: absolute;
    bottom: 8px;
    left: 8px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

.rbp-related__info {
    padding: 10px 12px;
}

.rbp-related__name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--rbp-primary);
    margin: 0 0 4px;
    line-height: 1.3;
}

.rbp-related__duration {
    font-size: 0.8rem;
    color: var(--rbp-text-light);
    margin: 0;
}

/* ── Errores (solo admin) ───────────────────────────────── */
.rbp-error--admin {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 10px 14px;
    border-radius: var(--rbp-radius);
    font-size: 0.9rem;
    margin: 8px 0;
}


/* ═══════════════════════════════════════════════════════════
   CALENDARIO
   ═══════════════════════════════════════════════════════════ */

.rbp-cal-wrap {
    background: #fff;
    border-radius: var(--rbp-radius);
    box-shadow: var(--rbp-shadow);
    padding: 24px;
    max-width: 480px;
    margin: 0 auto;
    font-family: inherit;
}

/* ── Cabecera mes / año ─────────────────────────────────── */
.rbp-cal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 8px;
}

.rbp-cal__nav {
    background: none;
    border: 1px solid var(--rbp-border);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    cursor: pointer;
    color: var(--rbp-primary);
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rbp-cal__nav:hover {
    background: var(--rbp-primary);
    color: #fff;
    border-color: var(--rbp-primary);
}

.rbp-cal__month-year {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--rbp-primary);
}

.rbp-cal__select-month,
.rbp-cal__select-year {
    border: none;
    background: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--rbp-primary);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding: 2px 4px;
}

.rbp-cal__select-month:focus,
.rbp-cal__select-year:focus {
    outline: 2px solid var(--rbp-accent);
    border-radius: 4px;
}

/* ── Grid días ──────────────────────────────────────────── */
.rbp-cal__day-names {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 6px;
}

.rbp-cal__day-name {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--rbp-text-light);
    padding: 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.rbp-cal__days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

/* Cada celda del calendario */
.rbp-cal__cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: default;
    color: var(--rbp-text-light);
    transition: background 0.15s, color 0.15s;
    user-select: none;
}

/* Día del mes actual pero fuera del mes visible */
.rbp-cal__cell--outside {
    color: #ccc;
}

/* Día disponible para reservar */
.rbp-cal__cell--available {
    color: var(--rbp-text);
    cursor: pointer;
    font-weight: 500;
}

.rbp-cal__cell--available:hover {
    background: var(--rbp-bg-light);
    color: var(--rbp-primary);
}

/* Día seleccionado */
.rbp-cal__cell--selected {
    background: var(--rbp-primary);
    color: #fff !important;
    font-weight: 700;
}

/* Día no disponible */
.rbp-cal__cell--disabled {
    color: #ddd;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* ── Loading spinner ────────────────────────────────────── */
.rbp-cal__loading {
    text-align: center;
    padding: 20px 0;
    color: var(--rbp-text-light);
    font-size: 0.9rem;
    gap: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rbp-cal__loading i {
    color: var(--rbp-accent);
}

/* ── Label de sección ───────────────────────────────────── */
.rbp-cal__label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rbp-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.rbp-cal__label i {
    margin-right: 5px;
    color: var(--rbp-accent);
}

/* ── Selects de sesión y tipología ──────────────────────── */
.rbp-cal__sessions,
.rbp-cal__typologies {
    margin-top: 20px;
}

.rbp-cal__select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--rbp-border);
    border-radius: var(--rbp-radius);
    font-size: 0.95rem;
    color: var(--rbp-text);
    background: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 10px;
}

.rbp-cal__select:focus {
    outline: none;
    border-color: var(--rbp-primary);
    box-shadow: 0 0 0 3px rgba(1,4,50,0.08);
}

/* ── Precios ────────────────────────────────────────────── */
.rbp-cal__prices {
    margin-top: 20px;
    border-top: 1px solid var(--rbp-bg-light);
    padding-top: 16px;
}

.rbp-price-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--rbp-bg-light);
}

.rbp-price-row:last-of-type {
    border-bottom: none;
}

.rbp-price-row__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rbp-price-row__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--rbp-primary);
}

.rbp-price-row__price {
    font-size: 0.9rem;
    color: var(--rbp-text-light);
}

/* Selector de cantidad + - */
.rbp-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--rbp-bg-light);
    border-radius: 20px;
    padding: 4px 6px;
}

.rbp-qty__btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: var(--rbp-primary);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: background 0.2s, color 0.2s;
    line-height: 1;
}

.rbp-qty__btn:hover {
    background: var(--rbp-primary);
    color: #fff;
}

.rbp-qty__btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.rbp-qty__value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--rbp-primary);
    min-width: 20px;
    text-align: center;
}

/* ── Total ──────────────────────────────────────────────── */
.rbp-cal__total-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 2px solid var(--rbp-bg-light);
}

.rbp-cal__total-label {
    font-size: 1rem;
    color: var(--rbp-text-light);
}

.rbp-cal__total-amount {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rbp-primary);
}

/* ── Botones ────────────────────────────────────────────── */
.rbp-cal__actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.rbp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 25px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s, transform 0.15s;
    text-decoration: none;
}

.rbp-btn--primary {
    background: var(--rbp-primary);
    color: #fff;
    width: 100%;
    justify-content: center;
}

.rbp-btn--primary:hover:not(:disabled) {
    background: #020650;
    transform: translateY(-1px);
}

.rbp-btn--secondary {
    background: var(--rbp-bg-light);
    color: var(--rbp-primary);
    border: 1px solid var(--rbp-border);
}

.rbp-btn--secondary:hover {
    background: var(--rbp-border);
}

.rbp-btn--disabled,
.rbp-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}

/* ═══════════════════════════════════════════════════════════
   VISTA 2 — RESUMEN + FORMULARIO
   ═══════════════════════════════════════════════════════════ */

.rbp-form-view__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--rbp-primary);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rbp-form-view__title i {
    color: var(--rbp-accent);
}

/* ── Resumen de selección ───────────────────────────────── */
.rbp-summary {
    background: var(--rbp-bg-light);
    border-radius: var(--rbp-radius);
    padding: 16px;
    margin-bottom: 24px;
}

.rbp-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.93rem;
    padding: 5px 0;
    color: var(--rbp-text);
    border-bottom: 1px solid var(--rbp-border);
}

.rbp-summary__row:last-child {
    border-bottom: none;
}

.rbp-summary__row--total {
    font-weight: 700;
    font-size: 1rem;
    color: var(--rbp-primary);
    margin-top: 6px;
    padding-top: 10px;
    border-top: 2px solid var(--rbp-border);
    border-bottom: none;
}

.rbp-summary__date {
    font-size: 0.82rem;
    color: var(--rbp-text-light);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--rbp-border);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rbp-summary__date i { color: var(--rbp-accent); }

/* ── Formulario de cliente ──────────────────────────────── */
.rbp-client-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.rbp-field__label {
    display: block;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--rbp-text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 5px;
}

.rbp-field__input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--rbp-border);
    border-radius: var(--rbp-radius);
    font-size: 0.95rem;
    color: var(--rbp-text);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.rbp-field__input:focus {
    outline: none;
    border-color: var(--rbp-primary);
    box-shadow: 0 0 0 3px rgba(1,4,50,0.08);
}

.rbp-field__input.rbp-field--error {
    border-color: var(--rbp-accent);
}

/* ── Error de formulario ────────────────────────────────── */
.rbp-form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: var(--rbp-radius);
    padding: 10px 14px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Botones vista 2 ────────────────────────────────────── */
.rbp-form-view__actions {
    display: flex;
    gap: 12px;
}

.rbp-form-view__actions .rbp-btn--secondary {
    flex-shrink: 0;
}

.rbp-form-view__actions .rbp-btn--primary {
    flex: 1;
}

/* ── Botón de navegación deshabilitado ────────────────────────────────────── */
.rbp-cal__nav--disabled,
.rbp-cal__nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Sin disponibilidad ────────────────────────────────────── */
.rbp-price-row__unavailable {
    font-size: 0.8rem;
    color: var(--rbp-accent);
    font-style: italic;
    padding: 4px 0;
}

/* ── Filas de tipología y sesión en el resumen ────────────────────────────────────── */
.rbp-summary__row--typology,
.rbp-summary__row--session {
    color: var(--rbp-text-light);
    font-size: 0.88rem;
    border-bottom: 1px dashed var(--rbp-border);
}

.rbp-summary__row--typology i,
.rbp-summary__row--session i {
    color: var(--rbp-accent);
    margin-right: 4px;
}

/* ── Resultado de reserva ───────────────────────────────── */
.rbp-result {
    text-align: center;
    padding: 48px 24px;
    border-radius: var(--rbp-radius);
    max-width: 480px;
    margin: 0 auto;
}

.rbp-result__icon {
    font-size: 4rem;
    margin-bottom: 16px;
    display: block;
}

.rbp-result--success .rbp-result__icon { color: #16a34a; }
.rbp-result--error   .rbp-result__icon { color: var(--rbp-accent); }

.rbp-result__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--rbp-primary);
    margin-bottom: 12px;
}

.rbp-result__message {
    color: var(--rbp-text-light);
    font-size: 1rem;
    line-height: 1.6;
}

/* ── Selector privado ───────────────────────────────────── */
.rbp-private-select {
    margin-top: 8px;
}

/* ── Formulario adicional ───────────────────────────────── */
.rbp-extra-textarea {
    resize: vertical;
    min-height: 80px;
    max-height: 200px;
}

.rbp-extra-form__offset {
    background: var(--rbp-bg-light);
    border-left: 3px solid var(--rbp-accent);
    padding: 10px 14px;
    border-radius: 0 var(--rbp-radius) var(--rbp-radius) 0;
    font-size: 0.9rem;
    color: var(--rbp-text);
    margin-top: 12px;
}

.rbp-extra-form__offset i {
    color: var(--rbp-accent);
    margin-right: 6px;
}

.rbp-summary__row--offset {
    color: var(--rbp-text-light);
    font-size: 0.88rem;
    font-style: italic;
}

.rbp-summary__row--offset i {
    color: var(--rbp-accent);
    margin-right: 4px;
}

/* Aseguramos que el HTML dentro de tabs y descripciones
   respeta el formato de listas, párrafos y negritas */
.rbp-tabs__item-text ul,
.rbp-tabs__item-text ol,
.rbp-description__short ul,
.rbp-description__short ol,
.rbp-description__long ul,
.rbp-description__long ol {
    padding-left: 20px;
    margin: 8px 0;
}

.rbp-tabs__item-text li,
.rbp-description__short li,
.rbp-description__long li {
    margin-bottom: 4px;
    line-height: 1.6;
}

.rbp-tabs__item-text p,
.rbp-description__short p,
.rbp-description__long p {
    margin-bottom: 10px;
}

.rbp-tabs__item-text a,
.rbp-description__short a,
.rbp-description__long a {
    color: var(--rbp-accent);
    text-decoration: underline;
}

/* Agrupamos icono y contenido del tab en la misma línea */
.rbp-tabs__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rbp-bg-light);
}

.rbp-tabs__item-body {
    flex: 1;
}