:root {
    --primary: #00e676;
    --primary-dark: #00c853;
    --primary-glow: rgba(0, 230, 118, 0.4);
    --dark: #000000;
    --dark-100: #0a0a0a;
    --dark-200: #111111;
    --dark-300: #1a1a1a;
    --card-bg: #0d0d0d;
    --border: rgba(0, 230, 118, 0.1);
    --border-hover: rgba(0, 230, 118, 0.4);
    --text-gray: #888888;
    --text-light: #e0e0e0;
    --text-white: #ffffff;
    --glow: 0 0 30px rgba(0, 230, 118, 0.25);
    --glow-strong: 0 0 50px rgba(0, 230, 118, 0.4);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif; 
    background: var(--dark); 
    color: var(--text-white); 
    overflow-x: hidden; 
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Top accent line */
.top-accent-line {
    position: fixed; top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
    z-index: 1001; opacity: 0.8;
}

/* Section Header */
.section-header { text-align: center; margin-bottom: 60px; }
.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.2);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.section-title { font-size: 2.8rem; font-weight: 800; margin-bottom: 16px; }
.section-title span { color: var(--primary); position: relative; }
.section-subtitle { color: var(--text-gray); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* NAVBAR */
.navbar { 
    position: fixed; top: 2px; left: 0; width: 100%; 
    background: rgba(0, 0, 0, 0.9); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border); 
    transition: var(--transition); z-index: 1000; 
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; height: 75px; }
.navbar.scrolled { box-shadow: 0 4px 30px rgba(0, 0, 0, 0.8); }
.navbar.scrolled .container { height: 65px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon-box {
    width: 42px; height: 42px; border-radius: 12px;
    background: rgba(0, 230, 118, 0.1); border: 2px solid var(--primary);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; transition: var(--transition);
}
.logo:hover .logo-icon-box { box-shadow: var(--glow); }
.logo-img { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; }
.logo-text { font-weight: 800; font-size: 1.6rem; letter-spacing: -0.5px; }
.logo-text span { color: var(--primary); }
.nav-links { display: flex; gap: 36px; }
.nav-links a { font-weight: 500; font-size: 0.9rem; color: var(--text-gray); position: relative; padding: 6px 0; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--primary); transition: width 0.3s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text-white); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.btn-contact { 
    padding: 10px 24px; background: transparent; border: 1.5px solid var(--primary); 
    color: var(--primary); border-radius: 50px; font-weight: 600; font-size: 0.85rem; 
    display: flex; align-items: center; gap: 8px; transition: var(--transition);
}
.btn-contact:hover { background: var(--primary); color: var(--dark); box-shadow: var(--glow); }
.mobile-menu-btn { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

/* HERO */
.hero { 
    min-height: 100vh; display: flex; align-items: center; position: relative; 
    overflow: hidden; padding-top: 100px; 
}
.hero-bg { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 230, 118, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 230, 118, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(0, 230, 118, 0.03) 0%, transparent 50%);
    z-index: -1; 
}
.hero-grid-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(0, 230, 118, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 230, 118, 0.02) 1px, transparent 1px);
    background-size: 60px 60px; z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-content { position: relative; }
.hero-tag {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; background: rgba(0, 230, 118, 0.08);
    border: 1px solid rgba(0, 230, 118, 0.2); border-radius: 50px;
    font-size: 0.8rem; font-weight: 600; color: var(--primary); margin-bottom: 24px;
}
.tag-dot { width: 6px; height: 6px; background: var(--primary); border-radius: 50%; animation: pulseDot 2s infinite; }
@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 0 var(--primary-glow); }
    50% { box-shadow: 0 0 0 8px transparent; }
}
.hero-content h1 { font-size: 3.8rem; font-weight: 900; line-height: 1.1; margin-bottom: 20px; letter-spacing: -1px; }
.hero-content h1 .highlight { 
    background: linear-gradient(135deg, var(--primary) 0%, #69f0ae 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-content p { font-size: 1.1rem; color: var(--text-gray); margin-bottom: 36px; max-width: 85%; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }
.btn-primary { 
    padding: 14px 36px; background: var(--primary); color: var(--dark); 
    font-weight: 700; border-radius: 50px; font-size: 0.95rem; border: none; 
    cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 230, 118, 0.3);
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--glow-strong); transform: translateY(-3px); }
.btn-secondary { 
    padding: 14px 36px; background: transparent; color: var(--primary); 
    font-weight: 700; border-radius: 50px; font-size: 0.95rem; 
    border: 1.5px solid var(--primary); cursor: pointer; transition: var(--transition); 
    display: inline-flex; align-items: center; gap: 10px;
}
.btn-secondary:hover { background: rgba(0, 230, 118, 0.08); transform: translateY(-3px); box-shadow: var(--glow); }

.hero-stats { display: flex; gap: 40px; }
.stat-item { display: flex; flex-direction: column; }
.stat-number { font-size: 1.8rem; font-weight: 800; color: var(--primary); font-family: 'JetBrains Mono', monospace; }
.stat-label { font-size: 0.8rem; color: var(--text-gray); font-weight: 500; }

.hero-visual { position: relative; height: 420px; display: flex; align-items: center; justify-content: center; }
.hero-card-main {
    background: var(--dark-300); border: 1px solid var(--border);
    border-radius: 20px; padding: 36px; text-align: center;
    width: 240px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative; z-index: 2;
}
.hero-card-icon {
    width: 56px; height: 56px; border-radius: 16px;
    background: rgba(0, 230, 118, 0.1); display: flex;
    align-items: center; justify-content: center; margin: 0 auto 16px;
    font-size: 1.5rem; color: var(--primary);
}
.hero-card-main h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.hero-card-main p { font-size: 0.8rem; color: var(--text-gray); margin-bottom: 16px; }
.hero-card-dots { display: flex; gap: 8px; justify-content: center; }
.hero-card-dots .dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.2); }
.hero-card-dots .dot.active { background: var(--primary); width: 24px; border-radius: 4px; }

.hero-floating-card {
    position: absolute; background: var(--dark-200); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px 18px; display: flex; align-items: center; gap: 10px;
    font-size: 0.85rem; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    animation: floatCard 5s ease-in-out infinite; z-index: 1;
}
.hero-floating-card i { color: var(--primary); font-size: 1.1rem; }
.card-1 { top: 5%; right: 5%; animation-delay: 0s; }
.card-2 { bottom: 25%; left: 0; animation-delay: 1.5s; }
.card-3 { bottom: 10%; right: 10%; animation-delay: 3s; }
@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* SERVICES */
.services { padding: 120px 0; background: var(--dark-100); position: relative; }
.services::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(0, 230, 118, 0.03) 0%, transparent 60%);
    pointer-events: none;
}
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.service-card { 
    background: var(--card-bg); border-radius: var(--radius); padding: 36px 28px; 
    border: 1px solid var(--border); transition: var(--transition); position: relative; overflow: hidden;
}
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0; transition: opacity 0.4s;
}
.service-card:hover { transform: translateY(-8px); border-color: var(--border-hover); box-shadow: var(--glow); }
.service-card:hover::before { opacity: 1; }
.service-icon { 
    width: 56px; height: 56px; background: rgba(0, 230, 118, 0.08); 
    border-radius: 14px; display: flex; align-items: center; justify-content: center; 
    margin-bottom: 20px; font-size: 1.6rem; color: var(--primary);
}
.service-card h3 { font-size: 1.3rem; margin-bottom: 12px; font-weight: 700; }
.service-card p { color: var(--text-gray); font-size: 0.9rem; margin-bottom: 20px; line-height: 1.7; }
.service-link { 
    color: var(--primary); font-weight: 600; font-size: 0.85rem; 
    display: flex; align-items: center; gap: 6px; transition: var(--transition);
}
.service-link:hover { gap: 12px; }
.service-link i { font-size: 0.8rem; transition: var(--transition); }

/* TOOLS SECTION */
.tools { padding: 120px 0; position: relative; }

/* FILTER AREA */
.filter-area {
    display: flex; flex-direction: column; align-items: center; gap: 20px;
    margin-bottom: 50px; padding: 24px;
    background: var(--dark-200); border: 1px solid var(--border);
    border-radius: var(--radius);
}
.search-box { position: relative; width: 100%; max-width: 500px; }
.search-box i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-gray); font-size: 0.9rem; }
.search-box input { 
    width: 100%; padding: 14px 20px 14px 48px; border-radius: 50px; 
    background: var(--dark-300); border: 1px solid var(--border); color: white; 
    outline: none; font-size: 0.9rem; transition: var(--transition); font-family: 'Inter', sans-serif;
}
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.1); }
.search-box input::placeholder { color: var(--text-gray); }

.category-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.filter-pill { 
    padding: 8px 18px; border-radius: 50px; background: var(--dark-300); 
    color: var(--text-gray); cursor: pointer; transition: var(--transition); 
    border: 1px solid transparent; font-size: 0.8rem; font-weight: 500;
}
.filter-pill.active, .filter-pill:hover { 
    background: rgba(0, 230, 118, 0.1); color: var(--primary); border-color: var(--primary); 
}

.view-toggle { display: flex; gap: 0; background: var(--dark-300); border-radius: 50px; padding: 4px; }
.view-btn {
    padding: 10px 22px; border-radius: 50px; border: none; cursor: pointer;
    font-size: 0.8rem; font-weight: 600; transition: var(--transition);
    background: transparent; color: var(--text-gray); font-family: 'Inter', sans-serif;
    display: flex; align-items: center; gap: 8px;
}
.view-btn.active { background: var(--primary); color: var(--dark); }
.view-btn:hover:not(.active) { color: var(--text-white); }

/* SLIDER */
.tools-slider-container { position: relative; max-width: 1100px; margin: 0 auto; }
.tools-slider { 
    display: flex; gap: 24px; overflow-x: auto; scroll-behavior: smooth; 
    padding: 20px 10px; scrollbar-width: none; 
}
.tools-slider::-webkit-scrollbar { display: none; }

.tool-card { 
    flex: 0 0 calc(33.333% - 16px); min-width: 320px; 
    background: var(--card-bg); border-radius: var(--radius); overflow: hidden; 
    border: 1px solid var(--border); transition: var(--transition); cursor: pointer; 
    display: flex; flex-direction: column;
}
.tool-card:hover { transform: translateY(-8px); border-color: var(--primary); box-shadow: var(--glow); }
.tool-img { width: 100%; height: 180px; object-fit: cover; border-bottom: 1px solid var(--border); }
.tool-header { padding: 24px 24px 10px; }
.tool-icon { 
    width: 44px; height: 44px; background: rgba(0, 230, 118, 0.08); 
    border-radius: 10px; display: flex; align-items: center; justify-content: center; 
    margin-bottom: 12px; font-size: 1.2rem; color: var(--primary);
}
.tool-header h4 { font-size: 1.15rem; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.tool-body { padding: 0 24px 24px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.tool-body p { 
    color: var(--text-gray); font-size: 0.88rem; margin-bottom: 20px; 
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; 
}
.tool-link { 
    display: flex; align-items: center; justify-content: space-between; 
    color: var(--primary); font-weight: 600; font-size: 0.85rem;
    padding-top: 14px; border-top: 1px solid var(--border); 
}
.tool-card:hover .tool-link i { transform: translateX(5px); }
.tool-link i { transition: var(--transition); }

/* PRODUCTS GRID */
.products-grid-container { animation: fadeIn 0.4s ease; }
.products-grid { 
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; 
}
.products-grid .tool-card { flex: auto; min-width: unset; }

/* SLIDER CONTROLS */
.slider-controls { display: flex; justify-content: center; gap: 12px; margin-top: 36px; }
.slider-btn { 
    width: 44px; height: 44px; border-radius: 50%; background: var(--dark-300); 
    border: 1px solid var(--border); color: var(--primary); display: flex; 
    align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); 
}
.slider-btn:hover { background: var(--primary); color: var(--dark); box-shadow: var(--glow); }

/* FOOTER */
footer { padding: 60px 0 30px; background: var(--dark-100); border-top: 1px solid var(--border); }
.footer-content { display: flex; flex-direction: column; align-items: center; text-align: center; }
.footer-logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.8rem; margin-bottom: 16px; }
.footer-logo span { color: var(--primary); }
.footer-logo .logo-img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--primary); }
.footer-tagline { color: var(--text-gray); max-width: 500px; margin-bottom: 32px; font-size: 0.95rem; }
.footer-powered { display: flex; align-items: center; gap: 8px; color: var(--text-gray); font-size: 0.85rem; margin-bottom: 24px; }
.footer-powered span { color: var(--primary); font-weight: 600; }
.copyright { color: var(--text-gray); font-size: 0.8rem; padding-top: 24px; border-top: 1px solid var(--border); width: 100%; }

/* ========================================= */
/* MODAL STYLES - PREMIUM SPLIT-SCREEN UI    */
/* ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(12px);
    z-index: 2000; display: none; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease; padding: 20px;
}
.modal-overlay.active { display: flex; opacity: 1; }

.template-modal {
    background: var(--dark-200); 
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px; 
    width: 100%; 
    max-width: 1200px; 
    height: 90vh; /* Fixed height locks the modal in place */
    position: relative; 
    box-shadow: 0 40px 100px -20px rgba(0,0,0,0.8), 0 0 40px rgba(0, 230, 118, 0.1);
    transform: translateY(30px) scale(0.98); 
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden; /* Prevents outer scrollbars */
}
.modal-overlay.active .template-modal { transform: translateY(0) scale(1); }

.close-modal {
    position: absolute; top: 20px; right: 24px; 
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); 
    color: white; width: 44px; height: 44px; border-radius: 50%;
    cursor: pointer; z-index: 10; transition: var(--transition);
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.close-modal:hover { background: var(--primary); color: var(--dark); transform: rotate(90deg); }

/* The Split Layout Engine */
.template-modal-layout { 
    display: flex; 
    flex-direction: row; 
    height: 100%; 
    overflow: hidden; /* Isolates scrolling to the children */
}

/* LEFT SIDE: Image Gallery */
.template-gallery { 
    flex: 1.3; 
    padding: 40px; 
    background: var(--dark-300); 
    border-right: 1px solid var(--border); 
    overflow-y: auto; /* Independent scrolling */
    scrollbar-width: none; /* Hides scrollbar on Firefox */
}
.template-gallery::-webkit-scrollbar { display: none; } /* Hides scrollbar on Chrome/Edge */

.main-image-container { 
    width: 100%; 
    height: 500px; /* Big and beautiful on PC */
    background: radial-gradient(circle at center, #1a1a1a 0%, #050505 100%); 
    border-radius: 16px; 
    overflow: hidden; 
    margin-bottom: 24px; 
    border: 1px solid rgba(255,255,255,0.04); 
    display: flex; align-items: center; justify-content: center; 
}
.main-image-container img { 
    max-width: 95%; max-height: 95%; 
    object-fit: contain; /* Forces perfect aspect ratio without cropping */
    cursor: zoom-in; transition: transform 0.4s ease; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}
.main-image-container:hover img { transform: scale(1.03); }

.thumbnail-row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
.thumbnail-row::-webkit-scrollbar { display: none; }
.thumb { 
    width: 80px; height: 60px; border-radius: 10px; object-fit: cover; 
    cursor: pointer; border: 2px solid transparent; opacity: 0.4; transition: var(--transition); 
}
.thumb.active, .thumb:hover { opacity: 1; border-color: var(--primary); transform: translateY(-2px); }

/* RIGHT SIDE: Product Details */
.template-details { 
    flex: 1; 
    padding: 50px 40px; 
    display: flex; flex-direction: column; 
    overflow-y: auto; /* Independent scrolling */
    scrollbar-width: thin; scrollbar-color: var(--primary) transparent;
}
.template-details::-webkit-scrollbar { width: 4px; }
.template-details::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }

.badge { 
    display: inline-block; padding: 6px 16px; background: rgba(0, 230, 118, 0.08); 
    color: var(--primary); border-radius: 50px; font-size: 0.75rem; font-weight: 800; 
    letter-spacing: 1px; margin-bottom: 16px; width: max-content; border: 1px solid rgba(0, 230, 118, 0.2); 
}
.template-details h2 { font-size: 2.2rem; font-weight: 800; line-height: 1.2; margin-bottom: 16px; letter-spacing: -0.5px; }
.template-desc { color: var(--text-gray); margin-bottom: 32px; font-size: 1rem; line-height: 1.8; }

/* NEW: Ensures Rich Text Images look beautiful and don't break the layout */
.template-desc img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 16px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.template-desc ul, .template-desc ol { margin-left: 20px; margin-bottom: 16px; }

/* Dynamic Credentials UI */
.demo-credentials { margin-bottom: 32px; }
.cred-group { 
    background: rgba(0,0,0,0.3); padding: 20px; border-radius: 16px; 
    margin-bottom: 16px; border: 1px solid rgba(255,255,255,0.05); transition: var(--transition); 
}
.cred-group:hover { border-color: rgba(0, 230, 118, 0.3); background: rgba(0, 230, 118, 0.02); }
.cred-role-badge { 
    display: inline-block; background: rgba(0, 230, 118, 0.1); color: var(--primary); 
    padding: 4px 12px; border-radius: 6px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; 
    margin-bottom: 16px; border: 1px solid rgba(0, 230, 118, 0.2); 
}
.cred-link-btn { 
    display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; 
    color: var(--dark); background: var(--primary); padding: 8px 16px; 
    border-radius: 50px; font-weight: 700; text-decoration: none; transition: var(--transition); 
}
.cred-link-btn:hover { background: var(--text-white); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 230, 118, 0.3); }
.cred-box { font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; margin-bottom: 8px; color: var(--text-gray); }
.cred-box strong { color: var(--text-white); display: inline-block; width: 50px; }

.pricing-tier { margin-bottom: 32px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.05); }
.pricing-tier span { display: block; font-size: 0.85rem; color: var(--text-gray); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.pricing-tier strong { font-size: 2rem; color: var(--primary); font-weight: 900; }

/* Sticky Action Bar for the Right Column */
.template-actions { 
    position: sticky; 
    bottom: -50px; /* Pulls it flush with the bottom padding */
    background: var(--dark-200); /* Solid background prevents text from showing behind it */
    padding: 24px 0 50px 0; /* Creates space above buttons and fills bottom padding */
    margin-bottom: -50px; 
    margin-top: auto; 
    display: flex; 
    flex-direction: row; /* Places buttons side-by-side on PC */
    gap: 16px; 
    z-index: 20;
    border-top: 1px solid rgba(255,255,255,0.05); /* Clean separator line */
}
.template-actions .btn-primary, .template-actions .btn-secondary { 
    flex: 1; /* Makes both buttons exactly equal width */
    display: flex; justify-content: center; align-items: center; padding: 16px; font-size: 1rem; 
}


/* ========================================= */
/* MOBILE OPTIMIZATION ENGINE                */
/* ========================================= */
@media (max-width: 992px) {
    .modal-overlay { padding: 0; }
    .template-modal { 
        height: 100vh; max-height: 100vh; border-radius: 0; border: none; 
        transform: translateY(100%); /* Slide up animation for mobile */
    }
    .modal-overlay.active .template-modal { transform: translateY(0); }
    
    .template-modal-layout { 
        flex-direction: column; 
        overflow-y: auto; /* Re-enable full vertical scroll for mobile */
    }

    .template-actions {
        bottom: 0; 
        padding: 20px 0; 
        margin-bottom: -20px; 
        flex-direction: column; /* Stacks the buttons vertically on small phones */
    }
    
    .template-gallery { flex: none; padding: 20px; border-right: none; overflow-y: visible; background: transparent; }
    .template-details { flex: none; padding: 20px 20px 60px; overflow-y: visible; }
    
    /* Strict Mobile Image Constraint */
    .main-image-container { 
        height: 35vh; /* Never takes more than 35% of the screen height */
        min-height: 250px;
        margin-bottom: 16px;
    }
    .thumbnail-row { padding-bottom: 0; }
    .thumb { width: 60px; height: 45px; }
    
    .close-modal { top: 12px; right: 12px; background: rgba(0,0,0,0.5); backdrop-filter: blur(5px); }
    .template-details h2 { font-size: 1.8rem; }
    
    .cred-group .d-flex { flex-direction: column; align-items: flex-start !important; gap: 12px; margin-bottom: 12px; }
    .cred-link-btn { width: 100%; justify-content: center; margin-top: 0; }
}

/* LIGHTBOX */
.lightbox-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.95); backdrop-filter: blur(10px);
    z-index: 9999; display: none; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease; cursor: zoom-out;
}
.lightbox-overlay.active { display: flex; opacity: 1; }
.lightbox-overlay img { max-width: 90%; max-height: 90vh; border-radius: 8px; }
.lightbox-close { position: absolute; top: 20px; right: 40px; color: rgba(255,255,255,0.7); font-size: 3rem; cursor: pointer; }
.lightbox-close:hover { color: var(--primary); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .hero-content p { max-width: 100%; }
    .hero-btns { justify-content: center; }
    .hero-stats { justify-content: center; }
    .tool-card { flex: 0 0 calc(50% - 12px); }
}
@media (max-width: 768px) {
    .navbar .container { padding: 0 16px; height: 65px; }
    .logo-text { font-size: 1.2rem; }
    .logo-icon-box { width: 36px; height: 36px; }
    .logo-img { width: 28px; height: 28px; }
    
    .nav-links { 
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: var(--dark-200); 
        flex-direction: column; 
        align-items: center; 
        padding: 20px 0; 
        border-bottom: 1px solid var(--border); 
        gap: 16px; 
        backdrop-filter: blur(20px);
        background: rgba(0, 0, 0, 0.95);
    }
    .nav-links.active { display: flex; }
    .mobile-menu-btn { 
        display: block; 
        background: rgba(255,255,255,0.05);
        padding: 8px 12px;
        border-radius: 8px;
        border: 1px solid var(--border);
    }
    .btn-contact { display: none; }
    
    /* Hero Section Mobile */
    .hero { min-height: 90vh; padding-top: 80px; }
    .hero-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    .hero-content h1 { font-size: 2rem; line-height: 1.2; }
    .hero-content p { font-size: 0.95rem; max-width: 100%; }
    .hero-tag { font-size: 0.7rem; padding: 4px 12px; }
    .hero-btns { justify-content: center; flex-direction: column; align-items: center; width: 100%; }
    .hero-btns .btn-primary, .hero-btns .btn-secondary { 
        width: 100%; 
        max-width: 280px; 
        justify-content: center; 
        padding: 12px 24px; 
        font-size: 0.9rem; 
    }
    .hero-stats { justify-content: center; gap: 24px; flex-wrap: wrap; }
    .stat-number { font-size: 1.4rem; }
    
    .hero-visual { height: 200px; }
    .hero-card-main { 
        width: 180px; 
        padding: 20px; 
        transform: scale(0.85);
    }
    .hero-card-main h3 { font-size: 0.95rem; }
    .hero-card-main p { font-size: 0.7rem; }
    
    /* Services Mobile */
    .services { padding: 60px 0; }
    .section-title { font-size: 1.8rem; }
    .section-subtitle { font-size: 0.9rem; }
    .services-grid { grid-template-columns: 1fr; gap: 16px; }
    .service-card { padding: 24px 20px; }
    
    /* Products/Tools Mobile */
    .tools { padding: 60px 0; }
    .tools-slider { gap: 16px; padding: 10px 5px; }
    .tool-card { 
        flex: 0 0 85%; 
        min-width: 260px;
        scroll-snap-align: center;
    }
    .tool-img { height: 140px; }
    .tool-header h4 { font-size: 1rem; }
    .tool-body p { font-size: 0.82rem; }
    
    .showcase-tabs { 
        flex-wrap: wrap; 
        justify-content: center; 
        padding: 4px;
        border-radius: 12px;
        gap: 4px;
    }
    .showcase-tab { 
        padding: 8px 16px; 
        font-size: 0.8rem; 
        border-radius: 8px;
    }
    
    /* Premium View All Mobile */
    .premium-view-all { 
        flex-direction: column; 
        text-align: center; 
        padding: 20px; 
        margin-top: 30px;
        gap: 16px;
    }
    .pva-text h4 { font-size: 1.1rem; }
    .pva-text p { font-size: 0.85rem; }
    .pva-icon { width: 44px; height: 44px; font-size: 1.1rem; }
    
    /* Footer Mobile */
    footer { padding: 40px 0 20px; }
    .footer-logo { font-size: 1.4rem; }
    .footer-tagline { font-size: 0.85rem; }
    
    /* Modal Mobile Fixes */
    .template-modal { 
        border-radius: 12px 12px 0 0;
        max-height: 95vh;
        margin-top: auto;
        transform: translateY(100%);
    }
    .modal-overlay.active .template-modal { transform: translateY(0); }
    .template-modal-layout { flex-direction: column; }
    .template-gallery { padding: 16px; border-right: none; border-bottom: 1px solid var(--border); }
    .template-details { padding: 16px; }
    .template-details h2 { font-size: 1.4rem; }
    .template-desc { font-size: 0.9rem; }
    .main-image-container { height: 200px; }
    .thumb { width: 50px; height: 38px; }
    .template-actions { flex-direction: column; gap: 10px; }
    .template-actions .btn-primary, .template-actions .btn-secondary { 
        width: 100%; 
        padding: 14px; 
        font-size: 0.9rem; 
    }
    .close-modal { top: 10px; right: 10px; width: 36px; height: 36px; font-size: 1rem; }
    
    /* Products Page Mobile */
    .products-master-toggle { 
        flex-direction: column; 
        width: 100%; 
        border-radius: 12px;
        padding: 4px;
    }
    .pmt-btn { 
        padding: 10px; 
        font-size: 0.9rem;
        border-radius: 8px;
        width: 100%;
        text-align: center;
    }
    .products-grid { 
        grid-template-columns: 1fr; 
        gap: 16px;
    }
    .products-grid .tool-card { min-width: unset; }
    .filter-area { padding: 16px; }
    .search-box input { font-size: 0.85rem; padding: 12px 16px 12px 40px; }
    .category-filters { gap: 6px; }
    .filter-pill { padding: 6px 14px; font-size: 0.75rem; }
    
    /* Tables Mobile */
    .table-responsive { 
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch;
    }
    .table td, .table th { 
        padding: 10px 8px; 
        font-size: 0.8rem; 
        white-space: nowrap;
    }
    .table .btn { font-size: 0.7rem; padding: 4px 8px; }
}

/* Extra small devices (phones < 400px) */
@media (max-width: 400px) {
    .hero-content h1 { font-size: 1.6rem; }
    .hero-card-main { transform: scale(0.7); }
    .section-title { font-size: 1.5rem; }
    .tool-card { flex: 0 0 92%; min-width: 220px; }
    .modal-overlay { padding: 0; }
    .template-modal { height: 100vh; max-height: 100vh; border-radius: 0; }
    .main-image-container { height: 160px; }
    .template-details h2 { font-size: 1.2rem; }
}

/* ========================================= */
/* PREMIUM SHOWCASE TABS & DRAG EFFECTS      */
/* ========================================= */

.showcase-tabs {
    display: inline-flex; background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.05);
    padding: 6px; border-radius: 50px; gap: 8px; margin-top: 24px;
}
.showcase-tab {
    background: transparent; color: var(--text-gray); border: none;
    padding: 10px 24px; border-radius: 50px; font-weight: 600; font-size: 0.95rem;
    cursor: pointer; transition: var(--transition);
}
.showcase-tab:hover { color: var(--text-white); }
.showcase-tab.active { 
    background: var(--primary); color: var(--dark); 
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.2); 
}

/* Slider Dragging States */
.tools-slider {
    scroll-behavior: smooth;
    cursor: grab; /* Shows hand icon indicating it can be pulled */
}
.tools-slider.active-drag {
    cursor: grabbing; 
    scroll-behavior: auto; /* Disables smooth scroll during drag so it sticks to the mouse instantly */
}
.tools-slider * {
    user-select: none; /* Prevents text from highlighting while dragging */
}

/* Fade Animation Container */
.tools-slider-container {
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.tools-slider-container.fade-out { 
    opacity: 0; 
    transform: translateY(15px); /* Drops down slightly as it fades out */
}

/* ========================================= */
/* PREMIUM COLORS, ANIMATIONS & TOGGLES      */
/* ========================================= */

/* 1. Eye-Catching Category Tab Colors */
.showcase-tab.tab-software.active { background: #007bff; box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4); color: white; border-color: #007bff; }
.showcase-tab.tab-template.active { background: #a200ff; box-shadow: 0 4px 15px rgba(162, 0, 255, 0.4); color: white; border-color: #a200ff; }

/* 2. Magnetic Scroll Snapping & Card Animation */
.tools-slider { 
    scroll-snap-type: x mandatory; /* Makes the slider magnetically lock to cards */
    padding-bottom: 30px; 
}
.tool-card { 
    scroll-snap-align: center; /* Centers the card when dragging stops */
    scroll-snap-stop: always; 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease; 
}
.tools-slider:not(.active-drag) .tool-card:hover { 
    transform: translateY(-12px) scale(1.02); /* Makes the card "pop" out at you */
    z-index: 2; 
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.8), var(--glow-strong); 
}

/* 3. Premium "View All" Ecosystem Banner */
.premium-view-all {
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.08) 100%);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 20px;
    padding: 24px 40px; margin-top: 50px; text-decoration: none;
    transition: all 0.4s ease; position: relative; overflow: hidden;
}
.premium-view-all::before { 
    content:''; position:absolute; top:0; left:-100%; width:50%; height:100%; 
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent); 
    transition: 0.6s; 
}
.premium-view-all:hover::before { left: 150%; }
.premium-view-all:hover { 
    border-color: var(--primary); 
    box-shadow: 0 10px 30px rgba(0,230,118,0.15); 
    transform: translateY(-3px); 
}
.pva-text h4 { color: white; margin:0 0 4px 0; font-size: 1.3rem; font-weight: 800; }
.pva-text p { color: var(--text-gray); margin:0; font-size: 0.95rem; }
.pva-icon { 
    width: 54px; height: 54px; border-radius: 50%; background: var(--primary); 
    color: var(--dark); display: flex; align-items: center; justify-content: center; 
    font-size: 1.4rem; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.premium-view-all:hover .pva-icon { transform: scale(1.15) translateX(8px); }

/* 4. Products Page Master Toggle */
.products-master-toggle {
    display: flex; background: var(--dark-300); border-radius: 16px; padding: 6px; 
    margin: 0 auto 30px; width: max-content; border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.pmt-btn {
    background: transparent; border: none; color: var(--text-gray); padding: 12px 32px;
    border-radius: 12px; font-weight: 700; font-size: 1rem; cursor: pointer; transition: all 0.3s;
}
.pmt-btn:hover { color: var(--text-white); }
.pmt-btn.active { background: var(--dark-100); color: white; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.pmt-btn.active[data-type="software"] { box-shadow: inset 0 -3px 0 #007bff; }
.pmt-btn.active[data-type="template"] { box-shadow: inset 0 -3px 0 #a200ff; }
.pmt-btn.active[data-type="all"] { box-shadow: inset 0 -3px 0 var(--primary); }

@media (max-width: 768px) {
    .premium-view-all { flex-direction: column; text-align: center; gap: 20px; padding: 24px; }
    .premium-view-all:hover .pva-icon { transform: scale(1.1) translateY(5px); }
    .products-master-toggle { flex-direction: column; width: 100%; }
    .pmt-btn { padding: 12px; }
}