/* Estilos para la página mi-cuenta.php */
html, body {
    background-color: #0b101e !important;
    color: #ffffff;
    font-family: 'Space Grotesk', sans-serif;
}


.main-content {
    padding-top: 0px; /* Espacio para el header fijo */
    padding-bottom: 40px;
}

/* --- INICIO: Estilos de cabecera en Mi Cuenta --- */
.page-mi-cuenta #buscadorForm {
    display: none !important;
}

.page-mi-cuenta .user-session-controls,
.page-mi-cuenta .user-actions-mobile {
    margin-left: auto !important; /* Mantiene los botones de usuario y el carrito alineados a la derecha */
}
/* --- FIN: Estilos de cabecera en Mi Cuenta --- */

.account-container {
    width: 68%;
    max-width: 950px;
    margin: 20px auto 40px;
    padding: 30px 35px;
    background-color: #162032; /* Fondo pulido y moderno */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* ==================================================== */
/* 1. HERO CARDS (Invitado y Cliente)                   */
/* ==================================================== */
.account-hero-card {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.account-hero-card.logged-in {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(56, 189, 248, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.account-hero-card.guest-mode {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(13, 27, 42, 0.98) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.guest-hero-icon-box {
    display: flex;
    justify-content: center;
    align-items: center;
}

.guest-avatar-halo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, rgba(212, 175, 55, 0.05) 70%);
    border: 2px solid rgba(212, 175, 55, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #d4af37;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.2);
}

.hero-info {
    flex: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    margin-bottom: 8px;
}

.hero-badge.guest {
    background: rgba(212, 175, 55, 0.15);
    color: #facc15;
    border-color: rgba(212, 175, 55, 0.3);
}

.account-hero-card h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.hero-email {
    margin: 0 0 14px 0;
    font-size: 0.95rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guest-description {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #cbd5e1;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-hero-auth {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 10px 22px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    transition: all 0.22s ease;
    letter-spacing: 0.2px;
}

.btn-hero-auth:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    transform: translateY(-1.5px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.btn-hero-auth:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-hero-logout {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-hero-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
    border-color: #ef4444;
}

/* ==================================================== */
/* 2. CUADRÍCULA DE OPCIONES (Estilo App Nativa)        */
/* ==================================================== */
.account-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}

.menu-card-item {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease;
    position: relative;
}

.menu-card-item:hover {
    background: #243248;
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.3);
}

.menu-card-item.active {
    background: rgba(30, 41, 59, 0.95);
    border-color: #38bdf8;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.menu-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.menu-card-icon.icon-orders {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}

.menu-card-icon.icon-user {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

.menu-card-icon.icon-coupons {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.menu-card-icon.icon-help {
    background: rgba(37, 211, 102, 0.15);
    color: #25d366;
}

.menu-card-content {
    flex: 1;
    overflow: hidden;
}

.menu-card-content h3 {
    margin: 0 0 3px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.menu-card-content p {
    margin: 0;
    font-size: 0.78rem;
    color: #94a3b8;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.menu-card-arrow {
    color: #64748b;
    font-size: 0.85rem;
    transition: transform 0.2s ease, color 0.2s ease;
}

.menu-card-item:hover .menu-card-arrow,
.menu-card-item.active .menu-card-arrow {
    color: #38bdf8;
    transform: translateX(3px);
}

/* ==================================================== */
/* 3. SECCIONES Y PANELES DINÁMICOS                     */
/* ==================================================== */
.account-sections-wrapper {
    background: #182335;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 26px;
    min-height: 280px;
}

.account-section {
    display: none;
}

.account-section.active {
    display: block;
    animation: fadeInSection 0.35s ease;
}

@keyframes fadeInSection {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 14px;
    margin-bottom: 22px;
}

.section-header h2 {
    margin: 0 0 6px 0;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f1f5f9;
}

.section-header p {
    margin: 0;
    font-size: 0.9rem;
    color: #94a3b8;
}

/* Caja de Invitación (Guest CTA) */
.guest-cta-box {
    text-align: center;
    padding: 40px 20px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 14px;
}

.guest-cta-icon {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.1);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 16px;
}

.guest-cta-box h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
}

.guest-cta-box p {
    margin: 0 auto 22px;
    font-size: 0.95rem;
    color: #94a3b8;
    max-width: 500px;
    line-height: 1.5;
}

.btn-cta-login {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.35);
    transition: all 0.2s ease;
}

.btn-cta-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.5);
}

/* ==================================================== */
/* 4. ESTILOS DE CUPONES Y OFERTAS                      */
/* ==================================================== */
.coupons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.coupon-ticket {
    display: flex;
    background: #1e293b;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.coupon-ticket.gold {
    border-color: rgba(212, 175, 55, 0.35);
}

.coupon-left {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.05) 100%);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    text-align: center;
}

.coupon-ticket.gold .coupon-left {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(212, 175, 55, 0.05) 100%);
}

.coupon-discount {
    font-size: 1.4rem;
    font-weight: 800;
    color: #4ade80;
}

.coupon-ticket.gold .coupon-discount {
    color: #facc15;
}

.coupon-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

.coupon-divider {
    border-left: 2px dashed rgba(255, 255, 255, 0.12);
    position: relative;
}

.coupon-right {
    padding: 16px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.coupon-right h4 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    color: #ffffff;
    font-weight: 700;
}

.coupon-right p {
    margin: 0 0 12px 0;
    font-size: 0.85rem;
    color: #94a3b8;
    line-height: 1.4;
}

.coupon-code-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.coupon-code {
    background: #0f172a;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    padding: 6px 12px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: bold;
    color: #38bdf8;
    letter-spacing: 1px;
}

.btn-copy-code {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-copy-code:hover {
    background: #38bdf8;
    color: #0b101e;
}

.btn-go-shop {
    background: rgba(212, 175, 55, 0.15);
    color: #facc15;
    border: 1px solid rgba(212, 175, 55, 0.35);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-go-shop:hover {
    background: #d4af37;
    color: #0b101e;
}

/* ==================================================== */
/* 5. ESTILOS DE AYUDA Y MENSAJES                       */
/* ==================================================== */
.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.help-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.help-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 14px;
}

.whatsapp-card .help-icon {
    background: rgba(37, 211, 102, 0.15);
    color: #25d366;
}

.faq-card .help-icon {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}

.help-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.15rem;
    color: #ffffff;
    font-weight: 700;
}

.help-card p {
    margin: 0 0 16px 0;
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.5;
}

.btn-whatsapp-support {
    background: #25d366;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-support:hover {
    background: #20ba59;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

.help-bullet-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-bullet-list li {
    font-size: 0.88rem;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.help-bullet-list li i {
    color: #38bdf8;
    font-size: 0.85rem;
}

/* --- INICIO: Estilos para Formularios (movidos de mi_cuenta.php) --- */
.account-forms-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 20px;
    justify-content: center; /* Centra los formularios si solo hay uno o si no ocupan todo el espacio */
    align-items: start;
}

.form-section {
    background-color: #283a54; /* Fondo de la sección del formulario */
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #334155;
}

.form-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #F1F5F9;
}

.form-section label {
    display: block;
    margin-bottom: 5px;
    color: #CBD5E1;
}

.form-section input, .form-section textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    border: 1px solid #475569;
    background-color: #1E293B;
    color: #F1F5F9;
}

.form-section .session-btn {
    /* Hereda de .session-btn en style.css, pero añadimos/ajustamos aquí */
    background-color: #007bff;
    border: none;
    width: 100%;
    padding: 12px 15px; /* Hacemos el botón un poco más alto */
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}
/* --- FIN: Estilos para Formularios --- */

.pedidos-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

/* --- INICIO: Estilos de Pedidos Unificados (copiados de admin.css) --- */
.pedido-card {
    background-color: #2D4263;
    border-radius: 15px;
    padding: 20px;
    border-left: 5px solid;
    transition: opacity 0.3s;
}

.pedido-card.estado-pendiente { border-left-color: #ffc107; }
.pedido-card.estado-confirmado { border-left-color: #28a745; }
.pedido-card.estado-cancelado { border-left-color: #dc3545; opacity: 0.7; }

.pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #141C29;
}

.pedido-header h3 { margin: 0; font-size: 1.2rem; }

.pedido-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.pedido-cliente-info p, .pedido-productos-lista ul { margin: 0; padding: 0; list-style: none; }
.pedido-cliente-info p { margin-bottom: 5px; }
.pedido-cliente-info p strong { color: #a2b3c7; }
.pedido-productos-lista li { 
    padding: 5px 0; 
    border-bottom: 1px dashed #405a7e; 
    overflow-wrap: break-word; /* Evita el desbordamiento de texto largo */
    word-wrap: break-word; /* Compatibilidad con navegadores antiguos */
}
.pedido-productos-lista li:last-child { border-bottom: none; }

.pedido-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #141C29;
    display: flex;
    flex-direction: column; /* Apila los elementos verticalmente */
    align-items: flex-end; /* Alinea los elementos a la derecha */
}

.pedido-acciones a.btn-factura {
    margin-left: 10px;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: white; 
    transition: background-color 0.2s;
    background-color: #17a2b8;
    text-decoration: none;
    font-weight: 500;
}
.pedido-acciones a.btn-factura:hover { background-color: #117a8b; }

.pedido-acciones {
    margin-top: 15px; /* Añade espacio sobre los botones */
    width: 100%; /* Ocupa todo el ancho para alinear el contenido */
}

/* ============================================= */
/* ESTILOS PARA EL BOTÓN DE VER COMPROBANTE      */
/* ============================================= */

/* Estilo base para el botón en escritorio */
.ver-comprobante-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #28a745; /* Un color verde para éxito/confirmado */
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px; /* Bordes más redondeados */
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Sombra sutil */
}

/* Efecto al pasar el mouse por encima */
.ver-comprobante-btn:hover {
    background-color: #218838; /* Verde un poco más oscuro */
    transform: translateY(-2px); /* Efecto de elevación */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Efecto al hacer clic */
.ver-comprobante-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}



.pedido-total-desglose {
    font-size: 1rem;
    text-align: right;
    width: 100%; /* Asegura que ocupe todo el ancho del footer */
}
.desglose-fila { display: flex; justify-content: space-between; gap: 20px; padding: 2px 0; }
.desglose-fila.total-final {
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #405a7e;
}
/* --- FIN: Estilos de Pedidos Unificados --- */

/* Estados del pedido (igual que en admin.css pero con prefijo -cliente) */
.estado.pendiente { background-color: #ffc107; color: #212529; padding: 5px 10px; border-radius: 20px; font-size: 0.9rem; font-weight: bold; text-transform: uppercase; }
.estado.confirmado { background-color: #28a745; color: white; padding: 5px 10px; border-radius: 20px; font-size: 0.9rem; font-weight: bold; text-transform: uppercase; }
.estado.cancelado { background-color: #dc3545; color: white; padding: 5px 10px; border-radius: 20px; font-size: 0.9rem; font-weight: bold; text-transform: uppercase; }

/* --- INICIO: Estilos para botones del header de mi-cuenta --- */
.logout-btn-cuenta {
    background-color: #dc3545;
    color: white;
}

.logout-btn-cuenta:hover {
    background-color: #c82333;
}

.select {
    background-color: #007bff;
    color: white;
}
.select:hover { background-color: #0056b3; }
/* --- FIN: Estilos para botones --- */

/* --- INICIO: Estilos para Skeleton Loader --- */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton-card {
    background-color: #283a54;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 20px;
    overflow: hidden; /* Importante para la animación */
}

.skeleton-line {
    background-color: #334155;
    border-radius: 4px;
    animation: shimmer 2s infinite linear;
    background-image: linear-gradient(to right, #334155 0%, #475569 20%, #334155 40%, #334155 100%);
    background-repeat: no-repeat;
    background-size: 2000px 100%; /* Ancho grande para que la animación se vea fluida */
}

.skeleton-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.skeleton-header .skeleton-line:first-child {
    width: 40%;
    height: 24px;
}

.skeleton-header .skeleton-line:last-child {
    width: 100px;
    height: 24px;
}

.skeleton-body .skeleton-line {
    height: 16px;
    margin-bottom: 10px;
}

.skeleton-body .skeleton-line:first-child { width: 80%; }
.skeleton-body .skeleton-line:last-child { width: 60%; }

.skeleton-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.skeleton-footer .skeleton-line:first-child { width: 30%; height: 28px; }
.skeleton-footer .skeleton-line:last-child { width: 120px; height: 34px; }
/* --- FIN: Estilos para Skeleton Loader --- */

@media (max-width: 850px) {
    /* Ocultar el Header superior de la tienda en página mi-cuenta independiente */
    .page-mi-cuenta header,
    .page-mi-cuenta #header,
    .page-mi-cuenta #header_micuenta,
    .page-mi-cuenta #header_reseñas {
        display: none !important;
        height: 0 !important;
        min-height: 0 !important;
        max-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    /* Eliminar el espacio superior de 120px en la página independiente mi-cuenta */
    body.page-mi-cuenta {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    .main-content {
        padding-top: 15px !important;
        margin-top: 0 !important;
        padding-bottom: 90px !important; /* Espacio para que la barra inferior no tape el contenido */
    }

    .account-container {
        width: 92% !important;
        padding: 20px 16px;
        margin: 0 auto 20px !important;
    }

    .pedido-acciones a.btn-factura {
        font-size: 80%;
    }

    .account-hero-card {
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 24px 16px !important;
        gap: 16px !important;
    }

    .account-hero-card .profile-pic-container,
    .account-hero-card .guest-hero-icon-box {
        margin: 0 auto 38px auto !important;
        align-self: center !important;
    }

    .hero-info {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }

    .hero-email {
        justify-content: center !important;
    }

    .hero-actions {
        justify-content: center !important;
    }

    .account-menu-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .menu-card-item {
        padding: 12px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .menu-card-arrow {
        display: none;
    }

    .account-sections-wrapper {
        padding: 18px 14px;
    }

    .coupons-container {
        grid-template-columns: 1fr;
    }

    .coupon-ticket {
        flex-direction: column;
    }

    .coupon-left {
        padding: 14px;
        flex-direction: row;
        gap: 10px;
    }

    .coupon-divider {
        border-left: none;
        border-top: 2px dashed rgba(255, 255, 255, 0.12);
    }

    .pedido-acciones {
        text-align: center;
    }

    .ver-comprobante-btn {
        padding: 8px;
        font-size: 14px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .account-menu-grid {
        grid-template-columns: 1fr;
    }

    .menu-card-item {
        flex-direction: row;
        text-align: left;
        padding: 14px;
    }

    .menu-card-arrow {
        display: block;
    }
}

/* --- INICIO: Estilos para Foto de Perfil --- */
.profile-pic-container {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 0 35px 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-pic,
#profilePicImg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover; /* Para que la imagen no se deforme */
    border: 4px solid #334155;
    background-color: #283a54; /* Color de fondo mientras carga la imagen */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2394A3B8'%3E%3Cpath d='M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 60%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.profile-pic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: rgba(15, 23, 42, 0.7);
    color: #38bdf8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    z-index: 2;
}

.profile-pic-container:hover .profile-pic-overlay {
    opacity: 1;
}

/* Muestra el texto cuando el cursor está sobre el contenedor de la imagen */
.profile-pic-container:hover .profile-pic-caption {
    opacity: 1;
}

#account-container h2{
    text-align: center;
    font-size: 16px;
}

.delete-pic-form {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    white-space: nowrap;
    text-align: center;
    z-index: 3;
}

.delete-pic-btn {
    background-color: rgba(220, 53, 69, 0.15); /* Fondo rojo sutil */
    color: #ff6b6b; /* Texto rojo brillante */
    border: 1px solid rgba(220, 53, 69, 0.4);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Oculta el texto alternativo de la imagen de perfil si no se carga */
.profile-pic {
    color: transparent;
}

/* Evita auto-zoom en iPhone al editar datos */
.account-forms-container input,
.account-forms-container textarea {
    font-size: 16px !important;
}


.delete-pic-btn:hover {
    background-color: #dc3545;
    color: #fff;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
    border-color: #dc3545;
}

.hidden-form {
    display: none;
}
/* --- FIN: Estilos para Foto de Perfil --- */