/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --portal-primary: #6A0DAD;
    /* Morado marca del portal */
    --portal-secondary: #FF0066;
    /* Rosa acento interactivo */
    --portal-bg: #F9F9F9;
    --portal-card-bg: #FFFFFF;
    --portal-text: #333333;
    --portal-font-title: 'Montserrat', sans-serif;
    --portal-font-body: 'Inter', sans-serif;
    --radius-lg: 12px;
    --radius-md: 8px;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.dashboard-theme,
.admin-theme {
    --portal-primary: #0071E3;
    /* Azul Apple San Francisco */
    --portal-secondary: #0071E3;
    --portal-bg: #F5F5F7;
    --portal-card-bg: #FFFFFF;
    --portal-text: #1d1d1f;
    --portal-font-title: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --portal-font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --radius-lg: 18px;
    --radius-md: 12px;
    --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Global Size Utilities */
.size-12 {
    width: 12px !important;
    height: 12px !important;
}

.size-14 {
    width: 14px !important;
    height: 14px !important;
}

.size-16 {
    width: 16px !important;
    height: 16px !important;
}

.size-18 {
    width: 18px !important;
    height: 18px !important;
}

.size-20 {
    width: 20px !important;
    height: 20px !important;
}

.size-24 {
    width: 24px !important;
    height: 24px !important;
}

.size-28 {
    width: 28px !important;
    height: 28px !important;
}

.size-32 {
    width: 32px !important;
    height: 32px !important;
}

.size-40 {
    width: 40px !important;
    height: 40px !important;
}

.price-tooltip {
    background: var(--portal-secondary);
    border: none;
    color: white;
    font-weight: 700;
    border-radius: 8px;
    padding: 2px 8px;
    font-size: 0.7rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.price-tooltip:before {
    border-top-color: var(--portal-secondary) !important;
}

.spin {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


body {
    background-color: var(--portal-bg);
    color: var(--portal-text);
    font-family: var(--portal-font-body);
    -webkit-font-smoothing: antialiased;
    margin: 0;
}


h1,
h2,
h3,
h4,
h5,
h6,
.fw-title {
    font-family: var(--portal-font-title);
    color: var(--portal-primary);
    font-weight: 700;
}

/* Sticky Header with Blur */
.navbar-portal {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    height: 75px;
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo Styles */
.logo-tiendaprop {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-family: var(--portal-font-title);
    font-weight: 800;
    font-size: 1.4rem;
    letter-spacing: -1px;
    color: #333;
}

.logo-tiendaprop .logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--portal-primary), var(--portal-secondary));
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z"/><path d="M3 6h18"/><path d="M16 10a4 4 0 0 1-8 0"/><path d="m9 16 3-3 3 3v4H9z"/></svg>') no-repeat center;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z"/><path d="M3 6h18"/><path d="M16 10a4 4 0 0 1-8 0"/><path d="m9 16 3-3 3 3v4H9z"/></svg>') no-repeat center;
}

.logo-tiendaprop span {
    color: var(--portal-secondary);
}

/* Premium Navigation Links */
.nav-links-portal a {
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    margin: 0 1rem;
    transition: all 0.2s ease;
    padding-bottom: 5px;
}

.nav-links-portal a:hover,
.nav-links-portal a.active {
    color: var(--portal-primary);
}

.nav-links-portal a.active {
    border-bottom: 2px solid var(--portal-primary);
}

/* E-commerce Style Cards */
.card-tiendaprop {
    background: var(--portal-card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.02);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-tiendaprop:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.card-image-box {
    position: relative;
    width: 100%;
    height: 200px;
    background: #eee;
    overflow: hidden;
}

.card-tiendaprop img,
.card-tiendaprop .property-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card-tiendaprop:hover img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.25rem;
    flex-grow: 1;
}

/* Action Buttons (CTAs) */
.btn-cta {
    background-color: var(--portal-secondary);
    color: white !important;
    font-weight: 700;
    border-radius: var(--radius-lg, 12px);
    padding: 0.75rem 2rem;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.2);
}


.btn-cta:hover {
    background-color: #e6005c;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 0, 102, 0.3);
}

.btn-nav-outline {
    border: 2px solid var(--portal-primary);
    color: var(--portal-primary) !important;
    font-weight: 600;
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-nav-outline:hover {
    background: var(--portal-primary);
    color: white !important;
}

/* Sidebar Dashboard (Super Admin & Agencies) */
.sidebar {
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.7);
    /* Translucent */
    backdrop-filter: blur(10px);
    /* Glassmorphism */
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    background: transparent;
    /* No more solid purple */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}


.sidebar-nav {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    margin: 0.25rem 0;
    border-radius: 8px;
    color: #555;
    text-decoration: none;
    gap: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-nav .nav-item:hover,
.sidebar-nav .nav-item.active {
    background: rgba(0, 113, 227, 0.08);
    color: var(--portal-primary);
}

.sidebar-nav .nav-item.active {
    font-weight: 700;
    border-left: 4px solid var(--portal-primary);
    border-radius: 4px 12px 12px 4px;
}

/* Main Content with Sidebar */
.main-content.with-sidebar {
    margin-left: 280px;
    padding: 2.5rem;
}

/* Mobile Nav Styles (PWA Aesthetic) */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-container {
    width: 100%;
    max-width: 500px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #8E8E93;
    font-size: 10px;
    font-weight: 600;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-grow: 1;
    padding: 8px 0;
}

.mobile-nav-item i {
    width: 24px;
    height: 24px;
    margin-bottom: 5px;
    stroke-width: 2.2px;
}

.mobile-nav-item.active {
    color: var(--portal-secondary);
}

.mobile-nav-item:active {
    transform: scale(0.92);
    opacity: 0.7;
}

@media (max-width: 768px) {
    .main-content {
        padding-bottom: 90px !important;
    }
}

/* Apple Radius Utilities */
.rounded-apple {
    border-radius: 18px !important;
}

.rounded-apple-sm {
    border-radius: 12px !important;
}

/* Utilities adjusted for Apple Blue */
.x-small {
    font-size: 0.75rem;
}

.tiny {
    font-size: 0.65rem;
}

.text-rosa,
.text-morado {
    color: var(--portal-primary) !important;
}

.bg-rosa,
.bg-morado {
    background-color: var(--portal-primary) !important;
}

.bg-rosa-light,
.bg-morado-light {
    background-color: rgba(0, 113, 227, 0.1) !important;
    color: var(--portal-primary) !important;
}

/* HTMX/Bootstrap Modal Fix */
.modal-backdrop.show {
    opacity: 0.5;
}

body.modal-open {
    overflow: hidden;
}


@media (max-width: 768px) {
    .main-content.with-sidebar {
        margin-left: 0;
        padding: 1.5rem;
        padding-bottom: 90px;
    }

    .card-tiendaprop.flex-md-row {
        flex-direction: column !important;
    }

    .card-image-box {
        width: 100% !important;
        min-width: 100% !important;
    }
}

/* Guided Search */
.guided-item {
    text-decoration: none;
    color: var(--portal-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100px;
    transition: all 0.3s ease;
}

.guided-item .icon-box {
    width: 65px;
    height: 65px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--portal-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.guided-item:hover .icon-box {
    transform: translateY(-8px);
    background: var(--portal-secondary);
    color: white;
    box-shadow: 0 8px 20px rgba(255, 0, 102, 0.2);
}

.guided-item span {
    font-size: 0.8rem;
    font-weight: 600;
}