/*
Theme Name: Tarang Tech Theme
Theme URI: https://tarang.tech
Author: Tarang Tech
Author URI: https://tarang.tech
Description: Premium SaaS-style theme for Tarang Tech ecosystem, featuring glassmorphism, fluid animations, and custom integrations.
Version: 1.0.0
Text Domain: tarang-tech-theme
*/

/* ==========================================================================
   CSS Variables & Design System
   ========================================================================== */
:root {
    --primary: #0f172a; /* Slate 900 */
    --secondary: #3b82f6; /* Blue 500 */
    --accent: #8b5cf6; /* Violet 500 */
    --background: #f8fafc; /* Slate 50 */
    --surface: #ffffff;
    --text-main: #1e293b; /* Slate 800 */
    --text-muted: #64748b; /* Slate 500 */
    --border: #e2e8f0; /* Slate 200 */
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    /* Animations */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode {
    --primary: #f8fafc;
    --secondary: #60a5fa;
    --accent: #a78bfa;
    --background: #0f172a;
    --surface: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.tt-theme-toggle {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
}
.tt-theme-toggle:hover {
    background: var(--border);
    color: var(--text-main);
}
.tt-theme-toggle i {
    position: absolute;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.toggle-sun {
    transform: translateY(30px) rotate(90deg);
    opacity: 0;
}
.toggle-moon {
    transform: translateY(0) rotate(0);
    opacity: 1;
}

body.dark-mode .toggle-sun {
    transform: translateY(0) rotate(0);
    opacity: 1;
}
body.dark-mode .toggle-moon {
    transform: translateY(-30px) rotate(-90deg);
    opacity: 0;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary);
}

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

a:hover {
    color: var(--accent);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==========================================================================
   Glassmorphism Utilities
   ========================================================================== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.05);
    border-radius: 12px;
    transition: var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   Layouts
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
}

.main-navigation a:hover {
    color: var(--secondary);
}

.site-main {
    padding-top: 100px;
    min-height: 80vh;
}

.site-footer {
    background: var(--primary);
    color: #fff;
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
}

/* ==========================================================================
   Cinematic Day/Night Celestial Overlay
   ========================================================================== */
.tt-celestial-overlay {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 150px;
}

.tt-celestial-sun {
    color: #fbbf24;
    text-shadow: 0 0 100px rgba(251, 191, 36, 1);
}

.tt-celestial-moon {
    color: #e2e8f0;
    text-shadow: 0 0 100px rgba(226, 232, 240, 1);
}

.theme-transition-active,
.theme-transition-active * {
    transition: background-color 1.5s ease-in-out, color 1.5s ease-in-out, border-color 1.5s ease-in-out, box-shadow 1.5s ease-in-out, background 1.5s ease-in-out !important;
}

/* ==========================================================================
   Slide-Out Cart Drawer
   ========================================================================== */
.tt-cart-drawer-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.tt-cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}
.tt-cart-drawer {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-height: calc(100vh - 130px);
    background: var(--surface);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    transform-origin: bottom right;
    transform: scale(0.5) translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}
.tt-cart-drawer.active {
    transform: scale(1) translateY(0);
    opacity: 1;
    visibility: visible;
}
@media (max-width: 480px) {
    .tt-cart-drawer { 
        width: calc(100% - 40px); 
        right: 20px;
        bottom: 100px;
    }
}
.tt-cart-drawer-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tt-cart-drawer-header h3 {
    margin: 0; font-family: 'Outfit'; color: var(--primary); font-size: 24px;
}
.tt-close-drawer {
    background: none; border: none; font-size: 20px; color: var(--text-muted); cursor: pointer; transition: color 0.2s;
}
.tt-close-drawer:hover { color: var(--primary); }
.tt-cart-drawer-body {
    flex-grow: 1; overflow-y: auto; padding: 30px;
}
.tt-cart-empty { text-align: center; color: var(--text-muted); padding: 50px 0; }
.tt-cart-items-list { list-style: none; padding: 0; margin: 0; }
.tt-cart-item {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border); padding-bottom: 20px; margin-bottom: 20px;
}
.tt-cart-item-title { margin: 0 0 5px 0; font-family: 'Outfit'; font-size: 16px; color: var(--text-main); }
.tt-cart-item-meta { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 5px; }
.tt-cart-item-price { font-weight: 600; color: var(--primary); font-size: 15px; }
.tt-remove-item {
    background: none; border: none; color: #ef4444; font-size: 16px; cursor: pointer; opacity: 0.7; transition: opacity 0.2s;
}
.tt-remove-item:hover { opacity: 1; }
.tt-cart-drawer-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

/* ==========================================================================
   WhatsApp Widget
   ========================================================================== */
.tt-whatsapp-fab {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: #25D366;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    z-index: 9999;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
}
.tt-whatsapp-fab:hover {
    transform: scale(1.1) translateY(-5px);
    color: #fff;
}
.tt-whatsapp-modal {
    position: fixed;
    bottom: 100px;
    left: 30px;
    width: 320px;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    transform-origin: bottom left;
    transform: scale(0.5) translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    border: 1px solid var(--glass-border);
}
.tt-whatsapp-modal.active {
    transform: scale(1) translateY(0);
    opacity: 1;
    visibility: visible;
}
.tt-wa-header {
    background: #075E54;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.tt-wa-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.tt-wa-body {
    padding: 20px;
    background: var(--bg);
}
.tt-wa-chat-bubble {
    background: var(--surface);
    padding: 12px 15px;
    border-radius: 0 12px 12px 12px;
    font-size: 14px;
    color: var(--text-main);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 15px;
    display: inline-block;
    border: 1px solid var(--border);
}
.tt-wa-footer {
    padding: 15px;
    background: var(--surface);
    display: flex;
    gap: 10px;
}
.tt-wa-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 10px 15px;
    background: var(--bg);
    color: var(--text-main);
    outline: none;
}
.tt-wa-send {
    background: #25D366;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}
.tt-wa-send:hover {
    background: #1ebd5c;
}
@media (max-width: 480px) {
    .tt-whatsapp-modal { 
        width: calc(100% - 40px); 
        left: 20px;
        bottom: 100px;
    }
}

.tt-cart-total {
    display: flex; justify-content: space-between; font-size: 18px; color: var(--primary); margin-bottom: 20px;
}
.tt-btn-checkout {
    display: block; width: 100%; text-align: center; background: var(--secondary); color: #fff;
    padding: 15px; border-radius: 8px; font-weight: 600; text-decoration: none; font-size: 16px;
    transition: transform 0.2s;
}
.tt-btn-checkout:hover { transform: translateY(-2px); color: #fff; }
