/* Soluciones360 - Main Stylesheet */

:root {
    --primary: #10b981; /* Esmeralda agrícola moderno */
    --primary-light: #34d399;
    --primary-dark: #047857;
    --primary-rgb: 16, 185, 129;
    --secondary: #64748b; /* Slate moderno */
    --secondary-light: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-main: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-primary: 0 10px 15px -3px rgba(16, 185, 129, 0.2), 0 4px 6px -4px rgba(16, 185, 129, 0.2);
}

/* General */
body {
    font-family: 'Inter', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
}

/* Glassmorphism Classes */
.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: var(--shadow-md);
}

/* ===== NAVEGACIÓN FLOTANTE EN CÁPSULA DE CRISTAL PARA COMPUTADORA (>= 992px) ===== */
@media (min-width: 992px) {
    .glass-navbar {
        background: rgba(11, 46, 22, 0.94) !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.22) !important;
        border-radius: 99px !important;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3) !important;
        margin: 10px auto !important;
        width: 95% !important;
        max-width: 1240px !important;
        padding: 0.35rem 1rem !important;
        position: sticky;
        top: 10px;
        z-index: 1040;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .glass-navbar .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .glass-navbar .navbar-brand {
        padding: 0;
        margin-right: 0.75rem;
    }

    .glass-navbar .navbar-brand img {
        height: 32px;
        border-radius: 8px;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    }

    .glass-navbar .navbar-nav {
        flex-wrap: nowrap !important;
        align-items: center;
    }

    .glass-navbar .nav-link {
        color: rgba(255, 255, 255, 0.95) !important;
        font-weight: 600;
        font-size: 0.86rem !important;
        padding: 0.45rem 0.8rem !important;
        border-radius: 99px !important;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        margin: 0 2px;
        transition: all 0.22s ease-in-out;
        white-space: nowrap !important;
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
    }

    .glass-navbar .nav-link i {
        font-size: 0.9rem;
    }

    .glass-navbar .nav-link:hover {
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.2) !important;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    }

    .glass-navbar .nav-link.active {
        color: #ffffff !important;
        background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
        border: 1px solid rgba(255, 255, 255, 0.35) !important;
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45) !important;
    }

    .glass-navbar .dropdown-menu {
        background: rgba(14, 48, 22, 0.96) !important;
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 18px !important;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4) !important;
        padding: 0.6rem;
        margin-top: 10px;
        min-width: 220px;
        animation: dropdownSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes dropdownSlideIn {
        from { opacity: 0; transform: translateY(-8px) scale(0.97); }
        to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    .glass-navbar .dropdown-item {
        color: rgba(255, 255, 255, 0.92) !important;
        border-radius: 10px !important;
        padding: 0.5rem 0.85rem !important;
        font-size: 0.85rem !important;
        font-weight: 500;
        transition: all 0.18s ease;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        white-space: nowrap !important;
    }

    .glass-navbar .dropdown-item:hover {
        background: rgba(255, 255, 255, 0.18) !important;
        color: #ffffff !important;
        transform: translateX(4px);
    }
}

/* ===== BOTÓN HAMBURGUESA PERSONALIZADO (MÓVIL) ===== */
.custom-nav-toggler {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid rgba(16, 185, 129, 0.7) !important;
    border-radius: 12px !important;
    background: rgba(16, 185, 129, 0.15) !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    outline: none !important;
}

.custom-nav-toggler:hover {
    background: rgba(16, 185, 129, 0.3) !important;
    border-color: #10b981 !important;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.5);
    transform: scale(1.05);
}

.custom-nav-toggler:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.4) !important;
}

.custom-nav-toggler[aria-expanded="true"] {
    background: rgba(16, 185, 129, 0.35) !important;
    border-color: #10b981 !important;
}

.toggler-line {
    display: block;
    width: 22px;
    height: 2.5px;
    background: #10b981;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
}

/* Animación X cuando el menú está abierto */
.custom-nav-toggler[aria-expanded="true"] .toggler-line:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
    background: #34d399;
}
.custom-nav-toggler[aria-expanded="true"] .toggler-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.custom-nav-toggler[aria-expanded="true"] .toggler-line:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
    background: #34d399;
}

/* ===== NAVBAR MÓVIL ===== */
@media (max-width: 991.98px) {
    .glass-navbar {
        background: rgba(11, 46, 22, 0.97) !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.5rem 1rem !important;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    background: radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 90.2%), var(--surface);
    color: var(--text-main);
    padding: 6rem 0;
    margin: -1.5rem -1rem 3rem -1rem;
    border-radius: 0 0 2.5rem 2.5rem;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, rgba(255, 255, 255, 0) 70%);
    filter: blur(40px);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section .btn-light {
    background: var(--primary);
    color: white;
    border: none;
}

.hero-section .btn-light:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.hero-section .btn-outline-light {
    border-color: var(--border-color);
    color: var(--text-main);
}

.hero-section .btn-outline-light:hover {
    background: rgba(16, 185, 129, 0.08);
    border-color: var(--primary);
    color: var(--primary);
}

/* Card Styles */
.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color);
    overflow: hidden;
    background: var(--surface);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg) !important;
    border-color: var(--primary-light);
}

.product-card .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.price-tag {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}

/* Stats */
.stat-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-main);
}

.upload-zone:hover {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.04);
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 96px;
    right: 24px;
    z-index: 9998;
    background: #25d366;
    color: white;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(10deg);
    color: white;
    box-shadow: 0 12px 24px rgba(37, 211, 102, 0.6);
}

@media (max-width: 991.98px) {
    .whatsapp-float {
        bottom: 148px;
        right: 16px;
        width: 52px;
        height: 52px;
        font-size: 1.35rem;
    }
}

/* Navbar */
.navbar {
    transition: all 0.3s;
}

.navbar .nav-link {
    font-weight: 500;
    transition: color 0.2s ease;
}

.navbar .nav-link:hover {
    color: var(--primary-light) !important;
}

.navbar .nav-link.active {
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: white !important;
}

.dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    color: var(--text-main);
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(16, 185, 129, 0.08);
    color: var(--primary-dark);
}

/* Forms */
.form-control, .form-select {
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    padding: 0.65rem 1.1rem;
    color: var(--text-main);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.btn {
    border-radius: var(--radius-md);
    padding: 0.65rem 1.3rem;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-success {
    background: var(--primary);
    border: none;
}

.btn-success:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.btn-lg {
    padding: 0.85rem 1.8rem;
    border-radius: var(--radius-lg);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
}

/* Tables */
.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Pagination */
.page-link {
    border-radius: 10px !important;
    margin: 0 2px;
    color: var(--primary);
    border: 1.5px solid #e2e8f0;
}

.page-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 12px;
}

/* Cards */
.card {
    border-radius: 12px;
}

.rounded-4 {
    border-radius: 16px !important;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 2.5rem 0;
        margin: -1rem -0.75rem 1.5rem -0.75rem;
    }
    
    .product-card .card-img-top {
        height: 150px;
    }

    .price-tag {
        font-size: 1.1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.3s ease-out;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.custom-nav-toggler {
    background: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-radius: 10px !important;
    padding: 6px 12px !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.custom-nav-toggler:focus, .custom-nav-toggler:active {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3) !important;
    outline: none !important;
}

/* Print */
@media print {
    .navbar, .whatsapp-float, footer {
        display: none !important;
    }
}

/* Mobile WhatsApp position adjustment */
@media (max-width: 991.98px) {
    .whatsapp-float {
        bottom: 80px !important;
    }
}

/* ===== RESPONSIVE GLOBAL FIXES ===== */

/* Prevent any element from overflowing the viewport */
*, *::before, *::after {
    max-width: 100%;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal scroll globally on mobile devices */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

@media (max-width: 991.98px) {
    body {
        padding-bottom: 85px !important; /* Espacio garantizado para la barra móvil fija */
    }
    
    .glass-navbar {
        padding: 0.4rem 0.75rem !important;
    }
    
    .glass-navbar .navbar-brand img {
        height: 28px !important;
    }

    /* Menú móvil desplegable flotante, ultracompacto y translúcido */
    #mainNav {
        background: rgba(20, 83, 45, 0.97) !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 16px;
        padding: 10px 12px;
        margin-top: 8px;
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }

    #mainNav .navbar-nav {
        gap: 6px;
    }

    #mainNav .nav-item {
        margin-bottom: 2px;
    }

    #mainNav .nav-link {
        padding: 8px 12px !important;
        font-size: 0.88rem !important;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.08);
        color: #ffffff !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* Subbotones organizados en cuadrícula de 2 columnas dentro del menú móvil */
    #mainNav .dropdown-menu {
        position: static !important;
        float: none !important;
        background: rgba(0, 0, 0, 0.22) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-radius: 12px;
        margin: 6px 0 8px 0;
        padding: 6px;
        box-shadow: none !important;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4px;
    }

    #mainNav .dropdown-item {
        padding: 7px 10px !important;
        font-size: 0.8rem !important;
        white-space: nowrap;
        border-radius: 8px;
        color: rgba(255, 255, 255, 0.95) !important;
        display: flex;
        align-items: center;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    #mainNav .dropdown-item:hover, #mainNav .dropdown-item:active {
        background: rgba(255, 255, 255, 0.2) !important;
    }
    
    /* Hero Title scaling for mobile */
    .hero-section h1.display-3 {
        font-size: 1.8rem !important;
        line-height: 1.25;
        word-wrap: break-word;
    }

    /* Modal / Bottom Sheet width */
    .quick-action-sheet .modal-dialog {
        margin: 0 !important;
        width: 100% !important;
    }
}

/* Prevent tables from overflowing */
.table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* ===== MOBILE (< 768px) ===== */
@media (max-width: 767.98px) {

    /* Container padding */
    .container, .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Hero adjustments */
    .hero-section {
        padding: 1.5rem 0.5rem;
        margin: 0 0 1.5rem 0;
        border-radius: 0 0 1.5rem 1.5rem;
    }

    .hero-section h1.display-3 {
        font-size: 1.75rem !important;
    }

    /* Touch-friendly inputs and buttons */
    .form-control, .form-select, .btn-lg {
        min-height: 44px;
        font-size: 0.95rem;
    }

    /* Product cards on mobile: 2 columns */
    .product-card .card-img-top {
        height: 135px;
        object-fit: cover;
    }

    .price-tag {
        font-size: 0.95rem;
        font-weight: 700;
    }

    /* Launchpad CTA cards flex wrap */
    .launchpad-card .d-flex {
        flex-wrap: wrap;
    }

    /* Announcement cards: single column */
    .col-md-6.col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Dashboard cards: reduce padding */
    .card-body.p-4 {
        padding: 1rem !important;
    }

    /* Stat cards row */
    .stat-card {
        padding: 1.1rem 0.85rem;
    }

    /* Form labels always readable */
    .form-label {
        font-size: 0.82rem;
        margin-bottom: 0.25rem;
    }

    /* Buttons full-width in forms */
    .btn-form-submit {
        width: 100% !important;
    }

    /* Badge overflow fix */
    .badge {
        white-space: normal;
        text-align: center;
        max-width: 100%;
    }

    /* Text truncation on mobile */
    .text-truncate-mobile {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 130px;
    }

    /* Dashboard header flex wrap */
    .d-flex.justify-content-between.flex-wrap {
        gap: 0.5rem;
    }

    /* Weather widget stacking */
    .col-md-3.border-end {
        border-right: none !important;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    /* Fix image overflow in detail pages */
    .detail-img-container img {
        width: 100% !important;
        height: 200px !important;
        object-fit: cover;
    }

    /* Navbar notification panel full-width on mobile */
    #agro-notif-panel {
        right: 4px !important;
        left: 4px !important;
        width: auto !important;
    }

    /* Font size reductions on very small screens */
    h1.display-5 { font-size: 1.4rem !important; }
    h1.display-4 { font-size: 1.6rem !important; }
    .lead { font-size: 0.88rem !important; }
}

/* ===== TABLET (768px - 991px) ===== */
@media (min-width: 768px) and (max-width: 991.98px) {
    .product-card .card-img-top {
        height: 180px;
    }

    .col-md-3.border-end {
        border-right: 1px solid #e2e8f0;
    }
}

/* Responsive tables - Convert to cards on mobile */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto !important;
    }

    .table-responsive table.table {
        display: block !important;
        width: 100% !important;
        background: transparent !important;
        border: none !important;
    }

    .table-responsive table.table thead {
        display: none !important;
    }

    .table-responsive table.table tbody {
        display: block !important;
        width: 100% !important;
    }

    .table-responsive table.table tr {
        display: block !important;
        background: #fff;
        border-radius: 12px;
        padding: 1.25rem !important;
        margin-bottom: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        border-left: 4px solid #198754 !important;
        box-sizing: border-box;
    }

    .table-responsive table.table td {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0 !important;
        border-bottom: 1px solid #e2e8f0 !important;
        box-sizing: border-box;
        text-align: right;
        font-size: 0.875rem;
    }

    .table-responsive table.table td:last-child {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }

    .table-responsive table.table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #4b5563;
        font-size: 0.8rem;
        text-align: left;
        margin-right: 1rem;
        flex-shrink: 0;
    }


    .table-responsive table.table td .btn-group,
    .table-responsive table.table td form {
        display: inline-flex !important;
        justify-content: flex-end;
    }
}

/* ===== BOTÓN FLOTANTE CENTRAL DE ACCIÓN RÁPIDA (FAB MÓVIL) ===== */
.mobile-fab-wrapper {
    position: relative;
    top: -18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mobile-fab-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: 3px solid #ffffff;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    outline: none;
}

.mobile-fab-btn:active {
    transform: scale(0.9) translateY(2px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.mobile-fab-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: #059669;
    margin-top: 1px;
}

/* Modal Emergente de Acciones Rápidas (Bottom Sheet Style) */
.quick-action-sheet .modal-dialog {
    margin: 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 100%;
}

.quick-action-sheet .modal-content {
    border-radius: 24px 24px 0 0;
    border: none;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
    background: #ffffff;
}

.quick-action-sheet .sheet-handle {
    width: 44px;
    height: 5px;
    background: #e2e8f0;
    border-radius: 99px;
    margin: 10px auto 4px auto;
}

.quick-action-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    text-decoration: none;
    color: #1e293b;
    transition: all 0.2s ease;
}

.quick-action-card:hover, .quick-action-card:active {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.quick-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* ===== NUEVAS UTILIDADES VISUALES Y DISEÑO PREMIUM ===== */
.text-gradient-emerald {
    background: linear-gradient(135deg, #047857 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
    background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-card-premium {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06) !important;
    border-radius: 20px;
}

.card-hover-elevate {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.card-hover-elevate:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.14) !important;
}

.img-hover-zoom {
    overflow: hidden;
    position: relative;
}

.img-hover-zoom img {
    transition: transform 0.45s ease !important;
}

.img-hover-zoom:hover img {
    transform: scale(1.07) !important;
}

.badge-price-tag {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.4rem 0.9rem;
    border-radius: 99px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    display: inline-block;
}

.badge-chip {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-emerald-glow {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600;
    border-radius: 99px !important;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.35) !important;
    transition: all 0.22s ease !important;
}

.btn-emerald-glow:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.48) !important;
    color: #ffffff !important;
}

.category-pill-btn {
    border-radius: 99px;
    padding: 0.4rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #64748b;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.category-pill-btn:hover, .category-pill-btn.active {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* ===== GARANTÍA DE RESPONSIVIDAD GLOBAL PARA TODAS LAS PÁGINAS ===== */
/* Evitar desbordamiento de imágenes, vídeos, tablas y svgs en cualquier vista */
img, video, iframe, canvas, svg, object, embed {
    max-width: 100% !important;
    height: auto;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Pestañas y filtros navegables horizontalmente en móvil sin deformarse */
@media (max-width: 768px) {
    .nav-tabs, .nav-pills, .category-pills-scroll {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 6px;
        margin-bottom: 12px;
        gap: 8px;
    }
    
    .nav-tabs .nav-link, .nav-pills .nav-link {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    /* Botones apilables en celulares pequeños */
    .btn-group-responsive {
        flex-direction: column !important;
        width: 100% !important;
    }

    .btn-group-responsive .btn {
        width: 100% !important;
        border-radius: 12px !important;
        margin-bottom: 6px !important;
    }

    /* Ajuste de ventanas modales en celular */
    .modal-dialog {
        max-width: 95vw !important;
        margin: 10px auto !important;
    }

    /* Tablas responsivas en tarjeta */
    .table-responsive {
        border: none !important;
        width: 100% !important;
    }

    /* Ajuste de espacio entre columnas en celular */
    .row.g-4, .row.g-3 {
        --bs-gutter-y: 0.85rem !important;
        --bs-gutter-x: 0.85rem !important;
    }

    /* Relleno de tarjetas adaptativo */
    .card-body {
        padding: 1rem !important;
    }

    /* Tamaños de letra de títulos ajustados a pantalla chica */
    h1, .h1 { font-size: 1.65rem !important; }
    h2, .h2 { font-size: 1.45rem !important; }
    h3, .h3 { font-size: 1.25rem !important; }
    h4, .h4 { font-size: 1.1rem !important; }

    /* Inputs de 16px para evitar auto-zoom molesto en iOS */
    input[type="text"], input[type="number"], input[type="email"], input[type="password"], input[type="search"], select, textarea {
        font-size: 16px !important;
    }
}



