@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700;900&family=Manrope:wght@400;500;600;700;800&display=swap');

/* Lenis smooth scroll styles */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
    overflow: clip;
}

.lenis [data-lenis-prevent],
.lenis [data-lenis-prevent-wheel],
.lenis [data-lenis-prevent-touch] {
    overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
    pointer-events: none;
}

.lenis.lenis-autoToggle {
    transition-property: overflow;
    transition-duration: 1ms;
    transition-behavior: allow-discrete;
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* SISTEMA DE TEMAS - CLARO (POR DEFECTO) Y OSCURO                            */
/* ═══════════════════════════════════════════════════════════════════════════ */

:root {
    /* Colores Base */
    --primary: #f97316;
    --primary-dark: #ea580c;
    --secondary: #8b5cf6;

    /* TEMA CLARO (Por defecto) */
    --bg-main: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --bg-input: #f1f5f9;
    --bg-nav: rgba(255, 255, 255, 0.85);
    --bg-overlay: rgba(0, 0, 0, 0.5);
    --bg-modal: #ffffff;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-inverted: #ffffff;

    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --glass-border: rgba(0, 0, 0, 0.08);
    --shadow-color: rgba(0, 0, 0, 0.1);

    --btn-primary-bg: #f97316;
    --btn-primary-text: #ffffff;
    --btn-secondary-bg: #0f172a;
    --btn-secondary-text: #ffffff;

    /* Performance: Enable GPU acceleration */
    --gpu-transform: translateZ(0);
}

/* TEMA OSCURO */
.dark-mode {
    --bg-main: #050505;
    --bg-secondary: #0a0a0a;
    --bg-card: #0a0a0a;
    --bg-card-hover: #111111;
    --bg-input: #0f0f16;
    --bg-nav: rgba(10, 10, 10, 0.85);
    --bg-overlay: rgba(0, 0, 0, 0.9);
    --bg-modal: #0a0a0a;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverted: #0f172a;

    --border-color: #1e293b;
    --border-hover: #334155;
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-color: rgba(0, 0, 0, 0.5);

    --btn-primary-bg: #f97316;
    --btn-primary-text: #000000;
    --btn-secondary-bg: #ffffff;
    --btn-secondary-text: #000000;
}

html,
body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main) !important;
    color: var(--text-primary);
    overflow-x: hidden;
    overflow-x: clip;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Grid Background Effect */
.grid-bg {
    background-image:
        linear-gradient(var(--border-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--border-color) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    mask-image: radial-gradient(circle at center, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black, transparent 80%);
    opacity: 0.15;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.dark-mode .grid-bg {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    opacity: 0.4;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Utilities */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.full-viewport {
    height: 100vh;
    height: 100dvh;
}

.min-full-viewport {
    min-height: 100vh;
    min-height: 100dvh;
}

/* Glassmorphism Advanced - Adaptado a temas */
.glass {
    background: var(--bg-nav);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px 0 var(--shadow-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Neon Effects */
.neon-text {
    text-shadow: 0 0 15px rgba(249, 115, 22, 0.3);
}

.hero-title-neon {
    text-shadow:
        0 0 1px rgba(255, 255, 255, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.3);
    -webkit-text-stroke: 0;
}

.hero-title-neon-gradient {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
    background-size: 150% 150%;
    animation: hero-gradient-shift 8s ease-in-out infinite;
}

.hero-title-neon-light {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes hero-neon-breathe {
    /* Removed aggressive breathe animation */
    0%, 100% { opacity: 1; }
}

@keyframes hero-gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.neon-box {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--glass-border);
}

.neon-box:hover {
    box-shadow: 0 0 25px rgba(249, 115, 22, 0.15), inset 0 0 10px rgba(249, 115, 22, 0.05);
    border-color: rgba(249, 115, 22, 0.4);
    transform: translateY(-4px);
}

/* Buttons & Inputs */
.neon-button {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: all 0.3s;
    border: none;
}

.neon-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
}

.neon-button:hover::before {
    opacity: 1;
}

.neon-button:hover {
    box-shadow: 0 0 25px rgba(249, 115, 22, 0.5);
    transform: translateY(-2px);
}

.input-cyber {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 0.75rem;
    transition: all 0.3s;
}

.input-cyber:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
    background: var(--bg-card);
    outline: none;
}

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

/* Animations */
.animate-fade-up {
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .animate-fade-up {
        animation: none;
        opacity: 1;
    }
}

/* Pulse Animation */
.animate-pulse-slow {
    animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

/* New Animations */
.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-in-scale {
    animation: fadeInScale 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-slide-in-right {
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Left Animation */
.animate-slide-in-left {
    animation: slideInLeft 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In Up Animation */
.animate-slide-in-up {
    animation: slideInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Zoom In Animation */
.animate-zoom-in {
    animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Shake Animation (para errores) */
.animate-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

/* Glow Animation */
.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px rgba(249, 115, 22, 0.2);
    }

    to {
        box-shadow: 0 0 20px rgba(249, 115, 22, 0.4), 0 0 40px rgba(249, 115, 22, 0.2);
    }
}

/* Float Animation */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Stagger Animation Helper */
.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

.stagger-5 {
    animation-delay: 0.5s;
}

/* Card Hover Effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Image Hover Zoom */
.img-hover-zoom {
    overflow: hidden;
}

.img-hover-zoom img {
    transition: transform 0.5s ease;
}

.img-hover-zoom:hover img {
    transform: scale(1.1);
}

/* Button Press Effect */
.btn-press:active {
    transform: scale(0.95);
    transition: transform 0.1s;
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.2) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.ripple:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Admin Sidebar */
.admin-item {
    transition: all 0.2s;
    border-right: 3px solid transparent;
    margin-bottom: 4px;
}

.admin-item:hover,
.admin-item.active {
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.05) 0%, rgba(249, 115, 22, 0.1) 100%);
    border-right-color: var(--primary);
    color: #fb923c;
}

/* Admin Professional Refresh */
.admin-shell {
    --admin-surface: #101827;
    --admin-surface-alt: #172135;
    --admin-border: rgba(148, 163, 184, 0.14);
    --admin-border-strong: rgba(148, 163, 184, 0.28);
    --admin-text: #e6edf6;
    --admin-muted: #9aa9bf;
    background:
        radial-gradient(1200px 440px at 8% -12%, rgba(59, 130, 246, 0.12), transparent 48%),
        radial-gradient(980px 380px at 100% 2%, rgba(14, 116, 144, 0.1), transparent 50%),
        linear-gradient(180deg, #070d18 0%, #0a1322 52%, #0a1524 100%);
    min-height: 100dvh;
}

.admin-shell,
.admin-shell * {
    font-family: 'Manrope', 'Outfit', sans-serif;
    letter-spacing: 0;
}

.admin-shell .font-mono {
    font-family: 'Outfit', sans-serif;
}

.admin-shell .admin-sidebar {
    background: linear-gradient(180deg, #0d1626 0%, #0b1322 100%);
    border-right-color: rgba(148, 163, 184, 0.18);
    box-shadow: 0 16px 42px rgba(2, 8, 22, 0.46);
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
    flex-shrink: 0;
}

.admin-shell .admin-sidebar-header {
    border-bottom-color: rgba(148, 163, 184, 0.1);
}

.admin-shell .admin-sidebar-title {
    letter-spacing: -0.015em;
    font-weight: 800;
}

.admin-shell .admin-sidebar-title>div {
    background: linear-gradient(145deg, #334155 0%, #1f2937 100%);
    border: 1px solid rgba(148, 163, 184, 0.34);
}

.admin-shell .admin-sidebar-version {
    color: var(--admin-muted);
    letter-spacing: 0.03em;
    font-weight: 500;
}

.admin-shell .admin-sidebar-close-btn {
    border-color: rgba(148, 163, 184, 0.22);
}

.admin-shell .admin-nav-section {
    color: #7f8ca1;
    letter-spacing: 0.12em;
}

.admin-shell .admin-nav {
    min-height: 0;
    overscroll-behavior: contain;
}

.admin-shell .admin-nav-btn {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 0.9rem;
    font-weight: 600;
    color: #a5b2c4;
}

.admin-shell .admin-nav-btn:hover {
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.32) !important;
    background: rgba(30, 41, 59, 0.55) !important;
}

.admin-shell .admin-nav-btn[class*="bg-orange-500/15"],
.admin-shell .admin-nav-btn[class*="bg-purple-500/15"],
.admin-shell .admin-nav-btn[class*="bg-pink-500/15"] {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.16) 0%, rgba(37, 99, 235, 0.1) 100%) !important;
    border-color: rgba(96, 165, 250, 0.45) !important;
    color: #dbeafe !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(30, 64, 175, 0.2);
}

.admin-shell .admin-nav-btn svg {
    opacity: 0.9;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.admin-shell .admin-nav-btn:hover svg {
    opacity: 1;
    transform: translateX(1px);
}

.admin-shell .admin-sidebar-footer {
    border-top-color: rgba(148, 163, 184, 0.12);
    margin-top: auto;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(11, 19, 34, 0.18) 0%, rgba(11, 19, 34, 0.94) 32%, #0b1322 100%);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.admin-shell .admin-exit-btn {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(148, 163, 184, 0.22);
}

.admin-shell .admin-exit-btn:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(148, 163, 184, 0.38);
}

.admin-shell .admin-main {
    background:
        radial-gradient(1400px 360px at 50% -8%, rgba(59, 130, 246, 0.08), transparent 50%),
        linear-gradient(180deg, #091324 0%, #08111f 100%);
    min-height: 0;
}

.admin-shell .admin-mobile-menu {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.62);
}

.admin-shell .admin-page-title {
    text-shadow: none;
    letter-spacing: -0.03em;
    font-weight: 800;
}

.admin-shell .admin-page-subtitle {
    color: var(--admin-muted);
    font-weight: 500;
}

.admin-shell .admin-date-chip {
    background: rgba(15, 23, 42, 0.54);
    border-color: rgba(148, 163, 184, 0.25);
    color: #cbd5e1;
    box-shadow: 0 6px 16px rgba(2, 8, 22, 0.3);
}

.admin-shell .admin-main .bg-\[\#0a0a0a\].border.border-slate-800,
.admin-shell .admin-main .bg-\[\#0a0a0a\].border.border-slate-700 {
    background: linear-gradient(180deg, rgba(16, 24, 39, 0.96) 0%, rgba(12, 20, 35, 0.97) 100%);
    border-color: var(--admin-border);
    box-shadow: 0 10px 24px rgba(2, 8, 22, 0.32);
}

.admin-shell .admin-main .bg-\[\#0a0a0a\].border.border-slate-800:hover,
.admin-shell .admin-main .bg-\[\#0a0a0a\].border.border-slate-700:hover {
    border-color: var(--admin-border-strong);
}

.admin-shell .admin-main [class*="rounded-[2.5rem]"] {
    border-radius: 1.25rem !important;
}

.admin-shell .admin-main [class*="rounded-[2rem]"] {
    border-radius: 1rem !important;
}

.admin-shell .admin-main .neon-text {
    text-shadow: none;
}

/* Admin Panel Mobile Optimizations */
@media (max-width: 768px) {

    /* Sidebar animations */
    .admin-sidebar-enter {
        transform: translateX(-100%);
    }

    .admin-sidebar-enter-active {
        transform: translateX(0);
        transition: transform 0.3s ease-out;
    }

    /* Better touch targets for admin nav */
    .admin-shell nav button {
        min-height: 48px;
    }

    /* Reduce padding in admin content on small screens */
    .admin-content {
        padding: 1rem;
    }

    /* Stack admin cards on mobile */
    .admin-grid {
        grid-template-columns: 1fr !important;
    }

    /* Reduce card border radius on mobile for more space */
    .admin-shell .rounded-\[2\.5rem\] {
        border-radius: 1.5rem;
    }

    .admin-shell .rounded-\[2rem\] {
        border-radius: 1.25rem;
    }
}

.bg-grid {
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
}

:root {
    --grid-color: rgba(0, 0, 0, 0.03);
}

.dark-mode {
    --grid-color: rgba(255, 255, 255, 0.03);
}

/* ===== MOBILE RESPONSIVE OPTIMIZATIONS ===== */

/* Touch-friendly button sizes */
@media (max-width: 768px) {

    button,
    a,
    select,
    input {
        min-height: 44px;
        /* iOS touch target minimum */
    }

    /* Reduce padding on mobile */
    .p-8 {
        padding: 1.25rem;
    }

    .p-6 {
        padding: 1rem;
    }

    .p-12 {
        padding: 1.5rem;
    }

    /* Smaller text on mobile */
    .text-5xl {
        font-size: 2rem;
    }

    .text-4xl {
        font-size: 1.75rem;
    }

    .text-3xl {
        font-size: 1.5rem;
    }

    .text-2xl {
        font-size: 1.25rem;
    }

    /* Compact cards on mobile */
    .grid {
        gap: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .text-5xl {
        font-size: 1.75rem;
    }

    .text-4xl {
        font-size: 1.5rem;
    }

    .gap-8 {
        gap: 0.75rem;
    }

    .gap-6 {
        gap: 0.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* PRODUCT IMAGE CONTAINMENT — prevent images from overflowing their frames  */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Small thumbnail frames used in admin lists, suppliers, promos, etc. */
.product-preview-frame {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-preview-frame>img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* Main product card image container */
.premium-product-image {
    overflow: hidden;
}

.premium-product-image>img,
.premium-product-image>div>img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* Cart item images */
.cart-item-image {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-image>img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* Smooth bounce animation for cart badge */
.animate-bounce-short {
    animation: bounceShort 0.5s ease;
}

@keyframes bounceShort {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Fade in from right for mobile menu */
.animate-fade-in-right {
    animation: fadeInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Custom scrollbar for overflow containers */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.3);
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

/* Promo card glow */
.promo-glow {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.15);
}

/* Performance: GPU acceleration for animations */
.animate-fade-up,
.animate-fade-in,
.animate-fade-in-scale,
.animate-slide-in-right,
.animate-slide-in-left,
.animate-slide-in-up,
.animate-zoom-in,
.animate-float,
.card-hover,
.neon-box {
    will-change: transform, opacity;
    transform: var(--gpu-transform);
}

/* Performance: Contain layout for cards */
.glass,
.glass-panel,
.neon-box {
    contain: layout style;
}

/* Reduce motion for accessibility - Solo cuando el usuario lo prefiere */
@media (prefers-reduced-motion: reduce) {

    .animate-fade-up,
    .animate-fade-in,
    .animate-fade-in-scale,
    .animate-slide-in-right,
    .animate-slide-in-left,
    .animate-slide-in-up,
    .animate-zoom-in,
    .animate-bounce-short,
    .animate-pulse-slow,
    .animate-float,
    .animate-glow,
    .animate-shake {
        animation: none !important;
        opacity: 1;
        transform: none;
    }

    .card-hover:hover {
        transform: none;
    }
}

/* Safe area padding for notched phones */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* --- FUTURISTIC UI EXTRAS --- */

/* Animated Gradient Background */
.animate-gradient-xy {
    background-size: 200% 200%;
    animation: gradient-xy 6s ease infinite;
}

@keyframes gradient-xy {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* TV / Large Screen Optimizations */
@media (min-width: 1920px) {
    .container-tv {
        max-width: 1800px;
        margin: 0 auto;
    }

    .text-tv-huge {
        font-size: 3rem;
    }

    .grid-tv-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Subtle Tech Glow */
.tech-glow {
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.3), inset 0 0 10px rgba(249, 115, 22, 0.1);
}

.tech-border {
    border: 1px solid rgba(249, 115, 22, 0.3);
}

/* Infinite Brand Ticker Animation */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.ticker-content {
    display: inline-block;
    animation: ticker 30s linear infinite;
}

@keyframes ticker {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* Mobile Ticker Speed Adjustment */
@media (max-width: 768px) {
    .ticker-content {
        animation-duration: 15s;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* CLASES UTILITARIAS PARA SISTEMA DE TEMAS                                    */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Backgrounds tematizados */
.bg-themed-main {
    background-color: var(--bg-main);
}

.bg-themed-card {
    background-color: var(--bg-card);
}

.bg-themed-secondary {
    background-color: var(--bg-secondary);
}

.bg-themed-input {
    background-color: var(--bg-input);
}

/* Textos tematizados */
.text-themed-primary {
    color: var(--text-primary);
}

.text-themed-secondary {
    color: var(--text-secondary);
}

.text-themed-muted {
    color: var(--text-muted);
}

/* Bordes tematizados */
.border-themed {
    border-color: var(--border-color);
}

/* Cards con tema adaptativo */
.themed-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.themed-card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--border-hover);
}

/* Overlay adaptativo */
.themed-overlay {
    background-color: var(--bg-overlay);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* MEJORAS DE RESPONSIVE AVANZADAS                                             */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Grid de productos optimizado para móviles */
@media (max-width: 640px) {

    /* Productos: 2 columnas en móvil pequeño */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    /* Cards más compactas */
    .product-card-mobile {
        padding: 0.75rem !important;
    }

    .product-card-mobile .card-image {
        height: 120px !important;
    }

    .product-card-mobile .card-title {
        font-size: 0.8rem !important;
        line-height: 1.2 !important;
    }

    .product-card-mobile .card-price {
        font-size: 1rem !important;
    }

    /* Hero más compacto en móvil */
    .hero-mobile {
        height: 200px !important;
        padding: 1rem !important;
    }

    .hero-mobile h1 {
        font-size: 1.5rem !important;
    }

    /* Navbar más compacta */
    .nav-mobile {
        height: 60px !important;
        padding: 0 0.75rem !important;
    }

    /* Espaciador navbar */
    .nav-spacer-mobile {
        height: 60px !important;
    }
}

/* Tablets */
@media (min-width: 641px) and (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
    }
}

/* Desktop grande */
@media (min-width: 1440px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

/* Mejoras de touch targets */
@media (hover: none) and (pointer: coarse) {

    /* Dispositivos táctiles */
    button,
    a,
    [role="button"] {
        min-height: 44px;
        min-width: 44px;
    }

    /* Botones de cantidad más grandes */
    .quantity-btn {
        width: 48px !important;
        height: 48px !important;
    }
}

/* Modo oscuro específico para elementos que necesitan override */
.dark-mode .announcement-banner {
    background: linear-gradient(to right, rgba(249, 115, 22, 0.1), rgba(239, 68, 68, 0.1));
}

.dark-mode .feature-card {
    background: rgba(15, 23, 42, 0.5);
}

/* Modo claro específico */
:root:not(.dark-mode) .announcement-banner {
    background: linear-gradient(to right, rgba(249, 115, 22, 0.08), rgba(239, 68, 68, 0.08));
    border-color: rgba(249, 115, 22, 0.2);
}

:root:not(.dark-mode) .feature-card {
    background: rgba(241, 245, 249, 0.8);
    border-color: var(--border-color);
}

/* Toast adaptativo al tema */
.toast-themed {
    background-color: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Modal adaptativo */
.modal-themed {
    background-color: var(--bg-modal);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* PANTALLA DE CARGA - MOBILE FIX                                              */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Estilos para la pantalla de carga inicial */
.loading-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.loading-screen h1 {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Fix para letras espaciadas en móviles */
@media (max-width: 480px) {
    .loading-title {
        font-size: 1.25rem !important;
        letter-spacing: 0.1em !important;
        max-width: 90vw;
        word-break: keep-all;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .loading-subtitle {
        font-size: 0.7rem !important;
        letter-spacing: 0.05em !important;
    }
}

@media (min-width: 481px) and (max-width: 640px) {
    .loading-title {
        font-size: 1.5rem !important;
        letter-spacing: 0.15em !important;
    }
}

@media (min-width: 641px) {
    .loading-title {
        font-size: 2rem !important;
        letter-spacing: 0.2em !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* COMPREHENSIVE RESPONSIVE FIX — ALL DEVICES & RESOLUTIONS                   */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* --- EXTRA SMALL PHONES (320px – 374px) --- */
@media (max-width: 374px) {
    html {
        font-size: 13px;
    }

    /* Navbar: prevent logo text from overflowing */
    nav .text-xl,
    nav .text-2xl,
    nav .text-4xl {
        font-size: 1rem !important;
    }

    /* Hero: compact on tiny screens */
    .hero-banner-wrap {
        height: 180px !important;
    }

    .hero-banner-wrap h1 {
        font-size: 1.25rem !important;
    }

    .hero-banner-wrap p {
        font-size: 0.75rem !important;
    }

    /* Product grid: 2 columnas también en móviles muy chicos */
    .product-grid-responsive {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.6rem !important;
    }

    /* Modals: full-width on tiny phones */
    .modal-responsive {
        max-width: 100% !important;
        border-radius: 1.25rem !important;
        margin: 0.5rem !important;
    }

    /* Checkout shipping/payment buttons stack */
    .checkout-options-grid {
        grid-template-columns: 1fr !important;
    }

    /* Reduce large paddings */
    .p-8 {
        padding: 1rem !important;
    }

    .p-12 {
        padding: 1.25rem !important;
    }

    .px-8 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .px-20 {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    /* Cart item image */
    .cart-item-image {
        width: 80px !important;
        height: 80px !important;
    }

    /* Big text taming */
    .text-4xl {
        font-size: 1.5rem !important;
    }

    .text-5xl {
        font-size: 1.5rem !important;
    }

    .text-3xl {
        font-size: 1.25rem !important;
    }

    /* Footer grid single col */
    footer .grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

/* --- SMALL PHONES (375px – 479px) --- */
@media (min-width: 375px) and (max-width: 479px) {
    html {
        font-size: 14px;
    }

    nav .text-xl,
    nav .text-2xl,
    nav .text-4xl {
        font-size: 1.15rem !important;
    }

    /* Compact rounded corners on mobile */
    .rounded-\[3rem\] {
        border-radius: 1.5rem !important;
    }

    .rounded-\[2\.5rem\] {
        border-radius: 1.25rem !important;
    }

    .rounded-\[2rem\] {
        border-radius: 1rem !important;
    }
}

/* --- PHONES GENERAL (up to 640px) — layout & comfort --- */
@media (max-width: 640px) {

    /* Ensure body doesn't scroll horizontally */
    body {
        overflow-x: hidden !important;
    }

    /* Main content: comfortable padding */
    main.flex-grow {
        padding: 0.75rem !important;
    }

    main.flex-grow>.max-w-\[1400px\] {
        padding-left: 0;
        padding-right: 0;
    }

    /* Navbar height & spacing */
    nav.fixed {
        height: 56px !important;
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    /* Navbar spacer */
    .nav-spacer,
    nav+div[class*="h-16"],
    nav~div[class*="h-16"] {
        height: 56px !important;
    }

    /* Hero banner: proportional on phones */
    div[class*="h-[30vh]"] {
        height: 200px !important;
        min-height: 180px;
    }

    div[class*="h-[30vh]"] h1 {
        font-size: 1.4rem !important;
        line-height: 1.1 !important;
    }

    div[class*="h-[30vh]"] p {
        font-size: 0.8rem !important;
    }

    /* Hero CTA buttons: stack and full width */
    div[class*="h-[30vh]"] .flex.items-center.gap-4 {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    div[class*="h-[30vh]"] .flex.items-center.gap-4 button {
        width: 100%;
        font-size: 0.8rem;
        padding: 0.65rem 1rem;
    }

    /* Category filter bar: more compact */
    div[class*="sticky"][class*="top-16"] {
        top: 56px !important;
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    /* Feature cards: horizontal scroll or compact */
    .feature-section-grid {
        gap: 0.75rem !important;
    }

    /* Product detail modal: full-screen on mobile */
    div[class*="max-w-4xl"][class*="flex-col"] {
        max-width: 100% !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    /* Product detail image section */
    div[class*="max-w-4xl"] div[class*="h-72"] {
        height: 250px !important;
    }

    /* Product detail info: compact padding */
    div[class*="max-w-4xl"] div[class*="p-8"] {
        padding: 1.25rem !important;
    }

    /* Quantity selector in product detail: smaller */
    div[class*="max-w-4xl"] .flex.gap-3 button[class*="w-12"] {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }

    /* Cart view: full-width items */
    .cart-item-row {
        flex-direction: column !important;
    }

    /* Cart summary: not sticky on mobile */
    div[class*="sticky"][class*="top-28"] {
        position: relative !important;
        top: auto !important;
    }

    /* Checkout: single column */
    div[class*="grid"][class*="md:grid-cols-5"] {
        grid-template-columns: 1fr !important;
    }

    /* Checkout cards: reduce padding */
    div[class*="rounded-[2.5rem]"][class*="p-8"] {
        padding: 1.25rem !important;
        border-radius: 1.5rem !important;
    }

    /* Payment method buttons: stack on phone */
    .payment-grid-mobile {
        grid-template-columns: 1fr !important;
    }

    /* Profile card: compact on mobile */
    div[class*="rounded-[3rem]"][class*="p-8"] {
        padding: 1.5rem !important;
        border-radius: 1.5rem !important;
    }

    /* Profile: stack layout */
    div[class*="flex-col"][class*="md:flex-row"][class*="items-center"] {
        text-align: center;
    }

    /* Profile user name: smaller on mobile */
    .profile-user-name {
        font-size: 1.75rem !important;
    }

    /* Auth modal: max height to prevent overflow */
    div[class*="max-w-md"][class*="rounded-[3rem]"] {
        max-height: 90dvh;
        overflow-y: auto;
        border-radius: 1.5rem !important;
    }

    /* Footer: single column on mobile */
    footer .grid[class*="md:grid-cols-4"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Footer copyright bar: center align */
    footer div[class*="flex-col"][class*="md:flex-row"] {
        text-align: center;
    }

    /* Promo cards: single column */
    .promo-grid-responsive {
        grid-template-columns: 1fr !important;
    }

    /* Text sizes: comfortable reading on mobile */
    .text-5xl {
        font-size: 1.75rem !important;
    }

    .text-4xl {
        font-size: 1.5rem !important;
    }

    /* Empty state: less padding */
    div[class*="p-16"],
    div[class*="p-20"] {
        padding: 2rem 1.25rem !important;
    }

    /* About & Guide views padding */
    .static-page-padding {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* --- TABLETS (641px – 1024px) --- */
@media (min-width: 641px) and (max-width: 1024px) {

    /* Hero: balanced height */
    div[class*="h-[30vh]"] {
        height: 280px !important;
    }

    /* Product grid: 3 columns */
    .product-grid-responsive {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem !important;
    }

    /* Checkout: 2-col layout (form 3, summary 2) still works */

    /* Cart: keep side-by-side but with tighter spacing */
    .lg\:grid-cols-3 {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Footer: 2 columns */
    footer .grid[class*="md:grid-cols-4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Modals: comfortable max-width */
    div[class*="max-w-4xl"] {
        max-width: 90vw !important;
    }

    /* Profile: balanced padding */
    div[class*="rounded-[3rem]"][class*="md:p-12"] {
        padding: 2rem !important;
    }

    /* Admin sidebar: narrower */
    .admin-sidebar-tablet {
        width: 240px !important;
    }
}

/* --- SMALL LAPTOPS (1025px – 1279px) --- */
@media (min-width: 1025px) and (max-width: 1279px) {
    .product-grid-responsive {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* --- DESKTOPS (1280px – 1919px) --- */
@media (min-width: 1280px) and (max-width: 1919px) {
    .product-grid-responsive {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* --- ULTRA-WIDE & TV (1920px+) --- */
@media (min-width: 1920px) {
    .product-grid-responsive {
        grid-template-columns: repeat(5, 1fr) !important;
    }

    /* Larger hero */
    div[class*="h-[30vh]"] {
        height: 450px !important;
    }

    /* Bigger text for readability */
    .text-tv-hero {
        font-size: 4rem !important;
    }
}

/* --- 4K & VERY LARGE (2560px+) --- */
@media (min-width: 2560px) {
    body {
        font-size: 18px;
    }

    .product-grid-responsive {
        grid-template-columns: repeat(6, 1fr) !important;
    }

    .container-tv,
    .max-w-\[1400px\] {
        max-width: 2200px !important;
    }
}

/* --- LANDSCAPE PHONES (short height, wide) --- */
@media (max-height: 500px) and (orientation: landscape) {

    /* Hero: don't take too much vertical space */
    div[class*="h-[30vh]"] {
        height: 150px !important;
    }

    /* Modals: allow scroll */
    div[class*="fixed"][class*="inset-0"][class*="flex"] {
        align-items: flex-start !important;
        padding-top: 1rem !important;
        overflow-y: auto !important;
    }

    /* Navbar: slimmer */
    nav.fixed {
        height: 48px !important;
    }
}

/* --- UNIVERSAL: Prevent overflow & improve comfort --- */
img {
    max-width: 100%;
    display: block;
}

/* Carousel/hero images must fill their containers edge-to-edge */
.premium-hero img {
    height: 100%;
    max-width: none;
    width: 100%;
    object-fit: cover;
}

/* Light mode premium hero polish */
:root:not(.dark-mode) .premium-hero {
    box-shadow:
        0 16px 48px rgba(15, 23, 42, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

input,
select,
textarea {
    max-width: 100%;
    box-sizing: border-box;
}

.product-preview-frame {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-preview-frame img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* Fix for text overflow in cards */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Smooth container widths */
.max-w-\[1400px\],
.max-w-6xl,
.max-w-5xl,
.max-w-4xl {
    width: 100%;
    box-sizing: border-box;
}

/* Scrollable horizontal category bar on all sizes */
.category-scroll {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.category-scroll>* {
    scroll-snap-align: start;
}

/* Better modal scrolling on all devices */
.modal-scroll-body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* ===== PRODUCTION STOREFRONT PREMIUM LAYER ===== */
.storefront-shell {
    position: relative;
    isolation: isolate;
}

.storefront-shell::before,
.storefront-shell::after {
    content: '';
    position: absolute;
    top: -2rem;
    left: calc(50% - 50vw);
    width: 100vw;
    height: 40rem;
    pointer-events: none;
    z-index: 0;
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
    transition: opacity 0.5s ease;
}

.storefront-shell::before {
    background:
        linear-gradient(90deg,
            rgba(249, 115, 22, 0.34) 0%,
            rgba(249, 115, 22, 0.20) 14%,
            rgba(160, 93, 42, 0.14) 28%,
            rgba(56, 46, 64, 0.15) 50%,
            rgba(53, 78, 146, 0.14) 72%,
            rgba(37, 99, 235, 0.20) 86%,
            rgba(37, 99, 235, 0.34) 100%),
        radial-gradient(62% 64% at 6% 10%, rgba(249, 115, 22, 0.24), transparent 72%),
        radial-gradient(60% 62% at 94% 10%, rgba(37, 99, 235, 0.24), transparent 74%);
}

.storefront-shell::after {
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
}

.storefront-shell>* {
    position: relative;
    z-index: 1;
}

.dark-mode .storefront-shell::before,
.dark-mode .storefront-shell::after {
    height: 44rem;
}

.dark-mode .storefront-shell::before {
    background:
        linear-gradient(90deg,
            rgba(249, 115, 22, 0.42) 0%,
            rgba(249, 115, 22, 0.26) 14%,
            rgba(168, 95, 42, 0.18) 28%,
            rgba(66, 52, 86, 0.20) 50%,
            rgba(59, 86, 162, 0.18) 72%,
            rgba(37, 99, 235, 0.26) 86%,
            rgba(37, 99, 235, 0.42) 100%),
        radial-gradient(62% 64% at 6% 10%, rgba(249, 115, 22, 0.30), transparent 72%),
        radial-gradient(60% 62% at 94% 10%, rgba(37, 99, 235, 0.28), transparent 74%);
}

:root:not(.dark-mode) .storefront-shell::before {
    background:
        linear-gradient(90deg,
            rgba(249, 115, 22, 0.25) 0%,
            rgba(249, 115, 22, 0.15) 14%,
            rgba(166, 103, 67, 0.11) 28%,
            rgba(102, 104, 136, 0.12) 50%,
            rgba(83, 114, 179, 0.11) 72%,
            rgba(37, 99, 235, 0.15) 86%,
            rgba(37, 99, 235, 0.25) 100%),
        radial-gradient(60% 62% at 6% 11%, rgba(249, 115, 22, 0.18), transparent 72%),
        radial-gradient(58% 60% at 94% 10%, rgba(37, 99, 235, 0.16), transparent 74%);
}

/* --- Premium Navbar --- */
.premium-nav {
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.03),
        0 10px 32px rgba(2, 6, 23, 0.06);
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.dark-mode .premium-nav {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.03),
        0 12px 36px rgba(0, 0, 0, 0.5);
}

.premium-nav-search {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: all 0.25s ease;
}

.premium-nav-search:focus-within {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 0 3px rgba(249, 115, 22, 0.15);
}

/* --- Premium Announcement Banner --- */
.premium-announcement {
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.08);
    position: relative;
    overflow: hidden;
}

.premium-announcement::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent,
            rgba(249, 115, 22, 0.06) 25%,
            rgba(249, 115, 22, 0.12) 50%,
            rgba(249, 115, 22, 0.06) 75%,
            transparent);
    animation: announcement-shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes announcement-shimmer {

    0%,
    100% {
        transform: translateX(-100%);
        opacity: 0;
    }

    50% {
        transform: translateX(100%);
        opacity: 1;
    }
}

:root:not(.dark-mode) .premium-announcement {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.06), rgba(239, 68, 68, 0.04), rgba(168, 85, 247, 0.03)) !important;
    border-color: rgba(249, 115, 22, 0.15) !important;
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.06);
}

/* --- Premium Brand Ticker --- */
.premium-brand-ticker {
    border-radius: 0.85rem;
    position: relative;
    overflow: hidden;
}

:root:not(.dark-mode) .premium-brand-ticker {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.7)) !important;
    border-color: rgba(226, 232, 240, 0.6) !important;
}

/* --- Premium Hero --- */
.premium-hero {
    box-shadow:
        0 20px 60px rgba(2, 6, 23, 0.25),
        0 1px 0 rgba(255, 255, 255, 0.05) inset;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s ease;
    position: relative;
}

.premium-hero:hover {
    box-shadow:
        0 24px 70px rgba(2, 6, 23, 0.32),
        0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.premium-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(100deg, rgba(15, 23, 42, 0.52) 0%, rgba(15, 23, 42, 0.2) 48%, rgba(15, 23, 42, 0.06) 100%);
    z-index: 3;
}

:root:not(.dark-mode) .premium-hero {
    box-shadow:
        0 20px 60px rgba(15, 23, 42, 0.10),
        0 4px 16px rgba(15, 23, 42, 0.04),
        0 1px 0 rgba(255, 255, 255, 0.9) inset !important;
}

:root:not(.dark-mode) .premium-hero:hover {
    box-shadow:
        0 24px 70px rgba(15, 23, 42, 0.14),
        0 6px 20px rgba(15, 23, 42, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.9) inset !important;
}

.premium-hero-content h1 {
    letter-spacing: -0.035em;
}

.premium-hero-content {
    display: inline-flex;
    flex-direction: column;
    width: fit-content;
    max-width: min(100%, 42rem);
    padding: clamp(0.6rem, 2vw, 1.1rem) clamp(0.7rem, 2.2vw, 1.35rem);
    border-radius: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(120deg, rgba(2, 6, 23, 0.6), rgba(2, 6, 23, 0.3));
    box-shadow: 0 14px 36px rgba(2, 6, 23, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

:root:not(.dark-mode) .premium-hero::after {
    background: linear-gradient(100deg, rgba(2, 6, 23, 0.4) 0%, rgba(2, 6, 23, 0.14) 48%, rgba(2, 6, 23, 0.03) 100%);
}

:root:not(.dark-mode) .premium-hero-content {
    border-color: rgba(255, 255, 255, 0.62);
    background: linear-gradient(120deg, rgba(15, 23, 42, 0.52), rgba(15, 23, 42, 0.18));
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.premium-carousel-controls {
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.35);
    transform: translateZ(0);
}

.premium-carousel-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-carousel-dot:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.65), 0 0 0 5px rgba(249, 115, 22, 0.45);
}

.premium-carousel-dot.is-active {
    width: 1.65rem;
    box-shadow: 0 0 14px rgba(249, 115, 22, 0.5);
}

:root:not(.dark-mode) .premium-carousel-controls {
    border-color: rgba(148, 163, 184, 0.25);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

@media (prefers-reduced-motion: reduce) {
    .hero-title-neon,
    .hero-title-neon-gradient {
        animation: none;
    }
}

.premium-hero-ctas button {
    min-height: 46px;
    letter-spacing: -0.01em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-hero-ctas button:hover {
    transform: translateY(-1px);
}

.premium-hero-proof span {
    backdrop-filter: blur(8px);
}

/* --- Premium Feature Cards (Why Choose Us) --- */
.premium-benefits .premium-feature-card {
    box-shadow: 0 6px 24px rgba(2, 6, 23, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.premium-benefits .premium-feature-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-benefits .premium-feature-card:hover::after {
    width: 60%;
}

.premium-benefits .premium-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.10);
}

.dark-mode .premium-benefits .premium-feature-card {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.dark-mode .premium-benefits .premium-feature-card:hover {
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}

.premium-catalog-intro {
    align-items: flex-end;
    position: relative;
    padding-bottom: 1rem;
}

.premium-catalog-intro::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--primary), transparent 50%);
    opacity: 0.2;
}

/* --- Premium Category Bar --- */
.premium-category-bar {
    box-shadow: 0 8px 24px rgba(2, 6, 23, 0.05);
    transition: box-shadow 0.3s ease;
}

#catalog.premium-category-bar {
    position: sticky;
    z-index: 70 !important;
    isolation: isolate;
}

:root:not(.dark-mode) .premium-category-bar {
    background: rgba(255, 255, 255, 0.92) !important;
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.03),
        0 8px 24px rgba(2, 6, 23, 0.04);
}

.dark-mode .premium-category-bar {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.02),
        0 8px 24px rgba(0, 0, 0, 0.35);
}

.premium-category-bar button {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.premium-category-bar button:active {
    transform: scale(0.96);
}

/* --- Premium Promo Cards --- */
.premium-promos-section .premium-promo-card {
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
}

.premium-promos-section .premium-promo-card:hover {
    transform: translateY(-6px);
}

:root:not(.dark-mode) .premium-promos-section .premium-promo-card:hover {
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

/* --- Premium Empty State --- */
.premium-empty-state {
    box-shadow: 0 14px 32px rgba(2, 6, 23, 0.06);
    transition: box-shadow 0.3s ease;
}

.dark-mode .premium-empty-state {
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}

/* --- Premium Product Cards --- */
.premium-product-card {
    transform: translateY(0);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.35s ease,
        box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-product-card:hover {
    transform: translateY(-5px);
}

:root:not(.dark-mode) .premium-product-card {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

:root:not(.dark-mode) .premium-product-card:hover {
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.10);
    border-color: rgba(249, 115, 22, 0.15) !important;
}

.premium-product-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    filter: saturate(1.03) contrast(1.03);
}

.quick-add-container {
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    width: fit-content;
    max-width: 100%;
}

.quick-add-qty {
    flex-shrink: 0;
    padding: 0.2rem !important;
    border-radius: 0.9rem !important;
}

.quick-add-qty button {
    width: 1.9rem;
    height: 1.9rem;
    min-width: 1.9rem;
    min-height: 1.9rem;
    flex: 0 0 auto;
    border-radius: 0.72rem;
}

.quick-add-qty span {
    width: 2.05rem;
    font-size: 0.78rem;
}

.quick-add-action {
    min-width: 5.85rem;
    height: 2.2rem;
    white-space: nowrap;
    border-radius: 0.9rem !important;
    padding: 0 0.8rem !important;
}

.product-grid-responsive .premium-product-card {
    align-self: start;
    max-width: 100%;
}

@media (max-width: 640px) {
    .storefront-shell::before {
        top: -1rem;
        height: 22rem;
    }

    .premium-announcement p {
        letter-spacing: 0.12em;
    }

    .premium-hero-ctas {
        gap: 0.65rem !important;
        flex-direction: row;
        /* allow side-by-side on mobile */
    }

    .premium-hero-ctas button {
        min-height: 48px !important;
    }

    .premium-hero-proof {
        gap: 0.4rem;
    }

    .premium-catalog-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .premium-product-card:hover {
        transform: none;
    }

    .quick-add-container {
        gap: 0.32rem;
    }

    .quick-add-qty {
        padding: 0.16rem !important;
    }

    .quick-add-qty button {
        width: 1.62rem;
        height: 1.62rem;
        min-width: 1.62rem;
        min-height: 1.62rem;
    }

    .quick-add-qty span {
        width: 1.7rem;
        font-size: 0.69rem;
    }

    .quick-add-action {
        min-width: 5.2rem;
        height: 1.95rem;
        padding: 0 0.58rem !important;
        font-size: 0.62rem !important;
        letter-spacing: 0.06em;
    }
}

/* ===== MOBILE COMFORT LAYER ===== */
@media (max-width: 374px) {
    html {
        font-size: 14px !important;
    }
}

@media (min-width: 375px) and (max-width: 640px) {
    html {
        font-size: 15px !important;
    }
}

@media (max-width: 640px) {
    body {
        line-height: 1.45;
        -webkit-text-size-adjust: 100%;
    }

    nav.fixed {
        height: 60px !important;
        padding-left: 0.9rem !important;
        padding-right: 0.9rem !important;
    }

    .nav-spacer,
    nav+div[class*="h-16"],
    nav~div[class*="h-16"] {
        height: 60px !important;
    }

    main.flex-grow {
        padding: 1rem !important;
    }

    main.flex-grow>.max-w-\[1400px\] {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .store-brand-title {
        max-width: none;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        overflow-wrap: anywhere;
        font-size: clamp(0.9rem, 3.4vw, 1.08rem) !important;
        line-height: 1.05 !important;
    }

    .premium-announcement {
        padding: 0.75rem !important;
        margin-bottom: 1rem !important;
        border-radius: 1rem !important;
    }

    .premium-announcement p {
        font-size: 0.72rem !important;
        letter-spacing: 0.11em !important;
        gap: 0.35rem !important;
        line-height: 1.3 !important;
    }

    .premium-brand-ticker {
        margin-bottom: 1rem !important;
    }

    .premium-hero {
        border-radius: 1.25rem !important;
        margin-bottom: 1rem !important;
    }

    .premium-hero-content h1 {
        font-size: clamp(1.55rem, 6.6vw, 2.05rem) !important;
        line-height: 1.02 !important;
        margin-bottom: 0.65rem !important;
    }

    .premium-hero-content {
        border-radius: 0.95rem;
        padding: 0.62rem 0.68rem;
        max-width: min(100%, 30rem);
    }

    .premium-hero-content p {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }

    .premium-hero-ctas {
        gap: 0.65rem !important;
    }

    .premium-hero-ctas button {
        min-height: 44px !important;
        font-size: 0.85rem !important;
        border-radius: 0.75rem !important;
    }

    .premium-benefits {
        gap: 0.9rem !important;
        margin-bottom: 1.25rem !important;
    }

    .premium-feature-card {
        padding: 0.9rem !important;
        border-radius: 1.1rem !important;
    }

    .premium-feature-card p {
        font-size: 0.78rem !important;
        line-height: 1.4 !important;
    }

    #catalog.premium-category-bar {
        top: calc(60px + env(safe-area-inset-top)) !important;
        padding-top: 0.7rem !important;
        padding-bottom: 0.7rem !important;
        margin-bottom: 1.15rem !important;
    }

    #catalog .category-scroll {
        gap: 0.5rem !important;
        padding-bottom: 0 !important;
    }

    #catalog .category-scroll button {
        min-height: 40px !important;
        padding: 0.5rem 0.85rem !important;
        font-size: 0.72rem !important;
        border-radius: 0.85rem !important;
    }

    .product-grid-responsive {
        gap: 0.65rem !important;
        padding-bottom: 7rem !important;
    }

    .premium-product-card {
        border-radius: 1.15rem !important;
    }

    .premium-product-card .premium-product-image {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        aspect-ratio: 1 / 1 !important;
        height: auto !important;
        border-radius: 1.15rem !important;
    }

    .premium-product-card .premium-product-image img {
        border-radius: 1.15rem !important;
    }

    .premium-product-card .text-\[9px\],
    .premium-product-card .text-\[10px\] {
        font-size: 0.68rem !important;
    }

    .premium-product-card h3 {
        font-size: 0.88rem !important;
        line-height: 1.2 !important;
        min-height: 0 !important;
        margin-bottom: 0.45rem !important;
    }

    .premium-product-card .text-lg {
        font-size: 1.06rem !important;
    }

    .grid.lg\:grid-cols-3,
    .grid.md\:grid-cols-5 {
        gap: 1rem !important;
    }

    .profile-user-name {
        font-size: 1.95rem !important;
    }

    div[class*="p-16"],
    div[class*="p-20"] {
        padding: 2.25rem 1.25rem !important;
    }

    .cart-item-row {
        gap: 0.9rem !important;
    }

    .cart-item-image {
        width: 92px !important;
        height: 92px !important;
    }

    .store-view .premium-product-card h3 {
        font-size: 0.9rem !important;
        line-height: 1.2 !important;
    }

    .store-view .premium-product-card .text-lg {
        font-size: 1.08rem !important;
    }

    .store-view .premium-product-card .text-\[10px\],
    .store-view .premium-product-card .text-xs {
        font-size: 0.72rem !important;
    }

    .store-view .product-card-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.45rem !important;
    }

    .store-view .product-card-action {
        width: 100%;
    }

    .store-view .product-card-action .quick-add-container {
        width: 100%;
        justify-content: stretch;
        flex-direction: column;
        align-items: stretch;
        gap: 0.3rem !important;
    }

    .store-view .product-card-action .quick-add-qty {
        width: 100%;
        justify-content: space-between;
    }

    .store-view .product-card-action .quick-add-qty span {
        width: auto !important;
        flex: 1 1 auto;
    }

    .store-view .product-card-action .quick-add-action {
        width: 100%;
        min-width: 0 !important;
        letter-spacing: 0.03em !important;
    }

    .store-view .product-card-price .product-card-final-price {
        font-size: 1.2rem !important;
        line-height: 1.05;
    }

    .store-view .product-offer-badge {
        left: 0.45rem !important;
        top: 0.45rem !important;
    }

    .store-view .product-offer-badge-inner {
        padding: 0.38rem 0.48rem !important;
        border-radius: 0.72rem !important;
    }

    .cart-view .cart-item-row {
        padding: 1rem !important;
        border-radius: 1rem !important;
    }

    .cart-view .cart-item-title {
        font-size: 1.03rem !important;
        line-height: 1.3 !important;
    }

    .cart-view .cart-item-unit-price {
        font-size: 1rem !important;
        margin-bottom: 0.85rem !important;
    }

    .cart-view .cart-qty-wrap {
        padding: 0.3rem !important;
        gap: 0.35rem !important;
    }

    .cart-view .cart-qty-wrap button {
        width: 2.35rem !important;
        height: 2.35rem !important;
    }

    .cart-view .cart-summary-card {
        padding: 1.2rem !important;
        border-radius: 1.15rem !important;
    }

    .cart-view .cart-summary-card .text-4xl {
        font-size: 2.05rem !important;
    }

    .cart-view .cart-summary-card button {
        min-height: 50px !important;
        font-size: 1rem !important;
    }

    .checkout-view .checkout-card {
        padding: 1.1rem !important;
        border-radius: 1.15rem !important;
    }

    .checkout-view .checkout-card h2 {
        font-size: 1.12rem !important;
        margin-bottom: 0.95rem !important;
    }

    .checkout-view .checkout-options-grid {
        grid-template-columns: 1fr !important;
        gap: 0.7rem !important;
        margin-bottom: 0.9rem !important;
    }

    .checkout-view .checkout-options-grid button {
        min-height: 74px !important;
        padding: 0.9rem 0.8rem !important;
        border-radius: 0.95rem !important;
    }

    .checkout-view .checkout-payment-grid {
        gap: 0.75rem !important;
    }

    .checkout-view .checkout-payment-grid button {
        min-height: 74px !important;
        padding: 0.95rem 0.8rem !important;
        border-radius: 0.95rem !important;
    }

    .checkout-view .checkout-summary-card {
        position: relative !important;
        top: auto !important;
        padding: 1.2rem !important;
        border-radius: 1.15rem !important;
    }

    .checkout-view .checkout-summary-card .text-3xl {
        font-size: 1.9rem !important;
    }

    .checkout-view .grid.grid-cols-2.gap-5 {
        grid-template-columns: 1fr !important;
        gap: 0.8rem !important;
    }

    .checkout-view input,
    .checkout-view select,
    .checkout-view textarea {
        font-size: 16px !important;
    }

    div[class*="max-w-4xl"][class*="flex-col"] {
        border-radius: 1.25rem 1.25rem 0 0 !important;
    }

    div[class*="max-w-md"][class*="rounded-[3rem]"] {
        border-radius: 1.25rem !important;
    }
}

@media (max-width: 339px) {
    .product-grid-responsive {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .store-view .premium-product-card .premium-product-image {
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
    }
}

@media (min-width: 340px) and (max-width: 640px) {
    .product-grid-responsive {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* ===== NAVBAR RESPONSIVE SYSTEM ===== */
.store-nav {
    gap: clamp(0.25rem, 0.8vw, 0.9rem);
}

.store-nav-left {
    min-width: 0;
}

.store-nav-brand {
    min-width: 0;
    max-width: 100%;
}

.store-nav-logo {
    flex: 0 0 auto;
    aspect-ratio: 1 / 1;
}

.store-nav-logo img,
.store-nav-logo .store-nav-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 9999px;
    display: block;
}

.store-nav-actions {
    align-items: center;
}

.store-nav-icon-btn {
    line-height: 1;
    flex-shrink: 0;
}

.store-nav-login-btn,
.store-nav-profile-btn {
    min-height: 2.75rem !important;
}

@media (max-width: 640px) {
    .store-nav {
        height: 60px !important;
        padding-left: max(0.6rem, env(safe-area-inset-left)) !important;
        padding-right: max(0.6rem, env(safe-area-inset-right)) !important;
        gap: 0.4rem !important;
    }

    .store-nav-spacer {
        height: 60px !important;
    }

    .store-nav-left {
        flex: 1 1 auto !important;
        min-width: 0;
        gap: 0.45rem !important;
        padding-right: 0.3rem !important;
    }

    .store-nav-brand {
        gap: 0.45rem !important;
        flex: 1 1 auto !important;
    }

    .store-nav-brand-text {
        min-width: 0;
        flex: 1 1 auto;
    }

    .store-nav-logo {
        width: 1.9rem !important;
        height: 1.9rem !important;
    }

    .store-nav .store-brand-title {
        max-width: none !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        overflow-wrap: normal !important;
        word-break: keep-all !important;
        font-size: clamp(0.78rem, 2.95vw, 0.98rem) !important;
        line-height: 1.02 !important;
    }

    .store-nav-actions {
        gap: 0.3rem !important;
    }

    .store-nav-icon-btn,
    .store-nav-login-btn,
    .store-nav-profile-btn {
        height: 2.7rem !important;
        min-height: 2.7rem !important;
        min-width: 2.7rem !important;
        border-radius: 0.75rem !important;
    }

    .store-nav-login-label {
        display: none;
    }

    .store-nav-login-btn {
        width: 2.7rem !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        letter-spacing: 0.01em;
    }

    .store-nav-profile-btn {
        padding-left: 0.25rem !important;
        padding-right: 0.42rem !important;
    }
}

@media (max-width: 480px) {
    .store-nav .store-brand-title {
        font-size: clamp(0.74rem, 3.1vw, 0.9rem) !important;
    }
}

@media (max-width: 412px) {
    .store-nav .store-brand-title {
        font-size: 0.78rem !important;
    }

    .store-nav-logo {
        width: 1.8rem !important;
        height: 1.8rem !important;
    }
}

@media (max-width: 359px) {
    .store-nav {
        height: 56px !important;
        padding-left: max(0.5rem, env(safe-area-inset-left)) !important;
        padding-right: max(0.5rem, env(safe-area-inset-right)) !important;
    }

    .store-nav-spacer {
        height: 56px !important;
    }

    .store-nav-icon-btn,
    .store-nav-login-btn,
    .store-nav-profile-btn {
        height: 2.55rem !important;
        min-height: 2.55rem !important;
        min-width: 2.55rem !important;
    }

    .store-nav .store-brand-title {
        font-size: 0.72rem !important;
        line-height: 1 !important;
    }

    .store-nav-logo {
        width: 1.65rem !important;
        height: 1.65rem !important;
    }
}

@media (max-height: 500px) and (orientation: landscape) and (max-width: 960px) {
    .store-nav {
        height: 50px !important;
    }

    .store-nav-spacer {
        height: 50px !important;
    }

    .store-nav-login-label {
        display: none;
    }
}

@media (min-width: 1024px) {
    .store-nav {
        gap: 0.85rem;
    }

    .store-nav-left {
        flex: 0 1 auto;
    }

    .store-nav-search-shell {
        min-width: 340px;
    }

    .store-nav-actions {
        padding-left: 0.35rem;
    }
}

@media (min-width: 1440px) {
    .store-nav-search-shell {
        margin-left: 2.6rem !important;
        margin-right: 2.6rem !important;
    }
}

/* ===== STOREFRONT CARD + FAB LAYOUT STABILITY PATCH ===== */
.product-grid-responsive {
    display: grid;
    align-items: stretch;
}

.product-grid-responsive .premium-product-card {
    height: 100%;
    align-self: stretch !important;
}

@media (max-width: 479px) {
    .product-grid-responsive {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 480px) and (max-width: 1024px) {
    .product-grid-responsive {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1025px) and (max-width: 1439px) {
    .product-grid-responsive {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1440px) {
    .product-grid-responsive {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

.store-view .product-card-footer {
    align-items: stretch;
}

.store-view .premium-product-card h3 {
    min-height: 2.15rem !important;
}

@media (min-width: 640px) {
    .store-view .premium-product-card h3 {
        min-height: 2.9rem !important;
    }
}

.store-view .product-card-price {
    min-height: 4.15rem;
}

@media (min-width: 640px) {
    .store-view .product-card-price {
        min-height: 4.65rem;
    }
}

.store-view .product-card-action {
    width: 100%;
    min-width: 0;
}

.store-view .product-card-action .quick-add-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.45rem !important;
}

.store-view .product-card-action .quick-add-qty {
    width: auto;
    min-width: 0;
    flex: 0 0 44%;
    justify-content: space-between;
    overflow: visible;
}

.store-view .product-card-action .quick-add-qty span {
    width: auto !important;
    flex: 1 1 auto;
}

.store-view .product-card-action .quick-add-action {
    width: auto;
    flex: 1 1 56%;
    min-width: 0 !important;
    max-width: 100%;
    padding-left: 0.58rem !important;
    padding-right: 0.58rem !important;
    letter-spacing: 0.015em !important;
    overflow: visible;
}

.store-view .product-card-action .quick-add-action span {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .store-view .product-card-action .quick-add-container {
        gap: 0.32rem !important;
    }
}

.store-view.store-view-fab-safe {
    --fab-safe-right: max(0px, env(safe-area-inset-right));
    --fab-safe-bottom: max(0px, env(safe-area-inset-bottom));
}

.store-view.store-view-fab-safe.store-view-fab-single .product-grid-responsive {
    padding-right: 0 !important;
    padding-bottom: calc(9rem + var(--fab-safe-bottom)) !important;
}

.store-view.store-view-fab-safe.store-view-fab-dual .product-grid-responsive {
    padding-right: 0 !important;
    padding-bottom: calc(12rem + var(--fab-safe-bottom)) !important;
}

@media (max-width: 640px) {
    .store-view.store-view-fab-safe.store-view-fab-single .product-grid-responsive {
        padding-right: 0 !important;
    }

    .store-view.store-view-fab-safe.store-view-fab-dual .product-grid-responsive {
        padding-right: 0 !important;
        padding-bottom: calc(12.5rem + var(--fab-safe-bottom)) !important;
    }
}

/* Keep IA launcher visually separated when WhatsApp FAB is also visible. */
@media (min-width: 640px) {
    .store-sustia-root.store-sustia-root-with-wa {
        bottom: calc(6.75rem + env(safe-area-inset-bottom)) !important;
    }

    .store-sustia-root.store-sustia-root-with-wa .store-sustia-launcher-fab {
        margin-bottom: 0;
    }
}

@media (max-width: 639px) {
    .store-sustia-root.store-sustia-root-with-wa {
        bottom: calc(1rem + env(safe-area-inset-bottom)) !important;
    }

    .store-sustia-root.store-sustia-root-with-wa .store-sustia-launcher-fab {
        margin-bottom: 0;
    }
}

@media (min-width: 768px) {
    .admin-shell {
        height: 100dvh;
        overflow: hidden;
    }

    .admin-shell .admin-sidebar {
        position: sticky;
        top: 0;
    }
}

@media (min-width: 768px) {
    .store-sustia-root.store-sustia-root-checkout {
        left: 1rem !important;
        right: auto !important;
        align-items: flex-start !important;
    }
}

/* ===== MOBILE STOREFRONT SOURCE OF TRUTH ===== */
@media (max-width: 640px) {
    .store-view .product-grid-responsive {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.65rem !important;
    }

    .store-view .store-product-card {
        border-radius: 1.1rem !important;
    }

    .store-view .store-product-image-shell {
        width: 100% !important;
        margin: 0.36rem !important;
        padding: 0.2rem !important;
        height: 9.6rem !important;
    }

    .store-view .product-card-info {
        padding: 0.58rem !important;
    }

    .store-view .product-card-category-chip {
        font-size: 0.6rem !important;
        padding: 0.14rem 0.35rem !important;
        letter-spacing: 0.06em !important;
    }

    .store-view .product-card-title {
        font-size: 0.82rem !important;
        line-height: 1.2 !important;
        min-height: 1.7rem !important;
        margin-bottom: 0.24rem !important;
    }

    .store-view .product-card-stock-alert,
    .store-view .product-card-base-price,
    .store-view .product-card-savings-badge {
        display: none !important;
    }

    .store-view .product-card-price .product-card-final-price {
        font-size: 1.12rem !important;
        line-height: 1.05 !important;
    }

    .store-view .product-card-price {
        min-height: 3.15rem !important;
    }

    .store-view .product-card-action .quick-add-container {
        gap: 0.32rem !important;
    }

    .store-view .product-card-action .quick-add-qty {
        flex-basis: 42%;
        min-height: 2rem !important;
        padding: 0.14rem !important;
    }

    .store-view .product-card-action .quick-add-qty button {
        width: 1.62rem !important;
        height: 1.62rem !important;
    }

    .store-view .product-card-action .quick-add-qty span {
        font-size: 0.7rem !important;
    }

    .store-view .product-card-action .quick-add-action {
        flex-basis: 58%;
        min-height: 2rem !important;
        height: 2rem !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        font-size: 0.72rem !important;
        letter-spacing: 0.01em !important;
    }

    .store-view .product-card-action .quick-add-action svg {
        display: none !important;
    }

    .store-view .product-card-icon-btn {
        width: 2.25rem !important;
        height: 2.25rem !important;
        min-width: 2.25rem !important;
        min-height: 2.25rem !important;
        padding: 0 !important;
        border-radius: 9999px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .store-view .product-card-icon-btn svg {
        width: 1rem !important;
        height: 1rem !important;
    }

    .store-view .product-card-zoom-btn {
        bottom: 0.38rem !important;
        right: 0.38rem !important;
    }

    .store-view .product-card-favorite-btn {
        top: 0.38rem !important;
        right: 0.38rem !important;
    }

    .store-nav .store-nav-logo {
        flex: 0 0 auto !important;
        aspect-ratio: 1 / 1 !important;
    }

    .store-nav .store-nav-logo img,
    .store-nav .store-nav-logo .store-nav-logo-image {
        object-fit: contain !important;
        border-radius: 9999px !important;
    }

    .store-view.store-view-fab-safe.store-view-fab-single .product-grid-responsive {
        padding-right: 0 !important;
        padding-bottom: calc(9.8rem + var(--fab-safe-bottom)) !important;
    }

    .store-view.store-view-fab-safe.store-view-fab-dual .product-grid-responsive {
        padding-right: 0 !important;
        padding-bottom: calc(12.25rem + var(--fab-safe-bottom)) !important;
    }
}

/* Mobile storefront hotfix (category overlap + quick add truncation) */
@media (max-width: 640px) {
    #catalog.premium-category-bar {
        position: relative !important;
        top: 0 !important;
        z-index: 24 !important;
        margin-bottom: 1.2rem !important;
    }

    .store-view .product-card-action .quick-add-container {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 0.28rem !important;
    }

    .store-view .product-card-action .quick-add-qty {
        width: auto !important;
        flex: 0 0 46% !important;
    }

    .store-view .product-card-action .quick-add-action {
        width: auto !important;
        flex: 1 1 54% !important;
        min-width: 0 !important;
        overflow: visible !important;
        padding-left: 0.45rem !important;
        padding-right: 0.45rem !important;
        letter-spacing: 0.005em !important;
    }

    .store-view .product-card-action .quick-add-action .quick-add-label {
        display: inline-block;
        white-space: nowrap;
        overflow: visible;
        text-overflow: clip;
        line-height: 1;
        font-size: 0.73rem;
    }

    .store-view .product-card-action .quick-add-action .quick-add-icon {
        display: none !important;
    }
}

/* Desktop storefront card re-balance */
@media (min-width: 1025px) and (max-width: 1439px) {
    .store-view .product-grid-responsive {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 1.1rem !important;
    }
}

@media (min-width: 1440px) {
    .store-view .product-grid-responsive {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 1.2rem !important;
    }
}

@media (min-width: 1025px) {
    .store-view .product-grid-responsive .store-product-card {
        width: 100%;
        max-width: 26rem;
        justify-self: center;
    }

    .store-view .product-card-title {
        white-space: normal !important;
        word-break: keep-all !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
        line-height: 1.28 !important;
        min-height: 2.8rem !important;
        text-wrap: pretty;
        font-size: clamp(1.02rem, 1.1vw, 1.16rem) !important;
    }

    .store-view .store-product-image-shell {
        width: 100% !important;
        margin: 0.6rem !important;
        padding: 0.28rem !important;
        height: 16.8rem !important;
    }

    .store-view .product-card-price .product-card-final-price {
        font-size: clamp(1.72rem, 1.75vw, 2rem) !important;
    }
}

.store-view .product-image-adaptive-frame {
    width: 100% !important;
    height: 100% !important;
    padding: 0.3rem !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.store-view .product-image-adaptive-frame img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
}

.store-view .product-card-footer {
    gap: 0.58rem !important;
    padding-top: 0.58rem !important;
}

.store-view .store-product-card:hover .product-image-adaptive-frame {
    border-color: rgba(249, 115, 22, 0.45);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.16);
}

.dark-mode .store-view .store-product-card:hover .product-image-adaptive-frame {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

/* ═══════════════════════════════════════════════════════════════════════════ */
/* ULTRA PREMIUM HERO UPGRADE (CLEAN VERSION)                                  */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* Clean Border Gradient */
.hero-animated-border {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-animated-border::before {
    content: none;
}

/* Refined Glass Effect (Cleaner) */
.glass-ultra {
    background: rgba(20, 20, 25, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.dark-mode .glass-ultra {
    background: rgba(5, 5, 10, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

:root:not(.dark-mode) .glass-ultra {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Text Enhancements - Solid Gradient */
.text-gradient-premium {
    background: linear-gradient(to right, #f97316, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 100% auto;
}

/* Floating Elements */
.floating-badge {
    animation: float-badge 3s ease-in-out infinite;
}

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

/* Button Shine Effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(45deg);
    transition: all 0.5s;
    animation: shine-sweep 3s infinite;
}

@keyframes shine-sweep {
    0% { transform: translateX(-100%) rotate(45deg); }
    20% { transform: translateX(100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* ------- */
/* ANIMACIONES PROFESIONALES REVISADAS (V2)                                    */
/* -------- */

/* 1. Keyframes Base y Cinematograficos */

@keyframes fadeInUpCinema {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes slideInRightCinema {
    0% {
        opacity: 0;
        transform: translateX(40px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

@keyframes softPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
    50% { box-shadow: 0 0 0 8px rgba(249, 115, 22, 0.1); }
}

@keyframes shineSweep {
    0% { transform: translateX(-100%) skewX(-15deg); }
    100% { transform: translateX(200%) skewX(-15deg); }
}

/* 2. Hero Section Cinematografica */

.premium-hero {
    overflow: hidden; /* Necesario para Ken Burns */
    position: relative;
    /* Entrada suave del contenedor */
    animation: scaleInSmooth 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-hero img {
    /* Efecto Ken Burns continuo */
    animation: kenBurns 20s ease-out infinite alternate;
    will-change: transform;
}

.premium-hero-content {
    /* Entrada del panel de contenido */
    animation: slideInRightCinema 1s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.3s;
    /* Glassmorphism reforzado */
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
}

.premium-hero-content h1 {
    animation: fadeInUpCinema 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: 0.5s;
}

.premium-hero-content p {
    animation: fadeInUpCinema 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: 0.6s;
}

.premium-hero-ctas {
    animation: fadeInUpCinema 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: 0.7s;
}

/* 3. Productos: Entrada en Cascada Elegante */

.product-grid-responsive .premium-product-card {
    /* Animación de entrada más suave y pesada (calidad premium) */
    /* Usamos 'both' para que aplique el estado inicial (0%) antes de empezar y el final (100%) al terminar */
    animation: fadeInUpCinema 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Stagger delay optimizado */
.product-grid-responsive .premium-product-card:nth-child(1) { animation-delay: 0.1s; }
.product-grid-responsive .premium-product-card:nth-child(2) { animation-delay: 0.15s; }
.product-grid-responsive .premium-product-card:nth-child(3) { animation-delay: 0.2s; }
.product-grid-responsive .premium-product-card:nth-child(4) { animation-delay: 0.25s; }
.product-grid-responsive .premium-product-card:nth-child(5) { animation-delay: 0.3s; }
.product-grid-responsive .premium-product-card:nth-child(6) { animation-delay: 0.35s; }
.product-grid-responsive .premium-product-card:nth-child(7) { animation-delay: 0.4s; }
.product-grid-responsive .premium-product-card:nth-child(8) { animation-delay: 0.45s; }
.product-grid-responsive .premium-product-card:nth-child(9) { animation-delay: 0.5s; }
.product-grid-responsive .premium-product-card:nth-child(10) { animation-delay: 0.55s; }
.product-grid-responsive .premium-product-card:nth-child(11) { animation-delay: 0.6s; }
.product-grid-responsive .premium-product-card:nth-child(12) { animation-delay: 0.65s; }

/* 4. Interaccion de Producto (Hover Premium) */

.premium-product-card {
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.premium-product-card:hover {
    transform: translateY(-8px) scale(1.01);
}

:root:not(.dark-mode) .premium-product-card:hover {
    box-shadow: 
        0 20px 40px -5px rgba(15, 23, 42, 0.15), 
        0 10px 15px -3px rgba(15, 23, 42, 0.05);
    border-color: rgba(249, 115, 22, 0.3) !important;
}

.premium-product-card .premium-product-image img {
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.premium-product-card:hover .premium-product-image img {
    transform: scale(1.08);
}

/* Boton de accion rapida */
.quick-add-action {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.quick-add-action::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.4), transparent);
    transform: translateX(-150%) skewX(-20deg);
}

.premium-product-card:hover .quick-add-action::after {
    animation: shineSweep 1.2s ease-in-out;
}

/* 5. UI Elements & Nav */

/* Navbar glass effect transition */
.premium-nav {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.premium-nav:hover, .premium-nav:focus-within {
    background-color: var(--bg-nav);
    backdrop-filter: blur(20px);
}

/* Botones principales con pulso suave al hover */
.btn-primary:hover {
    animation: softPulse 2s infinite;
}

/* Categorias flotantes */
.premium-category-bar {
    animation: slideDownSmooth 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    animation-delay: 0.2s;
}

/* Background animado sutil */
.grid-bg {
    opacity: 0.08; /* Mas sutil */
    animation: gridMove 30s linear infinite; /* Mas lento */
}


/* FORCE VISIBILITY PATCH */
.premium-product-card {
    opacity: 1 !important;
}

.store-view .product-grid-responsive {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1rem !important;
}

@media (max-width: 380px) {
    .store-view .product-grid-responsive {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0.7rem !important;
    }

    .store-view .store-product-card {
        max-width: 100% !important;
    }
}

@media (min-width: 381px) and (max-width: 767px) {
    .store-view .product-grid-responsive {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.72rem !important;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .store-view .product-grid-responsive {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 0.95rem !important;
    }
}

@media (min-width: 1200px) {
    .store-view .product-grid-responsive {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 1.2rem !important;
    }
}

@media (min-width: 1025px) {
    .store-view .product-grid-responsive .store-product-card {
        max-width: 100% !important;
        min-height: 100% !important;
    }
}

.store-view .store-product-image-shell {
    height: clamp(10.8rem, 31vw, 18.5rem) !important;
}

.admin-shell .admin-main.admin-content {
    animation: adminPanelEnter 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-shell .admin-main.admin-content>* {
    animation: adminSectionEnter 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.admin-shell .admin-nav-btn,
.admin-shell .admin-exit-btn,
.admin-shell .admin-mobile-menu {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.admin-shell .admin-nav-btn:hover,
.admin-shell .admin-exit-btn:hover,
.admin-shell .admin-mobile-menu:hover {
    transform: translateY(-2px);
}

.admin-shell .admin-main .bg-\[\#0a0a0a\].border,
.admin-shell .admin-main .bg-slate-900\/30.border,
.admin-shell .admin-main .bg-slate-900.border {
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.admin-shell .admin-main .bg-\[\#0a0a0a\].border:hover,
.admin-shell .admin-main .bg-slate-900\/30.border:hover,
.admin-shell .admin-main .bg-slate-900.border:hover {
    transform: translateY(-4px);
}

.admin-shell .admin-main table tbody tr {
    transition: background-color 0.24s ease, transform 0.24s ease;
}

.admin-shell .admin-main table tbody tr:hover {
    transform: translateX(2px);
}

@keyframes adminPanelEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes adminSectionEnter {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.995);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .admin-shell .admin-main.admin-content,
    .admin-shell .admin-main.admin-content>* {
        animation: none !important;
    }

    .admin-shell .admin-nav-btn,
    .admin-shell .admin-exit-btn,
    .admin-shell .admin-mobile-menu,
    .admin-shell .admin-main .bg-\[\#0a0a0a\].border,
    .admin-shell .admin-main .bg-slate-900\/30.border,
    .admin-shell .admin-main .bg-slate-900.border,
    .admin-shell .admin-main table tbody tr {
        transition: none !important;
        transform: none !important;
    }
}

main.admin-viewport-host.flex-grow {
    padding: 0 !important;
    width: 100%;
    min-width: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

main.admin-viewport-host.flex-grow > .admin-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    flex: 1 1 100%;
}

@media (max-width: 767px) {
    main.admin-viewport-host.flex-grow {
        min-height: 100dvh;
        height: 100dvh;
        overflow: hidden;
    }

    .admin-shell {
        width: 100% !important;
        max-width: 100% !important;
        height: 100dvh;
        min-height: 100dvh;
        overflow: hidden;
        align-items: stretch;
    }

    .admin-shell .admin-sidebar {
        width: min(88vw, 320px) !important;
        max-width: calc(100vw - 1rem);
        left: 0 !important;
        top: 0 !important;
        height: 100dvh;
        min-height: 100dvh;
        will-change: transform;
    }

    .admin-shell .admin-sidebar-header,
    .admin-shell .admin-sidebar-footer {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    .admin-shell .admin-nav {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .admin-shell .admin-main {
        width: 100% !important;
        min-width: 0;
        min-height: 0;
        height: 100%;
        flex: 1 1 auto;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        touch-action: pan-y pinch-zoom;
        padding-top: max(1rem, env(safe-area-inset-top));
        padding-right: max(0.9rem, env(safe-area-inset-right));
        padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
        padding-left: max(0.9rem, env(safe-area-inset-left));
    }

    .admin-shell .admin-main > * {
        min-width: 0;
    }

    .admin-shell .admin-mobile-menu {
        position: sticky;
        top: max(0.5rem, env(safe-area-inset-top));
        z-index: 25;
        width: fit-content;
    }

    .admin-shell .admin-main .grid[class*="grid-cols-2"],
    .admin-shell .admin-main .grid[class*="grid-cols-3"],
    .admin-shell .admin-main .grid[class*="grid-cols-4"] {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .admin-shell .admin-main .overflow-x-auto {
        width: 100%;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .admin-shell .admin-main input,
    .admin-shell .admin-main select,
    .admin-shell .admin-main textarea {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
}

/* Storefront refresh */
.storefront-shell {
    position: relative;
    z-index: 1;
}

.storefront-shell::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: 50%;
    width: 100vw;
    max-width: 100vw;
    height: 34rem;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), transparent 72%);
    pointer-events: none;
    z-index: -1;
}

:root:not(.dark-mode) .storefront-shell::before {
    background:
        radial-gradient(circle at 0% 10%, rgba(249, 115, 22, 0.18), transparent 42%),
        radial-gradient(circle at 100% 12%, rgba(59, 130, 246, 0.16), transparent 38%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), transparent 72%);
}

.dark-mode .storefront-shell::before {
    background:
        radial-gradient(circle at 0% 10%, rgba(249, 115, 22, 0.12), transparent 40%),
        radial-gradient(circle at 100% 12%, rgba(59, 130, 246, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.28), transparent 72%);
}

.premium-hero {
    border-radius: clamp(1.4rem, 3vw, 2.4rem) !important;
    box-shadow:
        0 30px 80px -45px rgba(15, 23, 42, 0.42),
        0 14px 36px -24px rgba(15, 23, 42, 0.2) !important;
}

.premium-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(15, 23, 42, 0.08) 34%, rgba(15, 23, 42, 0.34) 100%);
    pointer-events: none;
}

.dark-mode .premium-hero::after {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, rgba(2, 6, 23, 0.14) 28%, rgba(2, 6, 23, 0.52) 100%);
}

.premium-hero-overlay {
    background:
        linear-gradient(90deg, rgba(248, 250, 252, 0.9) 0%, rgba(248, 250, 252, 0.54) 32%, rgba(15, 23, 42, 0.08) 58%, rgba(15, 23, 42, 0.18) 100%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(15, 23, 42, 0.34) 100%);
}

.dark-mode .premium-hero-overlay {
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.74) 34%, rgba(2, 6, 23, 0.28) 58%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.04) 0%, rgba(2, 6, 23, 0.72) 100%);
}

.premium-hero-copy {
    max-width: 40rem;
    padding: clamp(1.05rem, 2vw, 1.6rem);
    border-radius: clamp(1.35rem, 2vw, 1.9rem);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(248, 250, 252, 0.72));
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: 0 30px 70px -52px rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.dark-mode .premium-hero-copy {
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.84), rgba(15, 23, 42, 0.62));
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 34px 70px -54px rgba(0, 0, 0, 0.72);
}

.premium-hero-copy p {
    max-width: 36rem;
}

.premium-hero-badge {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.premium-hero-badge-light {
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 14px 30px -24px rgba(15, 23, 42, 0.35);
}

.premium-hero-badge-dark {
    background: rgba(249, 115, 22, 0.12);
}

.premium-hero-trust-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    max-width: 72rem;
}

.premium-hero-trust-card {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 34px -28px rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.dark-mode .premium-hero-trust-card {
    background: rgba(2, 6, 23, 0.72);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 22px 42px -30px rgba(0, 0, 0, 0.6);
}

.premium-hero-trust-icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f97316;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(59, 130, 246, 0.14));
    flex-shrink: 0;
}

.dark-mode .premium-hero-trust-icon {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(59, 130, 246, 0.2));
}

.premium-hero-trust-title {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 800;
    color: #0f172a;
}

.dark-mode .premium-hero-trust-title {
    color: #f8fafc;
}

.premium-hero-trust-description {
    margin: 0.2rem 0 0;
    font-size: 0.74rem;
    line-height: 1.45;
    color: #475569;
}

.dark-mode .premium-hero-trust-description {
    color: #94a3b8;
}

.premium-catalog-intro {
    display: block;
    max-width: 54rem;
}

.premium-catalog-panel {
    position: relative;
    overflow: hidden;
    padding: 1.45rem 1.55rem 1.5rem;
    border-radius: 2rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 24px 46px -38px rgba(15, 23, 42, 0.34);
}

.premium-catalog-panel::after {
    content: '';
    position: absolute;
    left: 1.45rem;
    right: 1.45rem;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(249, 115, 22, 0.36), rgba(59, 130, 246, 0.26), transparent 92%);
    pointer-events: none;
}

.premium-catalog-panel-light {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.74));
}

.premium-catalog-panel-dark {
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.82));
    border-color: rgba(51, 65, 85, 0.75);
}

.premium-catalog-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
}

.premium-catalog-stat {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 5.25rem;
    padding: 0.95rem 1rem;
    border-radius: 1.2rem;
    border: 1px solid rgba(226, 232, 240, 0.88);
}

.premium-catalog-stat-light {
    background: rgba(255, 255, 255, 0.82);
}

.premium-catalog-stat-dark {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(51, 65, 85, 0.75);
}

.premium-catalog-stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.premium-catalog-stat-orange .premium-catalog-stat-icon {
    color: #f97316;
    background: rgba(249, 115, 22, 0.12);
}

.premium-catalog-stat-rose .premium-catalog-stat-icon {
    color: #e11d48;
    background: rgba(225, 29, 72, 0.11);
}

.premium-catalog-stat-blue .premium-catalog-stat-icon {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
}

.premium-catalog-stat-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.premium-catalog-stat-copy strong {
    font-size: 1.28rem;
    line-height: 1;
    font-weight: 900;
    color: var(--text-primary);
}

.dark-mode .premium-catalog-stat-copy strong {
    color: #f8fafc;
}

.premium-catalog-stat-copy span {
    margin-top: 0.22rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

#catalog.premium-category-bar {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    border-radius: 1.45rem;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 20px 36px -34px rgba(15, 23, 42, 0.4);
}

.dark-mode #catalog.premium-category-bar {
    border-color: rgba(51, 65, 85, 0.75) !important;
}

.premium-category-track {
    gap: 0.55rem !important;
    padding-bottom: 0 !important;
}

.premium-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.72rem 0.9rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.premium-filter-chip-light {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(226, 232, 240, 0.92);
    color: #475569;
}

.premium-filter-chip-dark {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(51, 65, 85, 0.75);
    color: #cbd5e1;
}

.store-view .store-product-card {
    overflow: hidden;
}

:root:not(.dark-mode) .store-view .store-product-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
    border-color: rgba(226, 232, 240, 0.88) !important;
    box-shadow: 0 18px 34px -30px rgba(15, 23, 42, 0.5);
}

.dark-mode .store-view .store-product-card {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.9));
}

.store-view .product-card-category-chip {
    border-radius: 999px !important;
    padding-inline: 0.55rem !important;
}

.store-view .product-card-action {
    min-height: 2.85rem;
}

.store-view .product-card-action .quick-add-qty,
.store-view .product-card-action .quick-add-action,
.store-view .product-card-icon-btn {
    box-shadow: 0 12px 24px -18px rgba(15, 23, 42, 0.45);
}

.premium-store-footer {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(241, 245, 249, 0.98)) !important;
}

.dark-mode .premium-store-footer {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 1)) !important;
}

.premium-store-footer::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(249, 115, 22, 0.08), transparent 26%),
        radial-gradient(circle at 84% 10%, rgba(59, 130, 246, 0.08), transparent 22%);
    pointer-events: none;
}

.premium-footer-card {
    position: relative;
    padding: 1.35rem 1.4rem;
    border-radius: 1.6rem;
    border: 1px solid rgba(226, 232, 240, 0.88);
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 26px 42px -38px rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.dark-mode .premium-footer-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(51, 65, 85, 0.72);
    box-shadow: 0 28px 44px -38px rgba(0, 0, 0, 0.6);
}

.premium-footer-brand h2 {
    font-size: clamp(2.1rem, 4vw, 3rem);
}

.premium-footer-socials button {
    width: 2.8rem;
    height: 2.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
}

.premium-footer-link-list button {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(226, 232, 240, 0.88);
    justify-content: flex-start;
}

.dark-mode .premium-footer-link-list button {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(51, 65, 85, 0.72);
}

.premium-footer-bottom {
    position: relative;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

@media (min-width: 641px) {
    .store-view .product-card-savings-badge {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .storefront-shell::before {
        height: 26rem;
    }

    .premium-hero {
        min-height: 18.5rem;
    }

    .premium-hero-overlay {
        background:
            linear-gradient(180deg, rgba(248, 250, 252, 0.12) 0%, rgba(15, 23, 42, 0.16) 38%, rgba(15, 23, 42, 0.74) 100%);
    }

    .dark-mode .premium-hero-overlay {
        background:
            linear-gradient(180deg, rgba(2, 6, 23, 0.06) 0%, rgba(2, 6, 23, 0.28) 40%, rgba(2, 6, 23, 0.84) 100%);
    }

    .premium-hero-copy {
        max-width: none;
        padding: 0.95rem;
        border-radius: 1.3rem;
    }

    .premium-hero-copy p {
        font-size: 0.78rem !important;
        line-height: 1.42 !important;
        max-width: none;
    }

    .premium-hero-ctas {
        flex-direction: column;
        align-items: stretch !important;
    }

    .premium-hero-ctas > * {
        width: 100%;
    }

    .premium-brand-ticker {
        display: none !important;
    }

    .premium-hero-trust-grid {
        display: none;
    }

    .premium-hero-trust-card {
        padding: 0.8rem 0.85rem;
        border-radius: 1rem;
    }

    .premium-catalog-panel {
        padding: 1rem 1.05rem 1.15rem;
        border-radius: 1.35rem;
    }

    #catalog.premium-category-bar {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        border-radius: 1.15rem;
        margin-bottom: 1rem !important;
    }

    .premium-filter-chip {
        padding: 0.62rem 0.75rem;
        font-size: 0.6rem;
    }

    .store-view .product-grid-responsive {
        gap: 0.8rem !important;
    }

    .store-view .store-product-image-shell {
        height: 10.6rem !important;
        margin: 0.45rem !important;
    }

    .store-view .product-card-info {
        padding: 0.72rem !important;
    }

    .store-view .product-card-title {
        min-height: 2rem !important;
        font-size: 0.84rem !important;
        line-height: 1.25 !important;
    }

    .store-view .product-card-price .product-card-final-price {
        font-size: 1.18rem !important;
    }

    .store-view .product-card-action .quick-add-qty,
    .store-view .product-card-action .quick-add-action {
        min-height: 2.15rem !important;
        height: 2.15rem !important;
        border-radius: 0.9rem !important;
    }

    .store-view .product-card-action {
        min-height: 2.15rem;
    }

    .premium-footer-grid {
        gap: 1rem !important;
    }

    .premium-footer-card {
        padding: 1rem;
        border-radius: 1.25rem;
    }

    .premium-footer-socials button {
        width: 2.55rem;
        height: 2.55rem;
    }
}

/* ===== HERO + NAV RESPONSIVE POLISH ===== */
.premium-hero-content.premium-hero-copy {
    width: min(100%, 40rem);
}

:root:not(.dark-mode) .premium-hero-content.premium-hero-copy {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.78));
    border-color: rgba(255, 255, 255, 0.86);
    box-shadow:
        0 26px 54px -38px rgba(15, 23, 42, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.dark-mode .premium-hero-content.premium-hero-copy {
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.84), rgba(15, 23, 42, 0.68));
}

@media (max-width: 640px) {
    .store-nav-theme-tooltip {
        display: none !important;
    }

    .premium-carousel-controls {
        display: flex !important;
        top: 0.9rem !important;
        transform: none !important;
        width: 2.5rem !important;
        height: 2.5rem !important;
        opacity: 0.96 !important;
    }

    .premium-carousel-pagination {
        bottom: 0.95rem !important;
        padding-left: 3.75rem !important;
        padding-right: 3.75rem !important;
    }

    .premium-hero {
        aspect-ratio: 0.98 / 1;
        min-height: 21rem;
    }

    .premium-hero-overlay {
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(15, 23, 42, 0.12) 34%, rgba(15, 23, 42, 0.68) 100%);
    }

    .dark-mode .premium-hero-overlay {
        background:
            linear-gradient(180deg, rgba(2, 6, 23, 0.04) 0%, rgba(2, 6, 23, 0.18) 34%, rgba(2, 6, 23, 0.82) 100%);
    }

    .premium-hero-overlay > div {
        padding-left: 0.9rem !important;
        padding-right: 0.9rem !important;
        padding-bottom: 3.3rem !important;
    }

    .premium-hero-content.premium-hero-copy {
        display: flex;
        width: 100%;
        max-width: 100%;
        padding: 0.95rem 0.95rem 0.9rem;
        border-radius: 1.15rem;
        gap: 0.15rem;
    }

    :root:not(.dark-mode) .premium-hero-content.premium-hero-copy {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(248, 250, 252, 0.74));
        border-color: rgba(255, 255, 255, 0.84);
        box-shadow:
            0 18px 40px -28px rgba(15, 23, 42, 0.36),
            inset 0 1px 0 rgba(255, 255, 255, 0.86);
    }

    .premium-hero-copy .premium-hero-badge {
        margin-bottom: 0.55rem !important;
        padding: 0.42rem 0.62rem !important;
        font-size: 0.48rem !important;
        letter-spacing: 0.18em !important;
    }

    .premium-hero-content h1 {
        font-size: clamp(1.7rem, 8vw, 2.3rem) !important;
        line-height: 0.94 !important;
        margin-bottom: 0.55rem !important;
    }

    .premium-hero-copy p {
        font-size: 0.82rem !important;
        line-height: 1.48 !important;
        margin-bottom: 0.85rem !important;
        max-width: none;
    }

    .premium-hero-ctas {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch !important;
        gap: 0.65rem !important;
    }

    .premium-hero-ctas > * {
        width: 100%;
        min-width: 0;
    }

    .premium-hero-ctas button {
        min-height: 3rem !important;
        padding: 0 0.8rem !important;
        border-radius: 0.95rem !important;
        font-size: 0.82rem !important;
        gap: 0.45rem !important;
    }

    .premium-hero-primary-cta,
    .premium-hero-secondary-cta {
        justify-content: center !important;
    }

    .premium-hero-primary-cta span,
    .premium-hero-secondary-cta {
        white-space: nowrap;
    }

    .premium-hero-primary-cta .w-8,
    .premium-hero-secondary-cta .w-3,
    .premium-hero-secondary-cta .w-4 {
        flex-shrink: 0;
    }
}

@media (max-width: 360px) {
    .premium-hero {
        min-height: 20.25rem;
    }

    .premium-hero-content h1 {
        font-size: clamp(1.52rem, 9vw, 2rem) !important;
    }

    .premium-hero-copy p {
        font-size: 0.76rem !important;
        line-height: 1.44 !important;
    }

    .premium-hero-ctas {
        grid-template-columns: 1fr;
    }
}

