/* ==========================================================================
   TooFácil Comida - Estilos Base & Tokens
   ========================================================================== */

:root {
    --font-heading: 'Fredoka', 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-body: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;

    /* ── Paleta Cálida — identidad gastronómica ── */
    --bg-base:        #0a0706;   /* negro cálido, casi marrón profundo  */
    --bg-surface:     #160e0a;   /* superficie oscura con calor         */
    --bg-card:        #231410;   /* tarjetas: marrón muy oscuro         */
    --bg-card-hover:  #2e1a12;   /* hover de tarjeta                    */

    --primary:        #FF6B1A;   /* Naranja Fuego                       */
    --primary-hover:  #FF3D2E;   /* Rojo Intenso                        */
    --primary-rgb:    255, 107, 26;

    --accent:         #FFD166;   /* Ámbar Dorado (antes azul eléctrico) */
    --accent-rgb:     255, 209, 102;

    --red:            #FF3D2E;
    --red-rgb:        255, 61, 46;
    --red-glow:       #FF6B4A;

    --success:        #10b981;   /* Verde Esmeralda — funcional         */
    --success-rgb:    16, 185, 129;

    --warning:        #fbbf24;
    --danger:         #ef4444;

    --text-primary:   #FFF4E6;   /* Crema cálida                        */
    --text-secondary: #c4a882;   /* Beige suave                         */
    --text-muted:     #8a6a50;   /* Marrón medio                        */

    --border:         rgba(255, 107, 26, 0.22);  /* borde naranja sutil */
    --border-light:   rgba(255, 107, 26, 0.10);

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.35), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 30px -3px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 107, 26, 0.08);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* overflow-x en html, NO en body — si se pone en body rompe position:fixed */
html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-base);
    background-image:
        radial-gradient(ellipse 70% 40% at 50% 0%, rgba(255, 107, 26, 0.07) 0%, transparent 60%),
        radial-gradient(ellipse 50% 30% at 0% 100%, rgba(255, 61, 46, 0.05) 0%, transparent 50%);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: visible;
    position: relative;
}


/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 26, 0.35);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 26, 0.6);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

/* Layout Utilities */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 16px 100px;
    min-height: calc(100vh - 80px);
}

/* Grid & Flex Helpers */
.flex {
    display: flex;
}
.flex-col {
    flex-direction: column;
}
.gap-2 {
    gap: 8px;
}
.gap-3 {
    gap: 12px;
}
.gap-4 {
    gap: 16px;
}
.justify-between {
    justify-content: space-between;
}
.items-center {
    align-items: center;
}
.w-full {
    width: 100%;
}
.mt-2 {
    margin-top: 8px;
}
.grid-2-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 768px) {
    .grid-2-columns {
        grid-template-columns: 1fr 1fr;
    }
}

.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

/* Button Component */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 8px;
    text-decoration: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-xs {
    padding: 5px 11px;
    font-size: 11px;
    border-radius: 6px;
    font-weight: 600;
}

/* ── PRIMARY ── */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #ffffff !important;
    box-shadow: 0 4px 14px 0 rgba(var(--primary-rgb), 0.35);
}
.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-hover), #ea6c00);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(var(--primary-rgb), 0.5);
}
.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}
.btn-primary:disabled {
    background: var(--border);
    color: var(--text-muted) !important;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ── DANGER ── */
.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: #ffffff !important;
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.35);
}
.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(239, 68, 68, 0.5);
}
.btn-danger:active:not(:disabled) {
    transform: translateY(0);
}

/* ── OUTLINE (neutral) ── */
.btn-outline {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--border);
    color: var(--text-primary) !important;
}
.btn-outline:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}

/* ── OUTLINE DANGER ── */
.btn-outline-danger,
.btn-outline[style*="color:var(--danger)"],
.btn-outline[style*="color: var(--danger)"] {
    background-color: rgba(239, 68, 68, 0.12) !important;
    border: 1.5px solid rgba(239, 68, 68, 0.5) !important;
    color: #f87171 !important;
}
.btn-outline-danger:hover:not(:disabled) {
    background-color: rgba(239, 68, 68, 0.22) !important;
    border-color: var(--danger) !important;
    transform: translateY(-1px);
}

/* ── OUTLINE SUCCESS ── */
.btn-outline-success {
    background-color: rgba(16, 185, 129, 0.12);
    border: 1.5px solid rgba(16, 185, 129, 0.5);
    color: #34d399 !important;
}
.btn-outline-success:hover:not(:disabled) {
    background-color: rgba(16, 185, 129, 0.22);
    border-color: var(--success);
    transform: translateY(-1px);
}

/* ── OUTLINE INFO (Azul) ── */
.btn-outline-info {
    background-color: rgba(56, 189, 248, 0.12);
    border: 1.5px solid rgba(56, 189, 248, 0.5);
    color: #7dd3fc !important;
}
.btn-outline-info:hover:not(:disabled) {
    background-color: rgba(56, 189, 248, 0.22);
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* ── OUTLINE MUTED (gris) ── */
.btn-outline[style*="color:var(--text-muted)"],
.btn-outline[style*="color: var(--text-muted)"] {
    background-color: rgba(107, 114, 128, 0.12) !important;
    border: 1.5px solid rgba(107, 114, 128, 0.4) !important;
    color: #9ca3af !important;
}

.btn-block {
    display: flex;
    width: 100%;
}


.icon {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
}

.badge {
    display: inline-flex;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-success { background: rgba(var(--success-rgb), 0.15); color: var(--success); }
.badge-warning { background: rgba(251, 191, 36, 0.15); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-control, select.form-control {
    width: 100%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 12px;
    font-family: var(--font-body);
    font-size: 14px;
    transition: all 0.2s ease;
}
select option {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.input-addon {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--bg-surface);
    overflow: hidden;
}
.input-addon .addon-text {
    padding: 0 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.02);
    border-right: 1px solid var(--border);
}
.input-addon input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px;
    color: var(--text-primary);
    font-size: 14px;
}
.input-addon input:focus {
    outline: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border);
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}
input:checked + .slider {
    background-color: var(--success);
}
input:checked + .slider:before {
    transform: translateX(24px);
}
.slider.round {
    border-radius: 34px;
}
.slider.round:before {
    border-radius: 50%;
}

/* Header */
.app-header {
    height: 80px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background-color: rgba(9, 13, 22, 0.8);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo-emoji {
    font-size: 32px;
}
.logo-text h1 {
    font-size: 20px;
    line-height: 1.1;
}
.logo-text h1 span {
    color: var(--primary);
}
.logo-text small {
    font-size: 11px;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.btn-location {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s ease;
}
.btn-location:hover {
    background-color: var(--border-light);
    border-color: var(--text-secondary);
}

.header-cart-wrapper {
    position: relative;
}
.btn-cart {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    position: relative;
    padding: 8px;
}
.cart-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modals & Overlays */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    padding: 32px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-lg);
}
.modal-overlay.show .modal-content {
    transform: scale(1);
}
.modal-blocking {
    pointer-events: auto !important;
}
.btn-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}
.btn-close:hover {
    color: white;
}

/* Client Search Hero */
.search-hero {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15) 0%, rgba(var(--accent-rgb), 0.05) 100%);
    padding: 40px 24px;
    border-radius: var(--radius-xl);
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
    border: 1px solid var(--border-light);
}
.search-box {
    position: relative;
    width: 100%;
    max-width: 600px;
}
.search-box .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    width: 20px;
    height: 20px;
}
.search-box input {
    width: 100%;
    padding: 16px 16px 16px 52px;
    font-size: 16px;
    border-radius: 9999px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
}
.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.2);
}

.search-box.sm input {
    padding: 10px 10px 10px 42px;
    font-size: 14px;
}
.search-box.sm .search-icon {
    left: 14px;
    width: 16px;
    height: 16px;
}

/* Client Product Cards Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.product-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}
.product-card-img {
    height: 140px;
    background-color: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    position: relative;
    border-bottom: 1px solid var(--border-light);
}
.product-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card-body h3 {
    font-size: 18px;
    margin-bottom: 8px;
}
.product-card-body p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    flex: 1;
}
.product-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}
.product-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
}

/* Comparison View */
.client-grid {
    display: flex;
    gap: 24px;
    flex-direction: column;
}
@media (min-width: 1024px) {
    .client-grid {
        flex-direction: row;
    }
    .client-feed {
        flex: 1;
    }
    .comparison-sidebar {
        width: 380px;
        flex-shrink: 0;
        position: sticky;
        top: 104px;
        align-self: flex-start;
    }
}

.comparison-sidebar {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-lg);
}
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 12px;
}
.comparison-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.comparison-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color 0.2s;
}
.comparison-item:hover {
    border-color: var(--accent);
}
.comparison-store-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.store-stars {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--warning);
    font-size: 12px;
}
.store-stars svg {
    width: 12px;
    height: 12px;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 120px);
    gap: 24px;
}
@media (min-width: 768px) {
    .dashboard-layout {
        flex-direction: row;
    }
    .dashboard-sidebar {
        width: 260px;
        flex-shrink: 0;
    }
    .dashboard-content {
        flex: 1;
    }
}

.dashboard-sidebar {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: fit-content;
}
.sidebar-profile {
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 12px;
}
.sidebar-profile .avatar {
    font-size: 32px;
    margin-bottom: 8px;
}
.sidebar-profile h4 {
    margin-bottom: 4px;
}
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 16px;
}
.nav-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    text-align: left;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}
.nav-item:hover {
    background-color: var(--border-light);
    color: white;
}
.nav-item.active {
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.dashboard-content {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
}

/* Tabs */
.tab-pane {
    display: none;
}
.tab-pane.active {
    display: block;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.metrics-grid.col-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.metric-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
}
.metric-card h3 {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}
.metric-value {
    font-size: 28px;
    font-weight: 800;
    color: white;
    margin-bottom: 4px;
}
.metric-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

.progress-bar-container {
    background-color: rgba(255, 255, 255, 0.05);
    height: 8px;
    border-radius: 9999px;
    overflow: hidden;
    margin: 8px 0;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 9999px;
    transition: width 0.3s ease;
}

/* Orders Table */
.orders-table-wrapper {
    overflow-x: auto;
}
.orders-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.orders-table th {
    padding: 12px 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}
.orders-table td {
    padding: 16px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}
.orders-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

/* Menu CRUD List */
.menu-crud-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.menu-crud-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.crud-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.crud-item-img {
    font-size: 32px;
    background-color: rgba(255, 255, 255, 0.03);
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}
.crud-item-info h4 {
    margin-bottom: 4px;
}
.crud-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Success subscription Banner */
.success-banner {
    background: linear-gradient(135deg, rgba(var(--success-rgb), 0.15) 0%, rgba(var(--accent-rgb), 0.05) 100%);
    border: 1px solid rgba(var(--success-rgb), 0.3);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
}
.banner-icon {
    font-size: 40px;
}
.banner-body h3 {
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-primary);
    font-style: italic;
}

.suscripcion-status-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
}

.status-value-box {
    margin: 20px 0;
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
}
.status-value-box h4 {
    font-size: 14px;
    color: var(--text-secondary);
    text-transform: uppercase;
}
.status-value-box p {
    font-size: 32px;
    font-weight: 800;
    margin-top: 6px;
}
.status-value-box p.text-success {
    color: var(--success);
}
.status-value-box p.text-danger {
    color: var(--danger);
}

/* Alert Boxes */
.alert {
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.alert-info {
    background-color: rgba(var(--accent-rgb), 0.1);
    border-color: rgba(var(--accent-rgb), 0.3);
    color: var(--text-primary);
}
.alert-warning {
    background-color: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: var(--text-primary);
}
.alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--text-primary);
}
.alert-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    flex-wrap: wrap;
    gap: 12px;
}
.animate-pulse {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4); }
    70% { transform: scale(1.01); box-shadow: 0 0 0 10px rgba(251, 191, 36, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

/* Star Selector */
.star-rating-selector {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 16px 0;
}
.star-selector {
    font-size: 36px;
    color: var(--border);
    cursor: pointer;
    transition: color 0.1s;
}
.star-selector.active, .star-selector:hover {
    color: var(--warning);
}

/* Settings card */
.settings-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
}
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.setting-row h3 {
    font-size: 16px;
    margin-bottom: 4px;
}
.setting-row p {
    font-size: 13px;
    color: var(--text-secondary);
}

.setting-row-collapsible {
    border-top: 1px solid var(--border-light);
    margin-top: 16px;
    padding-top: 16px;
}

/* Cart Items & Summary */
.cart-items-container {
    max-height: 250px;
    overflow-y: auto;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-card);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
}
.cart-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cart-item-emoji {
    font-size: 24px;
}
.cart-item-details h4 {
    font-size: 14px;
}
.cart-item-details p {
    font-size: 12px;
    color: var(--text-secondary);
}

.invoice-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text-secondary);
}
.invoice-row.total-row {
    font-size: 18px;
    font-weight: 800;
    color: white;
    margin-top: 12px;
}

/* Delivery Option Selection */
.checkout-delivery-section {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}
.checkout-delivery-section h3 {
    font-size: 14px;
    margin-bottom: 12px;
}
.delivery-options-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.delivery-option-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.delivery-option-card.selected {
    border-color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.05);
}
.delivery-option-card input {
    cursor: pointer;
}
.delivery-option-details {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.delivery-option-name {
    font-weight: 600;
    font-size: 14px;
}
.delivery-option-rate {
    font-weight: 800;
    color: var(--primary);
}

/* Admin Dashboard Lists */
.provincia-ranking-list, .subscription-metric-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}
.ranking-item, .sub-metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.02);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
}
.ranking-bar-fill {
    height: 4px;
    background-color: var(--accent);
    border-radius: 9999px;
    margin-top: 4px;
}

.reviews-moderation-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}
.review-moderation-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
}
.review-mod-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}
.review-mod-text {
    font-size: 14px;
    margin-bottom: 12px;
    background-color: rgba(0, 0, 0, 0.15);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
}

/* FLOATING DEV PANEL */
.dev-panel-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.dev-panel-toggle {
    background-color: #1e293b;
    border: 1px solid var(--primary);
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 13px;
    padding: 12px 20px;
    border-radius: 9999px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
}
.dev-panel-toggle:hover {
    transform: scale(1.05);
}
.dev-panel-content {
    display: none;
    width: 320px;
    background-color: #0f172a;
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-top: 12px;
    box-shadow: var(--shadow-lg);
}
.dev-panel-container.open .dev-panel-content {
    display: block;
}
.dev-panel-content h3 {
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--primary);
}
.dev-role-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px 0;
}
.btn-dev-role {
    background-color: #1e293b;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 4px;
    font-size: 11px;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}
.btn-dev-role:hover {
    background-color: #334155;
    color: white;
}
.btn-dev-role.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}
.dev-actions h4 {
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.dev-info-box {
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-size: 11px;
    color: var(--text-secondary);
    border-left: 2px solid var(--accent);
}
.dev-info-box p {
    margin-bottom: 4px;
}
.dev-info-box p strong {
    color: white;
}

/* Sidebar Toggle for Mobile Dashboard */
.sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    margin-bottom: 16px;
}
.sidebar-toggle span {
    width: 24px;
    height: 2px;
    background-color: white;
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile responsive fixes */
@media (max-width: 767px) {
    .app-header {
        padding: 0 16px;
    }
    .logo-text h1 {
        font-size: 16px;
    }
    .logo-emoji {
        font-size: 24px;
    }
    
    .sidebar-toggle {
        display: flex;
        position: fixed;
        top: 96px;
        left: 16px;
        z-index: 101;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background-color: rgba(15, 23, 42, 0.85);
        backdrop-filter: blur(8px);
        border: 1px solid var(--border);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
        align-items: center;
        justify-content: center;
        margin-bottom: 0;
        padding: 0;
    }

    .sidebar-toggle span {
        width: 18px;
    }

    .sidebar-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .sidebar-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .sidebar-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .dashboard-sidebar {
        display: none;
    }
    .dashboard-sidebar.show {
        display: flex;
        position: fixed;
        top: 80px; left: 0; bottom: 0; right: 0;
        z-index: 99;
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--border);
        padding-top: 64px; /* Evita solapamiento con el botón flotante */
    }
    
    .dashboard-content {
        padding: 16px;
        padding-top: 64px; /* Evita solapamiento con el botón de hamburguesa flotante */
    }
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* Support Bar Styles */
.support-bar {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    padding: 8px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-secondary);
}
.support-bar a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.support-bar a:hover {
    text-decoration: underline;
}
.support-divider {
    color: var(--border);
}
@media (max-width: 767px) {
    .support-bar {
        flex-direction: column;
        gap: 4px;
        padding: 8px 16px;
        text-align: center;
    }
    .support-divider {
        display: none;
    }
}

/* --- Nuevas Reglas Agregadas para Experiencia de Usuario --- */

/* Controles de cantidad en el Carrito */
.quantity-controller {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 2px;
    gap: 4px;
}

.btn-qty {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-qty:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
}

.qty-val {
    font-size: 14px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
    color: var(--text-primary);
}

/* Banner de Guía del Cliente (Cómo usar el sistema) */
.guide-banner {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.guide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.guide-header h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.guide-icon {
    font-size: 18px;
}

.btn-close-guide {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}

.btn-close-guide:hover {
    color: var(--danger);
}

.guide-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.guide-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.step-num {
    background: rgba(255, 143, 0, 0.15);
    color: var(--primary);
    font-size: 12px;
    font-weight: bold;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255, 143, 0, 0.3);
}

.guide-step p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.guide-step p strong {
    color: var(--text-primary);
}

/* Renderizado de Imágenes Reales de Productos */
.product-img-render {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

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

.product-emoji-render {
    font-size: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

/* Avatar de Perfil con Imagen en Sidebar */
.sidebar-profile .avatar {
    font-size: 48px;
    margin-bottom: 10px;
    width: 64px;
    height: 64px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border-light);
}

.sidebar-profile .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Banner de Advertencia de Sesión Obligatoria para Visitantes */
.visitor-notice-banner {
    display: flex;
    gap: 16px;
    align-items: center;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.02) 100%);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: pulseGlow 4s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        border-color: rgba(245, 158, 11, 0.2);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }
    100% {
        border-color: rgba(245, 158, 11, 0.4);
        box-shadow: 0 4px 25px rgba(245, 158, 11, 0.05);
    }
}

.visitor-notice-banner .notice-icon {
    font-size: 24px;
    animation: bounceSlow 2s infinite;
}

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.visitor-notice-banner .notice-content h4 {
    margin: 0 0 4px 0;
    color: #f59e0b; /* Color ámbar premium */
    font-size: 15px;
    font-weight: 600;
}

.visitor-notice-banner .notice-content p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.visitor-notice-banner .notice-content p strong {
    color: var(--text-primary);
}

.visitor-notice-banner .notice-content a {
    color: #f59e0b;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s;
}

.visitor-notice-banner .notice-content a:hover {
    color: #fbbf24;
}

/* Tracker de Pedidos Activos para Clientes */
.active-orders-tracker {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.tracker-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
}

.tracker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.tracker-logo {
    font-size: 24px;
}

.tracker-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.tracker-meta {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.tracker-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 10px;
}

/* Línea de progreso que conecta los pasos */
.tracker-steps::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    z-index: 1;
}

.tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 3px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.step-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    transition: all 0.3s ease;
}

/* Clases de estado */
.tracker-step.completed .step-dot {
    background: var(--primary);
    border-color: rgba(255, 143, 0, 0.3);
    box-shadow: 0 0 10px rgba(255, 143, 0, 0.3);
}

.tracker-step.completed .step-label {
    color: var(--text-primary);
    font-weight: 600;
}

.tracker-step.active .step-dot {
    background: var(--bg-surface);
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary);
    animation: pulseDot 2s infinite alternate;
}

.tracker-step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

@keyframes pulseDot {
    0% {
        box-shadow: 0 0 8px rgba(255, 143, 0, 0.3);
    }
    100% {
        box-shadow: 0 0 16px rgba(255, 143, 0, 0.8);
    }
}

/* ==========================================================================
   BOTONES FLOTANTES PWA (FAB - Floating Action Buttons)
   ========================================================================== */

#pwaFab {
    position: fixed !important;
    bottom: 28px !important;
    right: 24px !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 12px !important;
    will-change: transform !important;
    transform: translateZ(0) !important;
    /* Asegurar que no hereda overflow de ningún padre */
    contain: none !important;
}


.fab-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    animation: fabPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    position: relative;
    padding: 0;
}

.fab-btn:hover {
    transform: scale(1.12);
}

.fab-btn:active {
    transform: scale(0.95);
}

/* Tooltip al hacer hover */
.fab-btn::after {
    content: attr(data-label);
    position: absolute;
    right: 66px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(17, 24, 39, 0.96);
    color: #f3f4f6;
    font-size: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.fab-btn:hover::after {
    opacity: 1;
}

.fab-btn-share {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.5);
    color: white;
}

.fab-btn-share:hover {
    box-shadow: 0 6px 28px rgba(56, 189, 248, 0.7);
}

.fab-btn-install {
    background: linear-gradient(135deg, #fb923c, #f97316);
    box-shadow: 0 4px 20px rgba(251, 146, 60, 0.5);
    color: white;
}

.fab-btn-install:hover {
    box-shadow: 0 6px 28px rgba(251, 146, 60, 0.7);
}

.fab-btn-install.fab-hidden {
    display: none !important;
}

@keyframes fabPop {
    0%   { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
}

/* ==========================================
   NUEVOS ESTILOS: FAB PWA MINIMALISTA
   ========================================== */
.pwa-pill-btn {
    pointer-events: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    font-family: var(--font-heading) !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(8px) !important;
    text-transform: none !important;
    letter-spacing: 0.5px !important;
}

#installFabBtn {
    background: linear-gradient(135deg, #fb923c, #f97316) !important;
}

#installFabBtn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4) !important;
}

#shareFabBtn {
    background: rgba(15, 23, 42, 0.85) !important;
}

#shareFabBtn:hover {
    background: rgba(15, 23, 42, 0.98) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4) !important;
}

#pwaFab {
    gap: 8px !important;
}

/* ==========================================
   NUEVOS ESTILOS: CONFIRMACIÓN ANIMADA (TARIFA)
   ========================================== */
.custom-success-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(9, 13, 22, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.custom-success-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.custom-success-modal-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 380px;
    padding: 32px 24px;
    text-align: center;
    transform: scale(0.85);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: var(--shadow-lg);
}

.custom-success-modal-overlay.active .custom-success-modal-card {
    transform: scale(1);
}

.custom-success-modal-card h3 {
    margin: 16px 0 8px 0;
    font-size: 1.4rem;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.custom-success-modal-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.custom-success-modal-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 10px 28px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-heading);
    transition: all 0.2s ease;
}

.custom-success-modal-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.success-checkmark-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.checkmark-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 4px solid #10b981;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.checkmark-draw {
    width: 15px;
    height: 30px;
    border-right: 4px solid #10b981;
    border-top: 4px solid #10b981;
    transform: scaleX(-1) rotate(135deg);
    transform-origin: left top;
    animation: draw-checkmark 0.4s ease-out 0.2s forwards;
    opacity: 0;
    position: absolute;
    top: 34px;
    left: 16px;
}

@keyframes draw-checkmark {
    0% {
        height: 0;
        width: 0;
        opacity: 1;
    }
    40% {
        height: 0;
        width: 15px;
        opacity: 1;
    }
    100% {
        height: 30px;
        width: 15px;
        opacity: 1;
    }
}

/* ==========================================
   NUEVOS ESTILOS: VISTA DETALLE DE NEGOCIO
   ========================================== */
.business-view-modal {
    max-width: 650px !important;
    max-height: 85vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 28px !important;
}

.business-view-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.business-view-header-logo {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    font-size: 36px;
}

.business-view-header-info {
    flex-grow: 1;
}

.business-view-header-info h2 {
    margin: 0 0 6px 0;
    font-size: 1.6rem;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.business-view-header-info p {
    margin: 0 0 8px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.business-view-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--warning);
    font-weight: 600;
    font-size: 0.95rem;
}

.business-view-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.business-view-tabs .tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px 20px;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    outline: none;
}

.business-view-tabs .tab-btn:hover {
    color: var(--text-primary);
}

.business-view-tabs .tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.business-tab-section {
    display: none;
}

.business-tab-section.active {
    display: block;
}

/* Menú interno */
.business-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.business-menu-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.business-menu-card:hover {
    transform: translateY(-2px);
    border-color: rgba(251, 146, 60, 0.3);
}

.business-menu-card-img {
    height: 110px;
    background: rgba(255, 255, 255, 0.01);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.business-menu-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.business-menu-card-img .menu-emoji {
    font-size: 40px;
}

.business-menu-card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.business-menu-card-body h4 {
    margin: 0 0 6px 0;
    font-size: 0.95rem;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.business-menu-card-body p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
    line-height: 1.4;
    flex-grow: 1;
}

.business-menu-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.business-menu-price {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary);
}

/* Reseñas internas */
.business-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 45vh;
    overflow-y: auto;
    padding-right: 4px;
}

.business-review-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
}

.business-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

.business-review-user {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.business-review-stars {
    color: var(--warning);
    font-size: 0.85rem;
}

.business-review-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.business-review-comment {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

.business-logo-link {
    cursor: pointer;
    transition: transform 0.2s ease;
}
.business-logo-link:hover {
    transform: scale(1.08);
}

.prod-card-logo-img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: transform 0.2s;
}
.prod-card-logo-img:hover {
    transform: scale(1.15);
}

.prod-card-logo-emoji {
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s;
    display: inline-block;
}
.prod-card-logo-emoji:hover {
    transform: scale(1.2);
}

.business-clickable-name {
    cursor: pointer;
    color: var(--text-primary);
    transition: color 0.2s;
}
.business-clickable-name:hover {
    color: var(--primary);
    text-decoration: underline;
}

.best-rate-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Media query para móviles - Ajustes de experto en diseño gráfico */
@media (max-width: 480px) {
    /* Ajustes generales de tipografía */
    h1 { font-size: 1.4rem !important; }
    h2 { font-size: 1.2rem !important; }
    h3 { font-size: 1.05rem !important; }
    
    /* Modales generales */
    .modal-overlay {
        align-items: flex-start !important;
        overflow-y: auto !important;
        padding: 20px 10px !important;
    }
    .modal-content {
        padding: 16px 12px !important;
        border-radius: var(--radius-md) !important;
        margin: 20px auto !important;
        max-height: none !important;
        overflow-y: visible !important;
    }
    
    /* Header principal */
    .app-header {
        padding: 0 10px !important;
        height: 60px !important;
    }
    .logo-emoji {
        font-size: 18px !important;
    }
    .logo-text h1 {
        font-size: 13px !important;
    }
    .logo-text small {
        display: none !important;
    }
    .btn-location {
        padding: 4px 6px !important;
        font-size: 10px !important;
        gap: 3px !important;
    }
    .btn-location svg {
        width: 9px !important;
        height: 9px !important;
    }
    
    #headerUserArea {
        display: flex !important;
        gap: 3px !important;
    }
    #headerRegisterBtn {
        display: none !important; /* Esconder Registro en cabecera móvil */
    }
    #headerLoginBtn {
        padding: 4px 8px !important;
        font-size: 10px !important;
        border-radius: var(--radius-sm) !important;
    }
    
    /* Badge de sesión de usuario */
    .user-session-badge {
        display: flex !important;
        align-items: center !important;
        gap: 3px !important;
        font-size: 10px !important;
    }
    .user-session-badge .user-name-text {
        display: none !important; /* Esconder nombre en móvil */
    }
    .user-session-badge .avatar {
        font-size: 12px !important;
    }
    #logoutBtn {
        padding: 3px 5px !important;
        font-size: 8px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 1px !important;
    }
    #logoutBtn svg {
        width: 8px !important;
        height: 8px !important;
    }

    /* Modal de negocio */
    .business-view-modal {
        padding: 12px !important;
        max-height: 88vh;
    }
    .business-view-header {
        gap: 8px;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }
    .business-view-header-logo {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    .business-view-header-info h2 {
        font-size: 1.15rem;
    }
    .business-menu-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 8px;
    }
    .business-menu-card-img {
        height: 80px;
    }
    .business-menu-card-body {
        padding: 6px;
    }
    .business-menu-card-body h4 {
        font-size: 0.8rem;
        margin-bottom: 2px;
    }
    .business-menu-card-body p {
        font-size: 0.7rem;
        margin-bottom: 6px;
        line-height: 1.3;
    }
    .business-menu-price {
        font-size: 0.8rem;
    }
    .business-view-tabs .tab-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    /* Ajustes para el modal de éxito */
    .custom-success-modal-card {
        padding: 20px 12px;
        max-width: 290px;
    }
    .custom-success-modal-card h3 {
        font-size: 1.1rem;
    }
    .custom-success-modal-card p {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }
    .checkmark-circle {
        width: 48px;
        height: 48px;
    }
    .checkmark-draw {
        width: 10px;
        height: 20px;
        top: 24px;
        left: 12px;
    }

    /* === Ajustes específicos para los paneles (Comercio, Repartidor, Admin y Cliente) === */

    /* Tablas de Pedidos y Fletes */
    .orders-table th {
        padding: 8px 10px !important;
        font-size: 10px !important;
    }
    .orders-table td {
        padding: 8px 10px !important;
        font-size: 11px !important;
    }

    /* CRUD de Platos (Comercio) */
    .menu-crud-item {
        padding: 10px !important;
        gap: 8px !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .crud-item-left {
        gap: 8px !important;
    }
    .crud-item-img {
        font-size: 24px !important;
    }
    .crud-item-actions {
        display: flex !important;
        justify-content: flex-end !important;
        gap: 6px !important;
        width: 100% !important;
    }
    .crud-item-actions button {
        padding: 6px 10px !important;
        font-size: 11px !important;
    }

    /* Tarjetas de Métricas de los Dashboards */
    .metric-card {
        padding: 12px !important;
    }
    .metric-card h3 {
        font-size: 10px !important;
        margin-bottom: 6px !important;
    }
    .metric-value {
        font-size: 20px !important;
    }
    .metric-sub {
        font-size: 10px !important;
    }

    /* Ajustes para Formularios y Configuración */
    .settings-card {
        padding: 12px !important;
    }
    .setting-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }
    .setting-row select, .setting-row input {
        width: 100% !important;
    }
    .form-group label {
        font-size: 11px !important;
        margin-bottom: 4px !important;
    }
    .form-control, select.form-control {
        padding: 8px 10px !important;
        font-size: 13px !important;
    }
    .input-addon input {
        padding: 8px 10px !important;
        font-size: 13px !important;
    }
    .addon-text {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
    .form-help {
        font-size: 10px !important;
    }

    /* Botones de Formularios */
    .btn {
        padding: 8px 16px !important;
        font-size: 13px !important;
    }
    .btn-sm {
        padding: 6px 12px !important;
        font-size: 11px !important;
    }

    /* Grilla del Feed de Productos (2 Columnas en móvil) */
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 8px !important;
    }
    .product-card-img {
        height: 90px !important;
        font-size: 36px !important;
    }
    .product-card-body {
        padding: 10px !important;
    }
    .product-card-body h3 {
        font-size: 13px !important;
        margin-bottom: 4px !important;
    }
    .product-card-body p {
        font-size: 11px !important;
        margin-bottom: 8px !important;
        line-height: 1.3;
    }
    .product-card-meta {
        padding-top: 8px !important;
    }
    .product-card-meta .price {
        font-size: 13px !important;
    }
    .product-card-meta .btn {
        padding: 4px 8px !important;
        font-size: 11px !important;
    }

    /* Elementos del Carrito de Compras */
    .cart-item {
        padding: 8px 10px !important;
        gap: 8px !important;
    }
    .cart-item-info {
        gap: 6px !important;
    }
    .cart-item-emoji {
        font-size: 20px !important;
    }
    .cart-item-details h4 {
        font-size: 12px !important;
    }
    .invoice-row {
        font-size: 12px !important;
    }
    .invoice-row.total-row {
        font-size: 15px !important;
    }

    /* Repartidores en Checkout */
    .delivery-option-card {
        padding: 8px 10px !important;
        gap: 8px !important;
    }
    .delivery-option-name {
        font-size: 12px !important;
    }
    .delivery-option-rate {
        font-size: 13px !important;
    }
    .ranking-item, .sub-metric-item {
        font-size: 12px !important;
    }
}

/* Suscripcion Block Overlay */
.suscripcion-block-overlay {
    position: fixed;
    top: 80px; /* Debajo de la cabecera */
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(9, 13, 22, 0.95);
    backdrop-filter: blur(16px);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.block-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: fadeIn 0.4s ease;
}
.block-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 16px;
    animation: pulse 2s infinite;
}
.block-text {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.block-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ==========================================================================
   MIS NEGOCIOS Y TARIFAS - REPARTIDOR
   ========================================================================== */
.negocios-tarifas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.negocio-tarifa-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s ease;
}
.negocio-tarifa-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    background: var(--bg-card-hover);
}
.negocio-tarifa-card .negocio-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.negocio-tarifa-card .negocio-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg-surface);
}
.negocio-tarifa-card .negocio-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.negocio-tarifa-card .negocio-provincia {
    font-size: 12px;
    color: var(--text-muted);
}
.negocio-tarifa-card .tarifa-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}
.negocio-tarifa-card .status-indicator {
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}
.negocio-tarifa-card .status-active {
    color: var(--success);
}
.negocio-tarifa-card .status-inactive {
    color: var(--text-muted);
}

