/* ============================================================
   Twinsoftmedia - Custom CSS
   ============================================================ */

/* --- CSS Variables --- */
:root {
    --primary:    #4F46E5;
    --secondary:  #06B6D4;
    --accent:     #F59E0B;
    --bg:         #F9FAFB;
    --dark:       #0F172A;
    --card-bg:    rgba(255,255,255,0.85);
    --glass-blur: blur(20px);
    --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
    --shadow-md:  0 8px 30px rgba(0,0,0,.1);
    --shadow-lg:  0 20px 60px rgba(0,0,0,.12);
    --radius:     16px;
    --radius-lg:  24px;
    --transition: all .25s cubic-bezier(.4,0,.2,1);
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: #1e293b;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
.font-display, h1, h2, h3 { font-family: 'Syne', sans-serif; }

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: linear-gradient(135deg, var(--primary), #6366F1);
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    padding: .65rem 1.5rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: .9rem;
    box-shadow: 0 4px 15px rgba(79,70,229,.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79,70,229,.4);
    filter: brightness(1.05);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: transparent;
    color: var(--primary);
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    padding: .65rem 1.5rem;
    border-radius: var(--radius);
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: .9rem;
}
.btn-secondary:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.btn-accent {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: linear-gradient(135deg, var(--accent), #f97316);
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    padding: .7rem 1.6rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: .9rem;
    box-shadow: 0 4px 15px rgba(245,158,11,.35);
}
.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245,158,11,.45);
}

.btn-wa {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #25D366;
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    padding: .65rem 1.4rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: .875rem;
}
.btn-wa:hover {
    background: #20c65a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37,211,102,.35);
}

/* --- Navbar --- */
#navbar { background: transparent; }
#navbar.scrolled .nav-inner {
    background: rgba(255,255,255,.9);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(0,0,0,.06);
    box-shadow: var(--shadow-sm);
}
#navbar .nav-inner {
    border-radius: 0;
    transition: var(--transition);
}
#navbar.scrolled { background: transparent; }

/* --- Glass Card --- */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255,255,255,.6);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* --- Product Card --- */
.product-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(79,70,229,.15);
}
.product-card .product-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: linear-gradient(135deg, #e0e7ff, #cffafe);
}
.product-card .product-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.product-card .product-price {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.2rem;
}
.product-card .product-price-old {
    color: #94a3b8;
    font-size: .85rem;
    text-decoration: line-through;
}
.badge-sale {
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: .2rem .55rem;
    border-radius: 6px;
    letter-spacing: .05em;
}
.badge-featured {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: .2rem .55rem;
    border-radius: 6px;
}

/* --- Hero --- */
.hero-gradient {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0F2FE 50%, #FEF3C7 100%);
    position: relative;
    overflow: hidden;
}
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .35;
    animation: blobMove 8s ease-in-out infinite alternate;
}
@keyframes blobMove {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, -20px) scale(1.1); }
}
.hero-mockup {
    background: linear-gradient(135deg, #fff, #f8fafc);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(79,70,229,.2);
    border: 1px solid rgba(255,255,255,.8);
    overflow: hidden;
}

/* --- Section Titles --- */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(79,70,229,.08);
    color: var(--primary);
    font-size: .8rem;
    font-weight: 600;
    padding: .4rem 1rem;
    border-radius: 100px;
    border: 1px solid rgba(79,70,229,.15);
    margin-bottom: 1rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* --- Feature Cards --- */
.feature-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: var(--transition);
}
.feature-card:hover::before { opacity: 1; }
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(79,70,229,.1);
}
.feature-icon {
    width: 3.5rem; height: 3.5rem;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

/* --- Testimonial Card --- */
.testimonial-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.star-rating { color: #F59E0B; letter-spacing: .1em; }

/* --- Portfolio --- */
.portfolio-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    background: #e2e8f0;
    aspect-ratio: 16/10;
}
.portfolio-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.portfolio-card:hover img { transform: scale(1.06); }
.portfolio-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,.85), transparent);
    opacity: 0; transition: var(--transition);
    display: flex; flex-direction: column; justify-content: flex-end; padding: 1.5rem;
}
.portfolio-card:hover .portfolio-overlay { opacity: 1; }

/* --- Countdown --- */
.countdown-box {
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 12px;
    padding: .75rem 1.25rem;
    text-align: center;
    min-width: 4.5rem;
}
.countdown-box .count-num {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}
.countdown-box .count-label { font-size: .7rem; opacity: .75; text-transform: uppercase; letter-spacing: .08em; }

/* --- Forms --- */
.form-input {
    width: 100%;
    padding: .75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif;
    font-size: .9rem;
    color: #1e293b;
    background: #fff;
    transition: var(--transition);
    outline: none;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.form-input::placeholder { color: #94a3b8; }
.form-label { display: block; font-size: .875rem; font-weight: 500; color: #475569; margin-bottom: .4rem; }
.form-error { color: #ef4444; font-size: .8rem; margin-top: .3rem; }

/* --- Admin Sidebar --- */
.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--dark);
    position: fixed;
    left: 0; top: 0;
    z-index: 100;
    transition: transform .3s ease;
}
.admin-sidebar .sidebar-logo {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.admin-sidebar .nav-item {
    display: flex; align-items: center; gap: .875rem;
    padding: .8rem 1.5rem;
    color: rgba(255,255,255,.6);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border-radius: 0;
    margin: .1rem .75rem;
    border-radius: 10px;
}
.admin-sidebar .nav-item:hover,
.admin-sidebar .nav-item.active {
    background: rgba(79,70,229,.15);
    color: #fff;
}
.admin-sidebar .nav-item.active { color: #a5b4fc; }
.admin-content { margin-left: 260px; min-height: 100vh; }

/* --- Tables --- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    background: #f8fafc;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748b;
    padding: .875rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}
.data-table td {
    padding: 1rem;
    font-size: .875rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.data-table tr:hover td { background: #f8fafc; }

/* --- Badges --- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .75rem;
    border-radius: 100px;
    font-size: .75rem;
    font-weight: 600;
}
.status-active    { background: #dcfce7; color: #166534; }
.status-inactive  { background: #f1f5f9; color: #475569; }
.status-pending   { background: #fef3c7; color: #92400e; }
.status-confirmed { background: #d1fae5; color: #065f46; }
.status-failed    { background: #fee2e2; color: #991b1b; }
.status-paid      { background: #dbeafe; color: #1e40af; }

/* --- Utilities --- */
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.gradient-bg { background: linear-gradient(135deg, var(--primary), var(--secondary)); }

.section-title { font-family: 'Syne', sans-serif; font-weight: 800; }

/* --- Scroll Reveal --- */
/* Reveal animation - elements visible by default, animate when JS adds .visible */
.reveal { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
.reveal.animate-ready { opacity: 0; transform: translateY(24px); }
.reveal.animate-ready.visible { opacity: 1; transform: none; }

/* --- Loading Skeleton --- */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* --- Promo Banner --- */
.promo-banner {
    background: linear-gradient(135deg, #4F46E5, #06B6D4);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.promo-banner::before {
    content: '';
    position: absolute; top: -50%; right: -10%;
    width: 300px; height: 300px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
}

/* --- Category Pills --- */
.category-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1.1rem;
    border-radius: 100px;
    font-size: .85rem;
    font-weight: 500;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}
.category-pill:hover,
.category-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79,70,229,.25);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-content { margin-left: 0; }
}

/* --- Animations --- */
@keyframes fadeIn { from { opacity: .3; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: .3; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-slow { 0%,100% { opacity: 1; } 50% { opacity: .6; } }

.animate-fade-in { animation: fadeIn .5s ease forwards; }
.animate-slide-up { animation: slideUp .5s ease forwards; }

/* Staggered children */
.stagger-children > *:nth-child(1) { animation-delay: .1s; }
.stagger-children > *:nth-child(2) { animation-delay: .2s; }
.stagger-children > *:nth-child(3) { animation-delay: .3s; }
.stagger-children > *:nth-child(4) { animation-delay: .4s; }
.stagger-children > *:nth-child(5) { animation-delay: .5s; }
.stagger-children > *:nth-child(6) { animation-delay: .6s; }

/* Payment method cards */
.payment-card {
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
}
.payment-card:hover { border-color: var(--primary); }
.payment-card.selected { border-color: var(--primary); background: rgba(79,70,229,.04); }
