/**
 * HonlyCraft Network - Estilo Cobalt Adaptado
 * Diseño oscuro inspirado en Cobalt Theme
 * Integrado con API de Tebex
 */

/* ========== Variables CSS ========== */
:root {
    /* Colores Cobalt */
    --primary-color: #a45eeb;
    --bg-primary: #080817;
    --bg-secondary: #100e2a;
    --bg-tertiary: #181547;
    --bg-card: rgba(26, 20, 64, 0.82);
    --text-primary: #ffffff;
    --text-secondary: #c8c1e6;
    --text-muted: rgba(255, 255, 255, 0.5);
    
    /* Colores de estado */
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #5bdcff;
    
    /* Efectos */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --border-radius: 0.25rem;
    --transition: 0.25s;
}

/* ========== Reset y Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none !important;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
    filter: brightness(0.85);
}

img {
    max-width: 100%;
}

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

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #252525;
}

/* ========== Header ========== */
.header {
    background-size: cover !important;
    background-position: center !important;
    width: 100%;
    position: relative;
    height: 475px;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: -5px;
    background: linear-gradient(rgba(0, 0, 0, 0.6), var(--bg-primary));
    z-index: 10;
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 227.5px;
    background: linear-gradient(rgba(0, 0, 0, 0.6), transparent);
    z-index: 10;
}

/* Partículas en el header */
#tsparticles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

/* ========== Header Top Row ========== */
.header-top-row {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 7%;
    z-index: 10000;
    display: flex;
    justify-content: space-between;
    background-color: transparent;
    transition: all 0.3s ease;
}

/* Header sticky cuando se hace scroll */
.header-top-row.scrolled {
    background-color: rgba(16, 16, 16, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    padding: 0.75rem 7%;
}

.btn-header-new {
    border-radius: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-header-new:hover {
    filter: brightness(0.75);
    color: rgba(255, 255, 255, 0.8);
}

.btn-header-new i {
    color: #fff;
    font-size: 1rem;
}

.cart-badge {
    background-color: rgba(255, 255, 255, 0.15);
    position: relative;
    padding: 0.25rem 0.5rem;
    margin-left: 0.3rem;
    border-radius: 3rem;
    color: #fff;
    font-size: 0.85rem;
}

/* ========== Logo ========== */
.logo-ds-flex {
    display: flex;
    left: 0;
    top: 0;
    right: 0;
    position: absolute;
    max-width: 100%;
    width: 100%;
    z-index: 100;
    justify-content: center;
}

.logo-container {
    z-index: 1;
    height: fit-content;
}

.logo {
    height: 200px;
    margin-top: 127.5px;
    z-index: 10;
    transition: var(--transition);
    display: block;
}

.logo:hover {
    filter: brightness(0.9);
}

.animated-logo {
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(5px); }
}

/* ========== Status Boxes (Discord/Server) ========== */
.status-box-container,
.discord-box-container {
    flex: 1;
    z-index: 100;
    width: fit-content;
    height: fit-content;
}

.status-text,
.discord-text {
    margin-top: 203.5px;
    color: #afa6a6;
    z-index: 1000;
    transition: 0.5s;
    display: flex;
    cursor: pointer;
}

.status-text {
    margin-right: 50px;
    text-align: right;
    float: right;
}

.discord-text {
    text-align: left;
    margin-left: 50px;
}

.status-text .icon,
.discord-text .icon {
    background-color: transparent;
    height: 54px;
    width: 54px;
    position: relative;
}

.status-text .icon {
    margin-left: 8px;
    margin-top: -6px;
}

.discord-text .icon {
    margin-right: 18px;
    margin-top: -10px;
    margin-left: -15px;
}

.status-text .icon svg,
.discord-text .icon svg {
    height: 48px;
    margin: 7px;
    transition: var(--transition);
    fill: var(--primary-color);
}

.discord-text .icon svg {
    height: 55px;
}

.status-text:hover .icon svg,
.discord-text:hover .icon svg {
    margin-top: 4px;
}

.status-text .icon::after,
.discord-text .icon::after {
    height: 4px;
    border-radius: 10px;
    margin-bottom: 10px;
    content: "";
    position: absolute;
    top: 115%;
    width: 50%;
    transition: var(--transition);
    box-shadow: 0 0 10px 0;
    background-color: var(--primary-color);
}

.status-text .icon::after {
    left: 35%;
}

.discord-text .icon::after {
    left: 39%;
}

.status-text:hover .icon::after,
.discord-text:hover .icon::after {
    top: 119%;
}

.top-text {
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 3.5px;
    font-size: 1rem;
    color: var(--primary-color);
}

.discord-text .top-text {
    margin-top: 1px;
}

.bottom-text {
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
    margin-top: 0;
    overflow: hidden;
    height: 20px;
}

.reel-1 {
    transition: var(--transition);
    margin-bottom: 10px;
}

.status-text:hover .reel-1,
.discord-text:hover .reel-1 {
    margin-top: -15px;
}

/* Animación de actualización en tiempo real */
.pulse-update {
    animation: pulseUpdate 0.5s ease-in-out;
}

@keyframes pulseUpdate {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.status-number {
    font-weight: 700;
    color: var(--primary-color);
}

/* ========== Container ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 100;
}

.top-container {
    margin-top: -100px;
    z-index: 101 !important;
}

/* ========== Sidebar ========== */
/* NOTA: Estilos de username-box están en includes/sidebar.php (inline) */

.user-nav {
    background-color: var(--bg-secondary);
    padding: 1rem 0;
    width: 100%;
    border-radius: var(--border-radius);
    margin-bottom: 1.2rem;
}

.user-nav-link {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1rem 1.5rem;
    display: block;
    color: var(--text-secondary);
    border-left: 5px solid transparent;
    transition: var(--transition);
}

.user-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
}

.user-nav-link.active {
    color: var(--text-primary);
    border-left-color: var(--primary-color);
}

/* ========== Cards ========== */
.card {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: none;
    margin-bottom: 1.2rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background-color: transparent !important;
    border-bottom: none;
    font-weight: 600;
    font-size: 1.3rem;
    padding-bottom: 0;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
}

.card .card {
    background-color: rgba(255, 255, 255, 0.03);
}

/* ========== Productos ========== */
.store-home {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 1rem;
}

.store-welcome {
    color: rgba(255, 255, 255, 0.2);
    font-style: italic;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1.1rem;
}

.store-name {
    font-weight: 600;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.85);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.product-card {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

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

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

.product-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(25, 118, 210, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-content {
    padding: 1.5rem;
}

.product-category {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.product-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 2px solid rgba(255, 255, 255, 0.05);
}

.product-price {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
}

.discount {
    color: var(--danger-color);
    font-weight: 500;
    text-decoration: line-through;
    font-size: 1rem;
    margin-right: 0.5rem;
}

/* ========== Botones ========== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:focus {
    box-shadow: none !important;
    outline: none;
}

.btn-theme,
.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-primary) !important;
}

.btn-theme:hover,
.btn-primary:hover {
    background-color: var(--primary-color);
    filter: brightness(0.85);
}

.btn-secondary {
    background-color: #696969;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: #585858;
}

.btn-success {
    background-color: var(--success-color);
    color: var(--text-primary);
}

.btn-success:hover {
    background-color: #45a049;
}

.btn-add-cart {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-cart:hover {
    transform: scale(1.05);
    filter: brightness(0.85);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== Carrito Modal ========== */
.cart-menu {
    opacity: 0;
    display: none;
    left: 0;
    right: 0;
    top: 0;
    margin: 5rem auto;
    width: 45rem;
    max-width: 90%;
    position: fixed;
    z-index: 200000;
    transition: var(--transition);
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.cart-menu.active {
    display: block;
    opacity: 1;
}

.cart-menu .cart-header {
    display: flex;
    padding: 1.5rem 2.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
}

.cart-menu .cart-header .cart-header-text {
    font-weight: 600;
    font-size: 1.4rem;
    flex-grow: 1;
    color: var(--primary-color);
}

.cart-body {
    padding: 1.5rem 2.5rem;
    max-height: 500px;
    overflow-y: auto;
}

.cart-footer {
    padding: 1.5rem 2.5rem;
    border-top: 2px solid rgba(255, 255, 255, 0.05);
}

.cart-menu .name {
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.cart-close {
    cursor: pointer;
}

.overlay {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    position: fixed;
    transition: var(--transition);
    display: none;
    opacity: 0;
}

.overlay.active {
    display: block;
    opacity: 1;
}

/* ========== Alerts ========== */
.alert {
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    background-color: var(--bg-secondary) !important;
    position: relative;
    padding-left: 3.7rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: #fff;
    padding: 0.8rem 0.8rem;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    max-width: 2.7rem;
}

.alert-success::before {
    content: "\f00c";
    background-color: var(--success-color);
}

.alert-info::before {
    content: "\f129";
    background-color: var(--info-color);
}

.alert-warning::before {
    content: "\f12a";
    background-color: var(--warning-color);
}

.alert-danger::before {
    content: "\f071";
    background-color: var(--danger-color);
}

.alert-dismissible .close {
    color: var(--text-primary) !important;
}

/* ========== Footer ========== */
.footer {
    background: var(--bg-secondary);
    padding: 3rem 2rem 1.5rem;
    margin-top: auto;
    border-top: 3px solid rgba(255, 255, 255, 0.025);
}

.footer .small-section {
    padding-top: 1rem;
    background-color: rgba(255, 255, 255, 0.01);
}

.footer-copyright {
    display: inline-block;
    font-weight: 500;
    padding: 1.5rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-link {
    padding-right: 1.8rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-color);
}

/* ========== Forms ========== */
.form-control {
    background-color: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
}

.form-control:focus {
    background-color: var(--bg-card) !important;
    color: var(--text-secondary) !important;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-group-text {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: var(--text-secondary) !important;
    font-weight: 500;
    border: none !important;
}

/* ========== Loading ========== */
.loading {
    text-align: center;
    padding: 4rem 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(33, 150, 243, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== Dropdown ========== */
.dropdown-menu {
    padding: 0;
    border: none;
    box-shadow: 0 0 10px 0 #1b1b1b;
    background-color: var(--bg-tertiary);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: var(--text-secondary) !important;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.dropdown-item.active {
    background-color: var(--primary-color) !important;
}

/* ========== Responsive ========== */
@media (max-width: 992px) {
    .status-box-container,
    .discord-box-container {
        display: none;
    }
    
    .header {
        height: 340px;
    }
    
    .logo {
        height: 130px;
        margin-top: 90px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 90%;
    }
    
    .header-top-row {
        left: 5%;
        right: 5%;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-menu {
        width: 95%;
        margin: 2rem auto;
    }
}

@media (max-width: 480px) {
    /* Productos más compactos */
    .product-content {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 1.1rem;
    }
    
    .product-description {
        font-size: 0.85rem;
    }
    
    .product-price {
        font-size: 1.3rem;
    }
}

/* ========== Toast Notifications ========== */

/* Welcome Toast (para login/sesión) */
.welcome-toast {
    position: fixed;
    top: 100px;
    right: -400px;
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 1.25rem;
    min-width: 320px;
    max-width: 380px;
    z-index: 300000;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.welcome-toast.show {
    right: 20px;
}

.welcome-toast .toast-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.welcome-toast .toast-icon.premium {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.welcome-toast .toast-icon.non-premium {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.welcome-toast .toast-username {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.welcome-toast .toast-status {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.welcome-toast .toast-status i {
    font-size: 0.9rem;
}

/* Product Toast (para agregar al carrito) */
.toast-notification {
    position: fixed;
    top: 100px;
    right: -400px;
    background: var(--bg-secondary);
    border-left: 4px solid var(--success-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 1.25rem;
    min-width: 350px;
    max-width: 400px;
    z-index: 300000;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
}

.toast-notification.show {
    right: 20px;
}

.toast-notification:hover {
    transform: translateX(-5px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.toast-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.toast-content {
    flex-grow: 1;
    padding-right: 0.5rem;
}

.toast-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.toast-product {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.toast-cart-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast-cart-info i {
    color: var(--primary-color);
}

.toast-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: var(--transition);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Animación de progreso */
.toast-notification::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    width: 100%;
    animation: toastProgress 5s linear;
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-toast,
    .toast-notification {
        min-width: 300px;
        max-width: calc(100% - 40px);
        right: -100%;
    }
    
    .welcome-toast.show,
    .toast-notification.show {
        right: 20px;
    }
}

/* ========== SweetAlert2 Personalizado (Estilo Cobalt) ========== */

/* Contenedor principal del modal */
.swal2-popup {
    background: var(--bg-secondary) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-lg) !important;
    color: var(--text-primary) !important;
}

/* Título del modal */
.swal2-title {
    color: var(--text-primary) !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    font-size: 1.5rem !important;
}

/* Contenido/texto del modal */
.swal2-html-container,
.swal2-content {
    color: var(--text-secondary) !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Iconos */
.swal2-icon {
    border-color: transparent !important;
}

.swal2-icon.swal2-warning {
    border-color: var(--warning-color) !important;
    color: var(--warning-color) !important;
}

.swal2-icon.swal2-warning .swal2-icon-content {
    color: var(--warning-color) !important;
}

.swal2-icon.swal2-error {
    border-color: var(--danger-color) !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: var(--danger-color) !important;
}

.swal2-icon.swal2-success {
    border-color: var(--success-color) !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: var(--success-color) !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
    border-color: rgba(40, 167, 69, 0.3) !important;
}

.swal2-icon.swal2-info {
    border-color: var(--info-color) !important;
    color: var(--info-color) !important;
}

/* Botones */
.swal2-confirm,
.swal2-cancel,
.swal2-deny {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 600 !important;
    border-radius: var(--border-radius) !important;
    padding: 0.75rem 2rem !important;
    font-size: 0.95rem !important;
    transition: var(--transition) !important;
    border: none !important;
    box-shadow: none !important;
}

.swal2-confirm {
    background-color: var(--warning-color) !important;
    color: #000 !important;
}

.swal2-confirm:hover {
    background-color: var(--warning-color) !important;
    filter: brightness(0.9) !important;
}

.swal2-cancel {
    background-color: #6c757d !important;
    color: var(--text-primary) !important;
}

.swal2-cancel:hover {
    background-color: #5a6268 !important;
}

.swal2-deny {
    background-color: var(--danger-color) !important;
    color: var(--text-primary) !important;
}

/* Input fields */
.swal2-input,
.swal2-textarea {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--border-radius) !important;
}

.swal2-input:focus,
.swal2-textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1) !important;
}

/* Backdrop/overlay */
.swal2-container {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

/* Loading spinner */
.swal2-loader {
    border-color: var(--primary-color) transparent var(--primary-color) transparent !important;
}

/* Progress bar */
.swal2-timer-progress-bar {
    background-color: var(--primary-color) !important;
}

/* Toast notifications */
.swal2-toast {
    background: var(--bg-secondary) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: var(--shadow-lg) !important;
}

.swal2-toast .swal2-title {
    color: var(--text-primary) !important;
    font-size: 1rem !important;
}

.swal2-toast .swal2-content {
    color: var(--text-secondary) !important;
}

/* Close button */
.swal2-close {
    color: var(--text-muted) !important;
    transition: var(--transition) !important;
}

.swal2-close:hover {
    color: var(--text-primary) !important;
}

/* Validation message */
.swal2-validation-message {
    background-color: var(--bg-tertiary) !important;
    color: var(--danger-color) !important;
    border: 1px solid var(--danger-color) !important;
}

/* HTML content styling */
.swal2-html-container p {
    margin-bottom: 0.5rem;
}

.swal2-html-container strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ========== Utilidades ========== */
.text-center { text-align: center; }
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-white { color: var(--text-primary) !important; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.d-flex { display: flex; }
.flex-grow-1 { flex-grow: 1; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }

/* ========== MOBILE RESPONSIVE FIXES ========== */

/* Prevenir overflow horizontal */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw;
}

/* Sidebar en móvil - MOSTRAR siempre */
@media (max-width: 991px) {
    .col-lg-3 {
        margin-bottom: 2rem;
        display: block !important; /* Forzar que se muestre */
    }
    
    .col-lg-9 {
        max-width: 100%;
        flex: 0 0 100%;
    }
}

/* Header móvil */
@media (max-width: 768px) {
    .header {
        height: 350px !important;
    }
    
    .header-top-row {
        padding: 0.75rem 3% !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn-header-new {
        padding: 0.5rem 1rem !important;
        font-size: 0.8rem !important;
    }
    
    .logo {
        height: 120px !important;
        margin-top: 160px !important;
    }
}

@media (max-width: 480px) {
    .header {
        height: 300px !important;
    }
    
    .btn-header-new span {
        display: none;
    }
    
    .logo {
        height: 100px !important;
        margin-top: 140px !important;
    }
}

/* Container móvil */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .top-container {
        margin-top: -50px !important;
    }
}

/* Productos móvil */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .product-footer {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-add-cart {
        width: 100%;
        justify-content: center;
    }
}

/* Carrito modal móvil */
@media (max-width: 768px) {
    .cart-menu {
        width: 95% !important;
        margin: 1rem auto !important;
    }
    
    .cart-menu .cart-header,
    .cart-body,
    .cart-footer {
        padding: 1rem !important;
    }
}

/* Cards móvil */
@media (max-width: 768px) {
    .card-header {
        font-size: 1.1rem !important;
        padding: 1rem !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
}


/* Badge Premium - evitar que tape el logo */
@media (max-width: 768px) {
    .badge-premium,
    [class*="badge-"] {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        margin: 0.5rem auto !important;
        display: inline-block !important;
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
    }
}

/* Botones móvil - ancho completo */
@media (max-width: 576px) {
    .btn:not(.quantity-btn):not(.cart-close) {
        width: 100% !important;
        justify-content: center !important;
    }
    
    .buttons-group {
        flex-direction: column !important;
        width: 100%;
    }
    
    .buttons-group .btn {
        width: 100% !important;
    }
}

/* Carrito items móvil */
@media (max-width: 768px) {
    .cart-item-card {
        flex-direction: column !important;
        text-align: center;
        padding: 1rem !important;
    }
    
    .cart-item-image {
        width: 100% !important;
        max-width: 120px;
        margin: 0 auto;
    }
    
    .cart-item-details {
        width: 100%;
    }
    
    .cart-item-actions {
        width: 100%;
        flex-direction: row !important;
        justify-content: space-between;
        align-items: center;
    }
    
    .quantity-controls {
        flex: 1;
        justify-content: center;
    }
}

/* Footer móvil */
@media (max-width: 768px) {
    .footer {
        padding: 2rem 1rem 1rem !important;
    }
    
    .footer-link {
        padding-right: 1rem !important;
        font-size: 0.85rem !important;
    }
}

/* Textos responsive */
@media (max-width: 768px) {
    .store-welcome {
        font-size: 0.9rem !important;
    }
    
    .store-name {
        font-size: 1.3rem !important;
    }
    
    .product-title {
        font-size: 1.1rem !important;
    }
    
    .product-category {
        font-size: 0.75rem !important;
    }
}
