/* ===================================
   BolderWeb - Custom CSS
   Only animations & helpers Tailwind can't do
   =================================== */

/* ── Dark/Light Theme System ── */
:root {
    --bg-base: #0F0F0F;
    --bg-surface: #1A1A1A;
    --bg-elevated: #2A2A2A;
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    --border-theme: rgba(255,255,255,0.1);
    --bg-page: #FFFFFF;
    --text-page: #0F0F0F;
    --bg-card: #FFFFFF;
    --border-card: #F3F4F6;
}

[data-theme="light"] {
    --bg-base: #FFFFFF;
    --bg-surface: #F9FAFB;
    --bg-elevated: #F3F4F6;
    --text-primary: #0F0F0F;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    --border-theme: rgba(0,0,0,0.08);
    --bg-page: #F9FAFB;
    --text-page: #0F0F0F;
    --bg-card: #FFFFFF;
    --border-card: #E5E7EB;
}

/* Override key elements for light mode */
[data-theme="light"] .bg-brand-black { background-color: var(--bg-base) !important; }
[data-theme="light"] .bg-brand-black .text-white,
[data-theme="light"] .bg-brand-black .text-gray-300,
[data-theme="light"] .bg-brand-black .text-gray-400,
[data-theme="light"] .bg-brand-black .text-gray-500 { color: var(--text-page) !important; }
[data-theme="light"] .bg-brand-black .text-gray-400:hover,
[data-theme="light"] .bg-brand-black .text-gray-300:hover { color: #DC2626 !important; }
[data-theme="light"] .bg-brand-black .border-white\/5,
[data-theme="light"] .bg-brand-black .border-white\/10 { border-color: var(--border-theme) !important; }
[data-theme="light"] .bg-brand-black .bg-white\/5 { background-color: rgba(0,0,0,0.04) !important; }
[data-theme="light"] .bg-brand-black .bg-white\/10 { background-color: rgba(0,0,0,0.06) !important; }
[data-theme="light"] .bg-brand-black .hover\:bg-white\/10:hover { background-color: rgba(0,0,0,0.06) !important; }
[data-theme="light"] .bg-brand-black .hover\:bg-white\/5:hover { background-color: rgba(0,0,0,0.04) !important; }
[data-theme="light"] .bg-brand-black .hover\:text-white:hover { color: var(--text-page) !important; }
[data-theme="light"] .bg-brand-black .hover\:text-brand-red:hover { color: #DC2626 !important; }

/* Light mode: white bg sections become light gray */
[data-theme="light"] body { background-color: var(--bg-page); color: var(--text-page); }

/* Announcement bar in light mode */
[data-theme="light"] .bg-brand-black.text-white.text-xs { color: var(--text-page) !important; }

/* Nav links in light mode */
[data-theme="light"] .text-gray-400 { color: var(--text-secondary) !important; }
[data-theme="light"] .text-gray-300 { color: var(--text-secondary) !important; }
[data-theme="light"] .text-gray-500 { color: var(--text-muted) !important; }

/* Borders in light mode */
[data-theme="light"] .border-white\/5 { border-color: var(--border-theme) !important; }
[data-theme="light"] .border-white\/10 { border-color: var(--border-theme) !important; }
[data-theme="light"] .border-white\/20 { border-color: rgba(0,0,0,0.12) !important; }
[data-theme="light"] .border-white\/30 { border-color: rgba(0,0,0,0.15) !important; }

/* White backgrounds in light mode header/footer */
[data-theme="light"] header .bg-white\/5 { background-color: rgba(0,0,0,0.03) !important; }
[data-theme="light"] footer .border-white\/10 { border-color: var(--border-theme) !important; }

/* Search input in light mode header */
[data-theme="light"] header .bg-white { background-color: var(--bg-elevated) !important; color: var(--text-page) !important; }
[data-theme="light"] header .text-brand-black { color: var(--text-page) !important; }
[data-theme="light"] header .placeholder-gray-400::placeholder { color: #9CA3AF !important; }

/* Hero section in light mode */
[data-theme="light"] .bg-brand-black .bg-gradient-to-t { background: linear-gradient(to top, var(--bg-base), rgba(255,255,255,0.7), rgba(255,255,255,0.5)) !important; }

/* White text on dark sections stays white */
[data-theme="light"] .bg-brand-red .text-white { color: #FFFFFF !important; }

/* Theme toggle button */
.theme-toggle { transition: transform 0.3s ease; }
.theme-toggle:hover { transform: rotate(15deg); }

/* ── Shop Now Button Pulse ── */
@keyframes pulse-slow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 35, 60, 0.5); }
    50% { box-shadow: 0 0 0 12px rgba(239, 35, 60, 0); }
}
.animate-pulse-slow {
    animation: pulse-slow 2s ease-in-out infinite;
}
.animate-pulse-slow:hover {
    animation: none;
}

/* ── Scroll Animation Helpers ── */
[data-animate] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-animate].animated {
    opacity: 1;
    transform: translateY(0);
}

[data-animate-delay="100"] { transition-delay: 0.1s; }
[data-animate-delay="200"] { transition-delay: 0.2s; }
[data-animate-delay="300"] { transition-delay: 0.3s; }
[data-animate-delay="400"] { transition-delay: 0.4s; }
[data-animate-delay="500"] { transition-delay: 0.5s; }

/* ── About Us Animations ── */

/* Floating animation for stat cards */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-float-delayed { animation: float 3s ease-in-out infinite; animation-delay: 1.5s; }

/* Slide in from left */
@keyframes slide-in-left {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}
.animate-slide-left {
    animation: slide-in-left 0.6s ease-out forwards;
}

/* Slide in from right */
@keyframes slide-in-right {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
.animate-slide-right {
    animation: slide-in-right 0.6s ease-out forwards;
}

/* Scale in */
@keyframes scale-in {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.animate-scale-in {
    animation: scale-in 0.5s ease-out forwards;
}

/* Gradient shift for hero badge */
@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Fade in up */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up {
    animation: fade-in-up 0.7s ease-out forwards;
}

/* Bounce in */
@keyframes bounce-in {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); }
}
.animate-bounce-in {
    animation: bounce-in 0.8s ease-out forwards;
}

/* Shimmer effect on hover for cards */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.shimmer-hover {
    position: relative;
    overflow: hidden;
}
.shimmer-hover::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s;
}
.shimmer-hover:hover::after {
    opacity: 1;
    animation: shimmer 1.5s infinite;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
    width: 0;
    display: none;
}

html {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* ── Cart Drawer Open/Close States ── */
.cart-overlay.open {
    opacity: 1 !important;
    visibility: visible !important;
}

.cart-drawer.open {
    right: 0 !important;
}

/* ── Fly to Cart Animation ── */
.fly-image {
    position: fixed;
    z-index: 9999;
    border-radius: 8px;
    object-fit: cover;
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Toast Animation ── */
.toast {
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border: 1px solid #f0f0f0;
    min-width: 280px;
    max-width: 360px;
}

.toast.error {
    border-left: 4px solid #DC2626;
}

.toast:not(.error) {
    border-left: 4px solid #DC2626;
}

.toast .toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast:not(.error) .toast-icon {
    background: rgba(220,38,38,0.1);
    color: #DC2626;
}

.toast.error .toast-icon {
    background: #FEF2F2;
    color: #DC2626;
}

.toast .toast-icon svg {
    width: 20px;
    height: 20px;
}

.toast .toast-content h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0A0A0B;
    margin-bottom: 2px;
}

.toast .toast-content p {
    font-size: 0.78rem;
    color: #6b7280;
}

.toast.removing {
    animation: toastOut 0.3s ease forwards;
}

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

@keyframes toastOut {
    to { opacity: 0; transform: translateX(100px); }
}

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

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

/* ── Header Scrolled State ── */
#header.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* ── BTC Notice Pill Glow ── */
.btc-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(250,204,21,0.4), 0 0 20px rgba(250,204,21,0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(250,204,21,0.8), 0 0 40px rgba(250,204,21,0.4), 0 0 60px rgba(250,204,21,0.2);
    }
}

/* ── Admin-written SEO copy blocks (rendered by render_seo_content) ──
   Tailwind's typography plugin is not loaded, so the prose defaults that the
   preflight reset strips off headings, lists and tables are restored here. */
.seo-content {
    color: #4b5563;
    font-size: 0.9375rem;
    line-height: 1.75;
}
.seo-content > *:first-child { margin-top: 0; }
.seo-content > *:last-child  { margin-bottom: 0; }
.seo-content p,
.seo-content ul,
.seo-content ol,
.seo-content blockquote,
.seo-content table,
.seo-content figure { margin: 0 0 1rem; }
.seo-content h2,
.seo-content h3,
.seo-content h4,
.seo-content h5,
.seo-content h6 {
    font-family: 'Oswald', system-ui, sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    color: #0F0F0F;
    margin: 1.75rem 0 0.75rem;
    line-height: 1.25;
}
.seo-content h2 { font-size: 1.375rem; }
.seo-content h3 { font-size: 1.125rem; }
.seo-content h4,
.seo-content h5,
.seo-content h6 { font-size: 1rem; }
.seo-content strong, .seo-content b { color: #0F0F0F; font-weight: 700; }
.seo-content a { color: #DC2626; text-decoration: underline; }
.seo-content a:hover { color: #B91C1C; }
.seo-content ul { list-style: disc; padding-left: 1.35rem; }
.seo-content ol { list-style: decimal; padding-left: 1.35rem; }
.seo-content li { margin: 0.35rem 0; }
.seo-content blockquote {
    border-left: 3px solid #DC2626;
    padding: 0.25rem 0 0.25rem 1rem;
    color: #374151;
    font-style: italic;
}
.seo-content hr { border: 0; border-top: 1px solid #e5e7eb; margin: 1.75rem 0; }
.seo-content img { max-width: 100%; height: auto; border-radius: 0.75rem; }
.seo-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    display: block;
    overflow-x: auto;
}
.seo-content th,
.seo-content td { border: 1px solid #e5e7eb; padding: 0.5rem 0.75rem; text-align: left; }
.seo-content th { background: #fff; font-weight: 700; color: #0F0F0F; }
