/* ==========================================================================
   GALA STORE - Mobile-First Tech Store Stylesheet
   Orientado a consumidores jóvenes, ágil, responsivo y ultra moderno
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');
@import url('dialogs.css');

:root {
    --primary: #00f2fe;
    --primary-rgb: 0, 242, 254;
    --primary-hover: #4facfe;
    --primary-hover-rgb: 79, 172, 254;
    --secondary: #38bdf8;
    --accent: #8b5cf6;
    --accent-rgb: 139, 92, 246;
    --glow-rgb: 0, 242, 254;
    --bg: #0a0d14;
    --card-bg: #121826;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #1f293d;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 25px rgba(var(--glow-rgb, var(--primary-rgb)), 0.28);
    --btn-shadow: 0 4px 15px rgba(var(--glow-rgb, var(--primary-rgb)), 0.35);
    --btn-shadow-hover: 0 8px 25px rgba(var(--glow-rgb, var(--primary-rgb)), 0.52);
    --card-hover-border: rgba(var(--glow-rgb, var(--primary-rgb)), 0.5);
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    padding-bottom: 75px; /* Espacio para bottom bar en mobile */
    overflow-x: hidden;
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

a {
    color: inherit;
    text-decoration: none;
}

/* ==========================================================================
   Top Announcement Bar
   ========================================================================== */
.top-bar {
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.15), rgba(var(--accent-rgb, 139, 92, 246), 0.2), rgba(var(--primary-rgb), 0.15));
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 16px;
    text-align: center;
    letter-spacing: 0.2px;
}

/* ==========================================================================
   Header & Navbar (Mobile First)
   ========================================================================== */
.navbar-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(18, 24, 38, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    transition: var(--transition);
}

.nav-wrap {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand-logo-img {
    height: 54px;
    max-width: 240px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

@media (min-width: 768px) {
    .brand-logo-img {
        height: 66px;
        max-width: 320px;
    }
}

.brand-title {
    color: var(--text-main);
}

.brand-title span {
    color: var(--primary);
    text-shadow: 0 0 15px rgba(var(--primary-rgb), 0.5);
}

.search-box {
    display: none;
    flex: 1;
    max-width: 480px;
    position: relative;
}

@media (min-width: 768px) {
    .search-box {
        display: block;
    }
}

.search-box input {
    width: 100%;
    background: rgba(10, 13, 20, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 10px 18px 10px 42px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

.search-box .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-actions .btn-nav-icon,
.nav-actions .btn-nav-btn,
.nav-actions .user-btn,
.nav-actions .btn {
    height: 42px;
    min-height: 42px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.btn-nav-icon {
    position: relative;
    width: 42px;
    min-width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 1.15rem;
    cursor: pointer;
    text-decoration: none;
}

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

.btn-nav-btn {
    position: relative;
    padding: 0 14px;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

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

.btn-nav-btn.btn-primary {
    background: var(--primary);
    color: #0a0d14;
    border-color: var(--primary);
    font-weight: 700;
}

.btn-nav-btn.btn-primary:hover {
    background: var(--primary-hover);
    color: #0a0d14;
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.4);
}

.cart-bubble {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary);
    color: #0a0d14;
    font-size: 0.72rem;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.6);
}

.user-btn {
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.user-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* En pantallas pequeñas (< 768px): NO usar texto en los botones del encabezado, SOLO ICONOS */
@media (max-width: 767.98px) {
    .navbar-header .btn-text,
    .navbar-header .nav-actions .btn-text,
    .admin-mobile-topbar .btn-text {
        display: none !important;
    }

    .navbar-header .nav-actions .btn-nav-btn,
    .navbar-header .nav-actions .btn,
    .navbar-header .nav-actions .user-btn {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        padding: 0 !important;
        gap: 0 !important;
        justify-content: center !important;
        border-radius: var(--radius-md) !important;
    }

    .navbar-header .nav-actions .btn-nav-btn i,
    .navbar-header .nav-actions .btn i,
    .navbar-header .nav-actions .user-btn i {
        font-size: 1.15rem !important;
        margin: 0 !important;
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-banner {
    position: relative;
    padding: 40px 16px 50px;
    text-align: center;
    background: radial-gradient(circle at 50% 20%, rgba(var(--primary-rgb), 0.12) 0%, rgba(var(--accent-rgb, 139, 92, 246), 0.08) 45%, transparent 75%);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero-banner {
        padding: 65px 24px 75px;
    }
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.15;
    max-width: 800px;
    margin: 0 auto 14px;
    letter-spacing: -0.8px;
    color: var(--text-main);
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

.hero-title .highlight {
    color: inherit;
    background: none;
    -webkit-text-fill-color: initial;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 620px;
    margin: 0 auto 24px;
    line-height: 1.5;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

.hero-ctas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #0a0d14;
    box-shadow: var(--btn-shadow, 0 4px 15px rgba(var(--primary-rgb), 0.35));
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--btn-shadow-hover, 0 8px 25px rgba(var(--primary-rgb), 0.52));
    color: #0a0d14;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.35);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
    color: #ffffff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
}

/* ==========================================================================
   Categories Scroll Bar (Mobile First Horizontal)
   ========================================================================== */
.categories-wrapper {
    max-width: 1280px;
    margin: 25px auto 10px;
    padding: 0 16px;
}

.categories-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 10px;
    padding-bottom: 8px;
    overflow-x: visible;
}

.cat-pill {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
    cursor: pointer;
}

.cat-pill:hover, .cat-pill.active {
    background: rgba(var(--primary-rgb), 0.12);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.25);
}

.cat-pill i {
    font-size: 1rem;
}

/* En pantallas pequeñas: rubros en 2 columnas, todas del mismo tamaño */
@media (max-width: 767.98px) {
    .categories-wrapper {
        margin: 15px auto 10px;
        padding: 0 12px;
    }

    .categories-bar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
        padding-bottom: 4px;
    }

    .cat-pill {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 48px;
        min-height: 48px;
        max-height: 48px;
        padding: 4px 10px;
        font-size: 0.78rem;
        font-weight: 600;
        line-height: 1.15;
        border-radius: 999px;
        white-space: normal;
        box-sizing: border-box;
        gap: 6px;
    }

    .cat-pill span {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-align: left;
        word-break: break-word;
    }

    .cat-pill i {
        font-size: 0.95rem;
        flex-shrink: 0;
    }
}

@media (max-width: 360px) {
    .categories-bar {
        gap: 6px;
    }

    .cat-pill {
        height: 46px;
        min-height: 46px;
        max-height: 46px;
        padding: 4px 6px;
        font-size: 0.72rem;
        gap: 4px;
    }

    .cat-pill i {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   Product Grid & Cards (Ultra Modern Mobile-First)
   ========================================================================== */
.main-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 16px 50px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-title {
    font-size: 1.45rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    align-items: stretch;
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition: var(--transition);
}

.product-card:hover {
    border-color: var(--card-hover-border, rgba(var(--primary-rgb), 0.5));
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft), var(--shadow-glow);
}

.product-thumb {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    background: #080b11;
}

.product-thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .product-thumb img {
    transform: scale(1.06);
}

.badge-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.badge-discount {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
}

.badge-new {
    top: 12px;
    right: 12px;
    left: auto;
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.4);
}

.product-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-brand {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary);
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.product-name {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--text-main);
    word-break: break-word;
}

.product-name a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.product-name a:hover {
    color: var(--primary);
}

.product-specs-snippet {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--text-muted);
    margin-bottom: 14px;
    word-break: break-word;
}

.product-price-box {
    margin-top: auto;
    margin-bottom: 14px;
}

.price-regular {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-bottom: 2px;
}

.price-current {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.product-card-actions {
    display: flex;
    gap: 8px;
}

.btn-add-cart {
    flex: 1;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    color: var(--primary);
    padding: 9px;
    font-weight: 700;
    font-size: 0.88rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-add-cart:hover {
    background: var(--primary);
    color: #0a0d14;
    box-shadow: var(--btn-shadow, 0 4px 15px rgba(var(--primary-rgb), 0.4));
}

.btn-quick-view {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.btn-quick-view:hover {
    color: var(--text-main);
    border-color: var(--text-muted);
}

/* ==========================================================================
   Mobile Bottom Bar (Navigation for young mobile shoppers)
   ========================================================================== */
.bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 65px;
    background: rgba(18, 24, 38, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-color);
    z-index: 998;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
}

@media (min-width: 992px) {
    .bottom-nav {
        display: none;
    }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    position: relative;
    padding: 6px 12px;
    transition: var(--transition);
}

.bottom-nav-item i {
    font-size: 1.25rem;
}

.bottom-nav-item.active, .bottom-nav-item:hover {
    color: var(--primary);
}

.bottom-nav-bubble {
    position: absolute;
    top: 4px;
    right: 14px;
    background: var(--primary);
    color: #0a0d14;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
#toast-container {
    position: fixed;
    bottom: 85px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 992px) {
    #toast-container {
        bottom: 25px;
    }
}

.toast {
    background: #121826;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    animation: toastSlide 0.3s ease;
}

.toast.toast-success {
    border-left: 4px solid var(--success);
}

.toast.toast-danger {
    border-left: 4px solid var(--danger);
}

@keyframes toastSlide {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: #090c13;
    border-top: 1px solid var(--border-color);
    padding: 45px 16px 30px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-wrap {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 35px;
}

.footer-col h5 {
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.2px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.82rem;
}

/* ==========================================================================
   Tables, Forms & Cart Styles
   ========================================================================== */
.table-cart {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.table-cart th {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 14px;
    text-align: left;
}

.table-cart td {
    background: var(--card-bg);
    padding: 14px;
    vertical-align: middle;
}

.table-cart tr td:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.table-cart tr td:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    background: rgba(10, 13, 20, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

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

.qty-input {
    width: 42px;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.9rem;
    outline: none;
}

/* ==========================================================================
   Responsive Cart View (Mobile-First 100% Collapse, No Scrollbars)
   ========================================================================== */
.cart-desktop-view {
    display: none;
    width: 100%;
}

.cart-mobile-view {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

@media (min-width: 768px) {
    .cart-desktop-view {
        display: block;
    }
    .cart-mobile-view {
        display: none;
    }
}

.cart-mobile-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cart-mobile-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.cart-mobile-img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: #080b11;
    flex-shrink: 0;
}

.cart-mobile-details {
    flex: 1;
    min-width: 0;
}

.cart-mobile-brand {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.cart-mobile-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.cart-mobile-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.btn-remove-icon {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-remove-icon:hover {
    background: rgba(239, 68, 68, 0.15);
}

.cart-mobile-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
    gap: 10px;
    width: 100%;
}

.cart-mobile-subtotal {
    text-align: right;
}

.cart-subtotal-label {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.cart-subtotal-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
}

/* ==========================================================================
   Product Detail Responsive Card & Controls
   ========================================================================== */
.product-detail-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 45px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

@media (min-width: 768px) {
    .product-detail-card {
        grid-template-columns: 1fr 1.15fr;
        gap: 36px;
        padding: 30px;
    }
}

.product-buy-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-top: auto;
    width: 100%;
}

.qty-control-detail {
    display: inline-flex;
    align-items: center;
    background: rgba(10, 13, 20, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    height: 48px;
    min-height: 48px;
    box-sizing: border-box;
    overflow: hidden;
    flex-shrink: 0;
}

.qty-control-detail .qty-btn {
    width: 44px;
    height: 100%;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

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

.qty-control-detail .qty-input {
    width: 48px;
    height: 100%;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.05rem;
    outline: none;
    box-sizing: border-box;
}

.btn-add-cart-detail {
    flex: 1;
    height: 48px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    box-sizing: border-box;
}

/* ==========================================================================
   Admin Panel Responsive Drawer Layout (< 992px)
   ========================================================================== */
.admin-mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 1040;
    background: #121826;
    border-bottom: 1px solid #1f293d;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100% !important;
    flex: 0 0 100% !important;
}

.admin-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1050;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.admin-sidebar-overlay.active {
    display: block !important;
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: -320px !important;
        width: 285px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        min-height: 100vh !important;
        z-index: 1060 !important;
        background: #121826 !important;
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.85) !important;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .admin-sidebar.show-mobile {
        left: 0 !important;
    }

    .admin-main-content {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 14px 10px !important;
        overflow-x: hidden !important;
    }

    .card-custom {
        padding: 16px 12px !important;
        border-radius: 14px !important;
    }
}

@media (min-width: 992px) {
    .admin-mobile-topbar {
        display: none !important;
    }
    .admin-sidebar {
        position: static !important;
        left: 0 !important;
        min-height: 100vh !important;
        display: flex !important;
    }
}

/* Botones de filtro responsive */
.admin-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    width: 100%;
}
.admin-filter-btn {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    border: 1px solid #1f293d;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}
.admin-filter-btn:hover {
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
    border-color: rgba(var(--primary-rgb), 0.35);
}
.admin-filter-btn.active {
    background: var(--primary);
    color: #0a0d14;
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(var(--primary-rgb), 0.35);
}

/* Cards mobile para listas en admin */
.admin-mobile-card {
    background: #0c121e;
    border: 1px solid #1f293d;
    border-radius: 12px;
    padding: 14px;
    width: 100%;
    box-sizing: border-box;
}
.admin-mobile-card:hover {
    border-color: rgba(var(--primary-rgb), 0.3);
}


