/* ===== ROOXIS Custom Styles ===== */

/* Glass panel effect */
.glass-panel {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Hero gradient */
.hero-gradient {
    background: radial-gradient(circle at top right, #E0F2FE 0%, transparent 40%),
                radial-gradient(circle at bottom left, #F3E8FF 0%, transparent 40%);
}

/* Nav scroll state */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* ===== Scroll Animations ===== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.12);
}

/* ===== FAQ Accordion ===== */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.faq-answer.open {
    max-height: 500px;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* ===== Help Article Prose ===== */
.prose-article {
    max-width: 700px;
}

.prose-article h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.prose-article h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #334155;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose-article p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #475569;
}

.prose-article ul,
.prose-article ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: #475569;
}

.prose-article ul {
    list-style-type: disc;
}

.prose-article ol {
    list-style-type: decimal;
}

.prose-article li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.prose-article strong {
    color: #1e293b;
    font-weight: 600;
}

.prose-article code {
    background: #f1f5f9;
    color: #dc2626;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.prose-article pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.prose-article pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.prose-article a {
    color: #2563EB;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose-article a:hover {
    color: #1d4ed8;
}

.prose-article img {
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    max-width: 100%;
}

.prose-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.prose-article table th,
.prose-article table td {
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.prose-article table th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e293b;
}

/* Callout boxes (from blockquotes) */
.prose-article blockquote {
    border-left: 4px solid #e2e8f0;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    background: #f8fafc;
    border-radius: 0 0.5rem 0.5rem 0;
}

/* Tip callout */
.prose-article blockquote:has(strong:first-child) {
    border-left-color: #2563EB;
    background: #eff6ff;
}

/* Warning callout */
.callout-warning {
    border-left-color: #f59e0b !important;
    background: #fffbeb !important;
}

/* Note callout */
.callout-note {
    border-left-color: #6b7280 !important;
    background: #f9fafb !important;
}

.callout-tip {
    border-left-color: #2563EB !important;
    background: #eff6ff !important;
}

/* ===== Table of Contents ===== */
.toc-sidebar {
    position: sticky;
    top: 100px;
}

.toc-sidebar a {
    display: block;
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
    color: #64748b;
    border-left: 2px solid #e2e8f0;
    transition: all 0.2s ease;
    text-decoration: none;
}

.toc-sidebar a:hover {
    color: #2563EB;
    border-left-color: #2563EB;
}

.toc-sidebar a.active {
    color: #2563EB;
    border-left-color: #2563EB;
    font-weight: 600;
    background: #eff6ff;
}

.toc-sidebar a.toc-h3 {
    padding-left: 1.5rem;
    font-size: 0.75rem;
}

/* ===== Image Placeholder ===== */
.image-placeholder {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===== Amazon Button ===== */
.btn-amazon {
    background: #FF9900;
    color: #111;
    font-weight: 700;
    transition: background 0.2s ease;
}

.btn-amazon:hover {
    background: #FFB340;
}

/* ===== Filter Tabs ===== */
.filter-tab {
    transition: all 0.2s ease;
}

.filter-tab.active {
    background: #2563EB;
    color: white;
}

/* ===== Product Gallery ===== */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.gallery-thumb {
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gallery-thumb:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ===== Smooth Scroll ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Mega Menu ===== */

/* Panels hidden by default — pointer-events: none on wrapper prevents
   later-in-DOM panels from blocking clicks on earlier panels */
.mega-panel {
    pointer-events: none;
}

.mega-panel.open {
    pointer-events: auto;
}

.mega-panel .mega-panel-inner {
    transform: translateY(-8px);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.mega-panel.open .mega-panel-inner {
    transform: translateY(0);
    opacity: 1;
}

/* Backdrop */
.mega-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* Chevron rotation when open */
.mega-trigger.active .mega-chevron {
    transform: rotate(180deg);
}

/* Active button state */
.mega-trigger.active .mega-btn {
    color: #2563EB;
    background: rgba(37, 99, 235, 0.06);
}

/* ===== Mobile Menu (Full-screen takeover) ===== */

/* Backdrop fade */
.mobile-menu-backdrop {
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open .mobile-menu-backdrop {
    opacity: 1;
}

/* Panel slide-up entrance */
.mobile-menu-panel {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease;
}

.mobile-menu.open .mobile-menu-panel {
    transform: translateY(0);
    opacity: 1;
}

/* Staggered nav item entrance */
.mobile-nav-item {
    opacity: 0;
    transform: translateY(12px);
}

.mobile-menu.open .mobile-nav-item {
    animation: mobileNavIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.mobile-menu.open .mobile-nav-item:nth-child(1) { animation-delay: 0.06s; }
.mobile-menu.open .mobile-nav-item:nth-child(2) { animation-delay: 0.10s; }
.mobile-menu.open .mobile-nav-item:nth-child(3) { animation-delay: 0.14s; }
.mobile-menu.open .mobile-nav-item:nth-child(4) { animation-delay: 0.18s; }
.mobile-menu.open .mobile-nav-item:nth-child(5) { animation-delay: 0.22s; }

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

/* Mobile accordion */
.mobile-accordion-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-accordion-content > div {
    overflow: hidden;
}

.mobile-accordion.active .mobile-accordion-content {
    grid-template-rows: 1fr;
}

.mobile-accordion.active .mobile-accordion-icon {
    transform: rotate(180deg);
}

/* Active tap feedback for touch */
@media (hover: none) {
    .mobile-nav-item:active,
    .mobile-accordion-trigger:active {
        transform: scale(0.98);
    }
}

/* Momentum scrolling */
.mobile-menu-panel {
    -webkit-overflow-scrolling: touch;
}

/* Body scroll lock when mobile menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    touch-action: none;
}
