/* ============================================
   KIEN TECH - Premium Theme
   Home Appliances & RO Water Purifiers
   
   THEME SYSTEM: To rebrand for a new client,
   simply change the CSS variables below and
   update config/theme.php
   ============================================ */

/* ---- CSS Custom Properties (Theme Variables) ---- */
:root {
    /* Primary Palette - Deep Ocean Blue */
    --primary-50:  #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #0369a1;
    --primary-600: #0c4a6e;
    --primary-700: #0a3d5c;
    --primary-800: #082f49;
    --primary-900: #051e31;

    /* Accent - Aqua / Cyan */
    --accent-400: #22d3ee;
    --accent-500: #06b6d4;
    --accent-600: #0891b2;

    /* Gold / Premium accent */
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;

    /* Neutrals */
    --surface:    #ffffff;
    --surface-2:  #f8fafc;
    --surface-3:  #f1f5f9;
    --border:     #e2e8f0;
    --text:       #0f172a;
    --text-muted: #64748b;

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body:    'Inter', system-ui, sans-serif;

    /* Spacing & Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    /* Shadows */
    --shadow-sm:  0 1px 2px 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-xl:  0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
    --shadow-glow: 0 0 40px rgba(6,182,212,0.15);
}

/* ---- Base ---- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--surface-2);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(6,182,212,0.2); }
    50%      { box-shadow: 0 0 40px rgba(6,182,212,0.4); }
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%      { transform: translateY(-10px); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes water-ripple {
    0%   { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(2.5); opacity: 0; }
}
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up { animation: fadeInUp 0.7s ease-out both; }
.animate-fade-in    { animation: fadeIn 0.6s ease-out both; }
.animate-slide-left { animation: slideInLeft 0.7s ease-out both; }
.animate-slide-right{ animation: slideInRight 0.7s ease-out both; }
.animate-float      { animation: float 3s ease-in-out infinite; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* ---- Scroll Reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Top Bar ---- */
.kt-topbar {
    background: linear-gradient(135deg, var(--primary-900), var(--primary-800));
    color: rgba(255,255,255,0.8);
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
}
.kt-topbar a:hover { color: var(--accent-400); }

/* ---- Header ---- */
.kt-header {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.kt-header.scrolled {
    box-shadow: var(--shadow-lg);
}

.kt-logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}
.kt-logo span {
    -webkit-text-fill-color: var(--gold-500);
    font-weight: 400;
    font-size: 0.65em;
    display: block;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: -2px;
}

/* ---- Navigation ---- */
.kt-nav {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
}
.kt-nav a {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.75rem 1.25rem;
    position: relative;
    transition: all 0.3s ease;
    letter-spacing: 0.02em;
}
.kt-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-400);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.kt-nav a:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}
.kt-nav a:hover::after,
.kt-nav a.active::after {
    width: 60%;
}
.kt-nav a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

/* ---- Hero Slider ---- */
.kt-hero {
    position: relative;
    overflow: hidden;
    min-height: 520px;
}
.kt-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
}
.kt-hero-slide.active {
    opacity: 1;
    position: relative;
}
.kt-hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}
.kt-hero-content {
    position: relative;
    z-index: 2;
}
.kt-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.kt-hero p {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.85);
    max-width: 520px;
    line-height: 1.7;
}
.kt-hero-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 0.75rem;
}
.kt-hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}
.kt-hero-dot.active {
    background: #fff;
    border-color: var(--accent-400);
    transform: scale(1.2);
}

/* Water ripple decoration */
.water-ripple {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    animation: water-ripple 3s ease-out infinite;
}

/* ---- Buttons ---- */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-500), var(--primary-500));
    color: #fff;
    padding: 0.875rem 2.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(6,182,212,0.3);
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6,182,212,0.4);
}

.btn-outline {
    background: transparent;
    color: #fff;
    padding: 0.875rem 2.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9375rem;
    border: 2px solid rgba(255,255,255,0.4);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
    transform: translateY(-2px);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: #fff;
    padding: 0.875rem 2.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(245,158,11,0.3);
    border: none;
    cursor: pointer;
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245,158,11,0.4);
}

.btn-cart {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    width: 100%;
}
.btn-cart:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(3,105,161,0.3);
}

/* ---- Section Titles ---- */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}
.section-title h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    color: var(--text);
    margin-bottom: 0.75rem;
}
.section-title p {
    color: var(--text-muted);
    font-size: 1.0625rem;
    max-width: 600px;
    margin: 0 auto;
}
.section-title .accent-line {
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-500), var(--primary-500));
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ---- Trust Badges ---- */
.trust-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}
.trust-badge:hover {
    border-color: var(--accent-500);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.trust-badge-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.trust-badge-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary-500);
}

/* ---- Product Cards ---- */
.product-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}
.product-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-xl);
    transform: translateY(-6px);
}
.product-card-image {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    aspect-ratio: 1;
}
.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover .product-card-image img {
    transform: scale(1.08);
}
.product-card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    z-index: 2;
}
.badge-sale {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}
.badge-new {
    background: linear-gradient(135deg, var(--accent-500), var(--primary-500));
    color: #fff;
}
.badge-hot {
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: #fff;
}
.product-card-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    z-index: 2;
}
.product-card:hover .product-card-actions {
    opacity: 1;
    transform: translateX(0);
}
.product-card-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}
.product-card-action-btn:hover {
    background: var(--primary-500);
    color: #fff;
}
.product-card-body {
    padding: 1.25rem;
}
.product-card-category {
    font-size: 0.75rem;
    color: var(--accent-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.375rem;
}
.product-card-title {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    transition: color 0.2s;
}
.product-card:hover .product-card-title {
    color: var(--primary-500);
}
.product-card-price {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.product-card-price .current {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-600);
}
.product-card-price .original {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* ---- Category Cards ---- */
.category-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: all 0.4s ease;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}
.category-card-bg {
    position: absolute;
    inset: 0;
    transition: transform 0.6s ease;
}
.category-card:hover .category-card-bg {
    transform: scale(1.05);
}
.category-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}
.category-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    z-index: 2;
    color: #fff;
}
.category-card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}
.category-card-content p {
    font-size: 0.8125rem;
    opacity: 0.8;
}

/* ---- Promo Banner ---- */
.promo-banner {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-800), var(--primary-900));
    padding: 4rem;
}
.promo-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6,182,212,0.15), transparent 70%);
}

/* ---- Why Choose Us ---- */
.why-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--surface);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}
.why-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-500), var(--primary-500));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}
.why-card:hover::before {
    transform: scaleX(1);
}
.why-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}
.why-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}
.why-card:hover .why-card-icon {
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
}
.why-card:hover .why-card-icon svg {
    color: #fff;
}
.why-card h3 {
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.why-card p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ---- Testimonials ---- */
.testimonial-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    position: relative;
}
.testimonial-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-500);
}
.testimonial-card .quote-icon {
    color: var(--primary-100);
    margin-bottom: 1rem;
}
.testimonial-stars {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}
.testimonial-stars svg {
    width: 18px;
    height: 18px;
    color: var(--gold-500);
    fill: var(--gold-500);
}
.testimonial-text {
    color: var(--text-muted);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.125rem;
}

/* ---- Newsletter ---- */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-800), var(--primary-900));
    position: relative;
    overflow: hidden;
}
.newsletter-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6,182,212,0.1), transparent 70%);
}
.newsletter-input {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-input:focus {
    outline: none;
    border-color: var(--accent-400);
    background: rgba(255,255,255,0.15);
}

/* ---- Footer ---- */
.kt-footer {
    background: linear-gradient(180deg, var(--primary-900) 0%, #020617 100%);
    color: rgba(255,255,255,0.7);
}
.kt-footer h4 {
    font-family: var(--font-body);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}
.kt-footer a {
    color: rgba(255,255,255,0.6);
    transition: all 0.2s ease;
    font-size: 0.9375rem;
}
.kt-footer a:hover {
    color: var(--accent-400);
    padding-left: 4px;
}
.kt-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* ---- Search Bar ---- */
.kt-search {
    position: relative;
}
.kt-search input {
    width: 100%;
    padding: 0.75rem 1.25rem;
    padding-right: 3rem;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    background: var(--surface-2);
}
.kt-search input:focus {
    outline: none;
    border-color: var(--accent-500);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(6,182,212,0.1);
}
.kt-search button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.kt-search button:hover {
    transform: translateY(-50%) scale(1.05);
}

/* ---- Cart Badge ---- */
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- WhatsApp Float ---- */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    text-decoration: none;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37,211,102,0.5);
}

/* ---- Notification Toast ---- */
.toast-enter {
    animation: toastIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(100px) scale(0.9); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

/* ---- Stagger Children Animation ---- */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
}
.stagger-children.visible > * {
    animation: fadeInUp 0.6s ease-out both;
}
.stagger-children.visible > *:nth-child(1) { animation-delay: 0s; }
.stagger-children.visible > *:nth-child(2) { animation-delay: 0.08s; }
.stagger-children.visible > *:nth-child(3) { animation-delay: 0.16s; }
.stagger-children.visible > *:nth-child(4) { animation-delay: 0.24s; }
.stagger-children.visible > *:nth-child(5) { animation-delay: 0.32s; }
.stagger-children.visible > *:nth-child(6) { animation-delay: 0.40s; }
.stagger-children.visible > *:nth-child(7) { animation-delay: 0.48s; }
.stagger-children.visible > *:nth-child(8) { animation-delay: 0.56s; }

/* ---- Parallax Tilt on Cards ---- */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}
.tilt-card:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(-2deg);
}

/* ---- Magnetic Button Effect ---- */
.btn-magnetic {
    position: relative;
    overflow: hidden;
}
.btn-magnetic::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-magnetic:hover::before { opacity: 1; }
.btn-magnetic::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    transition: width 0.6s, height 0.6s, top 0.6s, left 0.6s;
    transform: translate(-50%, -50%);
}
.btn-magnetic:active::after {
    width: 300px;
    height: 300px;
}

/* ---- Gradient Border Cards ---- */
.gradient-border {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-xl);
    overflow: hidden;
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, var(--accent-400), var(--primary-500), var(--gold-500));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s;
}
.gradient-border:hover::before { opacity: 1; }

/* ---- Glow Effect ---- */
.glow-hover {
    transition: all 0.4s ease;
}
.glow-hover:hover {
    box-shadow: 0 0 30px rgba(6,182,212,0.15), 0 10px 40px rgba(0,0,0,0.08);
}

/* ---- Counter Animation ---- */
.count-up {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ---- Marquee / Infinite Scroll ---- */
@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }

/* ---- Image Reveal ---- */
@keyframes imageReveal {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0 0 0); }
}
.img-reveal {
    clip-path: inset(0 100% 0 0);
}
.img-reveal.visible {
    animation: imageReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ---- Skeleton Loading ---- */
@keyframes skeleton {
    0%   { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 37%, #f1f5f9 63%);
    background-size: 400px 100%;
    animation: skeleton 1.4s ease infinite;
    border-radius: var(--radius-md);
}

/* ---- Badge Pulse ---- */
@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}
.badge-pulse {
    animation: badgePulse 2s ease-in-out infinite;
}

/* ---- Scroll Progress Bar ---- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-500), var(--primary-500), var(--gold-500));
    z-index: 9999;
    transition: width 0.1s;
    border-radius: 0 2px 2px 0;
}

/* ---- Back to Top ---- */
.back-to-top {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}
.back-to-top:hover {
    background: var(--primary-500);
    color: #fff;
    border-color: var(--primary-500);
    transform: translateY(-3px);
}

/* ---- Product Card Enhancements ---- */
.product-card .badge-discount {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 50px;
    font-size: 0.6875rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    z-index: 3;
    letter-spacing: 0.03em;
}
.product-card .badge-new {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 50px;
    font-size: 0.6875rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-500), var(--primary-500));
    color: #fff;
    z-index: 3;
}
.product-card-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}
.product-card-rating svg {
    width: 14px;
    height: 14px;
    color: var(--gold-500);
    fill: var(--gold-500);
}
.product-card-rating span {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

/* ---- Fancy Section Divider ---- */
.section-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0;
}
.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.section-divider svg {
    color: var(--accent-500);
    flex-shrink: 0;
}

/* ---- Stats Counter Section ---- */
.stat-card {
    text-align: center;
    padding: 2rem;
}
.stat-card .stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-500), var(--primary-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}
.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .kt-hero { min-height: 400px; }
    .kt-hero h1 { font-size: 2rem; }
    .promo-banner { padding: 2rem; }
    .product-card-actions { opacity: 1; transform: none; }
    .back-to-top { bottom: 5rem; right: 1rem; }
}

/* ---- Utility ---- */
.glass {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.12);
}
.glass-light {
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.5);
}
.text-gradient {
    background: linear-gradient(135deg, var(--accent-400), var(--primary-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-gradient-gold {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}
.line-decoration {
    position: relative;
}
.line-decoration::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-500), var(--primary-500));
    border-radius: 2px;
}

/* ---- Smooth Image Loading ---- */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.4s ease;
}
img[loading="lazy"].loaded,
img:not([loading="lazy"]) {
    opacity: 1;
}

/* ---- Modern UI Components ---- */

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 16px 20px;
    margin-bottom: 12px;
    min-width: 300px;
    max-width: 500px;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-500);
}

.toast.success::before { background: #10b981; }
.toast.error::before { background: #ef4444; }
.toast.warning::before { background: #f59e0b; }
.toast.info::before { background: #3b82f6; }

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.toast.success .toast-icon { color: #10b981; }
.toast.error .toast-icon { color: #ef4444; }
.toast.warning .toast-icon { color: #f59e0b; }
.toast.info .toast-icon { color: #3b82f6; }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.toast-message {
    color: var(--text-muted);
    font-size: 14px;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    background: var(--surface-2);
    color: var(--text);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    transition: width linear;
}

.toast.success .toast-progress { background: #10b981; }
.toast.error .toast-progress { background: #ef4444; }
.toast.warning .toast-progress { background: #f59e0b; }
.toast.info .toast-progress { background: #3b82f6; }

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* SweetAlert Modal */
.swal-modal {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
    padding: 0;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

.swal-modal.danger .swal-icon {
    background: #ef4444;
    color: white;
}

.swal-modal.warning .swal-icon {
    background: #f59e0b;
    color: white;
}

.swal-modal.info .swal-icon {
    background: #3b82f6;
    color: white;
}

.swal-modal.success .swal-icon {
    background: #10b981;
    color: white;
}

.swal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
}

.swal-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    margin-bottom: 12px;
}

.swal-text {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.5;
}

.swal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 0 24px 24px;
}

.swal-button {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.swal-button.confirm {
    background: var(--primary-500);
    color: white;
}

.swal-button.confirm:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
}

.swal-button.cancel {
    background: var(--surface-2);
    color: var(--text);
}

.swal-button.cancel:hover {
    background: var(--surface-3);
}

.swal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: overlayFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--surface-2);
    border-top: 2px solid var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
