/* ============================================================
   PRINCIPAL.CSS — Estilos exclusivos de la página principal
   ============================================================ */

/* Banner publicitario */
.ad-banner {
    margin: 24px auto;
    max-width: 1400px;
    padding: 0 32px;
}

.ad-banner-inner {
    background: linear-gradient(135deg, #f3eefb 0%, #e8ddf5 100%);
    border: 2px dashed #c9a8e8;
    border-radius: 16px;
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 160px;
}

.ad-banner-text h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #6A4691;
    margin-bottom: 8px;
}

.ad-banner-text p {
    color: #888;
    font-size: 1rem;
}

.ad-banner-cta {
    background: #6A4691;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: background 0.2s, transform 0.15s;
}

.ad-banner-cta:hover {
    background: #5a3b7a;
    transform: scale(1.04);
}

/* Secciones de categoría */
.home-sections {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px 80px;
}

.category-section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #222;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title .section-icon {
    font-size: 1.5rem;
}

.section-see-all {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6A4691;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1.5px solid #6A4691;
    padding: 8px 16px;
    border-radius: 50px;
    transition: all 0.2s;
}

.section-see-all:hover {
    background: #6A4691;
    color: white;
}

/* Scroll horizontal */
.cards-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.cards-scroll::-webkit-scrollbar { display: none; }

/* Tarjeta horizontal */
.h-card {
    flex: 0 0 220px;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    display: block;
}

.h-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}

.h-card-img-wrap {
    position: relative;
}

.h-card-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    background: #e0e0e0;
}

.h-card-body {
    padding: 12px 14px 14px;
}

.h-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.h-card-meta {
    font-size: 0.8rem;
    color: #717171;
    margin-bottom: 2px;
}

.h-card-rating {
    font-size: 0.82rem;
    color: #6A4691;
    font-weight: 600;
}

.h-card-price {
    font-size: 0.92rem;
    font-weight: 700;
    margin-top: 6px;
    color: #222;
}

.h-card-price span {
    font-weight: 400;
    color: #888;
    font-size: 0.8rem;
}

/* Favorito en tarjeta */
.h-heart {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #717171;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    z-index: 2;
}

.h-heart:hover {
    color: #6A4691;
    transform: scale(1.1);
}

.h-heart.liked { color: #6A4691; }

/* Badge superhost */
.h-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: white;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 50px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    z-index: 2;
}

/* Separador entre secciones */
.section-divider-line {
    border: none;
    border-top: 1px solid #eee;
    margin: 0 0 48px;
}

/* Responsive */
@media (max-width: 768px) {
    .ad-banner { padding: 0 16px; }
    .ad-banner-inner {
        flex-direction: column;
        text-align: center;
        padding: 28px 20px;
    }
    .home-sections { padding: 0 16px 60px; }
    .section-title { font-size: 1.3rem; }
    .h-card { flex: 0 0 180px; }
    .h-card-img { height: 120px; }
}

/* ============================================================
   SECCIÓN DE UBICACIÓN
   ============================================================ */
.location-section-wrapper {
    max-width: 1400px;
    margin: 0 auto 8px;
    padding: 0 32px;
}

.location-section-inner {
    background: white;
    border-radius: 16px;
    padding: 32px 36px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    border: 1px solid #eee;
}

.location-header {
    margin-bottom: 20px;
}

.location-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #222;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.location-subtitle {
    color: #717171;
    font-size: 0.95rem;
}

/* Controles */
.location-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.location-gps-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #6A4691;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
}

.location-gps-btn:hover { background: #5a3b7a; transform: scale(1.03); }
.location-gps-btn:disabled { background: #aaa; cursor: not-allowed; transform: none; }

.location-or {
    color: #aaa;
    font-weight: 500;
    font-size: 0.95rem;
}

.location-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #ddd;
    border-radius: 50px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.location-input-wrap:focus-within {
    border-color: #6A4691;
}

.location-input {
    border: none;
    outline: none;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-family: inherit;
    min-width: 220px;
    background: transparent;
}

.location-search-btn {
    background: #6A4691;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
    white-space: nowrap;
}

.location-search-btn:hover { background: #5a3b7a; }

.location-status {
    color: #6A4691;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Estado vacío */
.location-empty {
    padding: 24px 32px;
    color: #777;
    font-size: 1rem;
    line-height: 1.8;
}

/* Divisor entre ubicación y categorías */
.sections-divider {
    max-width: 1400px;
    margin: 8px auto 32px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.sections-divider::before,
.sections-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.sections-divider span {
    color: #aaa;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive */
@media (max-width: 768px) {
    .location-section-wrapper { padding: 0 16px; }
    .location-section-inner { padding: 24px 20px; }
    .location-controls { flex-direction: column; align-items: flex-start; gap: 12px; }
    .location-input { min-width: 160px; }
    .sections-divider { padding: 0 16px; }
}

/* ============================================================
   SISTEMA DE ANUNCIOS
   ============================================================ */

.ads-wrapper {
    max-width: 1400px;
    margin: 24px auto 0;
    padding: 0 32px;
}

.ads-label {
    font-size: 0.72rem;
    color: #bbb;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

/* Grid de anuncios: hasta 3 en fila */
.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

/* Tarjeta de anuncio base */
.ad-card {
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
    min-height: 140px;
}

.ad-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}

/* Badge "Patrocinado" */
.ad-card::after {
    content: "Patrocinado";
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.45);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 50px;
    letter-spacing: 0.5px;
}

/* Anuncio con imagen de fondo */
.ad-card-image {
    background-size: cover;
    background-position: center;
}

.ad-card-image .ad-card-body {
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 100%);
    padding: 20px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
}

.ad-card-image .ad-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: white;
}

.ad-card-image .ad-card-desc {
    font-size: 0.85rem;
    opacity: 0.9;
    color: white;
}

.ad-card-image .ad-card-cta {
    display: inline-block;
    margin-top: 10px;
    background: white;
    color: #222;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    width: fit-content;
}

/* Anuncio con color sólido (sin imagen) */
.ad-card-solid .ad-card-body {
    padding: 24px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ad-card-solid .ad-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.ad-card-solid .ad-card-desc {
    font-size: 0.88rem;
    opacity: 0.85;
    margin-bottom: 14px;
}

.ad-card-solid .ad-card-cta {
    display: inline-block;
    background: rgba(255,255,255,0.25);
    border: 1.5px solid rgba(255,255,255,0.6);
    color: white;
    padding: 7px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    width: fit-content;
    transition: background 0.2s;
}

.ad-card-solid:hover .ad-card-cta {
    background: rgba(255,255,255,0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .ads-wrapper { padding: 0 16px; }
    .ads-grid { grid-template-columns: 1fr; }
}