/* ============================================
   Casa Púrpura — Marketplace Polish CSS
   Overrides cargado después de themes.css
   ============================================ */

/* ===== TYPOGRAPHY ===== */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
    color: #333;
}

h1, h2, h3, h4, h5, h6,
.text-heading {
    letter-spacing: -0.02em;
    color: #1a1a2e;
}

p {
    line-height: 1.7;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.005em;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-primary {
    background: #36139D;
    border-color: #36139D;
    box-shadow: 0 2px 8px rgba(54, 19, 157, 0.2);
}
.btn-primary:hover,
.btn-primary:focus {
    background: #2d1080;
    border-color: #2d1080;
    box-shadow: 0 4px 16px rgba(54, 19, 157, 0.3);
    transform: translateY(-1px);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(54, 19, 157, 0.2);
}

.btn-secondary {
    background: #671AB0;
    border-color: #671AB0;
}
.btn-secondary:hover {
    background: #5a16a0;
    border-color: #5a16a0;
}

.btn-outline-dark {
    border-width: 1.5px;
}
.btn-outline-dark:hover {
    transform: translateY(-1px);
}

/* ===== CARDS ===== */
.property-card {
    border: 1px solid #f0f0f0 !important;
    border-radius: 12px !important;
    overflow: hidden;
    transition: box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.property-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-3px);
}
.property-card .card-img-top-wrapper img {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.property-card:hover .card-img-top-wrapper img {
    transform: scale(1.04);
}

/* ===== FORM CONTROLS ===== */
.form-control {
    border-radius: 8px;
    border: 1.5px solid #e1e5e9;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus {
    border-color: #671AB0;
    box-shadow: 0 0 0 3px rgba(103, 26, 176, 0.08);
}

/* ===== BADGES ===== */
.badge {
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ===== PAGINATION ===== */
.pagination .page-link {
    border-radius: 8px;
    margin: 0 2px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1.5px solid #e1e5e9;
    color: #555;
    transition: all 0.2s ease;
}
.pagination .page-item.active .page-link {
    background: #36139D;
    border-color: #36139D;
    box-shadow: 0 2px 6px rgba(54, 19, 157, 0.25);
}
.pagination .page-link:hover {
    background: #f7f4fc;
    border-color: #671AB0;
    color: #36139D;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* ===== AUTOCOMPLETE DROPDOWN ===== */
.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 1060;
    max-height: 380px;
    overflow-y: auto;
    border: 1px solid #f0f0f0;
}
.ac-group-label {
    padding: 10px 16px 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
}
.ac-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.1s ease;
}
.ac-item:hover,
.ac-item.active {
    background: #f7f4fc;
}
.ac-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #f5f0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #671AB0;
    flex-shrink: 0;
    font-size: 0.85rem;
}
.ac-item-text {
    flex: 1;
    min-width: 0;
}
.ac-item-title {
    font-weight: 500;
    font-size: 0.88rem;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-item-title strong {
    font-weight: 700;
    color: #36139D;
}
.ac-item-subtitle {
    font-size: 0.75rem;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-loading {
    padding: 16px;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ===== FILTER PILLS (Listing) ===== */
.filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1.3;
    outline: none;
    -webkit-user-select: none;
    user-select: none;
}
.filter-pill:hover {
    border-color: #333;
    color: #222;
    background: #fafafa;
}
.filter-pill.active {
    border-color: #36139D;
    color: #36139D;
    background: rgba(54, 19, 157, 0.06);
}
.filter-pill-action {
    border-style: dashed;
    border-color: #ccc;
}
.filter-pill-action:hover {
    border-style: solid;
    border-color: #333;
}
.filter-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    background: #36139D;
    border-radius: 50%;
}

/* ===== COUNTER OPTION BUTTONS (Filter Modal) ===== */
.counter-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.counter-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    color: #555;
    background: #fff;
    border: 1.5px solid #e0e0e0;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
}
.counter-option:hover {
    border-color: #333;
    color: #222;
}
.counter-option.active {
    border-color: #36139D;
    background: #36139D;
    color: #fff;
}

/* ===== FILTER MODAL ===== */
.filter-modal .modal-content {
    border: 0;
    border-radius: 16px;
    overflow: hidden;
}
.filter-modal .modal-header {
    border: 0;
    padding: 20px 24px 0;
}
.filter-modal .modal-body {
    padding: 16px 24px;
}
.filter-modal .modal-footer {
    border: 0;
    padding: 0 24px 20px;
}
.filter-section-label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    color: #222;
    margin-bottom: 10px;
}
.filter-section-divider {
    border: 0;
    border-top: 1px solid #f0f0f0;
    margin: 16px 0;
}

/* ===== SLIDER REFINEMENTS ===== */
.slider-range-primary .ui-slider {
    height: 4px;
    border: none;
    background: #e8e4ee;
    border-radius: 2px;
}
.slider-range-primary .ui-slider-range {
    background: #671AB0;
    border-radius: 2px;
}
.slider-range-primary .ui-slider-handle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #671AB0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    cursor: grab;
    top: -10px;
}
.slider-range-primary .ui-slider-handle:active {
    cursor: grabbing;
    box-shadow: 0 2px 10px rgba(103, 26, 176, 0.3);
}

/* ===== AMENIDAD PILLS (in modal) ===== */
.amenidad-toggle {
    font-size: 0.78rem;
    padding: 5px 12px;
}
.amenidad-toggle.active {
    border-color: #36139D;
    color: #36139D;
    background: rgba(54, 19, 157, 0.06);
}

/* ===== GLOBAL TRANSITIONS ===== */
a,
.btn,
.form-control,
.card {
    transition-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== ANIMATIONS ===== */
@keyframes myfadeInUp {
    from { opacity: 0; transform: translate3d(0, 20px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.myFadeInUp {
    animation-name: myfadeInUp;
    animation-duration: 0.5s;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== HEADING DIVIDERS ===== */
.heading-divider {
    display: block;
    width: 40px;
    height: 3px;
    background: #671AB0;
    border-radius: 2px;
    margin-bottom: 1.5rem;
}

/* ===== HERO SEARCH ===== */
.hero-estado-pill {
    color: #555;
    background: #f5f5f5;
    border: 1.5px solid transparent;
    transition: all 0.15s ease;
}
.hero-estado-pill.active {
    color: #36139D;
    background: rgba(54, 19, 157, 0.08);
    border-color: #36139D;
}

/* ===== RESPONSIVE SPACING ===== */
@media (max-width: 767px) {
    .autocomplete-dropdown {
        max-height: 300px;
        border-radius: 8px;
    }
    .filter-pill {
        font-size: 0.78rem;
        padding: 5px 12px;
    }
}
