/* ===== ESTILOS DE COMPONENTES ===== */
/* Bodega Peruana - Sistema de Gestión */

/* ===== BOTONES DE AUTENTICACIÓN ===== */
.auth-buttons {
    display: flex;
    align-items: center;
}

.btn-login {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-login:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

/* MENÚ DE USUARIO */
.user-menu {
    position: relative;
}

.btn-user {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-user:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* Botón de usuario en modo admin */
.admin-mode .btn-user {
    background: var(--admin-primary);
}

.admin-mode .btn-user:hover {
    background: var(--admin-dark);
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.user-dropdown.active + .btn-user .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    z-index: 1001;
    display: none;
    margin-top: 0.5rem;
    animation: fadeInUp 0.3s ease;
}

.user-dropdown.active {
    display: block;
}

.user-info {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-light);
}

.user-info strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.user-info span {
    font-size: 0.8rem;
    color: var(--text-light);
}

.dropdown-item {
    width: 100%;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 0.9rem;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0.25rem 0;
}

/* ===== BUSCADOR Y AUTOCOMPLETADO ===== */
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    width: 280px;
    transition: all 0.3s ease;
    background: var(--bg-light);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--bg-white);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-lighter);
    z-index: 2;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background: var(--primary-light);
    color: white;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
}

.suggestion-item:hover .suggestion-icon,
.suggestion-item.selected .suggestion-icon {
    color: white;
}

.suggestion-content {
    flex: 1;
}

.suggestion-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.suggestion-category {
    font-size: 0.8rem;
    color: var(--text-light);
    opacity: 0.7;
}

.suggestion-item:hover .suggestion-category,
.suggestion-item.selected .suggestion-category {
    color: white;
    opacity: 0.9;
}

.suggestion-price {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
}

.suggestion-item:hover .suggestion-price,
.suggestion-item.selected .suggestion-price {
    color: white;
}

.no-suggestions {
    padding: 1rem;
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

/* ===== CARRITO ICONO ===== */
.cart-icon-nav {
    position: relative;
    background: var(--primary);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-icon-nav:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.cart-count-nav {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: var(--text-dark);
    font-size: 0.75rem;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== FILTROS ===== */
.filters-sidebar {
    position: sticky;
    top: 120px;
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF8F0 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(230, 57, 70, 0.1);
    height: fit-content;
    backdrop-filter: blur(10px);
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--bg-light);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-option {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid transparent;
    backdrop-filter: blur(5px);
}

.filter-option:hover {
    background: rgba(230, 57, 70, 0.05);
    border-color: var(--primary-light);
}

.filter-option.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.2);
}

.filter-option input {
    margin-right: 0.75rem;
}

.filter-option span {
    font-weight: 500;
}

/* ===== BOTONES GENERALES ===== */
.btn-add-cart {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.btn-add-cart:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-add-cart:disabled {
    background: var(--text-lighter);
    cursor: not-allowed;
    transform: none;
}

.btn-login-historial,
.btn-back-catalog {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-login-historial:hover,
.btn-back-catalog:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ===== BOTONES DE ADMINISTRADOR ===== */
.btn-admin {
    background: var(--admin-primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-admin:hover {
    background: var(--admin-dark);
    transform: translateY(-1px);
}

.btn-admin-secondary {
    background: transparent;
    color: var(--admin-primary);
    border: 2px solid var(--admin-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-admin-secondary:hover {
    background: var(--admin-primary);
    color: white;
    transform: translateY(-1px);
}

.btn-edit {
    background: var(--info);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-edit:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-delete {
    background: var(--error);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-delete:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-save {
    background: var(--success);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-save:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-cancel {
    background: var(--text-lighter);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cancel:hover {
    background: #6b7280;
    transform: translateY(-1px);
}

/* ===== COMPONENTES DE TABLA ===== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.admin-table th {
    background: var(--admin-primary);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover {
    background: var(--admin-bg);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* ===== FORMULARIOS DE ADMIN ===== */
.admin-form {
    background: var(--bg-white);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-lg);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-light);
}

/* ===== TARJETAS DE ADMIN ===== */
.admin-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-lg);
}

.admin-card-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-light);
}

.admin-card-title {
    color: var(--text-dark);
    margin: 0;
    font-size: 1.25rem;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.stat-card {
    background: var(--bg-white);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    border-left: 4px solid var(--admin-primary);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--admin-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== MODALES ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-width: 400px;
    width: 90%;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-content {
    padding: 0;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

/* Modales más grandes para admin */
.modal-lg {
    max-width: 600px;
}

.modal-xl {
    max-width: 800px;
}

/* ===== FORMULARIOS ===== */
.auth-form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-auth {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-auth:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-auth:disabled {
    background: var(--text-lighter);
    cursor: not-allowed;
    transform: none;
}

.auth-switch {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Estados de carga en formularios */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Mensajes de error */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* ===== CARRITO PANEL ===== */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-panel-modern {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: var(--bg-white);
    z-index: 1999;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.cart-panel-modern.active {
    right: 0;
}

.cart-header-modern {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header-modern h3 {
    margin: 0;
    color: var(--text-dark);
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.cart-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.cart-items-modern {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
}

.empty-cart-modern {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-light);
}

.empty-cart-modern i {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
    opacity: 0.5;
}

.cart-item-modern {
    display: flex;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border-light);
    gap: var(--space-md);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--text-light);
    font-size: 0.9rem;
}

.cart-item-controls-modern {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-medium);
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary);
}

.cart-item-quantity {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
}

.remove-item {
    color: var(--text-lighter);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.remove-item:hover {
    color: #DC3545;
    background: var(--bg-light);
}

.cart-summary-modern {
    padding: var(--space-lg);
    border-top: 1px solid var(--border-light);
    background: var(--bg-light);
}

.total-section-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    font-size: 1.25rem;
    font-weight: 600;
}

.total-amount-modern {
    color: var(--primary);
    font-size: 1.5rem;
}

.btn-pedir-modern {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.btn-pedir-modern:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== ESTILOS DE COMPONENTES ===== */
/* Bodega Peruana - Sistema de Gestión */

/* ... (TODO EL CÓDIGO HASTA "CARRITO PANEL" SE MANTIENE IGUAL) ... */
/* ===== CARRITO PANEL ===== */
/* ... (TODO IGUAL HASTA AQUÍ) ... */

.btn-pedir-modern:disabled {
    background: var(--text-lighter);
    cursor: not-allowed;
    transform: none;
}

/* ====================== */
/* 🔧 CORRECCIÓN: BOTÓN CENTRADO PANEL ADMIN */
/* ====================== */

.btn-admin-enter {
    text-align: center !important;
    margin: 20px auto !important;
    float: none !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: auto !important;
}

/* 🔧 FORZAR CENTRADO COMPLETO EN PANTALLA DE BIENVENIDA */
#adminWelcome {
    text-align: center !important;
}

#adminWelcome * {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.welcome-card {
    text-align: center !important;
    margin: 0 auto !important;
}

.welcome-stats {
    text-align: center !important;
    justify-content: center !important;
}

.welcome-stat {
    text-align: center !important;
}

/* 🔧 ANULAR text-align: left EN ELEMENTOS DE BIENVENIDA */
#adminWelcome .dropdown-item,
.welcome-card .dropdown-item,
.btn-admin-enter,
.welcome-stat {
    text-align: center !important;
}

/* ===== ESTILOS DE COMPONENTES ===== */
/* Bodega Peruana - Sistema de Gestión */

/* ... (TODO IGUAL HASTA AQUÍ) ... */

/* ====================== */
/* 🎯 VERSIÓN TRANSPARENTE 50% - IMAGEN GRANDE CON MARCO AZUL OSCURO */
/* ====================== */

/* TARJETA - Marco azul oscuro alrededor */
.product-card-modern {
    height: 480px !important;
    min-height: 480px !important;
    display: flex !important;
    flex-direction: column !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    position: relative !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    background: transparent !important;
    border: 3px solid #1e3a8a !important; /* ← MARCO AZUL OSCURAZO */
}

/* Hover suave en el marco */
.product-card-modern:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 16px 32px rgba(30, 58, 138, 0.3) !important;
    border-color: #2563eb !important;
}

/* CONTENEDOR DE IMAGEN - TRANSPARENTE */
.product-image {
    position: absolute !important;
    top: 3px !important;
    left: 3px !important;
    right: 3px !important;
    bottom: 3px !important;
    height: calc(100% - 6px) !important;
    width: calc(100% - 6px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    overflow: hidden !important;
    z-index: 1 !important;
    background: transparent !important;
    border-radius: 13px !important;
    cursor: pointer !important;
}

/* IMAGEN MUY GRANDE - Ocupa casi todo */
.product-real-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    background-color: white !important;
    border-radius: 10px !important;
    transition: all 0.4s ease !important;
    z-index: 2 !important;
    position: relative !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    cursor: pointer !important;
}

/* Efecto hover - Crecimiento sutil */
.product-card-modern:hover .product-real-image {
    transform: scale(1.03) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
}

/* OVERLAY para click - más visible */
.image-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(30, 58, 138, 0.0) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    opacity: 0 !important;
    transition: all 0.3s ease !important;
    z-index: 5 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
}

.product-image:hover .image-overlay {
    opacity: 1 !important;
    background: rgba(30, 58, 138, 0.7) !important;
}

.image-overlay i {
    font-size: 2.5rem !important;
    margin-bottom: 10px !important;
}

.image-overlay span {
    font-size: 1rem !important;
    font-weight: 600 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
}

/* BADGE DE CATEGORÍA - Sobre la imagen */
.category-badge {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    background: rgba(30, 58, 138, 0.9) !important; /* ← 90% opaco */
    padding: 6px 16px !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    color: white !important;
    z-index: 10 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(4px) !important;
}

/* CONTENIDO SUPERPUESTO - 50% TRANSPARENTE */
.product-card-body {
    position: absolute !important;
    bottom: 0 !important;
    left: 3px !important;
    right: 3px !important;
    padding: 20px 25px 25px 25px !important;
    z-index: 3 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    color: white !important;
    background: rgba(30, 58, 138, 0.5) !important; /* ← 50% TRANSPARENTE */
    border-top: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 0 0 13px 13px !important;
    backdrop-filter: blur(4px) !important;
}

/* Nombre del producto */
.product-card-title {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: white !important;
    line-height: 1.3 !important;
    margin-bottom: 5px !important;
    min-height: 2.6em !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    cursor: pointer !important;
}

.product-card-title:hover {
    text-decoration: underline !important;
}

/* Descripción */
.product-card-description {
    font-size: 0.9rem !important;
    color: rgba(255, 255, 255, 0.95) !important; /* ← Más blanco para mejor legibilidad */
    line-height: 1.4 !important;
    margin-bottom: 10px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* FILA INFERIOR - Compacta */
.product-card-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    margin-top: 8px !important;
    flex-wrap: wrap !important;
}

/* Precio */
.product-card-price {
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    color: white !important;
    letter-spacing: -0.5px !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important; /* ← Sombra más fuerte para legibilidad */
}

/* Stock */
.product-card-stock {
    font-size: 0.8rem !important;
    color: #0d966d !important; /* ← VERDE MÁS OSCURO */
    font-weight: 600 !important;
    background: rgba(13, 150, 109, 0.2) !important; /* ← FONDO OSCURO */
    padding: 4px 12px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(13, 150, 109, 0.4) !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2) !important; /* ← Sombra de texto */
}

/* Botón Agregar - Blanco sobre azul */
.btn-add-cart {
    padding: 12px 24px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    transition: all 0.2s ease !important;
    background: white !important;
    border: 2px solid white !important;
    color: #1e3a8a !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    flex-shrink: 0 !important;
}

.btn-add-cart:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3) !important;
    background: #f8fafc !important;
}

/* Para iconos (fallback) */
.product-image i {
    font-size: 5rem !important;
    color: rgba(30, 58, 138, 0.3) !important;
    z-index: 2 !important;
    position: relative !important;
    cursor: pointer !important;
}

/* Ocultar icono cuando hay imagen */
.product-real-image[src]:not([src=""]) ~ i.fas {
    display: none !important;
}

/* ====================== */
/* 🆕 ESTILOS PARA VISTA DETALLE DE PRODUCTO ===== */
/* ====================== */

/* Contenedor principal de detalle */
.producto-detalle-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    animation: fadeIn 0.4s ease;
}

/* Estado de carga */
.detalle-loading {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.detalle-loading i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Error */
.detalle-error {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.detalle-error i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--error);
}

/* Contenedor del detalle completo */
.producto-detalle {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

/* Header con botón volver */
.detalle-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-volver {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.btn-volver:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-5px);
}

.detalle-titulo {
    flex: 1;
    color: white;
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Contenido principal */
.detalle-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem;
}

@media (max-width: 992px) {
    .detalle-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }
}

/* Imagen principal */
.detalle-imagen-container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: var(--radius-xl);
    overflow: hidden;
    padding: 2rem;
    min-height: 400px;
    position: relative;
}

.detalle-imagen-principal {
    width: 100%;
    height: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.detalle-imagen-principal:hover {
    transform: scale(1.02);
}

.detalle-imagen-placeholder {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
}

.detalle-imagen-placeholder i {
    font-size: 6rem;
    opacity: 0.3;
}

/* Información del producto */
.detalle-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Precio y estado */
.detalle-precio-estado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-light);
}

.detalle-precio {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.precio-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.precio-valor {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.detalle-stock {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.detalle-stock.in-stock {
    background: rgba(13, 150, 109, 0.15);
    color: #0d966d;
    border: 2px solid rgba(13, 150, 109, 0.3);
}

.detalle-stock.out-of-stock {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
    border: 2px solid rgba(220, 38, 38, 0.3);
}

/* Secciones */
.detalle-seccion {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary);
}

.detalle-seccion h3 {
    margin: 0 0 1rem 0;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
}

.detalle-seccion h3 i {
    color: var(--primary);
}

.detalle-descripcion {
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 1.05rem;
    margin: 0;
}

/* Características */
.detalle-caracteristicas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 576px) {
    .detalle-caracteristicas {
        grid-template-columns: 1fr;
    }
}

.caracteristica {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.caracteristica-label {
    font-weight: 600;
    color: var(--text-dark);
}

.caracteristica-valor {
    color: var(--primary);
    font-weight: 500;
}

/* Acciones */
.detalle-acciones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

@media (max-width: 576px) {
    .detalle-acciones {
        grid-template-columns: 1fr;
    }
}

.btn-agregar-detalle {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-agregar-detalle:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

.btn-agregar-detalle:disabled {
    background: var(--text-lighter);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-comprar-ahora {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-comprar-ahora:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13, 150, 109, 0.3);
}

.btn-comprar-ahora:disabled {
    background: var(--text-lighter);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Información extra */
.detalle-extra {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-top: 1rem;
}

.detalle-extra p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.75rem 0;
    color: var(--text-dark);
}

.detalle-extra p i {
    color: var(--primary);
    min-width: 20px;
}

/* RESPONSIVE (TODO IGUAL, solo cambia la transparencia) */
/* Tablet */
@media (max-width: 1024px) {
    /* ... mismo código responsive ... */
    .product-card-body {
        background: rgba(30, 58, 138, 0.5) !important; /* ← 50% en todos los tamaños */
    }
    
    .detalle-content {
        padding: 2rem;
    }
    
    .precio-valor {
        font-size: 2.5rem;
    }
}

/* Móvil grande */
@media (max-width: 768px) {
    /* ... mismo código responsive ... */
    .product-card-body {
        background: rgba(30, 58, 138, 0.5) !important;
    }
    
    .detalle-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .detalle-titulo {
        font-size: 1.75rem;
    }
    
    .detalle-precio-estado {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Móvil pequeño */
@media (max-width: 480px) {
    /* ... mismo código responsive ... */
    .product-card-body {
        background: rgba(30, 58, 138, 0.5) !important;
    }
    
    .producto-detalle-container {
        padding: 1rem;
    }
    
    .detalle-content {
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .detalle-imagen-container {
        padding: 1rem;
        min-height: 300px;
    }
    
    .detalle-seccion {
        padding: 1rem;
    }
}

/* ====================== */
/* ANIMACIONES Y EFECTOS */
/* ====================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* ====================== */
/* UTILIDADES */
/* ====================== */

.text-center {
    text-align: center !important;
}

.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-center {
    justify-content: center !important;
}

/* ====================== */
/* 🆕 ESTILOS MODAL YAPE ===== */
/* ====================== */

/* Modal Yape específico */
.modal-lg {
    max-width: 800px;
    max-height: 90vh; /* 🆕 Limitar altura máxima */
    display: flex;
    flex-direction: column;
}

.yape-content {
    padding: 2rem;
    overflow-y: auto; /* 🆕 Hacer scrollable */
    flex: 1; /* 🆕 Para que ocupe espacio disponible */
    max-height: calc(90vh - 120px); /* 🆕 Altura máxima para scroll */
}

/* 🆕 Personalizar scrollbar */
.yape-content::-webkit-scrollbar {
    width: 8px;
}

.yape-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.yape-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.yape-content::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Instrucciones */
.yape-instructions {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid #10b981;
}

.instruction-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.instruction-header i {
    color: #10b981;
    font-size: 1.5rem;
}

.instruction-header h4 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.25rem;
}

.instruction-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-number {
    background: #10b981;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step p {
    margin: 0;
    color: var(--text-dark);
    line-height: 1.5;
    flex: 1;
}

.step strong {
    color: #1e40af;
}

/* Información de pago */
.yape-payment-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .yape-payment-info {
        grid-template-columns: 1fr;
    }
}

/* QR Section */
.qr-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.qr-container {
    position: relative;
    width: 250px;
    height: 250px;
    background: white;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #d1d5db;
    overflow: hidden;
}

.qr-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.qr-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    gap: 0.5rem;
    color: var(--text-light);
}

.qr-caption {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.qr-caption i {
    margin-right: 0.5rem;
    color: #10b981;
}

/* Detalles de pago */
.payment-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.detail-card:hover {
    background: white;
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.detail-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.detail-content {
    flex: 1;
}

.detail-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.detail-value {
    display: block;
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 600;
}

.detail-with-copy {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-copy {
    background: transparent;
    border: 1px solid var(--border-medium);
    color: var(--text-light);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Colores especiales */
.text-success {
    color: #10b981 !important;
}

.text-warning {
    color: #f59e0b !important;
}

/* Advertencia */
.yape-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 2rem;
    border-left: 4px solid #f59e0b;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.warning-icon {
    color: #f59e0b;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.warning-content p {
    margin: 0 0 0.5rem 0;
    color: #92400e;
}

.warning-content p:last-child {
    margin-bottom: 0;
}

.warning-small {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Acciones */
.yape-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.yape-actions button {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.yape-actions .btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-medium);
}

.yape-actions .btn-secondary:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.yape-actions .btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.yape-actions .btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

/* Responsive */
@media (max-width: 640px) {
    .yape-content {
        padding: 1.5rem;
    }
    
    .yape-actions {
        flex-direction: column;
    }
    
    .yape-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .qr-container {
        width: 200px;
        height: 200px;
    }
}

/* Animación de copiado */
@keyframes copied {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.copied-animation {
    animation: copied 0.3s ease;
}

/* 🆕 Estilos para QR error */
.qr-error {
    text-align: center;
    padding: 1rem;
}

.qr-error i {
    font-size: 2rem;
    color: #f59e0b;
    margin-bottom: 0.5rem;
}

.qr-error p {
    margin: 0.25rem 0;
    color: var(--text-dark);
}

.qr-error .small {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Mejorar el caption del QR */
.qr-caption small {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
    line-height: 1.3;
}

/* 🆕 Estilos para alternativa QR */
.qr-alternative {
    padding: 1.5rem;
    text-align: center;
}

.alternative-number {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
}

.alternative-number h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.big-number {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 0.5rem 0;
    font-family: 'Courier New', monospace;
}

.amount-info {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    font-size: 1.1rem;
}

.alternative-instructions {
    background: var(--bg-light);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    text-align: left;
}

.alternative-instructions p {
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alternative-instructions i {
    color: #10b981;
    min-width: 20px;
}

/* 🆕 Estilos para backup QR */
.backup-qr {
    padding: 1.5rem;
    text-align: center;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.backup-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.backup-header i {
    font-size: 1.5rem;
}

.backup-header h4 {
    margin: 0;
    font-size: 1.25rem;
}

.backup-number-display {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    position: relative;
}

.number-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.number-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.75rem;
}

.btn-copy-small {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-copy-small:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.backup-amount {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.amount-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.amount-value {
    font-size: 2.5rem;
    font-weight: 800;
}

.backup-steps {
    text-align: left;
    background: var(--bg-light);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid #10b981;
}

.backup-steps p {
    margin: 0 0 0.75rem 0;
    color: var(--text-dark);
    font-weight: 600;
}

.backup-steps ol {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-dark);
}

.backup-steps li {
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.backup-steps li:last-child {
    margin-bottom: 0;
}

.backup-steps strong {
    color: #1e40af;
}

/* 🆕 Estilos para mejor visualización en scroll */
.modal-content {
    max-height: inherit; /* Heredar altura máxima */
    display: flex;
    flex-direction: column;
}

.modal-header {
    flex-shrink: 0; /* 🆕 Evitar que el header se encoja */
    position: sticky;
    top: 0;
    background: var(--bg-white);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.yape-actions {
    flex-shrink: 0; /* 🆕 Evitar que los botones se encojan */
    position: sticky;
    bottom: 0;
    background: var(--bg-white);
    z-index: 10;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
    margin-top: auto; /* 🆕 Empujar al fondo */
}

/* ===== 🆕 ESTILOS PARA FORMULARIO AGREGAR PRODUCTO ===== */

/* Formulario de administrador */
.admin-product-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
}

.admin-product-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.admin-product-form .form-group {
    margin-bottom: 20px;
}

.admin-product-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
    font-size: 14px;
}

.admin-product-form input,
.admin-product-form select,
.admin-product-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.admin-product-form input:focus,
.admin-product-form select:focus,
.admin-product-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.admin-product-form input::placeholder {
    color: #9ca3af;
}

.admin-product-form textarea {
    resize: vertical;
    min-height: 100px;
    font-family: 'Inter', sans-serif;
}

.admin-product-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* Botones del formulario */
.admin-product-form .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-product-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.3);
}

.admin-product-form .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.admin-product-form .btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #d1d5db;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-product-form .btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

/* Mensaje de éxito */
.success-message {
    background: #d1fae5;
    border: 2px solid #10b981;
    border-radius: 10px;
    padding: 15px 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideInDown 0.3s ease;
}

.success-message .success-icon {
    color: #10b981;
    font-size: 24px;
}

.success-message .success-content h4 {
    color: #065f46;
    margin: 0 0 5px 0;
    font-size: 16px;
}

.success-message .success-content p {
    color: #047857;
    margin: 0;
    font-size: 14px;
}

.success-message .btn-close-success {
    background: none;
    border: none;
    color: #065f46;
    cursor: pointer;
    margin-left: auto;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.success-message .btn-close-success:hover {
    background: rgba(6, 95, 70, 0.1);
}

/* Tabs del admin */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin: 25px 0;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 5px;
}

.admin-tab {
    background: none;
    border: none;
    padding: 12px 20px;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.admin-tab:hover {
    color: #374151;
    background: #f3f4f6;
}

.admin-tab.active {
    color: #3b82f6;
    background: #eff6ff;
    border-bottom: 3px solid #3b82f6;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

/* Animaciones */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .admin-product-form .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .admin-product-form .form-actions {
        flex-direction: column;
    }
    
    .admin-product-form .btn-primary,
    .admin-product-form .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .admin-tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .admin-tab {
        width: 100%;
        border-radius: 8px;
        text-align: left;
    }
}

/* ===== 🆕 ESTILOS PARA MODALES DE EDICIÓN/ELIMINACIÓN ===== */

/* Botones de acción en tabla */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-edit, .btn-delete, .btn-view {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-edit {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.btn-delete {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

.btn-view {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-view:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: translateY(-2px);
}

/* Modal específico para eliminar */
.modal-sm {
    max-width: 400px;
}

.text-warning {
    color: #f59e0b;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Info de usuario en tabla */
.user-info-cell {
    display: flex;
    flex-direction: column;
}

.user-info-cell strong {
    font-size: 14px;
    color: #374151;
}

.user-info-cell small {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

/* Contador de productos */
.product-count {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* Estado badges en tabla */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estado-completado {
    background: #d1fae5;
    color: #065f46;
}

.estado-pendiente {
    background: #fef3c7;
    color: #92400e;
}

.estado-cancelado {
    background: #fee2e2;
    color: #991b1b;
}

.estado-en_camino {
    background: #dbeafe;
    color: #1e40af;
}

/* Precio en tabla */
.price {
    color: #059669;
    font-weight: 700;
}

/* Cerrar con ESC */
body.modal-open {
    overflow: hidden;
}
