        :root {
            --bg: #090d16;
            --bg-image: none;
            --panel: #121824;
            --panel-hover: #1c2536;
            --line: #232d3f;
            --text: #f0f4f8;
            --muted: #8a99ad;
            --accent: #60a5fa;
            --accent-glow: rgba(96, 165, 250, 0.25);
            --green: #22c55e;
            --green-glow: rgba(34, 197, 94, 0.2);
            --red: #ef4444;
            --radius: 12px;
            --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        }

        body.light-mode {
            --bg: #f1f5f9;
            --panel: #ffffff;
            --panel-hover: #f8fafc;
            --line: #cbd5e1;
            --text: #0f172a;
            --muted: #64748b;
            --accent: #2563eb;
            --accent-glow: rgba(37, 99, 235, 0.15);
        }

        * {
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            margin: 0;
            background-color: var(--bg);
            background-image: var(--bg-image);
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
            color: var(--text);
            font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            padding-bottom: 70px;
            -webkit-font-smoothing: antialiased;
            overflow-x: hidden;
        }

        header {
            position: sticky;
            top: 0;
            z-index: 50;
            background: rgba(18, 24, 36, 0.85);
            border-bottom: 1px solid var(--line);
            padding: 10px 16px;
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
        }

        body.light-mode header {
            background: rgba(255, 255, 255, 0.85);
        }

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

        .brand-logo {
            display: flex;
            align-items: center;
            gap: 10px;
            user-select: none;
        }

        .logo-circle {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            border: 2px solid var(--accent);
            box-shadow: 0 0 12px var(--accent-glow);
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            background: #000;
        }

        .logo-circle img {
            width: 38px;
            height: 38px;
            object-fit: cover;
        }

        h1 {
            margin: 0;
            font-size: 1.1rem;
            font-weight: 800;
            letter-spacing: -0.02em;
        }

        .header-right-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            position: relative;
            flex-wrap: wrap;
        }

        .bar {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            align-items: center;
            width: 100%;
        }

        input,
        select,
        button,
        textarea {
            background: var(--bg);
            color: var(--text);
            border: 1px solid var(--line);
            border-radius: 8px;
            padding: 8px 12px;
            min-height: 40px;
            font-size: 13px;
            outline: none;
            transition: var(--transition);
            max-width: 100%;
        }

        input:focus,
        select:focus,
        textarea:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--accent-glow);
        }

        button {
            cursor: pointer;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        button:active {
            transform: scale(0.97);
        }

        button:hover {
            border-color: var(--accent);
        }

        .btn-cores-prominent {
            /* background: linear-gradient(135deg, var(--accent) 0%, #3b82f6 100%); */
            color: #fff;
            font-weight: 700;
            border: 1px solid rgba(255, 255, 255, 0.2);
            border-radius: 20px;
            padding: 6px 16px;
            font-size: 12px;
            /* box-shadow: 0 2px 8px var(--accent-glow); */
            transition: var(--transition);
        }

        .btn-cores-prominent:hover {
            box-shadow: 0 4px 14px var(--accent-glow);
            transform: translateY(-1px);
        }

        .btn-cores-prominent.active {
            background: #1d4ed8;
            border-color: #60a5fa;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .btn-cores-prominent .card-back-icon {
            border-color: #fff;
        }

        main {
            display: grid;
            grid-template-columns: 1fr;
            gap: 16px;
            padding: 16px;
            max-width: 1400px;
            margin: 0 auto;
            width: 100%;
        }

        .panel {
            background: var(--panel);
            border: 1px solid var(--line);
            border-radius: var(--radius);
            padding: 14px;
            height: fit-content;
        }

        .select-set-label {
            display: block;
            font-size: 11px;
            font-weight: 700;
            color: var(--accent);
            margin-top: 8px;
            margin-bottom: 2px;
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        .grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
            gap: 12px;
            width: 100%;
        }

        .card {
            background: var(--panel);
            border: 1px solid var(--line);
            border-radius: var(--radius);
            padding: 10px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            transition: var(--transition);
            position: relative;
            overflow: hidden;
            contain: content;
            outline: none;
            word-wrap: break-word;
            word-break: break-word;
        }

        .card:hover,
        .card:focus {
            border-color: var(--accent);
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
        }

        body.is-admin .card:focus {
            box-shadow: 0 0 0 3px var(--accent-glow), 0 8px 20px rgba(0, 0, 0, 0.2);
        }

        .card img {
            width: 100%;
            height: auto;
            aspect-ratio: 0.69;
            object-fit: contain;
            background: #000;
            border-radius: 6px;
            cursor: pointer;
            user-select: none;
        }

        .name {
            font-weight: 700;
            margin-top: 8px;
            font-size: 13px;
            line-height: 1.25;
            color: var(--text);
        }

        .card-price-display {
            font-size: 1.2rem;
            font-weight: 800;
            color: #22c55e;
            margin: 4px 0;
        }

        .muted {
            color: var(--muted);
            font-size: 11px;
        }

        .stock-tag {
            display: inline-block;
            background: rgba(138, 153, 173, 0.1);
            color: var(--muted);
            font-size: 10px;
            padding: 3px 8px;
            border-radius: 20px;
            margin-top: 6px;
            font-weight: 700;
        }

        .stock-tag.has-stock {
            background: var(--green-glow);
            color: #16a34a;
            border: 1px solid rgba(34, 197, 94, 0.3);
        }

        .min-purchase-tag {
            display: inline-block;
            background: rgba(239, 68, 68, 0.15);
            color: #dc2626;
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 4px;
            margin-top: 4px;
            font-weight: 700;
            border: 1px solid rgba(239, 68, 68, 0.3);
        }

        .pagination-container {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 6px;
            margin-top: 20px;
            flex-wrap: wrap;
        }

        .pagination-btn {
            min-height: 34px;
            min-width: 34px;
            padding: 0 10px;
            font-size: 12px;
            font-weight: 700;
            border-radius: 6px;
        }

        .pagination-btn.active {
            background: var(--accent);
            color: #fff;
            border-color: var(--accent);
        }

        .public-note {
            font-size: 11px;
            color: var(--text);
            background: rgba(35, 45, 63, 0.1);
            border-left: 2px solid var(--accent);
            padding: 4px 6px;
            border-radius: 4px;
            margin-top: 6px;
            word-break: break-word;
        }

        .grid.list-mode {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .grid.list-mode .card {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 8px 12px;
        }

        .grid.list-mode .card-main-info {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
            min-width: 0;
        }

        .grid.list-mode .card img {
            width: 36px;
            height: 52px;
            flex-shrink: 0;
        }

        .grid.list-mode .card-details {
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

        .grid.list-mode .card-details .name {
            margin-top: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .grid.list-mode .card-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            flex-shrink: 0;
        }

        .admin-only {
            display: none !important;
        }

        body.is-admin .admin-only {
            display: inline-flex !important;
        }

        body.is-admin div.admin-only {
            display: block !important;
        }

        .role-badge {
            padding: 4px 10px;
            border-radius: 20px;
            font-size: 10px;
            font-weight: 700;
            background: var(--line);
            color: var(--muted);
        }

        body.is-admin .role-badge {
            background: var(--green-glow);
            color: #16a34a;
            border: 1px solid var(--green);
        }

        .view-btn {
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .view-btn.active {
            background: var(--accent);
            color: #fff;
            font-weight: 700;
            border-color: var(--accent);
        }

        .card-back-icon {
            width: 13px;
            height: 18px;
            border: 1.5px solid var(--accent);
            border-radius: 2px;
            background: rgba(0, 0, 0, 0.2);
            position: relative;
            display: inline-block;
            box-sizing: border-box;
            flex-shrink: 0;
        }

        .card-back-icon::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 7px;
            height: 10px;
            border: 1px solid currentColor;
            border-radius: 50%;
            opacity: 0.8;
        }

        .btn-header-cart {
            background: var(--accent);
            color: #fff;
            font-weight: 700;
            border: none;
            border-radius: 20px;
            padding: 6px 14px;
            font-size: 12px;
        }

        .cart-badge-count {
            background: #000;
            color: #fff;
            border-radius: 10px;
            padding: 1px 7px;
            font-size: 10px;
        }

        .cart-modal-panel {
            position: absolute;
            top: calc(100% + 12px);
            right: 0;
            z-index: 100;
            background: var(--panel);
            border: 1px solid var(--line);
            border-radius: var(--radius);
            box-shadow: 0 16px 36px rgba(0, 0, 0, 0.3);
            width: 340px;
            display: none;
            flex-direction: column;
            overflow: hidden;
            backdrop-filter: blur(8px);
        }

        .cart-modal-panel.active {
            display: flex;
        }

        .cart-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            background: rgba(9, 13, 22, 0.05);
            border-bottom: 1px solid var(--line);
        }

        .cart-body {
            padding: 14px;
            max-height: 380px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .cart-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 0;
            border-bottom: 1px dashed var(--line);
            font-size: 12px;
        }

        .cart-controls {
            display: flex;
            gap: 6px;
            align-items: center;
        }

        .btn-sm {
            padding: 4px 10px;
            font-size: 11px;
            border-radius: 6px;
            min-height: 32px;
        }

        .btn-green {
            background: var(--green);
            color: #fff;
            font-weight: 700;
            border: none;
        }

        .btn-green:hover {
            background: #16a34a;
        }

        .btn-green:disabled {
            background: var(--line);
            color: var(--muted);
            cursor: not-allowed;
            border: none;
        }

        .btn-red {
            background: rgba(239, 68, 68, 0.15);
            color: #dc2626;
            border: 1px solid rgba(239, 68, 68, 0.3);
        }

        .btn-red:hover {
            background: var(--red);
            color: #fff;
        }

        .btn-accent {
            background: var(--accent);
            color: #fff;
            font-weight: 700;
            border: none;
        }

        .total-box {
            font-size: 15px;
            font-weight: 800;
            margin: 10px 0 5px;
            text-align: right;
            color: #16a34a;
        }

        dialog {
            background: var(--panel);
            color: var(--text);
            border: 1px solid var(--line);
            border-radius: var(--radius);
            max-width: 700px;
            width: 92%;
            padding: 20px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
        }

        dialog::backdrop {
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(4px);
        }

        .checkout-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 10px;
            font-size: 12px;
        }

        .checkout-table th,
        .checkout-table td {
            border-bottom: 1px solid var(--line);
            padding: 10px 8px;
            text-align: left;
        }

        .checkout-table th {
            background: rgba(9, 13, 22, 0.05);
            color: var(--muted);
            font-size: 11px;
            text-transform: uppercase;
        }

        .checkout-img {
            width: 32px;
            height: 46px;
            object-fit: contain;
            border-radius: 4px;
            background: #000;
        }

        .form {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px;
        }

        .form label {
            display: flex;
            flex-direction: column;
            gap: 4px;
            font-size: 11px;
            color: var(--muted);
            font-weight: 700;
            text-transform: uppercase;
        }

        .full {
            grid-column: 1/-1;
        }

        .info-box {
            background: var(--bg);
            border: 1px solid var(--line);
            padding: 10px;
            border-radius: 8px;
            margin-bottom: 12px;
            font-size: 12px;
        }

        .file-input-wrapper {
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .file-input-wrapper input[type="file"] {
            display: none;
        }

        .btn-file-select {
            background: var(--panel-hover);
            border: 1px dashed var(--accent);
            font-size: 11px;
            min-height: 38px;
        }

        .mobile-cart-bar {
            display: none;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 60px;
            background: var(--panel);
            border-top: 1px solid var(--accent);
            padding: 0 16px;
            justify-content: space-between;
            align-items: center;
            z-index: 90;
            backdrop-filter: blur(10px);
        }

        .core-arrow {
            display: inline-block;
            width: 0;
            height: 0;
            border-left: 5px solid transparent;
            border-right: 5px solid transparent;
            border-top: 6px solid currentColor;
            transition: transform 0.2s ease;
        }

        .image-zoom-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.85);
            z-index: 999;
            backdrop-filter: blur(8px);
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }

        .image-zoom-overlay.active {
            display: flex;
        }

        .image-zoom-overlay img {
            max-width: 90vw;
            max-height: 90vh;
            border-radius: 12px;
            box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
            object-fit: contain;
        }

        .toast-notification {
            position: fixed;
            bottom: 20px;
            right: 20px;
            z-index: 1000;
            background: var(--panel);
            color: var(--text);
            border: 1px solid var(--green);
            padding: 12px 20px;
            border-radius: 8px;
            font-weight: 600;
            font-size: 13px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            pointer-events: none;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .toast-notification.show {
            opacity: 1;
            transform: translateY(0);
        }

        .order-card {
            background: var(--bg);
            border: 1px solid var(--line);
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 12px;
        }

        .order-card.pend {
            border-left: 4px solid #f59e0b;
        }

        .order-card.comp {
            border-left: 4px solid var(--green);
            opacity: 0.9;
        }

        .order-card.canc {
            border-left: 4px solid var(--red);
            opacity: 0.6;
        }

        .order-actions {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }

        .order-action-btn {
            border-radius: 999px !important;
            padding: 6px 12px !important;
            min-height: 32px !important;
            font-size: 11px !important;
            font-weight: 700;
        }

        .order-header {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            margin-bottom: 8px;
        }

        .cores-grid-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 16px;
            width: 100%;
        }


        .core-card:hover {
            border-color: var(--accent);
        }

        .core-title {
            font-size: 15px;
            font-weight: 800;
            color: var(--accent);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .core-price {
            font-size: 1.1rem;
            font-weight: 800;
            color: #22c55e;
        }

        .core-img-container {
            width: 300px;
            height: 360px;
            max-width: 100%;
            margin: 0 auto;
            border-radius: 8px;
            border: 1px solid var(--line);
            background: #000;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .core-img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            cursor: pointer;
        }

        .core-accordion-toggle {
            background: var(--bg);
            border: 1px solid var(--line);
            border-radius: 6px;
            padding: 8px 10px;
            font-size: 12px;
            font-weight: 700;
            color: var(--text);
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            width: 100%;
            transition: var(--transition);
        }

        .core-accordion-toggle:hover {
            border-color: var(--accent);
        }

        .core-accordion-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
            background: var(--bg);
            border-radius: 6px;
            font-size: 12px;
        }

        .core-accordion-content.open {
            max-height: 250px;
            overflow-y: auto;
            border: 1px solid var(--line);
            padding: 8px;
            transition: max-height 0.3s ease-in-out;
        }

        .core-cards-builder-list {
            display: flex;
            flex-direction: column;
            gap: 6px;
            margin-top: 8px;
            max-height: 180px;
            overflow-y: auto;
            background: var(--bg);
            border: 1px solid var(--line);
            border-radius: 8px;
            padding: 8px;
        }

        .core-card-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: var(--panel);
            border: 1px solid var(--line);
            padding: 6px 10px;
            border-radius: 6px;
            font-size: 12px;
        }

        @media(max-width: 800px) {
            .desktop-only {
                display: none !important;
            }

            .mobile-cart-bar {
                display: flex;
            }

            main {
                grid-template-columns: 1fr;
                padding: 8px;
                gap: 10px;
                max-width: 100vw;
            }

            .grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 8px;
                width: 100%;
            }

            .card {
                padding: 6px;
            }

            .name {
                font-size: 11px;
                margin-top: 4px;
            }

            .card-price-display {
                font-size: 1rem;
                margin: 2px 0;
            }

            .btn-sm {
                font-size: 10px;
                padding: 2px 6px;
                min-height: 28px;
            }

            .cart-modal-panel {
                position: fixed;
                top: 60px;
                right: 10px;
                left: 10px;
                width: auto;
                max-height: 75vh;
            }

            .grid.list-mode .card {
                flex-direction: column;
                align-items: flex-start;
                gap: 8px;
            }

            .grid.list-mode .card-actions {
                width: 100%;
                justify-content: space-between;
            }

            .form {
                grid-template-columns: 1fr;
            }

            .cores-grid-container {
                grid-template-columns: 1fr;
            }
        }
    

        .hero-carousel {
            width: 100%;
            overflow: hidden;
            position: relative;
        }

        .hero-carousel__track {
            display: flex;
            width: 100%;
        }

        .hero-carousel__slide {
            position: relative;
            min-width: 100%;
            height: 500px;
            overflow: hidden;
        }

        .hero-carousel__image {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center top;
        }

        /* Contenido encima de la imagen */
        .slide__content {
            position: absolute;
            inset: 0;
            z-index: 2;

            display: flex;
            align-items: flex-end;

            padding-block-start: max(20px, calc(var(--spacing-scale, 1) * 100px));
            padding-block-end: max(20px, calc(var(--spacing-scale, 1) * 100px));
            padding-inline-start: 20px;
            padding-inline-end: 20px;

            background: transparent;
        }

        .group-block-content {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 40px;
        }

        .banner-left,
        .banner-right {
            display: flex;
            flex-direction: column;
        }

        .banner-left {
            align-items: flex-start;
        }

        .banner-right {
            align-items: flex-end;
            text-align: right;
        }

        .banner-left p,
        .banner-right p {
            margin: 0;
        }

        /* Separación entre la frase y el botón */
        .banner-left .button-custom {
            margin-top: 25px;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .group-block-content {
                flex-direction: column;
                align-items: center;
                gap: 20px;
            }

            .banner-left,
            .banner-right {
                align-items: center;
                text-align: center;
            }

            .banner-left .button-custom {
                margin-top: 20px;
            }
        }

        .text-block {
            width: fit-content;
            max-width: var(--max-width--body-normal, 600px);
            color: #ffffff;
        }

        .text-block p {
            margin: 0;
            font-size: 32px;
            line-height: 1.2;
            font-weight: 600;

            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
        }

        .button-custom {
            display: inline-flex;
            align-items: center;
            justify-content: center;

            width: fit-content;

            padding: 12px 24px;

            background-color: rgb(181, 25, 22);
            color: #ffffff;

            border: 1px solid rgb(201, 54, 54);
            border-radius: 0;

            text-decoration: none;
            font-weight: 600;

            transition:
                background-color 0.2s ease,
                border-color 0.2s ease;
        }

        .button-custom:hover {
            background-color: #cc1c19;
            border-color: #ce4a4a;
        }

        /* Oscurece ligeramente la imagen para que el texto se lea mejor */
        .hero-carousel__slide::after {
            content: "";
            position: absolute;
            inset: 0;
            z-index: 1;

            background: linear-gradient(to top,
                    rgba(0, 0, 0, 0.65),
                    rgba(0, 0, 0, 0.05) 70%);

            pointer-events: none;
        }

        /* =========================
           BANNER RESPONSIVE
           ========================= */

        /* Celulares grandes */
        @media (max-width: 749px) {
            .hero-carousel__slide {
                height: 280px;
            }

            .slide__content {
                padding: 20px 15px;
            }

            .group-block-content {
                gap: 12px;
            }

            .text-block {
                max-width: 90%;
            }

            .text-block p {
                font-size: 19px;
                line-height: 1.2;
            }

            .banner-left .button-custom {
                margin-top: 12px;
                padding: 9px 16px;
                font-size: 12px;
            }
        }

        /* Celulares medianos */
        @media (max-width: 500px) {
            .hero-carousel__slide {
                height: 250px;
            }

            .text-block p {
                font-size: 17px;
            }

            .banner-left .button-custom {
                margin-top: 10px;
                padding: 8px 14px;
                font-size: 11px;
            }
        }

        /* Celulares chicos */
        @media (max-width: 380px) {
            .hero-carousel__slide {
                height: 220px;
            }

            .slide__content {
                padding: 15px 10px;
            }

            .group-block-content {
                gap: 8px;
            }

            .text-block p {
                font-size: 15px;
            }

            .banner-left .button-custom {
                margin-top: 8px;
                padding: 7px 12px;
                font-size: 10px;
            }
        }

        /* =========================================================
   MEJORAS DEL MODO CLARO
   ========================================================= */

        body.light-mode {
            --bg: #f3f6fa;
            --panel: #ffffff;
            --panel-hover: #f8fafc;
            --line: #b8c4d1;
            --text: #172033;
            --muted: #526174;
            --accent: #2563eb;
            --accent-glow: rgba(37, 99, 235, 0.18);
        }

        /* ---------- ELEMENTOS GENERALES ---------- */

        body.light-mode input,
        body.light-mode select,
        body.light-mode textarea,
        body.light-mode button {
            background: #ffffff;
            border-color: #b8c4d1;
            color: var(--text);
        }

        body.light-mode input::placeholder,
        body.light-mode textarea::placeholder {
            color: #718096;
        }

        body.light-mode input:hover,
        body.light-mode select:hover,
        body.light-mode textarea:hover,
        body.light-mode button:hover {
            border-color: #7c8da3;
        }

        body.light-mode input:focus,
        body.light-mode select:focus,
        body.light-mode textarea:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--accent-glow);
        }

        /* ---------- HEADER ---------- */

        body.light-mode header {
            background: rgba(255, 255, 255, 0.94);
            border-bottom-color: #b8c4d1;
            box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
        }

        /* ---------- PANELES Y CARTAS ---------- */

        body.light-mode .panel,
        body.light-mode .card {
            background: #ffffff;
            border-color: #b8c4d1;
        }

        body.light-mode .card:hover,
        body.light-mode .card:focus {
            border-color: var(--accent);
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.10);
        }

        /* ---------- BOTONES NORMALES ---------- */

        body.light-mode button:not(.btn-accent):not(.btn-green):not(.btn-red):not(.btn-header-cart):not(.btn-cores-prominent):not(.pagination-btn) {
            background: #ffffff;
            border: 1px solid #aebccc;
            color: #172033;
        }

        body.light-mode button:not(.btn-accent):not(.btn-green):not(.btn-red):not(.btn-header-cart):not(.btn-cores-prominent):not(.pagination-btn):hover {
            background: #f1f5f9;
            border-color: var(--accent);
            color: #1749b5;
        }

        /* ---------- SINGLES / CORES ---------- */

        body.light-mode .btn-cores-prominent {
            background: #ffffff;
            color: #172033;
            border: 1px solid #9eacbc;
            box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
        }

        body.light-mode .btn-cores-prominent:hover {
            background: #f1f5f9;
            border-color: var(--accent);
            box-shadow: 0 4px 14px var(--accent-glow);
        }

        body.light-mode .btn-cores-prominent.active {
            background: #2563eb;
            color: #ffffff;
            border-color: #1d4ed8;
            box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.20);
        }

        /* ---------- BOTONES COLOREADOS ---------- */

        body.light-mode .btn-accent {
            background: #2563eb;
            color: #ffffff;
            border-color: #1d4ed8;
        }

        body.light-mode .btn-accent:hover {
            background: #1d4ed8;
            border-color: #1e40af;
        }

        body.light-mode .btn-green {
            background: #16a34a;
            color: #ffffff;
            border-color: #15803d;
        }

        body.light-mode .btn-green:hover {
            background: #15803d;
        }

        body.light-mode .btn-red {
            background: #fff1f2;
            color: #b91c1c;
            border-color: #f3a3aa;
        }

        body.light-mode .btn-red:hover {
            background: #dc2626;
            border-color: #dc2626;
            color: #ffffff;
        }

        /* ---------- PAGINACIÓN ---------- */

        body.light-mode .pagination-btn {
            background: #ffffff;
            color: #172033;
            border: 1px solid #aebccc;
        }

        body.light-mode .pagination-btn:hover {
            background: #eef4ff;
            border-color: var(--accent);
            color: #1749b5;
        }

        body.light-mode .pagination-btn.active {
            background: var(--accent);
            color: #ffffff;
            border-color: var(--accent);
        }

        /* ---------- ETIQUETAS ---------- */

        body.light-mode .stock-tag {
            background: #eef1f5;
            color: #526174;
            border: 1px solid #c4ced9;
        }

        body.light-mode .stock-tag.has-stock {
            background: #ecfdf3;
            color: #15803d;
            border-color: #86efac;
        }

        body.light-mode .min-purchase-tag {
            background: #fff1f2;
            color: #b91c1c;
            border-color: #f3a3aa;
        }

        body.light-mode .role-badge {
            background: #e9eef5;
            color: #526174;
            border: 1px solid #c4ced9;
        }

        body.light-mode .public-note {
            background: #f1f5f9;
            color: #334155;
            border-left-color: var(--accent);
        }

        /* ---------- ICONOS ---------- */

        body.light-mode .card-back-icon {
            background: #eef2f7;
            border-color: #64748b;
            color: #475569;
        }

        body.light-mode .btn-cores-prominent.active .card-back-icon {
            border-color: #ffffff;
            color: #ffffff;
            background: transparent;
        }

        /* ---------- CARRITO ---------- */

        body.light-mode .cart-modal-panel {
            background: #ffffff;
            border-color: #aebccc;
            box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
        }

        body.light-mode .cart-header {
            background: #f1f5f9;
            border-bottom-color: #b8c4d1;
        }

        body.light-mode .cart-item {
            border-bottom-color: #cbd5e1;
        }

        /* ---------- FORMULARIOS / INFO BOX ---------- */

        body.light-mode .info-box {
            background: #f1f5f9;
            border-color: #b8c4d1;
            color: #334155;
        }

        body.light-mode .form label {
            color: #526174;
        }

        body.light-mode .file-input-wrapper .btn-file-select {
            background: #f8fafc;
            border-color: var(--accent);
            color: #1749b5;
        }

        body.light-mode .file-input-wrapper .btn-file-select:hover {
            background: #eef4ff;
        }

        /* ---------- CORES ---------- */

        body.light-mode .core-accordion-toggle {
            background: #ffffff;
            border-color: #aebccc;
            color: #172033;
        }

        body.light-mode .core-accordion-toggle:hover {
            background: #f8fafc;
            border-color: var(--accent);
        }

        body.light-mode .core-accordion-content {
            background: #f8fafc;
        }

        body.light-mode .core-accordion-content.open {
            border-color: #aebccc;
        }

        body.light-mode .core-cards-builder-list {
            background: #f8fafc;
            border-color: #aebccc;
        }

        body.light-mode .core-card-item {
            background: #ffffff;
            border-color: #b8c4d1;
        }

        body.light-mode .core-img-container {
            border-color: #aebccc;
        }

        /* ---------- DIÁLOGOS ---------- */

        body.light-mode dialog {
            background: #ffffff;
            color: var(--text);
            border-color: #aebccc;
            box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
        }

        body.light-mode dialog::backdrop {
            background: rgba(15, 23, 42, 0.55);
        }

        /* ---------- TABLAS ---------- */

        body.light-mode .checkout-table th,
        body.light-mode .checkout-table td {
            border-bottom-color: #cbd5e1;
        }

        body.light-mode .checkout-table th {
            background: #f1f5f9;
            color: #526174;
        }

        /* ---------- PEDIDOS ---------- */

        body.light-mode .order-card {
            background: #ffffff;
            border-color: #b8c4d1;
        }

        /* ---------- TEXTO MUTED ---------- */

        body.light-mode .muted {
            color: #526174;
        }

        /* ---------- BARRA DE CARRITO MOBILE ---------- */

        body.light-mode .mobile-cart-bar {
            background: rgba(255, 255, 255, 0.96);
            border-top-color: var(--accent);
            box-shadow: 0 -3px 12px rgba(15, 23, 42, 0.08);
        }

        /* =========================================================
   LISTA DE CARTAS DENTRO DE LOS CORES
   ========================================================= */

        .core-accordion-content {
            padding: 0;
            background: var(--bg);
        }

        .core-accordion-content.open {
            padding: 6px;
        }

        .core-set-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;

            min-height: 36px;
            padding: 7px 10px;

            background: var(--panel);
            border: 1px solid var(--line);
            border-radius: 6px;

            font-size: 11px;
            line-height: 1.3;

            transition: var(--transition);
        }

        .core-set-item+.core-set-item {
            margin-top: 5px;
        }

        .core-set-item:hover {
            border-color: var(--accent);
            background: var(--panel-hover);
        }

        .core-set-main {
            display: flex;
            align-items: center;
            gap: 8px;
            min-width: 0;
        }

        .core-set-qty {
            flex-shrink: 0;

            font-weight: 800;
            color: var(--accent);
            min-width: 28px;
        }

        .core-set-name {
            font-weight: 600;
            color: var(--text);

            overflow: hidden;
            text-overflow: ellipsis;
            word-break: break-word;
        }

        .core-set-rarity {
            flex-shrink: 0;

            padding: 2px 6px;
            border-radius: 4px;

            font-size: 9px;
            font-weight: 700;

            color: var(--accent);
            background: var(--accent-glow);
            border: 1px solid var(--accent);
        }

        /* ---------- MODO CLARO ---------- */

        body.light-mode .core-set-item {
            background: #ffffff;
            border-color: #b8c4d1;
        }

        body.light-mode .core-set-item:hover {
            background: #f1f5f9;
            border-color: var(--accent);
        }

        body.light-mode .core-set-rarity {
            background: #eef4ff;
            color: #1749b5;
            border-color: #93b4ed;
        }
    
