/* ================= GLOBAL ================= */
:root {
    --azul: #001741;
    --azul-claro: #003285;
    --magenta: #d81159;
    --magenta-hover: #f12c75;
    --blanco: #ffffff;
    --fondo: #f8fafc;
    --texto: #334155;
    --texto-ligero: #64748b;
    --borde: #e2e8f0;
    --sombra-suave: 0 4px 20px -5px rgba(0, 0, 0, 0.08);
    --sombra-fuerte: 0 10px 30px -5px rgba(0, 0, 0, 0.15);
}

body {
    margin: 0;
    font-family: 'Questrial', 'Montserrat', 'Inter', 'Segoe UI', system-ui, sans-serif;
    background: var(--fondo);
    color: var(--texto);
    -webkit-font-smoothing: antialiased;
}

/* ================= HEADER ================= */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
    max-width: 1400px;
    margin: 0 auto;
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#main-header.shrink .header-top {
    padding: 8px 40px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-link img {
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 600px) {
    .logo-link img {
        height: 48px;
    }
}

#main-header.shrink .logo-link img {
    transform: scale(0.5);
    transform-origin: left center;
}

.brand-name {
    font-family: 'ITC Avant Garde Gothic', 'Avant Garde', 'Questrial', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: var(--azul);
    letter-spacing: 0.5px;
}

@media (max-width: 600px) {
    .brand-name {
        font-size: 14px;
        max-width: 150px;
        line-height: 1.2;
    }
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    transition: gap 0.3s ease;
}

@media (max-width: 1350px) {
    .main-nav {
        gap: 15px;
    }
    .main-nav > a, .dropbtn {
        font-size: 14px;
    }
}

.main-nav>a,
.dropbtn {
    text-decoration: none;
    color: var(--texto);
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.main-nav>a:hover,
.dropbtn:hover {
    color: var(--magenta);
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown .arrow {
    font-size: 10px;
    margin-left: 6px;
    transition: transform 0.2s;
}

.dropdown:hover .arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--blanco);
    min-width: 550px;
    width: max-content;
    max-width: 90vw;
    box-shadow: var(--sombra-fuerte);
    border-radius: 12px;
    padding: 24px;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--borde);
    pointer-events: none;
    overflow: hidden;
}

.dropdown:hover .dropdown-content,
.dropdown.show .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.mobile-only {
    display: none;
}

.dropdown-columns {
    display: flex;
    gap: 30px;
}

.dropdown-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: max-content;
}

.group-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--texto-ligero);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--borde);
}

.dropdown-group a {
    color: var(--texto);
    padding: 8px 0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s, padding-left 0.2s;
    white-space: nowrap;
    border-radius: 4px;
}

.dropdown-group a:hover {
    color: var(--magenta);
    padding-left: 6px;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 24px;
    height: 3px;
    background-color: var(--azul);
    border-radius: 2px;
}

/* ================= BOOTSTRAP CAROUSEL CUSTOM ================= */
.featured-carousel-container {
    padding: 0;
    margin-top: 220px; /* Offset for fixed header + extra spacing */
}

.featured-carousel-container .carousel-label {
    padding-left: 40px;
    color: var(--azul);
    margin-bottom: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

#carouselExampleIndicators {
    max-width: 1400px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.carousel-item-wrapper {
    height: 500px;
    cursor: pointer;
    position: relative;
}

.carousel-item img {
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    width: 100%;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 60px 40px 30px;
    text-align: left;
}

.carousel-caption h5 {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.carousel-caption p {
    font-size: 16px;
    color: #cbd5e1;
}

.badge-reservado-carousel {
    display: inline-block;
    background-color: var(--magenta);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 2px;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(255, 0, 107, 0.4);
    animation: pulse-reservado 2s infinite;
}

@keyframes pulse-reservado {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

.carousel-indicators li {
    width: 30px;
    height: 4px;
    border-radius: 2px;
}

.carousel-control-prev, .carousel-control-next {
    width: 5%;
    opacity: 0.8;
}

.carousel-control-prev:hover, .carousel-control-next:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .featured-carousel-container {
        padding: 0;
        margin-top: 170px;
    }
    .carousel-item-wrapper {
        height: 300px;
    }
    .carousel-caption h5 {
        font-size: 18px;
    }
    #carouselExampleIndicators {
        border-radius: 0;
    }
}

/* ================= ACTION BAR ================= */
.action-bar {
    background: var(--azul);
    padding: 10px 40px;
    color: white;
    font-size: 14px;
}

.action-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.selection-actions {
    display: flex;
    gap: 10px;
}

.selected-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.badge-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    color: #e2e8f0;
    white-space: nowrap;
}

.btn-action {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-action.wp-action {
    background: white !important;
    border: 2px solid var(--azul) !important;
    color: var(--azul) !important;
}

.btn-action.wp-action:hover {
    background: #f1f5f9 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 32, 91, 0.15);
}

.btn-action.print-action {
    background: var(--magenta);
}

.btn-action.print-action:hover {
    background: var(--magenta-hover);
}

/* ================= CHECKBOXES ON CARDS ================= */
.card {
    position: relative;
    border: 1px solid transparent;
}

.card.selected {
    border-color: var(--magenta);
    box-shadow: 0 0 0 2px var(--magenta);
}

.check-container {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    background: white;
    border-radius: 5px;
    padding: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.check-container:hover {
    transform: scale(1.1);
}

.prop-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--magenta);
    margin: 0;
}

/* ================= FOOTER ================= */
.main-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 60px 40px 20px;
    margin-top: 80px;
    font-family: 'Inter', system-ui, sans-serif;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr) 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    font-family: 'ITC Avant Garde Gothic', 'Avant Garde', 'Questrial', sans-serif;
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.footer-section h4 {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-section a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.2s;
    font-size: 14px;
}

.footer-section a:hover {
    color: var(--magenta);
}

.footer-section a.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ================= PRINT MODE ================= */
#print-container {
    display: none;
}

@media print {
    @page { 
        size: A4; 
        margin: 10mm; 
    }

    /* Hide absolutely everything except the print container */
    body.modo-impresion > *:not(#print-container) {
        display: none !important;
    }

    body.modo-impresion #print-container {
        display: block !important;
        width: 100% !important;
    }

    .print-header {
        display: flex;
        align-items: center;
        gap: 20px;
        padding-bottom: 15px;
        border-bottom: 2px solid #0f172a;
        margin-bottom: 25px;
    }

    .print-header img {
        height: 60px;
        width: auto;
    }

    .print-brand {
        font-family: 'ITC Avant Garde Gothic', 'Avant Garde', 'Questrial', sans-serif;
        font-size: 20px;
        font-weight: 700;
        color: #0f172a;
    }

    .print-contact {
        font-size: 13px;
        color: #334155;
        margin-top: 4px;
    }

    .print-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5mm !important;
        width: 100% !important;
    }

    .print-grid .card {
        break-inside: avoid;
        border: 0.5pt solid #e2e8f0 !important;
        box-shadow: none !important;
        border-radius: 4px !important;
        overflow: hidden;
        height: 72mm !important; /* Larger to fill A4 (297mm / 4 rows ~ 74mm) */
        display: flex !important;
        flex-direction: column !important;
        margin: 0 !important;
    }

    /* Hide interactive elements in print */
    .print-grid .check-container,
    .print-grid .slider button,
    .print-grid .btn-whatsapp,
    .print-grid .badge-estado {
        display: none !important;
    }

    .print-grid .slider {
        height: 40mm !important;
        width: 100% !important;
        background: white !important;
        flex-shrink: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .print-grid .slider img {
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
    }

    .print-grid .card-body {
        padding: 3mm !important;
        flex-grow: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important; /* Perfect vertical centering of text section */
        text-align: center !important;
        gap: 1.5mm !important;
        overflow: hidden;
    }

    .print-grid .precio {
        font-size: 13pt !important;
        margin: 0 !important;
        font-weight: 800 !important;
        line-height: 1 !important;
        color: #0f172a !important;
    }

    .print-grid .card h3 {
        font-size: 8pt !important;
        margin: 0 !important;
        color: #64748b !important;
    }

    .print-grid .card p {
        font-size: 9pt !important;
        margin: 0 !important;
        line-height: 1.1 !important;
        color: #334155 !important;
        word-break: break-all;
    }

    .print-grid .card p br {
        display: none !important;
    }

    .print-operation {
        font-weight: 800;
        color: var(--azul);
        margin-right: 4px;
    }

    .print-operation-standalone {
        font-weight: 800;
        color: var(--azul);
        margin-bottom: 2px;
        font-size: 10px;
    }
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #1e293b;
    padding-top: 20px;
    font-size: 13px;
    color: #64748b;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1150px) {
    .header-top {
        padding: 15px 20px;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 10px 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.15);
        display: none;
        align-items: flex-start;
        max-height: 80vh; /* Prevent it from being taller than screen */
        overflow-y: auto;  /* Allow scrolling if menu is long */
        z-index: 1001;
    }

    .main-nav.show {
        display: flex;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .mobile-dropdown-details {
        width: 100%;
        border-bottom: 1px solid var(--borde);
    }

    .mobile-dropdown-details summary {
        list-style: none;
        padding: 15px 20px;
        outline: none;
        cursor: pointer;
        font-weight: 600;
        display: flex;
        justify-content: space-between;
        align-items: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-dropdown-details summary::-webkit-details-marker {
        display: none;
    }

    .dropdown-content-mobile {
        padding: 10px 20px 20px 20px;
        background: #f8fafc;
    }

    .dropdown-content-mobile .dropdown-group {
        margin-bottom: 20px;
    }

    .dropdown-content-mobile a {
        display: block;
        padding: 8px 0;
        color: var(--texto);
        text-decoration: none;
        font-size: 14px;
        border-bottom: 1px solid #edf2f7;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .main-nav>a,
    .dropdown {
        padding: 15px 20px;
        width: 100%;
        border-bottom: 1px solid var(--borde);
    }

    .dropdown-content {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0 0 0 20px;
        min-width: 100%;
        display: none; 
    }

    /* Target direct class for manual toggle in mobile */
    .dropdown-content.show-mobile {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .dropdown-columns {
        flex-direction: column;
        gap: 15px;
    }

    .hamburger {
        display: flex;
        padding: 5px;
        z-index: 1002;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .action-bar-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .selection-actions, .selected-actions {
        width: 100%;
        justify-content: center;
    }

    .selected-actions {
        flex-wrap: wrap;
    }

    .btn-action {
        font-size: 12px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .header-top {
        padding: 8px 12px;
    }
    
    .logo-link {
        gap: 6px;
    }

    .logo-link img {
        height: 36px; /* Even smaller for iPhone 12 */
    }

    .brand-name {
        font-size: 12px;
        max-width: 100px;
    }

    .action-bar {
        padding: 4px 10px;
    }

    .action-bar-inner {
        gap: 6px;
    }

    .btn-action {
        padding: 4px 6px;
        font-size: 11px;
    }
    
    .selected-actions {
        gap: 8px;
    }
    
    .badge-count {
        padding: 2px 8px;
        font-size: 11px;
    }
}