/* ==============================
   Carrito - Compacto + scroll solo en cards
============================== */

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.ah-cart-page {
    width: 100%;
    height: calc(100vh - 92px);
    max-height: calc(100vh - 92px);
    overflow: hidden;
    padding: 18px 18px 20px;
    background: #f4f4f4;
}

/* HEADER */

.ah-cart-header h1 {
    margin: 0 0 14px;
    font-size: 30px;
    line-height: .95;
    font-weight: 600;
    color: #000;
    letter-spacing: 1.4px;
}

/* LAYOUT */

.ah-cart-layout {
    height: calc(100% - 48px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: stretch;
    overflow: hidden;
}

.ah-cart-products {
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

.ah-cart-scroll {
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 8px 18px 4px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    align-items: start;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ah-cart-scroll::-webkit-scrollbar {
    display: none;
}

.ah-cart-item {
    display: block;
    min-width: 0;
}

/* CARD */

.ah-cart-card {
    position: relative;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .10);
    display: flex;
    flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
}

.ah-cart-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(0,0,0,.14);
}

/* ACCIONES SUPERIORES */

.ah-cart-card-top-actions {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 0;
    z-index: 8;
}

.ah-cart-check {
    position: absolute;
    top: 9px;
    left: 9px;
    z-index: 9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ah-cart-check input {
    display: none;
}

.ah-cart-check span {
    width: 23px;
    height: 23px;
    border-radius: 7px;
    background: #222;
    box-shadow: 0 4px 10px rgba(0,0,0,.22);
    position: relative;
}

.ah-cart-check input:checked + span::after {
    content: "✓";
    position: absolute;
    inset: 0;
    color: #fff;
    font-size: 15px;
    line-height: 23px;
    text-align: center;
    font-weight: 900;
}

.ah-cart-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 9;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    border: none;
    background: #cd1218;
    color: #fff;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
    font-weight: 300;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(205,18,24,.25);
    transition: transform .2s ease, background .2s ease;
}

.ah-cart-remove:hover {
    background: #a90f14;
    transform: scale(1.06);
}

/* CARD TOP */

.ah-cart-card-main {
    padding: 13px;
    background: #fff;
}

.ah-cart-img {
    display: block;
    width: 100%;
    height: 125px !important;
    min-height: 125px !important;
    max-height: 125px !important;
    border-radius: 11px;
    overflow: hidden;
    background: #e8e8e8;
    margin-bottom: 10px;
}

.ah-cart-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* INFO */

.ah-cart-info {
    padding: 0;
    display: block;
}

.ah-cart-info h3 {
    margin: 0 0 7px;
    font-size: 12px;
    line-height: 1.18;
    font-weight: 900;
    letter-spacing: .4px;
    color: #000;
    text-transform: uppercase;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 28px;
}

.ah-cart-info h3 a {
    color: inherit;
    text-decoration: none;
}

.ah-cart-info h3 a:hover {
    color: #cd1218;
}

.ah-cart-location {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    gap: 6px;
    font-size: 10.5px;
    line-height: 1.25;
    color: #444;
    margin-bottom: 7px;
    min-height: 26px;
}

.ah-cart-location i {
    font-size: 11px;
    color: #5a5760;
    margin-top: 1px;
}

.ah-cart-specs-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px 7px;
    margin-top: 6px;
}

.ah-cart-specs-list__item {
    display: flex;
    gap: 4px;
    align-items: baseline;
    font-size: 9.5px;
    line-height: 1.15;
    color: #444;
}

.ah-cart-specs-list__item strong {
    font-weight: 900;
    color: #111;
}

.ah-cart-specs-list__item span {
    font-weight: 600;
    color: #666;
}

.ah-cart-meta {
    display: none;
}

/* BLOQUE RENTA */

.ah-cart-price-box {
    position: relative;
    background: #000;
    padding: 16px 13px 14px !important;
    min-height: 205px !important;
    height: auto !important;
    flex: none !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-shadow: none !important;
    border: none !important;
    margin: 0 !important;
}

.ah-cart-date-field {
    width: 100%;
}

/* PLANES */

.cart-month-plans {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 7px 5px;
    margin: 0 0 12px;
    padding: 2px 0 0;
    overflow: visible;
}

.cart-month-plan {
    position: relative;
    min-width: 54px;
    min-height: 29px;
    padding: 7px 8px;
    border: 1.5px solid #fff;
    background: transparent;
    color: #fff;
    border-radius: 999px;
    font-size: 9.8px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: .2s ease;
    white-space: nowrap;
}

.cart-month-plan:hover,
.cart-month-plan.is-active {
    background: #fff;
    color: #cd1218;
}

.cart-month-plan[data-months="3"]::after,
.cart-month-plan[data-months="6"]::after,
.cart-month-plan[data-months="12"]::after {
    display: none;
}

/* INPUTS */

.ah-cart-date-field input,
.ah-general-date input {
    width: 100%;
    height: 38px;
    border: none;
    outline: none;
    border-radius: 8px;
    text-align: center;
    font-size: 10.5px;
    font-weight: 900;
    color: #1d1d1d;
    background: #fff;
    padding: 0 9px;
    box-shadow: none;
}

.ah-cart-date-field input::placeholder,
.ah-general-date input::placeholder {
    color: #8d8d8d;
}

.ah-cart-selected-range {
    min-height: 4px;
    font-size: 11px;
    color: #fff;
}

/* ALERTAS */

.ah-cart-date-alert {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    padding: 8px 10px;
    border-radius: 8px;
    width: 100%;
}

.ah-cart-date-alert i {
    color: #ffcc00;
    font-size: 12px;
}

.ah-cart-date-alert .alert-text {
    font-size: 10.5px;
}

/* PRECIO */

.ah-cart-price-comparison {
    width: 100%;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    min-height: 32px;
}

.ah-cart-price-base {
    color: rgba(255, 255, 255, .74);
    font-size: 10.5px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.ah-cart-price-base span {
    font-size: 8.5px;
    font-weight: 800;
}

.ah-cart-price-base.is-crossed {
    text-decoration: line-through;
    text-decoration-thickness: 2px;
    opacity: .9;
}

.ah-cart-price {
    margin-top: 0;
    width: auto;
    color: #fff;
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.spot-calculated-price,
.spot-calculated-price.ah-cart-price-trigger {
    border: none;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    text-align: center;
}

.spot-calculated-price:hover,
.spot-calculated-price.ah-cart-price-trigger:hover {
    opacity: .85;
}

.ah-cart-savings-trigger {
    width: 25px;
    height: 25px;
    min-width: 25px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #cd1218;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    box-shadow: 0 6px 14px rgba(0,0,0,.12);
}

.ah-cart-savings-trigger:hover {
    transform: scale(1.08);
    background: #f7f7f7;
    color: #a90f14;
}

.ah-cart-plan-savings-data {
    display: none !important;
}

/* SIDEBAR DERECHO */

.ah-cart-sidebar {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    align-self: stretch;
}

.ah-reservation-panel {
    height: 100%;
    max-height: 100%;
    background: #fff;
    border-radius: 18px;
    padding: 18px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ah-accordion-header {
    width: 100%;
    padding: 0 0 11px;
    background: transparent !important;
    border: none;
    border-bottom: 1px solid #d4d4d4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.15;
    font-weight: 900;
    color: #000;
    text-align: left;
    box-shadow: none !important;
    outline: none !important;
}

.ah-accordion-header:hover,
.ah-accordion-header:focus,
.ah-accordion-header:active {
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.ah-accordion-header i {
    transition: transform .25s ease;
}

.ah-reservation-panel.is-collapsed .ah-accordion-header i {
    transform: rotate(180deg);
}

.ah-accordion-body {
    padding-top: 14px;
    background: transparent !important;
}

.ah-reservation-panel.is-collapsed .ah-accordion-body {
    display: none;
}

.ah-accordion-body p {
    margin: 0 0 12px;
    font-size: 11.5px;
    line-height: 1.35;
    color: #222;
}

.ah-general-date input {
    height: 40px;
    background: #fff;
    font-size: 11px;
    border-radius: 8px;
    color: #333;
    box-shadow: 0 5px 16px rgba(0,0,0,.08);
}

/* BOTONES */

.ah-btn,
.ah-btn-rent,
button.ah-btn,
a.ah-btn {
    width: 100%;
    height: 42px;
    min-height: 42px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: #cd1218;
    color: #fff !important;
    border: none;
    outline: none;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.ah-btn:hover,
.ah-btn-rent:hover,
button.ah-btn:hover,
a.ah-btn:hover {
    background: #b80f15;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(205, 18, 24, .25);
}

.ah-btn-primary {
    margin-top: 16px;
}

.ah-btn-rent {
    margin-top: auto;
}

.ah-btn.is-loading,
.ah-btn-rent.is-loading,
.solicitar-renta.is-loading {
    pointer-events: none;
    opacity: .7;
}

/* RESUMEN */

.ah-summary {
    margin-top: 18px;
}

.ah-summary h2 {
    margin: 0 0 9px;
    padding-bottom: 10px;
    border-bottom: 1px solid #d4d4d4;
    font-size: 19px;
    line-height: 1;
    font-weight: 900;
    color: #000;
}

.ah-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px;
    font-size: 12px;
    color: #000;
}

/* EMPTY */

.ah-cart-empty {
    background: #fff;
    border-radius: 18px;
    padding: 40px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

.ah-cart-empty h3 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 800;
}

/* CALENDARIO */

.daterangepicker {
    z-index: 9999999 !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    width: min(940px, calc(100vw - 32px)) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 32px) !important;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    border-radius: 14px !important;
    box-shadow: 0 18px 46px rgba(0,0,0,.18) !important;
}

.daterangepicker.opensleft::before,
.daterangepicker.opensleft::after,
.daterangepicker.opensright::before,
.daterangepicker.opensright::after,
.daterangepicker.openscenter::before,
.daterangepicker.openscenter::after {
    display: none !important;
}

.daterangepicker .drp-calendar.left,
.daterangepicker .drp-calendar.right {
    width: 50% !important;
    max-width: 50% !important;
    padding: 14px !important;
}

.daterangepicker .calendar-table,
.daterangepicker .calendar-table table {
    width: 100% !important;
}

.daterangepicker .calendar-table th,
.daterangepicker .calendar-table td {
    font-size: 14px !important;
    padding: 8px !important;
}

.calendar-animated {
    transition: opacity .2s ease, transform .2s ease;
}

.calendar-visible {
    opacity: 1;
}

.calendar-hidden {
    opacity: 0;
}

/* MODALES */

.ahc-cart-price-modal,
.ahc-cart-savings-modal {
    position: fixed;
    inset: 0;
    z-index: 99999999;
    background: rgba(0, 0, 0, .35);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ahc-cart-price-modal.is-open,
.ahc-cart-savings-modal.is-open {
    display: flex;
}

.ahc-cart-price-modal__dialog,
.ahc-cart-savings-modal__dialog {
    width: 100%;
    max-width: 450px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    overflow: hidden;
}

.ahc-cart-price-modal__head,
.ahc-cart-savings-modal__head {
    padding: 22px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e5e5;
}

.ahc-cart-price-modal__head h3,
.ahc-cart-savings-modal__head h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    color: #000;
}

.ahc-cart-price-modal__close,
.ahc-cart-savings-modal__close {
    border: none;
    background: transparent;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    color: #111;
}

.ahc-cart-price-modal__body,
.ahc-cart-savings-modal__body {
    padding: 24px;
}

.ahc-cart-price-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    font-size: 15px;
    color: #222;
}

.ahc-cart-price-line strong {
    font-size: 16px;
    color: #000;
    white-space: nowrap;
}

.ahc-cart-price-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 18px 0;
}

.ahc-cart-price-line--total {
    margin-bottom: 0;
    font-size: 19px;
    font-weight: 900;
}

.ahc-cart-price-line--total strong {
    font-size: 22px;
    color: #cd1218;
}

.ahc-cart-savings-modal__body {
    display: grid;
    gap: 10px;
}

.ahc-cart-savings-modal__body span {
    font-size: 14px;
    font-weight: 900;
    color: #cd1218;
}

.ahc-cart-savings-modal__body strong {
    font-size: 26px;
    font-weight: 900;
    color: #111;
}

.ahc-cart-savings-modal__body small {
    font-size: 14px;
    font-weight: 700;
    color: #444;
}

.swal-wide-popup {
    width: 450px !important;
    max-width: 90vw !important;
}

/* ==============================
   BLOQUEO SOLO EN ESTA PÁGINA
============================== */

@media (min-width: 1301px) {
    body:has(.ah-cart-page) {
        overflow: hidden !important;
    }
}

/* ==============================
   RESPONSIVE
============================== */

@media (max-width: 1300px) {
    body:has(.ah-cart-page) {
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    .ah-cart-page,
    .ah-cart-layout,
    .ah-cart-products,
    .ah-cart-scroll,
    .ah-cart-sidebar,
    .ah-reservation-panel {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .ah-cart-page {
        padding: 24px 16px 40px;
    }

    .ah-cart-layout {
        grid-template-columns: 1fr;
    }

    .ah-cart-scroll {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
        gap: 16px;
    }

    .ah-cart-sidebar {
        max-width: 480px;
        width: 100%;
        margin: 12px auto 0;
    }

    .ah-btn-rent {
        margin-top: 24px;
    }
}

@media (max-width: 991px) {
    .ah-cart-page {
        padding: 24px 16px 40px;
    }

    #dashboard {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

@media (max-width: 768px) {
    .ah-cart-page {
        padding: 22px 12px 38px;
    }

    .ah-cart-header h1 {
        font-size: 34px;
        margin-bottom: 18px;
    }

    .ah-cart-scroll {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .ah-cart-img {
        height: 200px !important;
        min-height: 200px !important;
        max-height: 200px !important;
    }

    .daterangepicker {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
    }

    .daterangepicker .drp-calendar.left,
    .daterangepicker .drp-calendar.right {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        padding: 10px !important;
    }

    .daterangepicker .calendar-table th,
    .daterangepicker .calendar-table td {
        font-size: 13px !important;
        padding: 6px !important;
    }
}

@media (max-width: 520px) {
    .ah-cart-page {
        padding-left: 10px;
        padding-right: 10px;
    }

    .ah-cart-img {
        height: 185px !important;
        min-height: 185px !important;
        max-height: 185px !important;
    }

    .ah-cart-specs-list {
        grid-template-columns: 1fr;
    }

    .cart-month-plan {
        min-width: 58px;
        padding: 8px 9px;
        font-size: 10.5px;
    }

    .ah-cart-price {
        font-size: 19px;
    }

    .ahc-cart-price-modal__dialog,
    .ahc-cart-savings-modal__dialog {
        max-width: calc(100vw - 28px);
    }
}
