/**
 * SREV Labs - Master Stylesheet (Clean, Professional, Category-First Architecture)
 * Crisp Light Canvas, Deep Navy Typography, Vibrant Blue Accents & High-End UX
 */

:root {
    /* Backgrounds */
    --bg-main: #f8fafc;
    --bg-white: #ffffff;
    --bg-surface: #f1f5f9;
    --bg-card: #ffffff;
    --bg-dark: #0f172a;
    
    /* Brand & Accent Colors */
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-border: #bfdbfe;
    
    --accent-cyan: #06b6d4;
    --accent-indigo: #4f46e5;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    
    --whatsapp-green: #22c55e;
    --whatsapp-hover: #16a34a;
    
    /* Typography (High-Contrast & Sharp Readability) */
    --text-primary: #0f172a;
    --text-secondary: #1e293b;
    --text-muted: #334155;
    --text-light: #475569;
    
    /* Borders & Shadows */
    --border-subtle: #cbd5e1;
    --border-card: #cbd5e1;
    --border-hover: #93c5fd;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(226, 232, 240, 0.8);
    --shadow-card-hover: 0 12px 28px -4px rgba(37, 99, 235, 0.12), 0 0 0 1.5px rgba(37, 99, 235, 0.4);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-secondary);
    font-family: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", "Inter", "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 800;
}

p {
    color: var(--text-secondary);
    font-weight: 500;
}

.text-slate-500, .text-slate-600 {
    color: #334155 !important;
}

.text-slate-400 {
    color: #475569 !important;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.site-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Category Grid Card (Visual Banner + Badge + Clean Architecture) */
.category-card {
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}
.category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-card-hover);
}

.category-card .cat-banner {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    overflow: hidden;
    border-bottom: 1px solid var(--border-subtle);
}
.category-card .cat-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.category-card:hover .cat-banner img {
    transform: scale(1.05);
}

.category-card .cat-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(6px);
    color: #38bdf8;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    z-index: 10;
}

.category-card .cat-info {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.category-card .cat-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}

.category-card .explore-link {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    transition: var(--transition);
}
.category-card:hover .explore-link {
    gap: 9px;
}

/* Template Showcase Card */
.template-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
}
.template-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card-hover);
}

.template-card .preview-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #0f172a;
    border-bottom: 1px solid var(--border-subtle);
}
.template-card .preview-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.template-card:hover .preview-wrap img {
    transform: scale(1.03);
}

/* Action Buttons */
.btn-primary {
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    transition: var(--transition);
}
.btn-primary:hover {
    background: var(--primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-primary);
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border-card);
    cursor: pointer;
    transition: var(--transition);
}
.btn-secondary:hover {
    background: var(--bg-surface);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-whatsapp {
    background: var(--whatsapp-green);
    color: #ffffff;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
    transition: var(--transition);
}
.btn-whatsapp:hover {
    background: var(--whatsapp-hover);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35);
}

/* Category Filter Navigation Bar */
.category-nav-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}
.category-nav-wrap::-webkit-scrollbar {
    height: 4px;
}
.category-nav-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.category-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
.category-nav-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
}
.category-nav-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
}

/* Clean Form Controls */
.form-control-clean {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 14px;
    transition: var(--transition);
}
.form-control-clean:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* =========================================================
   WEBSITE DARK THEME ENGINE (Controlled via Navbar Button)
   ========================================================= */
body.dark-theme {
    --bg-main: #0b0f17;
    --bg-white: #0f172a;
    --bg-surface: #1e293b;
    --bg-card: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-subtle: #1e293b;
    --border-card: #334155;
    background-color: #0b0f17 !important;
    color: #cbd5e1 !important;
}

body.dark-theme section.bg-white,
body.dark-theme div.bg-white,
body.dark-theme main.bg-white {
    background-color: #0f172a !important;
}

body.dark-theme section.bg-slate-50,
body.dark-theme div.bg-slate-50,
body.dark-theme main.bg-slate-50 {
    background-color: #0b0f17 !important;
}

body.dark-theme .category-card {
    background: #0f172a !important;
    border-color: #1e293b !important;
}
body.dark-theme .cat-info {
    background: #0f172a !important;
}
body.dark-theme .cat-title {
    color: #f8fafc !important;
}

body.dark-theme .template-card {
    background: #0f172a !important;
    border-color: #1e293b !important;
}
body.dark-theme .template-card .bg-white {
    background-color: #0f172a !important;
}
body.dark-theme .template-card .bg-slate-50 {
    background-color: #162032 !important;
    border-color: #1e293b !important;
    color: #cbd5e1 !important;
}
body.dark-theme .template-card .border-slate-100 {
    border-color: #1e293b !important;
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme .text-slate-900 {
    color: #f8fafc !important;
}

body.dark-theme .text-slate-600,
body.dark-theme .text-slate-500,
body.dark-theme .text-slate-700 {
    color: #94a3b8 !important;
}

body.dark-theme .border-slate-200,
body.dark-theme .border-slate-200\/80 {
    border-color: #1e293b !important;
}

body.dark-theme .category-nav-pill {
    background: #162032 !important;
    border-color: #1e293b !important;
    color: #cbd5e1 !important;
}
body.dark-theme .category-nav-pill:hover {
    background: #1e293b !important;
    color: #38bdf8 !important;
}
body.dark-theme .category-nav-pill.active {
    background: var(--primary) !important;
    color: #ffffff !important;
}

body.dark-theme input[type="text"],
body.dark-theme select,
body.dark-theme textarea {
    background-color: #162032 !important;
    border-color: #334155 !important;
    color: #f8fafc !important;
}

body.dark-theme .ajax-page-btn,
body.dark-theme .ajax-home-page-btn {
    background-color: #162032 !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

body.dark-theme .bg-slate-50,
body.dark-theme .bg-slate-100 {
    background-color: #0b0f17 !important;
    color: #e2e8f0 !important;
}
body.dark-theme .bg-white {
    background-color: #111827 !important;
    border-color: #1f2937 !important;
}
body.dark-theme .text-slate-800 {
    color: #f1f5f9 !important;
}
body.dark-theme .border-slate-300 {
    border-color: #334155 !important;
}


