/* ============================================
   MEGAFIT - Custom Styles
   ============================================ */

/* ============================================
   Theme CSS Variables
   ============================================ */
:root {
    /* Tema escuro (padrão) — paleta da logo MegaFit
       lilás = primária (#5a117b na logo) · laranja = secundária */
    --mwf-dark-rgb: 14 6 23;
    --mwf-darker-rgb: 8 3 16;
    --mwf-card-rgb: 23 10 38;
    --mwf-border-rgb: 45 24 68;
    --mwf-cyan-rgb: 180 91 230;
    --mwf-purple-rgb: 242 140 15;
    --mwf-text-rgb: 243 234 250;
    --mwf-muted-rgb: 169 155 184;
    --mwf-brand: #5a117b;
    --mwf-dark: #0e0617;
    --mwf-darker: #080310;
    --mwf-card: #170a26;
    --mwf-border: #2d1844;
    --mwf-cyan: #b45be6;
    --mwf-cyan-glow: rgba(180, 91, 230, 0.22);
    --mwf-purple: #f28c0f;
    --mwf-pink: #e6007e;
    --mwf-text: #f3eafa;
    --mwf-muted: #a99bb8;
    --mwf-input-bg: rgba(45, 24, 68, 0.5);
    --mwf-input-border: #4a2d69;
    --mwf-hover-bg: rgba(61, 35, 88, 0.35);
    --mwf-overlay: rgba(8, 3, 16, 0.82);
    --mwf-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --mwf-gradient-bg-from: #1c0a2e;
    --mwf-gradient-bg-to: #08030f;
    --mwf-brand-gradient: linear-gradient(135deg, #5a117b 0%, #b45be6 45%, #f28c0f 100%);
    --mwf-accent-gradient: linear-gradient(135deg, #f28c0f 0%, #e6007e 100%);
}

.light-theme {
    --mwf-dark-rgb: 237 229 246;
    --mwf-darker-rgb: 226 214 240;
    --mwf-card-rgb: 255 255 255;
    --mwf-border-rgb: 205 184 224;
    --mwf-cyan-rgb: 90 17 123;
    --mwf-purple-rgb: 217 111 0;
    --mwf-text-rgb: 28 11 40;
    --mwf-muted-rgb: 85 68 106;
    --mwf-brand: #5a117b;
    --mwf-dark: #ede5f6;
    --mwf-darker: #e2d6f0;
    --mwf-card: #ffffff;
    --mwf-border: #cdb8e0;
    --mwf-cyan: #5a117b;
    --mwf-cyan-glow: rgba(90, 17, 123, 0.18);
    --mwf-purple: #d96f00;
    --mwf-pink: #e6007e;
    --mwf-text: #1c0b28;
    --mwf-muted: #55446a;
    --mwf-input-bg: #ffffff;
    --mwf-input-border: #bba3d1;
    --mwf-hover-bg: rgba(90, 17, 123, 0.07);
    --mwf-overlay: rgba(28, 11, 40, 0.55);
    --mwf-shadow: 0 6px 22px rgba(60, 10, 90, 0.14);
    --mwf-gradient-bg-from: #ede5f6;
    --mwf-gradient-bg-to: #e2d6f0;
}

/* Theme transition */
body, header, footer, main, .product-card, .glass,
input, select, textarea, button, a {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ============================================
   Light theme specific overrides
   ============================================ */

/* Background blobs become subtle in light mode */
.light-theme .bg-mwf-cyan\/5,
.light-theme .bg-cyan-500\/10 {
    opacity: 0.3;
}

.light-theme .bg-mwf-purple\/5,
.light-theme .bg-purple-500\/10 {
    opacity: 0.3;
}

/* Gradient text needs darker colors in light mode */
.light-theme .gradient-text {
    background: linear-gradient(135deg, #5a117b 0%, #f28c0f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Light theme card shadows */
.light-theme .product-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Light scrollbar */
.light-theme ::-webkit-scrollbar-track {
    background: #f3ebf9;
}

.light-theme ::-webkit-scrollbar-thumb {
    background: #d6c2e6;
}

.light-theme ::-webkit-scrollbar-thumb:hover {
    background: #5a117b;
}

.light-theme .to-white, .light-theme .to-cyan-400, .light-theme .text-mwf-cyan, .light-theme .to-cyan-300 {
    --tw-gradient-to: var(--mwf-purple) var(--tw-gradient-to-position);
}

/* ============================================
   Light Theme - Profile Page Overrides
   ============================================ */

/* Hero section background gradient */
.light-theme .from-gray-900 {
    --tw-gradient-from: #efe2f8 var(--tw-gradient-from-position);
}
.light-theme .via-gray-900 {
    --tw-gradient-via: #f6eefb var(--tw-gradient-via-position);
}
.light-theme .to-black {
    --tw-gradient-to: #f3ebf9 var(--tw-gradient-to-position);
}
.light-theme .to-gray-800 {
    --tw-gradient-to: #faf6fd var(--tw-gradient-to-position);
}

/* Hero blobs more visible in light mode */
.light-theme .bg-cyan-500\/10 {
    background-color: rgba(90, 17, 123, 0.08) !important;
    opacity: 0.6;
}
.light-theme .bg-purple-500\/10 {
    background-color: rgba(242, 140, 15, 0.08) !important;
    opacity: 0.6;
}

/* Background colors */
.light-theme .bg-black {
    background-color: var(--mwf-darker) !important;
}
.light-theme .bg-gray-900\/50,
.light-theme .bg-gray-900 {
    background-color: var(--mwf-card) !important;
}
.light-theme .bg-gray-800\/50,
.light-theme .bg-gray-800\/30,
.light-theme .bg-gray-800 {
    background-color: var(--mwf-input-bg) !important;
}

/* Text colors */
.light-theme .text-white {
    color: var(--mwf-text) !important;
}
.light-theme .text-gray-400 {
    color: var(--mwf-muted) !important;
}
.light-theme .text-gray-500 {
    color: #6d5a82 !important;
}
.light-theme .text-gray-300 {
    color: var(--mwf-muted) !important;
}
.light-theme .text-gray-600 {
    color: #5b4b6c !important;
}

/* Border colors */
.light-theme .border-gray-800,
.light-theme .border-gray-700,
.light-theme .border-gray-700\/50 {
    border-color: var(--mwf-border) !important;
}

/* Input fields */
.light-theme input:not([type="checkbox"]):not([type="radio"]):not(.sr-only),
.light-theme select,
.light-theme textarea {
    background-color: var(--mwf-input-bg) !important;
    border-color: var(--mwf-input-border) !important;
    color: var(--mwf-text) !important;
}

/* Profile tabs */
.light-theme .profile-tab {
    color: var(--mwf-muted);
}
.light-theme .profile-tab.active {
    background-color: var(--mwf-cyan-glow);
    color: var(--mwf-cyan);
}

/* Modal backgrounds */
.light-theme #endereco-modal .bg-gray-900,
.light-theme #delete-account-modal .bg-gray-900 {
    background-color: var(--mwf-card) !important;
}

/* Toggle switch background */
.light-theme .bg-gray-700 {
    background-color: #d6c2e6 !important;
}

/* Cancel/secondary buttons */
.light-theme button.bg-gray-700,
.light-theme .bg-gray-700 {
    background-color: #e6d8f1 !important;
    color: var(--mwf-text) !important;
}
.light-theme button.bg-gray-700:hover {
    background-color: #d6c2e6 !important;
}

/* Danger zone */
.light-theme .bg-red-900\/20 {
    background-color: rgba(254, 226, 226, 0.5) !important;
}
.light-theme .border-red-800\/50 {
    border-color: rgba(239, 68, 68, 0.3) !important;
}

/* Password strength bars */
.light-theme .password-strength-bar {
    background-color: #e6d8f1 !important;
}

/* ============================================
   Light Theme - Cart Page Overrides
   (Arbitrary hex values used in carrinho.html)
   ============================================ */

/* Main backgrounds: bg-[#0e0617] */
.light-theme .bg-\[\#0e0617\] {
    background-color: var(--mwf-darker) !important;
}

/* Card backgrounds: bg-[#170a26] */
.light-theme .bg-\[\#170a26\] {
    background-color: var(--mwf-card) !important;
}

/* Border color: border-[#2d1844] */
.light-theme .border-\[\#2d1844\] {
    border-color: var(--mwf-border) !important;
}

/* Subtle bg: bg-[#2d1844] */
.light-theme .bg-\[\#2d1844\] {
    background-color: var(--mwf-input-bg) !important;
}

/* Hover bg: hover:bg-[#2d1844] */
.light-theme .hover\:bg-\[\#2d1844\]:hover {
    background-color: var(--mwf-hover-bg) !important;
}

/* Hover bg: hover:bg-[#3d2358] */
.light-theme .hover\:bg-\[\#3d2358\]:hover {
    background-color: rgba(90, 17, 123, 0.12) !important;
}

/* Cyan text: text-[#b45be6] → use themed cyan */
.light-theme .text-\[\#b45be6\] {
    color: var(--mwf-cyan) !important;
}

/* Hover cyan text: hover:text-[#b45be6] */
.light-theme .hover\:text-\[\#b45be6\]:hover {
    color: var(--mwf-cyan) !important;
}

/* Cyan border hover: hover:border-[#b45be6]/50 */
.light-theme .hover\:border-\[\#b45be6\]\/50:hover {
    border-color: rgba(90, 17, 123, 0.5) !important;
}

/* Input bg: bg-[#0e0617] inside inputs */
.light-theme input.bg-\[\#0e0617\],
.light-theme .bg-\[\#0e0617\] input {
    background-color: var(--mwf-input-bg) !important;
    border-color: var(--mwf-input-border) !important;
    color: var(--mwf-text) !important;
}

/* Focus border cyan: focus:border-[#b45be6] */
.light-theme .focus\:border-\[\#b45be6\]:focus {
    border-color: var(--mwf-cyan) !important;
}

/* Hover cyan bg: hover:bg-[#b45be6] */
.light-theme .hover\:bg-\[\#b45be6\]:hover {
    background-color: var(--mwf-cyan) !important;
}

/* Hover text dark on cyan bg: hover:text-[#0e0617] */
.light-theme .hover\:text-\[\#0e0617\]:hover {
    color: #ffffff !important;
}

/* Cyan shadow: hover:shadow-[#b45be6]/25 */
.light-theme .hover\:shadow-\[\#b45be6\]\/25:hover {
    --tw-shadow-color: rgba(90, 17, 123, 0.25);
}

/* Selection color in light mode */
.light-theme ::selection {
    background: rgba(90, 17, 123, 0.3);
    color: #2a1238;
}

/* Glow effects toned down in light mode */
.light-theme .glow-cyan {
    box-shadow: 0 0 15px rgba(90, 17, 123, 0.2), 0 0 30px rgba(90, 17, 123, 0.08);
}

.light-theme .glow-cyan-strong {
    box-shadow: 0 0 20px rgba(90, 17, 123, 0.3), 0 0 40px rgba(90, 17, 123, 0.12);
}

.light-theme .text-glow {
    text-shadow: none;
}

/* Glass effect for light mode */
.light-theme .glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Toast in light mode */
.light-theme .toast {
    background: #ffffff;
    border: 1px solid #e6d8f1;
    color: #2a1238;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.light-theme .toast.success {
    border-color: #5a117b;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

::-webkit-scrollbar-track {
    background: #0e0617;
}

::-webkit-scrollbar-thumb {
    background: #2d1844;
    border-radius: 4px;
}

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

/* Selection Color */
::selection {
    background: rgba(180, 91, 230, 0.3);
    color: #fff;
}

/* ============================================
   Animations
   ============================================ */

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(180, 91, 230, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(180, 91, 230, 0.5);
    }
}

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

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.animate-fade-in {
    animation: fade-in 0.5s ease-out forwards;
}

.animate-slide-up {
    animation: slide-up 0.5s ease-out forwards;
}

/* ============================================
   Component Styles
   ============================================ */

/* Navigation Link Hover Effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #b45be6, #f28c0f);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Button Styles */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Product Card Hover Effects */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #b45be6 0%, #f28c0f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animated Gradient Background */
.gradient-animated {
    background: linear-gradient(135deg, #b45be6, #f28c0f, #b45be6);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Glass Effect */
.glass {
    background: rgba(18, 18, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Glow Effects */
.glow-cyan {
    box-shadow: 0 0 20px rgba(180, 91, 230, 0.3), 0 0 40px rgba(180, 91, 230, 0.1);
}

.glow-cyan-strong {
    box-shadow: 0 0 30px rgba(180, 91, 230, 0.5), 0 0 60px rgba(180, 91, 230, 0.2);
}

.glow-purple {
    box-shadow: 0 0 20px rgba(242, 140, 15, 0.3), 0 0 40px rgba(242, 140, 15, 0.1);
}

/* Text Glow */
.text-glow {
    text-shadow: 0 0 20px rgba(180, 91, 230, 0.5);
}

/* Border Glow on Hover */
.border-glow:hover {
    box-shadow: 0 0 0 1px rgba(180, 91, 230, 0.5), 
                0 0 20px rgba(180, 91, 230, 0.2);
}

/* ============================================
   Form Styles
   ============================================ */

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #b45be6;
    box-shadow: 0 0 0 3px rgba(180, 91, 230, 0.1);
}

/* Custom Checkbox */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #2d1844;
    border-radius: 4px;
    background: #170a26;
    cursor: pointer;
    transition: all 0.2s ease;
}

.light-theme input[type="checkbox"] {
    background: var(--mwf-card);
}

input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #b45be6, #f28c0f);
    border-color: transparent;
}

input[type="checkbox"]:checked::after {
    content: '✓';
    display: block;
    text-align: center;
    color: #0e0617;
    font-weight: bold;
    font-size: 14px;
    line-height: 18px;
}

/* ============================================
   Loading Spinner
   ============================================ */

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #2d1844;
    border-top-color: #b45be6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   Toast Notifications
   ============================================ */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    background: #170a26;
    border: 1px solid #2d1844;
    border-radius: 12px;
    color: #f3eafa;
    font-size: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 9999;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-color: #b45be6;
}

.toast.error {
    border-color: #ef4444;
}

/* ============================================
   Utility Classes
   ============================================ */

/* Line Clamp */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Aspect Ratios */
.aspect-square {
    aspect-ratio: 1 / 1;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

/* Hide Scrollbar */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* ============================================
   Responsive Utilities
   ============================================ */

@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    header,
    footer,
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ============================================
   Marca MegaFit: botões e selos com acento
   ============================================ */
[class*="bg-mwf-cyan"][class*="text-mwf-dark"],
[class*="from-mwf-cyan"][class*="text-mwf-dark"],
[class*="from-cyan-500"][class*="text-mwf-dark"],
[class*="bg-cyan-500"][class*="text-mwf-dark"],
[class*="bg-gradient"][class*="text-mwf-dark"],
[class*="bg-gradient"][class*="text-[#0e0617]"],
[class*="bg-[#b45be6]"][class*="text-[#0e0617]"] {
    color: #ffffff !important;
}

/* Selo de desconto e botão de destaque com o degradê laranja → magenta da logo */
.bg-brand-gradient { background-image: var(--mwf-brand-gradient); }
.bg-accent-gradient { background-image: var(--mwf-accent-gradient); }

::selection { background: rgba(180, 91, 230, 0.35); color: #fff; }
.light-theme ::selection { background: rgba(90, 17, 123, 0.2); color: #2a1238; }

/* =====================================================================
   TEMA CLARO — versão melhorada
   Tudo realmente claro: fundo lilás suave, cartões brancos com sombra
   colorida, textos escuros de alto contraste e brilhos lilás/laranja
   (hero, cabeçalho, botões) no lugar dos neons do tema escuro.
   ===================================================================== */

/* Fundo da página: lilás suave em degradê (em vez de quase branco) */
.light-theme body {
    background: linear-gradient(180deg, #efe7f8 0%, #e6dbf2 100%) fixed;
    color: var(--mwf-text);
}

/* Cartões: branco com borda definida e sombra colorida leve */
.light-theme .bg-mwf-card.rounded-2xl,
.light-theme .bg-mwf-card.rounded-xl,
.light-theme .product-card {
    box-shadow: 0 1px 2px rgba(60, 10, 90, 0.06), 0 8px 22px rgba(60, 10, 90, 0.08);
    border-color: var(--mwf-border);
}
.light-theme .product-card:hover,
.light-theme .bg-mwf-card.rounded-2xl:hover {
    box-shadow: 0 2px 4px rgba(60, 10, 90, 0.08), 0 16px 34px rgba(90, 17, 123, 0.18);
}

/* Faixas alternadas entre seções ficam visíveis */
.light-theme section.bg-gradient-to-b {
    background-image: linear-gradient(to bottom, #efe7f8, #e2d6f0, #efe7f8);
}

/* Textos de acento: versões escuras para ter contraste sobre o fundo claro */
.light-theme .text-cyan-300,
.light-theme .text-cyan-400,
.light-theme .text-cyan-500,
.light-theme .text-violet-400,
.light-theme .text-violet-500 { color: #7b22ab !important; }
.light-theme .text-purple-300,
.light-theme .text-purple-400,
.light-theme .text-purple-500 { color: #b45f06 !important; }
.light-theme .text-blue-400,
.light-theme .text-blue-500 { color: #be0068 !important; }
.light-theme .text-green-400 { color: #15803d !important; }
.light-theme .text-yellow-400 { color: #a16207 !important; }
.light-theme .text-red-400 { color: #b91c1c !important; }

/* Selos e botões secundários com mais presença */
.light-theme .bg-mwf-cyan\/10 { background-color: rgba(90, 17, 123, 0.10); }
.light-theme .border-mwf-cyan\/30 { border-color: rgba(90, 17, 123, 0.35); }
.light-theme .bg-mwf-purple\/10 { background-color: rgba(217, 111, 0, 0.12); }

/* Campos de formulário legíveis */
.light-theme input:not([type="checkbox"]):not([type="radio"]):not(.sr-only),
.light-theme select,
.light-theme textarea {
    border-width: 1px;
    box-shadow: inset 0 1px 2px rgba(60, 10, 90, 0.05);
}

/* ----- Cabeçalho claro ----- */
.light-theme header.fixed {
    background-color: rgba(255, 255, 255, 0.88) !important;
    border-bottom: 1px solid var(--mwf-border);
    box-shadow: 0 4px 22px rgba(60, 10, 90, 0.08);
}
.light-theme header .bg-mwf-card,
.light-theme header .bg-mwf-card\/95 {
    background-color: #ffffff !important;
}

/* ----- Hero claro: brilhos lilás e laranja sobre fundo suave ----- */
.light-theme .hero-section > .absolute.inset-0 > .bg-gradient-to-br {
    background-image:
        radial-gradient(circle at 12% 18%, rgba(180, 91, 230, 0.32), transparent 46%),
        radial-gradient(circle at 88% 82%, rgba(242, 140, 15, 0.26), transparent 46%),
        linear-gradient(135deg, #f5ecfc 0%, #ebdff7 100%);
}
.light-theme .hero-section .bg-mwf-cyan\/10 { background-color: rgba(155, 63, 208, 0.22); }
.light-theme .hero-section .bg-mwf-purple\/10 { background-color: rgba(242, 140, 15, 0.20); }

/* Título do hero: o tom do meio do degradê precisa ser mais escuro no fundo claro */
.light-theme .via-cyan-300 {
    --tw-gradient-stops: var(--tw-gradient-from), #9b3fd0 var(--tw-gradient-via-position), var(--tw-gradient-to, rgb(155 63 208 / 0));
}

/* Cartão de destaque do hero */
.light-theme .hero-section .bg-gradient-to-br.from-mwf-card {
    box-shadow: 0 24px 60px -20px rgba(90, 17, 123, 0.35);
}

/* Botões de acento: texto branco e sombra suave */
.light-theme [class*="from-mwf-cyan"][class*="to-"]:not(.bg-clip-text):not(.blur-3xl):not(.blur-xl) {
    box-shadow: 0 8px 20px -8px rgba(90, 17, 123, 0.55);
}

/* Botão de tema no cabeçalho: lua no claro, sol no escuro */
.light-theme #theme-toggle-btn .icon-sun { display: none; }
html:not(.light-theme) #theme-toggle-btn .icon-moon { display: none; }

/* Escalas de cor usadas pelo Tailwind (canais RGB). A Black Friday troca estes valores. */
:root {
    --mwf-glow-rgb: 180 91 230;
    --c-cyan-50: 250 245 255;
    --c-cyan-100: 243 230 251;
    --c-cyan-200: 230 204 247;
    --c-cyan-300: 211 165 240;
    --c-cyan-400: 180 91 230;
    --c-cyan-500: 155 63 208;
    --c-cyan-600: 123 34 171;
    --c-cyan-700: 90 17 123;
    --c-cyan-800: 68 13 93;
    --c-cyan-900: 47 10 64;
    --c-cyan-950: 29 5 40;
    --c-purple-50: 255 248 235;
    --c-purple-100: 255 236 198;
    --c-purple-200: 255 216 138;
    --c-purple-300: 255 196 112;
    --c-purple-400: 253 168 47;
    --c-purple-500: 242 140 15;
    --c-purple-600: 220 122 8;
    --c-purple-700: 180 95 6;
    --c-purple-800: 143 74 7;
    --c-purple-900: 116 61 10;
    --c-purple-950: 67 32 4;
    --c-blue-50: 255 240 247;
    --c-blue-100: 255 220 235;
    --c-blue-200: 255 185 216;
    --c-blue-300: 245 139 189;
    --c-blue-400: 238 74 154;
    --c-blue-500: 230 0 126;
    --c-blue-600: 190 0 104;
    --c-blue-700: 150 0 79;
    --c-blue-800: 120 0 63;
    --c-blue-900: 95 0 51;
    --c-blue-950: 58 0 31;
    --c-gray-50: 250 247 252;
    --c-gray-100: 241 234 246;
    --c-gray-200: 225 214 234;
    --c-gray-300: 201 187 214;
    --c-gray-400: 169 155 184;
    --c-gray-500: 132 117 143;
    --c-gray-600: 95 81 112;
    --c-gray-700: 67 52 79;
    --c-gray-800: 42 26 58;
    --c-gray-900: 23 10 38;
    --c-gray-950: 14 6 23;
    --c-violet-50: 250 245 255;
    --c-violet-100: 243 230 251;
    --c-violet-200: 230 204 247;
    --c-violet-300: 211 165 240;
    --c-violet-400: 180 91 230;
    --c-violet-500: 155 63 208;
    --c-violet-600: 123 34 171;
    --c-violet-700: 90 17 123;
    --c-violet-800: 68 13 93;
    --c-violet-900: 47 10 64;
    --c-violet-950: 29 5 40;
}


/* =====================================================================
   BLACK FRIDAY — tema sazonal (mobile first)
   Ligado por data no servidor (classe .bf-theme no <html>). Quando a
   campanha termina a classe some e a loja volta ao tema normal.
   ===================================================================== */
html.bf-theme {
    --mwf-dark-rgb: 11 6 18;
    --mwf-darker-rgb: 5 3 10;
    --mwf-card-rgb: 23 11 38;
    --mwf-border-rgb: 46 26 71;
    --mwf-cyan-rgb: 255 154 26;
    --mwf-purple-rgb: 230 0 126;
    --mwf-text-rgb: 251 245 255;
    --mwf-muted-rgb: 179 164 196;
    --mwf-glow-rgb: 255 154 26;
    --mwf-brand: #ff9a1a;
    --mwf-dark: #0b0612;
    --mwf-darker: #05030a;
    --mwf-card: #170b26;
    --mwf-border: #2e1a47;
    --mwf-cyan: #ff9a1a;
    --mwf-cyan-glow: rgba(255, 154, 26, 0.22);
    --mwf-purple: #e6007e;
    --mwf-pink: #e6007e;
    --mwf-text: #fbf5ff;
    --mwf-muted: #b3a4c4;
    --mwf-input-bg: rgba(46, 26, 71, 0.6);
    --mwf-input-border: #4a2d69;
    --mwf-hover-bg: rgba(255, 154, 26, 0.08);
    --mwf-overlay: rgba(0, 0, 0, 0.85);
    --mwf-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    --mwf-gradient-bg-from: #170b26;
    --mwf-gradient-bg-to: #05030a;
    --mwf-brand-gradient: linear-gradient(135deg, #ff9a1a 0%, #e6007e 62%, #b45be6 100%);
    --mwf-accent-gradient: linear-gradient(135deg, #e6007e 0%, #ff9a1a 100%);
}

/* Escalas (cyan/purple/blue/gray) trocadas para a paleta Black Friday */
html.bf-theme {
    --c-cyan-50: 255 248 235;
    --c-cyan-100: 255 236 198;
    --c-cyan-200: 255 216 138;
    --c-cyan-300: 255 196 112;
    --c-cyan-400: 255 154 26;
    --c-cyan-500: 242 140 15;
    --c-cyan-600: 220 122 8;
    --c-cyan-700: 180 95 6;
    --c-cyan-800: 143 74 7;
    --c-cyan-900: 116 61 10;
    --c-cyan-950: 67 32 4;
    --c-violet-50: 250 245 255;
    --c-violet-100: 243 230 251;
    --c-violet-200: 230 204 247;
    --c-violet-300: 211 165 240;
    --c-violet-400: 180 91 230;
    --c-violet-500: 155 63 208;
    --c-violet-600: 123 34 171;
    --c-violet-700: 90 17 123;
    --c-violet-800: 68 13 93;
    --c-violet-900: 47 10 64;
    --c-violet-950: 29 5 40;
    --c-purple-50: 255 240 247;
    --c-purple-100: 255 220 235;
    --c-purple-200: 255 185 216;
    --c-purple-300: 245 139 189;
    --c-purple-400: 238 74 154;
    --c-purple-500: 230 0 126;
    --c-purple-600: 190 0 104;
    --c-purple-700: 150 0 79;
    --c-purple-800: 120 0 63;
    --c-purple-900: 95 0 51;
    --c-purple-950: 58 0 31;
    --c-blue-50: 250 245 255;
    --c-blue-100: 243 230 251;
    --c-blue-200: 230 204 247;
    --c-blue-300: 211 165 240;
    --c-blue-400: 180 91 230;
    --c-blue-500: 155 63 208;
    --c-blue-600: 123 34 171;
    --c-blue-700: 90 17 123;
    --c-blue-800: 68 13 93;
    --c-blue-900: 47 10 64;
    --c-blue-950: 29 5 40;
    --c-gray-50: 250 247 252;
    --c-gray-100: 241 234 246;
    --c-gray-200: 225 214 234;
    --c-gray-300: 201 187 214;
    --c-gray-400: 169 155 184;
    --c-gray-500: 132 117 143;
    --c-gray-600: 95 81 112;
    --c-gray-700: 67 52 79;
    --c-gray-800: 42 26 58;
    --c-gray-900: 23 10 38;
    --c-gray-950: 14 6 23;
}

/* Fundo preto sempre (a escolha claro/escuro do cliente fica guardada e volta depois) */
html.bf-theme body { background: #0b0612; color: #fafafa; }
html.bf-theme #theme-toggle-btn { display: none; }

/* ----- Faixa de campanha no topo (mobile: compacta; sm+: com mensagem) ----- */
.bf-strip {
    background: #ff9a1a;
    color: #000;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11px;
    line-height: 1;
    border-bottom: 3px solid #0b0612;
    box-shadow: 0 1px 0 #ff9a1a;
}
.bf-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 36px;
}
.bf-strip-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.bf-strip-tag::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #e6007e;
    animation: bf-pisca 1.1s ease-in-out infinite;
}
.bf-strip-msg { display: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bf-strip-time {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    background: #000;
    color: #ff9a1a;
    padding: 5px 8px;
    border-radius: 6px;
}
@keyframes bf-pisca { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* O conteúdo desce a altura da faixa (cabeçalho 5rem + faixa 2.25rem) */
html.bf-theme main.pt-20 { padding-top: calc(5rem + 2.25rem + 3px); }

@media (min-width: 640px) {
    .bf-strip { font-size: 12px; }
    .bf-strip-msg { display: block; flex: 1; text-align: center; }
}

/* Fita zebrada decorativa */
.bf-tape {
    height: 10px;
    background: repeating-linear-gradient(-45deg, #ff9a1a 0 14px, #0b0612 14px 28px);
}

/* ----- Hero Black Friday ----- */
.bf-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: #ff9a1a;
    color: #000;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.bf-hero-title {
    background: linear-gradient(135deg, #ff9a1a 0%, #e6007e 62%, #b45be6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ----- Botões de acento: texto preto sobre o laranja ----- */
html.bf-theme [class*="bg-mwf-cyan"][class*="text-mwf-dark"],
html.bf-theme [class*="from-mwf-cyan"][class*="text-mwf-dark"],
html.bf-theme [class*="from-cyan-500"][class*="text-mwf-dark"],
html.bf-theme [class*="bg-cyan-500"][class*="text-mwf-dark"],
html.bf-theme [class*="bg-gradient"][class*="text-mwf-dark"],
html.bf-theme [class*="bg-gradient"][class*="text-[#0e0617]"],
html.bf-theme [class*="bg-[#b45be6]"][class*="text-[#0e0617]"],
html.bf-theme [class*="bg-cyan-"][class*="text-white"],
html.bf-theme [class*="from-cyan-"][class*="text-white"],
html.bf-theme [class*="bg-mwf-cyan"][class*="text-white"],
html.bf-theme [class*="from-mwf-cyan"][class*="text-white"] {
    color: #000 !important;
}

html.bf-theme .gradient-text,
html.bf-theme .bg-brand-gradient { background-image: var(--mwf-brand-gradient); }
html.bf-theme .gradient-text { -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
html.bf-theme .gradient-animated { background-image: linear-gradient(135deg, #5a117b, #e6007e, #ff9a1a); }
html.bf-theme input[type="checkbox"]:checked { background: linear-gradient(135deg, #ff9a1a, #f28c0f); }
html.bf-theme input:focus, html.bf-theme textarea:focus, html.bf-theme select:focus {
    border-color: #ff9a1a;
    box-shadow: 0 0 0 3px rgba(255, 154, 26, 0.15);
}
html.bf-theme ::selection { background: rgba(255, 154, 26, 0.35); color: #fff; }
html.bf-theme ::-webkit-scrollbar-thumb:hover { background: #ff9a1a; }
html.bf-theme .glow-cyan { box-shadow: 0 0 20px rgba(255, 154, 26, 0.3), 0 0 40px rgba(255, 154, 26, 0.1); }
html.bf-theme .glow-cyan-strong { box-shadow: 0 0 30px rgba(255, 154, 26, 0.5), 0 0 60px rgba(255, 154, 26, 0.2); }
html.bf-theme .glow-purple { box-shadow: 0 0 20px rgba(230, 0, 126, 0.3), 0 0 40px rgba(230, 0, 126, 0.1); }
html.bf-theme .text-glow { text-shadow: 0 0 20px rgba(255, 154, 26, 0.5); }
html.bf-theme .spinner { border-color: #2e1a47; border-top-color: #ff9a1a; }
html.bf-theme .toast.success { border-color: #ff9a1a; }
html.bf-theme .nav-link::after { background: linear-gradient(90deg, #ff9a1a, #e6007e); }

/* Cores fixas (hex) usadas em carrinho, favoritos, pedidos e chat */
html.bf-theme .bg-\[\#0e0617\] { background-color: #0b0612 !important; }
html.bf-theme .bg-\[\#170a26\] { background-color: #170b26 !important; }
html.bf-theme .bg-\[\#2d1844\] { background-color: #2a1740 !important; }
html.bf-theme .border-\[\#2d1844\] { border-color: #2e1a47 !important; }
html.bf-theme .text-\[\#b45be6\],
html.bf-theme .hover\:text-\[\#b45be6\]:hover { color: #ff9a1a !important; }
html.bf-theme .hover\:bg-\[\#b45be6\]:hover { background-color: #ff9a1a !important; }
html.bf-theme .hover\:border-\[\#b45be6\]\/50:hover,
html.bf-theme .focus\:border-\[\#b45be6\]:focus { border-color: #ff9a1a !important; }
html.bf-theme .hover\:bg-\[\#2d1844\]:hover,
html.bf-theme .hover\:bg-\[\#3d2358\]:hover { background-color: #2e1a47 !important; }
html.bf-theme [class*="bg-[#b45be6]"] { background-color: #ff9a1a; }
html.bf-theme [class*="text-[#f28c0f]"] { color: #e6007e; }

/* Cartões com destaque laranja ao tocar/passar o mouse */
html.bf-theme .product-card:hover,
html.bf-theme .bg-mwf-card.rounded-2xl:hover {
    border-color: rgba(255, 154, 26, 0.6);
    box-shadow: 0 0 0 1px rgba(255, 154, 26, 0.35), 0 12px 32px -12px rgba(255, 154, 26, 0.35);
}

/* ----- Selo "Pronta entrega" (vale para qualquer tema) ----- */
.selo-pronta-entrega {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ---------------------------------------------------------------------
   Black Friday — pequenos toques das cores da marca (lilás e laranja)
   O visual continua preto/laranja/vermelho; a marca aparece só em detalhes.
   --------------------------------------------------------------------- */
html.bf-theme {
    --marca-gradiente: linear-gradient(90deg, #5a117b 0%, #b45be6 35%, #f28c0f 70%, #e6007e 100%);
}

/* Filete com o degradê da marca abaixo da faixa e do cabeçalho */
html.bf-theme .bf-strip {
    border-bottom: 0;
    position: relative;
}
html.bf-theme .bf-strip::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -3px;
    height: 3px;
    background: var(--marca-gradiente);
}
html.bf-theme header.fixed { border-bottom-color: rgba(180, 91, 230, 0.35); }

/* Selo de pronta entrega com o lilás da marca */
html.bf-theme .selo-pronta-entrega {
    background: linear-gradient(135deg, #5a117b, #b45be6);
    color: #fff;
}

/* Brilho lilás e laranja bem sutil no fundo do hero */
html.bf-theme .hero-section > .absolute.inset-0::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 88% 12%, rgba(180, 91, 230, 0.30), transparent 46%),
        radial-gradient(circle at 8% 92%, rgba(230, 0, 126, 0.16), transparent 46%);
}

/* Fita zebrada com um fio do degradê da marca */
html.bf-theme .bf-tape { position: relative; }
html.bf-theme .bf-tape::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -3px;
    height: 3px;
    background: var(--marca-gradiente);
}

/* Detalhes de interação em lilás */
html.bf-theme .nav-link::after { background: var(--marca-gradiente); }
html.bf-theme ::selection { background: rgba(180, 91, 230, 0.4); color: #fff; }
html.bf-theme input:focus, html.bf-theme textarea:focus, html.bf-theme select:focus {
    border-color: #b45be6;
    box-shadow: 0 0 0 3px rgba(180, 91, 230, 0.22);
}
html.bf-theme ::-webkit-scrollbar-thumb:hover { background: #b45be6; }
html.bf-theme .bf-hero-badge { box-shadow: 0 0 0 3px rgba(180, 91, 230, 0.35); }

/* Logo da marca no cabeçalho: contorno discreto para destacar do fundo preto */
html.bf-theme header img[alt="Loja MegaFit"] { box-shadow: 0 0 0 1px rgba(180, 91, 230, 0.45); }

/* Aviso de cookies: o atributo hidden precisa vencer as classes flex/fixed do Tailwind */
#cookie-banner[hidden], #cookie-modal[hidden] { display: none !important; }
