/* ========================================
   Quartzo Suites - Frontend Styles
   ======================================== */

/* Loaders */
#gallery-container-loader, #posts-container-loader, #prices-city-loader {
    position: relative;
    overflow: hidden;
    background-color: #00000000;
    border-radius: 32px;
    opacity: 0.5;
}

#prices-city {
    gap: 30px;
    display: grid;
}

/* Gradiente animado dos loaders */
#gallery-container-loader::after,
#posts-container-loader::after,
#prices-city-loader::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        rgba(224,224,224,0) 0%,
        rgba(255,255,255,1) 50%,
        rgba(224,224,224,0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1s infinite;
    border-radius: 32px;
    opacity: 0.5;
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Slider */
.slider .prev {
    left: 0 !important;
}

.slider .next {
    right: 0 !important;
}

/* Tabela de preços */
.price-table-cell::before {
    content: none !important;
}

.price-table-row .price-table-cell:not(:last-child) {
    border-right: 1px solid #DBC2FF;
}

#prices-section {
    margin-top: 120px;
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 32px;
}

#prices-heading {
    text-align: center;
    font-family: "Cabinet Grotesk", sans-serif;
    font-size: 24px;
    font-style: italic;
    color: #D9C2FF;
    margin: 32px 0 16px;
}

#price-table {
    padding: 24px;
}

#price-table-container {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: "Cabinet Grotesk", sans-serif;
}

.price-table-row.header .price-table-cell.header-cell:nth-child(3)::after {
    content: "*Pernoite: período de 13 horas de permanência.";
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #666666;
    margin-top: 4px;
    line-height: 1.2;
}

.price-table-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.5fr 1fr !important;
    align-items: stretch !important;
    border-bottom: 1px solid #DBC2FF;
}

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

.price-table-row.header {
    background: transparent;
}

.price-table-cell.header-cell {
    color: #C7024C;
    font-weight: 700;
    text-align: center;
    font-size: 24px !important;
    height: 100%;
    align-content: center;
}

.price-table-cell {
    padding: 14px;
    text-align: center !important;
    color: #180138;
    font-size: 18px !important;
    line-height: 1.4;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.price-table-cell.promo {
    background: #350082 !important;
    color: white !important;
}

.price-observation {
    display: block;
    font-size: 12px;
    font-weight: 400;
    margin-top: 4px;
    line-height: 1.2;
}

.price-table-cell.suite-cell {
    height: 100%;
    align-content: center;
}

.suite-periodo {
    display: block;
    font-size: 12px;
    color: #676767;
    margin-top: 1px;
    font-weight: 400;
    line-height: 1.2;
}

/* Esconder período mobile no desktop */
.mobile-periodo {
    display: none;
}

.suite-cell::before { content: "Suíte"; }
.two-hours-cell::before { content: "Valor por Período"; }
.overnight-cell::before { content: "Pernoite (R$)"; }
.extra-half-cell::before { content: "Adicional / ½h (R$)"; }

#ararangua, #criciuma, #tubarao {
    cursor: pointer;
}

#aviso {
    color: #676767;
    font-family: "Cabinet Grotesk", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 130%;
}

#mobile-tipo-dropdown { display: none; }

#cont-pai {
    background: #ffffff;
    border-radius: 0 24px 24px 24px;
    padding-bottom: 24px;
}

.slider-image-wrapper {
    position: relative;
}

#gallery-container {
    position: relative;
    margin-bottom: 20px;
}

.slider {
    position: relative;
    overflow: visible;
}

.slider .slide-container {
    position: relative;
}

.slider .main-slide {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    object-position: center;
    border-radius: 24px;
    will-change: opacity;
    transition: opacity 0.3s ease;
}

.slider .prev, .slider .next {
    position: absolute;
    top: 45%;
    background: transparent;
    color: #DBC2FF;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 999 !important;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider .prev { left: 10px; }
.slider .next { right: 10px; }

.slider .prev svg, .slider .next svg {
    width: 24px;
    height: 24px;
    fill: #DBC2FF;
}

.slider .thumbnails {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 25;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
}

.slider .thumbnails img {
    width: 80px;
    height: 50px;
    object-fit: cover;
    margin-bottom: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
}

.slider .thumbnails img.active {
    border-color: #C7024C;
}

#left-container { display: flex; align-items: center; justify-content: start; }

.contato {
    display: inline-flex;
    height: 42px;
    padding: 16px 20px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    border-radius: 16px;
    background: #350082;
    color: #F2FCFF;
    text-align: center;
    font-family: "Cabinet Grotesk", sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 160%;
    border: 1px solid #350082;
}

#prices-city-name {
    color: var(--dbc-2-ff, #DBC2FF);
    font-family: "Tiempos Headline";
    font-size: 44px;
    font-style: italic;
    text-align: center;
    font-weight: 300;
    line-height: 110%;
}

#contato {
    color: #F2FCFF;
}

#contato:hover {
    color: #350082;
}

.contato:hover {
    border: 1px solid #350082;
    background: transparent;
    color: #350082;
}

#right-container { display: flex; align-items: center; justify-content: end; }

#extra-right, #extra-left, #extra-middle {
    display: grid;
    align-items: center;
    justify-content: center;
}

#tipo-suite-buttons-container button:first-child {
    border-top-left-radius: 32px;
}

#tipo-suite-buttons-container button:last-child {
    border-top-right-radius: 32px;
}

.city-btn:hover {
    color: #180138;
    background: #DBC2FF;
    border-radius: 16px;
    border: 1px solid #DBC2FF;
}

.city-btn.active {
    color: #180138 !important;
    background: #DBC2FF;
    border-radius: 16px;
    border: 1px solid #DBC2FF;
}

.city-btn.active span.elementor-button-text {
    color: #180138 !important;
}

#tipo-suite-buttons-container button:hover, #tipo-suite-buttons-container button.active {
    background-color: #ffffff;
    color: #C7024C;
}

#cont-info {
    display: flex;
    border-radius: 0 24px 24px 24px;
    padding: 24px;
    background: #fff;
}

#acomodacao-container {
    display: flex;
    justify-content: space-between;
    text-align: start;
}

#posts-select {
    border-radius: 16px;
    border: 1px solid #180138;
    color: #180138;
    font-family: "Cabinet Grotesk", sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 160%;
    padding: 10px;
    width: 100%;
}

.tipo-suite-btn {
    margin: 0;
    padding: 19px 24px;
    cursor: pointer;
    border: none;
    background: #C7024C;
    border-radius: 0;
    color: #fff;
    font-family: "Cabinet Grotesk", sans-serif !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 160%;
}

.tipo-suite-btn:hover { color: #C7024C; background: #ffffff; }

#posts-container {
    display: grid !important;
    border-radius: 0 24px 24px 24px;
    width: 90%;
    margin-top: -200px !important;
    justify-self: center;
    position: relative;
    z-index: 99;
}

#middle-container { border-left: 1px solid #DBC2FF; border-right: 1px solid #DBC2FF; }

.acomodacao-container-item {
    display: flex;
    margin: 5px;
    padding: 5px;
    text-align: start;
    width: 30%;
    font-family: "Cabinet Grotesk", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 130%;
    color: #180138;
    gap: 10px;
    align-items: center;
    justify-content: start;
}

.acomodacao-container-item img {
    max-width: 29px;
    max-height: 29px;
    display: flex;
    align-content: center;
}

.price-title {
    color: #180138;
    font-family: "Cabinet Grotesk", sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 160%;
    text-align: center;
}

.price-value {
    color: #180138;
    font-family: "Cabinet Grotesk", sans-serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 160%;
    text-align: center;
}

#container-avo {
    position: relative;
    min-height: 700px;
    gap: 60px;
    display: grid;
}

#gallery-container {
    height: 700px;
    overflow: visible;
    position: relative;
}

.slider {
    height: 700px;
    width: 100%;
    overflow: hidden;
}

.slider .main-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* ========================================
   MEDIA QUERIES
   ======================================== */

@media (max-width: 1200px) {
    #posts-select {
        font-size: 16px;
        padding: 8px;
    }
}

/* Tablet: até 1024px */
@media (max-width: 1024px) {
    #prices-city-name {
        font-size: 32px;
    }

    .price-table-row.header .price-table-cell.header-cell:nth-child(3)::after {
        content: "*Pernoite: período de 13 horas de permanência.";
        display: none;
    }

    .price-table-row {
        display: grid;
        grid-template-columns: 0.8fr 1fr 1fr 0.8fr !important;
        align-items: end !important;
        border-bottom: 1px solid #DBC2FF;
    }

    #container-avo {
        min-height: 600px;
        gap: 30px;
    }

    #aviso {
        color: #676767;
        font-size: 14px;
    }

    #gallery-container,
    .slider {
        height: auto;
    }

    #posts-container {
        width: 100%;
    }

    .price-table-cell.header-cell {
        color: #C7024C;
        font-weight: 700;
        text-align: center;
        font-size: 16px !important;
    }

    .price-table-cell {
        padding: 10px;
        text-align: center !important;
        color: #180138;
        font-size: 14px !important;
        line-height: 1.4;
        font-weight: 700;
    }

    .price-title {
        font-size: 16px;
    }

    .price-value {
        font-size: 24px;
    }

    .contato {
        font-size: 14px;
        padding: 8px 10px;
        height: 36px;
    }

    #posts-select {
        font-size: 16px;
        padding: 8px;
    }

    .tipo-suite-btn {
        font-size: 14px;
        padding: 10px 20px;
    }

    #cont-info {
        padding: 26px 8px 0 8px;
    }
}

/* Mobile: até 767px */
@media (max-width: 767px) {
    #gallery-container > div > div {
        overflow: hidden !important;
    }

    #gallery-container {
        overflow: hidden !important;
    }

    #tipo-suite-buttons-container { display: none !important; }

    #mobile-tipo-dropdown {
        display: block;
        background: #C7024C;
        border-radius: 16px 16px 16px 16px;
        margin: 16px 0px -16px 0px;
        overflow: hidden;
        z-index: 10;
    }

    .mobile-dropdown .dropdown-header {
        padding: 16px;
        color: #fff;
        font-weight: 700;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
    }

    .mobile-dropdown .caret {
        font-size: 18px;
        transition: transform 0.3s ease;
    }

    .mobile-dropdown .dropdown-list {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: #C7024C;
    }

    .mobile-dropdown.open .dropdown-list {
        max-height: 300px;
        padding: 0px;
    }

    .mobile-dropdown.open .caret {
        transform: rotate(180deg);
    }

    .mobile-dropdown .dropdown-list li {
        list-style: none;
        padding: 12px 16px;
        color: #fff;
        border-top: 1px solid rgba(255,255,255,0.3);
        cursor: pointer;
    }

    .mobile-dropdown .dropdown-list li:hover,
    .mobile-dropdown .dropdown-list li.active {
        background: rgba(255,255,255,0.2);
    }

    #cont-info,
    #preco-cont {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    #middle-container {
        border: none;
    }

    #cont-info {
        border-radius: 0 0 24px 24px;
        padding: 26px 16px 0 16px;
    }

    #right-container,
    #middle-container,
    #left-container {
        width: 100% !important;
    }

    #acomodacao-container {
        display: flex;
        flex-direction: column;
        margin-bottom: 16px;
        width: 100%;
    }

    #extra-left,
    #extra-middle,
    #extra-right {
        width: 100% !important;
        margin-bottom: 12px;
    }

    #right-container {
        justify-content: center;
    }

    .acomodacao-container-item {
        width: 100%;
        margin-bottom: 8px;
        font-size: 14px;
    }

    #posts-select {
        width: 100%;
        font-size: 14px;
        padding: 8px;
        gap: 0px;
    }

    .contato {
        font-size: 14px;
        padding: 12px 20px;
    }

    .tipo-suite-btn {
        font-size: 14px;
        padding: 12px 20px;
    }

    .price-title {
        font-size: 14px;
    }

    .price-value {
        font-size: 20px;
    }

    .price-table-cell.suite-cell {
        display: none !important;
    }

    .price-table-row.header .price-table-cell.header-cell:nth-child(1) {
        display: none !important;
    }

    .price-table-cell {
        height: 100%;
    }

    .price-table-row {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .price-table-cell.two-hours-cell::after,
    .price-table-cell.overnight-cell::after,
    .price-table-cell.extra-half-cell::after {
        content: attr(data-suite-name);
        display: block;
        margin-top: 4px;
        font-size: 14px;
        font-weight: 700;
        color: #180138;
    }

    /* Adicionar período no mobile usando um elemento adicional via JS */
    .price-table-cell .mobile-periodo {
        display: block;
        font-size: 12px;
        font-weight: 400;
        color: #676767;
        margin-top: 2px;
    }

    .price-table-cell.promo.two-hours-cell::after,
    .price-table-cell.promo.overnight-cell::after,
    .price-table-cell.promo.extra-half-cell::after {
        color: #DBC2FF;
    }

    #container-avo {
        min-height: 400px;
        padding: 0px;
    }

    #posts-container {
        width: 100%;
        margin-top: -50px !important;
        position: relative !important;
        top: auto !important;
        z-index: auto !important;
    }

    #gallery-container,
    .slider {
        height: auto;
        margin: 0px !important;
        overflow: hidden !important;
    }

    .slider {
        overflow: hidden !important;
    }
}
