/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #F4FBFF;
    --bg-tertiary: #EAF7FF;
    --text-primary: #0B1B2B;
    --text-secondary: #355066;
    --text-tertiary: #5E7A90;
    --border-color: #D6ECF7;
    --accent: #1D97C2;
    --accent-dark: #1F88B8;
    --accent-light: #EAF7FF;
    --card-bg: #ffffff;
    --card-hover-bg: #F4FBFF;
    --card-shadow: 0 4px 15px rgba(0,0,0,0.05);
    --header-bg: rgba(255, 255, 255, 0.8);
    --overlay-bg: rgba(0, 0, 0, 0.5);
    --hero-gradient: linear-gradient(135deg, #EAF7FF, #D6ECF7);
    --input-bg: #ffffff;
    --input-border: #D6ECF7;
}

[data-theme="dark"] {
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #1E293B;
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-tertiary: #64748B;
    --border-color: #1A3A4D;
    --accent-light: #0C2D3D;
    --card-bg: #1E293B;
    --card-hover-bg: #334155;
    --card-shadow: 0 4px 15px rgba(0,0,0,0.3);
    --header-bg: rgba(15, 23, 42, 0.85);
    --overlay-bg: rgba(0, 0, 0, 0.7);
    --hero-gradient: linear-gradient(135deg, #0C2D3D, #1E293B);
    --input-bg: #1E293B;
    --input-border: #1A3A4D;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background: var(--bg-primary);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px);
}

.container-header {
    max-width: 95%;
}

.container-section {
    max-width: 85%;
}

.container-footer {
    max-width: 90%;
}

/* Header */
.header {
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: clamp(10px, 1.5vw, 20px) 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.header.header-hidden {
    transform: translateY(-100%);
}

.header .container {
    display: flex;
    align-items: center;
    position: relative;
}

.header .logo {
    margin-right: auto;
}

.header .nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    font-weight: 700;
    font-size: clamp(1.32rem, 1.8vw, 1.62rem);
    text-decoration: none;
}

.logo-icon {
    width: clamp(100px, 12vw, 140px);
    height: auto;
}

.logo-text {
    font-family: 'Averia Serif Libre', serif;
    background: linear-gradient(90deg, #6366F1, #4F46E5, #6734D9, #7E22CE);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
    line-height: 1;
    transform: translateY(3px);
}

.nav {
    display: flex;
    align-items: center;
    gap: clamp(20px, 3vw, 40px);
}

.nav-menu {
    display: flex;
    gap: clamp(18px, 2.5vw, 35px);
}

.nav-menu a {
    color: #6B7280;
    font-weight: 500;
    font-size: clamp(1.02rem, 1.32vw, 1.14rem);
    transition: color 0.5s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #6366F1;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 3vw, 40px) 0;
    overflow: auto;
    background: var(--hero-gradient);
    background-image: url('../images/background_hero_index.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.06) 0%,
        rgba(168, 85, 247, 0.08) 25%,
        rgba(59, 130, 246, 0.06) 50%,
        rgba(99, 102, 241, 0.08) 75%,
        rgba(168, 85, 247, 0.06) 100%);
    background-size: 400% 400%;
    animation: heroGradientShift 10s ease infinite;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid rgba(168, 85, 247, 0.25);
    padding: clamp(5px, 0.8vw, 8px) clamp(10px, 1.2vw, 16px);
    border-radius: 30px;
    font-size: clamp(0.78rem, 1.02vw, 0.9rem);
    font-weight: 500;
    color: #6366F1;
    margin-bottom: clamp(16px, 2.5vw, 25px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.hero-badge svg {
    width: clamp(12px, 1.2vw, 15px);
    height: clamp(12px, 1.2vw, 15px);
    color: #7C3AED;
}

.hero h1 {
    font-size: clamp(3rem, 6.6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: clamp(14px, 2vw, 20px);
    color: #111827;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, #6366F1, #A855F7 50%, #3B82F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    color: #6B7280;
    font-size: clamp(0.96rem, 1.2vw, 1.1rem);
    max-width: min(580px, 85%);
    margin: 0 auto clamp(24px, 3vw, 35px);
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #111827;
    color: #fff;
    padding: clamp(10px, 1.5vw, 14px) clamp(24px, 3vw, 32px);
    border-radius: 30px;
    font-weight: 600;
    font-size: clamp(1.05rem, 1.32vw, 1.2rem);
    transition: all 0.5s;
}

.hero-cta:hover {
    background: #6366F1;
    transform: scale(1.03);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.hero-cta:active {
    transform: scale(0.96);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}



.hero-preview img {
    max-width: min(700px, 100%);
    width: 100%;
    border-radius: clamp(8px, 1.2vw, 16px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

/* Services Section */
.services {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(40px, 6vw, 80px) 0;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.services .container {
    padding: clamp(24px, 3vw, 48px);
    border-left: 1px solid rgba(229, 231, 235, 0.6);
    border-right: 1px solid rgba(229, 231, 235, 0.6);
    border-bottom: 1px solid rgba(229, 231, 235, 0.6);
    border-radius: 0 0 clamp(16px, 2vw, 24px) clamp(16px, 2vw, 24px);
    box-shadow: 0 8px 50px rgba(0, 0, 0, 0.12);
    clip-path: inset(0 -50px -50px -50px);
}

.section-title {
    text-align: center;
    margin-bottom: clamp(30px, 4vw, 50px);
}

.section-title h2 {
    font-size: clamp(1.8rem, 3.6vw, 2.4rem);
    font-weight: 700;
    color: #111827;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(16px, 2.5vw, 30px);
}

.service-card {
    text-align: center;
    padding: clamp(20px, 2.5vw, 30px) clamp(12px, 1.5vw, 20px);
    border-radius: clamp(12px, 1.5vw, 16px);
    border: 1px solid rgba(229, 231, 235, 0.6);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.5s;
}

.service-card:hover,
.service-card.auto-hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.service-card:hover .service-icon img,
.service-card.auto-hover .service-icon img {
    transform: scale(1.08);
}

.service-icon {
    width: clamp(50px, 6vw, 70px);
    height: clamp(50px, 6vw, 70px);
    border-radius: clamp(12px, 1.5vw, 16px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto clamp(14px, 1.8vw, 20px);
}

.service-card:nth-child(1) .service-icon { background: #EFF6FF; }
.service-card:nth-child(2) .service-icon { background: #FAF5FF; }
.service-card:nth-child(3) .service-icon { background: #EEF2FF; }
.service-card:nth-child(4) .service-icon { background: #F0FDF4; }

.service-icon img {
    width: clamp(24px, 3vw, 32px);
    height: clamp(24px, 3vw, 32px);
    transition: transform 0.3s ease;
}

.service-card h3 {
    font-size: clamp(1.05rem, 1.32vw, 1.2rem);
    font-weight: 600;
    color: #111827;
}

/* Templates Section */
.templates {
    min-height: calc(100vh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(40px, 6vw, 80px) 0;
    background: #F8FAFC;
    background-image: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.07) 30%, transparent 65%);
}

.templates .section-title {
    margin-bottom: clamp(-15px, -1vw, -5px);
}

.templates .section-title p {
    color: #4B5563;
    margin-top: 10px;
    font-size: clamp(1.05rem, 1.32vw, 1.2rem);
}

.templates-slider {
    position: relative;
    overflow: hidden;
    padding: clamp(15px, 3vw, 30px) 0;
}

.templates-track {
    position: relative;
    height: clamp(470px, 56vw, 620px);
}

.template-card {
    position: absolute;
    width: clamp(280px, 32vw, 380px);
    left: 50%;
    top: 50%;
    background: #fff;
    border-radius: clamp(18px, 2.2vw, 24px);
    overflow: hidden;
    border: 1px solid #E5E7EB;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.5s ease;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.75);
    pointer-events: none;
}

.template-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Card giữa — lớn, rõ */
.template-card.slide-active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
    z-index: 2;
    pointer-events: auto;
    border: 2px solid #6366F1;
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.15), 0 0 20px rgba(99, 102, 241, 0.08);
}

/* Card trái — nhỏ, mờ */
.template-card.slide-prev {
    opacity: 0.85;
    transform: translate(calc(-50% - 120% - 40px), -50%) scale(0.96);
    z-index: 1;
    pointer-events: auto;
}

/* Card phải — nhỏ, mờ */
.template-card.slide-next {
    opacity: 0.85;
    transform: translate(calc(-50% + 120% + 40px), -50%) scale(0.96);
    z-index: 1;
    pointer-events: auto;
}

.template-frame {
    padding: clamp(12px, 1.5vw, 20px);
    padding-bottom: clamp(8px, 1vw, 14px);
    position: relative;
}

.template-image {
    height: clamp(280px, 36vw, 400px);
    border-radius: clamp(14px, 1.8vw, 20px);
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
}

.template-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: clamp(14px, 1.8vw, 20px);
    transition: transform 0.3s ease;
}

.template-image iframe {
    width: 200%;
    height: 200%;
    border: none;
    border-radius: clamp(14px, 1.8vw, 20px);
    pointer-events: none;
    transform-origin: top left;
    transform: scale(0.5);
}

.template-card:hover .template-image img {
    transform: scale(1.06);
}

.template-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #6366F1;
    color: #fff;
    padding: 4px clamp(8px, 1vw, 12px);
    border-radius: 20px;
    font-size: clamp(0.78rem, 1.08vw, 0.9rem);
    font-weight: 600;
    display: none;
    z-index: 2;
}

.template-card.slide-active .template-badge {
    display: block;
}

.template-info {
    padding: clamp(14px, 1.8vw, 20px);
}

.template-info h3 {
    font-size: clamp(1.14rem, 1.44vw, 1.32rem);
    font-weight: 600;
    margin-bottom: 5px;
    color: #111827;
}

.template-info p {
    color: #6B7280;
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
}

.slider-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: clamp(20px, 2.5vw, 30px);
}

.slider-btn {
    width: clamp(36px, 4vw, 45px);
    height: clamp(36px, 4vw, 45px);
    border-radius: 50%;
    border: 1px solid #E5E7EB;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s;
    color: #6B7280;
}

.slider-btn:hover {
    border-color: #6366F1;
    color: #6366F1;
}

/* Slider nav buttons */
.slider-btn-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #E5E7EB;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    color: #6B7280;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.slider-btn-mobile:hover {
    border-color: #6366F1;
    color: #6366F1;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.25);
}

.slider-btn-mobile:active {
    transform: translateY(-50%) scale(0.95);
}

.slider-btn-prev { left: clamp(8px, 2vw, 24px); }
.slider-btn-next { right: clamp(8px, 2vw, 24px); }

@media (max-width: 768px) {
    .slider-btn-mobile {
        width: 36px;
        height: 36px;
    }
}

/* Benefits Section */
.benefits {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(50px, 7vw, 80px) 0;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(16px, 2.5vw, 30px);
}

.benefit-card {
    text-align: center;
    padding: clamp(20px, 2.5vw, 30px);
    background: #F9FAFB;
    border-radius: clamp(16px, 2vw, 24px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-card:hover,
.benefit-card.auto-hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 35px rgba(99, 102, 241, 0.18);
}

.benefit-card:hover .benefit-icon img,
.benefit-card.auto-hover .benefit-icon img {
    transform: scale(1.08);
}

.benefit-icon img {
    transition: transform 0.3s ease;
}

.benefit-icon {
    width: clamp(44px, 5vw, 64px);
    height: clamp(44px, 5vw, 64px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto clamp(14px, 1.8vw, 20px);
}

.benefit-card:nth-child(1) .benefit-icon { background: #DBEAFE; }
.benefit-card:nth-child(2) .benefit-icon { background: #F3E8FF; }
.benefit-card:nth-child(3) .benefit-icon { background: #E0E7FF; }
.benefit-card:nth-child(4) .benefit-icon { background: #FCE7F3; }

.benefit-card h3 {
    font-size: clamp(1.14rem, 1.44vw, 1.32rem);
    font-weight: 600;
    margin-bottom: clamp(6px, 1vw, 10px);
    color: var(--text-primary);
}

.benefit-card p {
    color: var(--text-secondary);
    font-size: clamp(0.96rem, 1.2vw, 1.08rem);
    line-height: 1.7;
}

/* Showcase Section */
.showcase {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(60px, 8vw, 120px) 0;
    background: linear-gradient(155deg, #6366F1 0%, #4F46E5 50%, #6734DA 75%, #7E22CE 100%);
    overflow: hidden;
    color: #fff;
}

.showcase-wave-top,
.showcase-wave-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    line-height: 0;
    pointer-events: none;
    z-index: 1;
}

.showcase-wave-top {
    top: -1px;
}

.showcase-wave-bottom {
    bottom: -1px;
}

.showcase-wave-top svg,
.showcase-wave-bottom svg {
    display: block;
    width: 100%;
}

.showcase-wave-top svg {
    height: clamp(30px, 4vw, 50px);
}

.showcase-wave-bottom svg {
    height: clamp(40px, 5vw, 70px);
}

.showcase .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(30px, 5vw, 60px);
    align-items: center;
}

.showcase-content span {
    display: inline-block;
    color: #fff;
    font-weight: 600;
    font-size: clamp(0.81rem, 1.08vw, 0.95rem);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.5);
    padding: clamp(4px, 0.5vw, 6px) clamp(10px, 1.2vw, 16px);
    border-radius: 20px;
    margin-bottom: clamp(8px, 1vw, 12px);
}

.showcase-content h2 {
    font-size: clamp(2.1rem, 4.2vw, 3rem);
    font-weight: 700;
    margin: clamp(10px, 1.5vw, 15px) 0;
    line-height: 1.3;
    color: #fff;
}

.showcase-content p {
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(1.05rem, 1.32vw, 1.2rem);
    margin-bottom: clamp(18px, 2.5vw, 25px);
}

.showcase-features {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.5vw, 15px);
}

.showcase-features li {
    display: flex;
    align-items: flex-start;
    gap: clamp(10px, 1.2vw, 16px);
    color: #fff;
}

.showcase-feature-icon {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 16px;
    flex: 0 0 40px;
}

.showcase-feature-icon.icon-purple {
    background: linear-gradient(135deg, #7C3AED, #5B21B6);
}

.showcase-feature-icon.icon-blue {
    background: linear-gradient(135deg, #397FED, #0D6C94);
}

.showcase-feature-icon img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

.showcase-feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.showcase-feature-text strong {
    font-size: clamp(1.05rem, 1.32vw, 1.2rem);
    font-weight: 600;
}

.showcase-feature-text small {
    font-size: clamp(0.9rem, 1.08vw, 1.02rem);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.showcase-image {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.showcase-image-inner {
    width: 100%;
}

.showcase-image-inner img {
    width: 100%;
    max-width: clamp(280px, 30vw, 460px);
    height: auto;
    display: block;
    margin: 0 auto;
}

.showcase-image-inner.float-active {
    animation: showcaseFloat 5s ease-in-out infinite;
}

/* CTA Section */
.cta {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(60px, 8vw, 100px) 0;
    background: var(--bg-primary);
    text-align: center;
    color: var(--text-primary);
}

.cta h2 {
    font-size: clamp(2.1rem, 4.2vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: clamp(10px, 1.5vw, 15px);
}

.cta h2 .gradient-text {
    background: linear-gradient(135deg, #6366F1, #4F46E5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta p {
    color: var(--text-secondary);
    max-width: min(600px, 90%);
    margin: 0 auto clamp(24px, 3vw, 35px);
    font-size: clamp(1.14rem, 1.44vw, 1.32rem);
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #6366F1, #4F46E5);
    color: #fff;
    padding: clamp(12px, 1.5vw, 16px) clamp(24px, 3vw, 36px);
    border-radius: 34px;
    font-weight: 600;
    font-size: clamp(1.05rem, 1.32vw, 1.2rem);
    transition: all 0.5s;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.cta-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.5);
}

.cta-btn:active {
    transform: scale(0.96);
}

/* Footer */
.footer {
    background: #F9FAFB;
    color: var(--text-primary);
    border-top: 1px solid #F3F4F6;
    padding: clamp(40px, 5vw, 60px) 0 clamp(20px, 2.5vw, 30px);
}

[data-theme="dark"] .footer {
    background: var(--bg-secondary);
    border-top-color: var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(20px, 3vw, 40px);
    margin-bottom: clamp(25px, 3vw, 40px);
}

.footer-brand .logo {
    margin-bottom: clamp(10px, 1.5vw, 15px);
}

.footer-brand .logo-text {
    color: var(--text-primary);
}

.footer-brand .logo-icon {
    width: clamp(90px, 10vw, 120px);
    height: auto;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: clamp(0.96rem, 1.2vw, 1.08rem);
    line-height: 1.7;
}

.footer-col h4 {
    font-size: clamp(0.96rem, 1.2vw, 1.08rem);
    font-weight: 600;
    margin-bottom: clamp(14px, 1.8vw, 20px);
    color: var(--text-primary);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1vw, 12px);
}

.footer-col a {
    color: var(--text-tertiary);
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
    transition: color 0.5s;
    position: relative;
    display: inline-block;
}

.footer-col a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #6366F1;
    transition: width 0.3s ease;
}

.footer-col a:hover {
    color: #6366F1;
}

.footer-col a:hover::after {
    width: 100%;
}

.footer-bottom {
    border-top: 1px solid #E5E7EB;
    padding-top: clamp(18px, 2vw, 25px);
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

[data-theme="dark"] .footer-bottom {
    border-top-color: var(--border-color);
}

.footer-bottom p {
    color: #94A3B8;
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
}

.footer-bottom-links {
    display: flex;
    gap: clamp(15px, 2vw, 25px);
}

.footer-bottom-links a {
    color: #6B7280;
    font-size: clamp(0.9rem, 1.2vw, 1.05rem);
    transition: color 0.5s;
}

.footer-bottom-links a:hover {
    color: #6366F1;
}

/* Responsive */
@media (max-width: 1024px) {
    .services-grid,
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .showcase .container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .services-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .template-card {
        width: clamp(220px, 60vw, 280px);
    }

    .templates-track {
        height: clamp(360px, 85vw, 450px);
    }

    .template-image {
        height: clamp(180px, 45vw, 240px);
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

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

.animate-fade-in {
    animation: fadeInUp 1s ease forwards;
}

@keyframes heroGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes showcaseFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes ctaGlowPulse {
    0% { box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 15px 45px rgba(99, 102, 241, 0.6), 0 0 25px rgba(99, 102, 241, 0.3); }
    100% { box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3); }
}

/* Hero stagger reveal */
.hero-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1),
                transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Slide from left/right (showcase) */
.anim-slide-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1),
                transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.anim-slide-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1),
                transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.anim-slide-left.anim-visible,
.anim-slide-right.anim-visible {
    opacity: 1;
    transform: translateX(0);
}

/* CTA glow pulse (one-time) */
.cta-btn.glow-pulse {
    animation: ctaGlowPulse 1.5s ease;
}



/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .hero::after {
        animation: none;
    }

    .hero-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .anim-slide-left,
    .anim-slide-right {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .showcase-image-inner.float-active {
        animation: none;
    }

    .cta-btn.glow-pulse {
        animation: none;
    }

    .animate-fade-in {
        animation-duration: 0.01ms;
    }
}

/* ============================================
   DARK MODE TOGGLE
   ============================================ */
.dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.3s, background 0.5s;
    margin-left: auto;
}

.dark-mode-toggle:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.dark-mode-toggle svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   HAMBURGER MENU
   ============================================ */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.5s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .header .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-primary);
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        padding-top: 80px;
        transform: none;
        left: auto;
    }

    .header .nav.open {
        right: 0;
    }

    .nav-menu {
        display: flex !important;
        flex-direction: column;
        padding: 0 30px;
        gap: 0;
    }

    .nav-menu li a {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 1.2rem;
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: var(--overlay-bg);
        z-index: 999;
    }

    .mobile-overlay.active {
        display: block;
    }
}

/* ============================================
   PRODUCTS PAGE
   ============================================ */
.products-hero {
    padding: clamp(120px, 15vw, 160px) 0 clamp(40px, 5vw, 60px);
    background: radial-gradient(ellipse 60% 70% at 50% 40%, rgba(99, 102, 241, 0.20), #F8FAFC 70%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .products-hero {
    background: var(--bg-primary);
}

[data-theme="dark"] .products-hero::before {
    background: rgba(99, 102, 241, 0.08);
}

.products-hero h1 {
    font-size: clamp(3rem, 6.6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: clamp(10px, 1.5vw, 16px);
    color: #111827;
    position: relative;
}

[data-theme="dark"] .products-hero h1 {
    color: var(--text-primary);
}

.products-hero .gradient-text {
    background: linear-gradient(135deg, #6366F1, #A855F7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.products-hero p {
    color: var(--text-secondary);
    font-size: clamp(1.08rem, 1.32vw, 1.26rem);
    margin-bottom: clamp(24px, 3vw, 35px);
}

.search-bar {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: clamp(12px, 1.5vw, 14px) clamp(16px, 2vw, 20px) clamp(12px, 1.5vw, 14px) 44px;
    border-radius: 10px;
    border: 1px solid #E5E7EB;
    background: #ffffff;
    color: var(--text-primary);
    font-size: clamp(1.05rem, 1.2vw, 1.14rem);
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.5s;
}

[data-theme="dark"] .search-bar input {
    background: var(--input-bg);
    border-color: var(--input-border);
}

.search-bar input::placeholder {
    color: var(--text-tertiary);
}

.search-bar input:focus {
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-bar svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    pointer-events: none;
}

/* Filters */
.filters {
    padding: clamp(16px, 2.5vw, 24px) 0;
    background: #ffffff;
    border-bottom: 1px solid #E5E7EB;
}

.filters-toggle {
    display: none;
}

[data-theme="dark"] .filters {
    background: var(--bg-primary);
    border-bottom-color: var(--border-color);
}

.filters-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: relative;
}

/* Two-level filter: category row overlays content */
.filters-group.filters-group--category {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9;
    background: transparent;
    padding: 12px 0;
    border-bottom: none;
    box-shadow: none;
    border-radius: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.filters-wrapper.category-open:not(.category-locked) .filters-group--category {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filters-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-divider {
    display: none;
}

.filters-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    min-width: 65px;
}

[data-theme="dark"] .filters-label {
    color: var(--text-tertiary);
}

.filters-divider {
    width: 1px;
    height: 28px;
    background: #E5E7EB;
    flex-shrink: 0;
}

[data-theme="dark"] .filters-divider {
    background: var(--border-color);
}

.filters-row {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

/* Type filters — tab style */
.filters-type .filter-btn {
    padding: 7px 16px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    background: transparent;
    color: #6B7280;
    font-size: 0.88rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.filters-type .filter-btn:hover {
    border-color: #6366F1;
    color: #6366F1;
}

.filters-type .filter-btn.active {
    background: #6366F1;
    border-color: #6366F1;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

/* Category filters — pill/chip style */
.filters-category .filter-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: none;
    background: #F3F4F6;
    color: #6B7280;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.filters-category .filter-btn:hover {
    background: #EEF2FF;
    color: #6366F1;
}

.filters-category .filter-btn.active {
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    color: #6366F1;
    font-weight: 600;
}

.filter-btn-other {
    color: #9CA3AF;
    cursor: default;
}

.filter-btn-other:hover {
    color: #9CA3AF;
}

/* Product Grid */
.products-section {
    padding: clamp(30px, 4vw, 50px) 0;
    background: var(--bg-primary);
    min-height: 50vh;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(16px, 2vw, 24px);
}

.product-card {
    background: var(--card-bg);
    border-radius: clamp(12px, 1.5vw, 16px);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: all 0.5s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.product-card-image {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    position: relative;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card-image iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 600%;
    border: none;
    pointer-events: none;
    transform: scale(0.5);
    transform-origin: top left;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card-image iframe.loaded {
    opacity: 1;
}

.product-card-image iframe.scrolling {
    animation: iframeScroll 12s ease-in-out forwards;
}

@keyframes iframeScroll {
    0%, 8% { top: 0; }
    92%, 100% { top: -200%; }
}

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.84rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-badge.new {
    background: #DBEAFE;
    color: #2563EB;
}

.product-badge.hot {
    background: #FEE2E2;
    color: #DC2626;
}

.product-badge.free {
    background: #D1FAE5;
    color: #059669;
}

.product-card-info {
    padding: clamp(14px, 1.8vw, 18px);
}

.product-card-info h3 {
    font-size: clamp(1.08rem, 1.32vw, 1.2rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.product-card-info p {
    color: var(--text-tertiary);
    font-size: clamp(0.9rem, 1.08vw, 0.96rem);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(6px, 1vw, 10px);
    margin-top: clamp(30px, 4vw, 50px);
    flex-wrap: wrap;
}

.pagination button {
    padding: clamp(6px, 0.8vw, 8px) clamp(12px, 1.5vw, 16px);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: clamp(0.96rem, 1.14vw, 1.05rem);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.5s;
}

.pagination button:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination button.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.products-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.products-empty svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */
.detail-page {
    padding-top: clamp(80px, 10vw, 100px);
    background: #F8FAFC;
    min-height: 100vh;
}

[data-theme="dark"] .detail-page {
    background: var(--bg-primary);
}

[data-theme="dark"] .detail-gallery,
[data-theme="dark"] .detail-sidebar,
[data-theme="dark"] .related-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .gallery-arrow {
    background: rgba(30, 41, 59, 0.85);
}

[data-theme="dark"] .gallery-arrow:hover {
    background: #334155;
}

[data-theme="dark"] .gallery-arrow svg {
    stroke: #E2E8F0;
}

[data-theme="dark"] .btn-outline {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn-custom {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .action-bar {
    border-top-color: var(--border-color);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: clamp(16px, 2vw, 20px) 0;
    font-size: clamp(0.96rem, 1.14vw, 1.05rem);
    color: var(--text-tertiary);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-tertiary);
    transition: color 0.5s;
}

.breadcrumb a:hover {
    color: #6366F1;
}

.breadcrumb .current {
    color: #6366F1;
    font-weight: 500;
}

.detail-title {
    font-size: clamp(1.8rem, 3.6vw, 2.4rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: clamp(20px, 2.5vw, 30px);
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: clamp(24px, 3vw, 40px);
    align-items: start;
}

/* Gallery */
.detail-gallery {
    background: #fff;
    border-radius: clamp(12px, 1.5vw, 16px);
    overflow: hidden;
    border: 1px solid #E2E8F0;
}

.gallery-main {
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 10;
    background: #000;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background 0.2s, transform 0.2s;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s, background 0.2s, transform 0.2s;
}

.gallery-main:hover .gallery-arrow {
    opacity: 1;
}

.gallery-arrow:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
}

.gallery-arrow svg {
    width: 20px;
    height: 20px;
    stroke: #334155;
    stroke-width: 2;
    fill: none;
}

.gallery-arrow.prev {
    left: 12px;
}

.gallery-arrow.next {
    right: 12px;
}

.gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px;
    overflow-x: auto;
}

.gallery-thumb {
    width: 78px;
    height: 59px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: border-color 0.5s;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: #6366F1;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Sidebar */
.detail-sidebar {
    background: #fff;
    border-radius: clamp(12px, 1.5vw, 16px);
    border: 1px solid #E2E8F0;
    padding: clamp(20px, 2.5vw, 28px);
    position: sticky;
    top: 90px;
}

.price-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.96rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.price-badge.free {
    background: #ECFDF5;
    border: 1px solid #D1FAE5;
    color: #059669;
}

.price-badge.paid {
    background: #FEF3C7;
    color: #D97706;
}

.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: clamp(12px, 1.5vw, 14px);
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: #fff;
    font-weight: 600;
    font-size: clamp(1.08rem, 1.32vw, 1.2rem);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.5s;
    margin-bottom: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}

.btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: clamp(10px, 1.3vw, 12px);
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    background: #fff;
    color: var(--text-primary);
    font-weight: 500;
    font-size: clamp(1.02rem, 1.2vw, 1.08rem);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.5s;
    margin-bottom: 20px;
}

.btn-outline:hover {
    border-color: #6366F1;
    color: #6366F1;
}

.sidebar-features-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.sidebar-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    max-height: 240px;
    overflow-y: auto;
}

.sidebar-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(0.96rem, 1.14vw, 1.05rem);
    color: var(--text-secondary);
}

.sidebar-features li svg {
    width: 18px;
    height: 18px;
    padding: 3px;
    background: #EEF2FF;
    border-radius: 8px;
    color: #6366F1;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.btn-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: clamp(10px, 1.3vw, 12px);
    border-radius: 12px;
    border: 1px solid #E0E7FF;
    background: linear-gradient(135deg, #C7D2FE, #EAEAF9);
    color: #4338CA;
    font-weight: 500;
    font-size: clamp(1.02rem, 1.2vw, 1.08rem);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.5s;
}

.btn-custom:hover {
    background: linear-gradient(135deg, #A5B4FC, #C7D2FE);
    color: #3730A3;
}

/* Action bar */
.action-bar {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2vw, 24px);
    padding: clamp(16px, 2vw, 20px) 0;
    margin-top: 10px;
    border-top: 1px solid #E2E8F0;
    color: var(--text-tertiary);
    font-size: clamp(0.96rem, 1.14vw, 1.05rem);
}

.action-bar button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.5s;
}

.action-bar button:hover {
    color: #6366F1;
}

.action-bar button.saved {
    color: #6366F1;
}

.action-bar button.saved svg {
    fill: #6366F1;
}

.action-bar button svg {
    width: 18px;
    height: 18px;
}

.action-bar .updated {
    margin-left: auto;
}

/* Related Products */
.related-section {
    padding: clamp(40px, 5vw, 60px) 0;
    background: #F8FAFC;
    border-top: 1px solid #E2E8F0;
}

[data-theme="dark"] .related-section {
    background: var(--bg-primary);
    border-top-color: var(--border-color);
}

.related-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(20px, 2.5vw, 30px);
}

.related-header h2 {
    font-size: clamp(1.5rem, 2.4vw, 1.8rem);
    font-weight: 700;
    color: var(--text-primary);
}

.related-header a {
    color: #6366F1;
    font-size: clamp(0.96rem, 1.14vw, 1.05rem);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.5s;
}

.related-header a:hover {
    opacity: 0.8;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(12px, 1.5vw, 20px);
}

.related-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
    transition: all 0.5s;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.related-card-image {
    aspect-ratio: 4/3;
    position: relative;
    overflow: hidden;
}

.related-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card-image iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 600%;
    border: none;
    pointer-events: none;
    transform: scale(0.5);
    transform-origin: top left;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.related-card-image iframe.loaded {
    opacity: 1;
}

.related-card-image iframe.scrolling {
    animation: iframeScroll 12s ease-in-out forwards;
}

.related-card-info {
    padding: 12px;
}

.related-card-info h4 {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    min-height: 2lh;
}

.related-card-info p {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

.related-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.84rem;
    color: var(--text-tertiary);
}

.related-card-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    padding: clamp(28px, 3.5vw, 40px);
    max-width: 440px;
    width: 100%;
    position: relative;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 4px;
    transition: color 0.5s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.modal-icon.mail {
    background: #EEF2FF;
    color: #6366F1;
}

.modal-icon.success {
    background: #D1FAE5;
    color: #059669;
}

.modal-icon svg {
    width: 28px;
    height: 28px;
}

.modal-content h2 {
    font-size: clamp(1.32rem, 1.8vw, 1.5rem);
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-content .modal-desc {
    text-align: center;
    color: var(--text-secondary);
    font-size: clamp(0.96rem, 1.14vw, 1.05rem);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group label .required {
    color: #EF4444;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1.08rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.5s;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #6366F1;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
    font-size: 0.96rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #6366F1;
}

.modal-submit {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: #fff;
    font-weight: 600;
    font-size: 1.14rem;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.5s;
}

.modal-submit:hover {
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}

.modal-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success modal */
.modal-success-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.02rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.modal-close-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: #fff;
    font-weight: 600;
    font-size: 1.14rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.5s;
}

.modal-close-btn:hover {
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-hero {
    min-height: 100vh;
    padding-top: clamp(120px, 15vw, 160px);
    padding-bottom: clamp(50px, 6vw, 70px);
    background: linear-gradient(135deg, #312E81 0%, #581C87 50%, #0F172A 100%);
    text-align: center;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.contact-hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.20);
    top: -80px;
    right: -80px;
    filter: blur(80px);
}

.contact-hero::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(168, 85, 247, 0.20);
    bottom: -80px;
    left: -80px;
    filter: blur(80px);
}

.contact-hero h1 {
    font-size: clamp(3rem, 6.6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: clamp(16px, 2.5vw, 24px);
    color: #fff;
}

.contact-hero .gradient-text {
    background: linear-gradient(90deg, #93C5FD, #C4B5FD);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-hero p {
    color: rgba(255,255,255,0.75);
    font-size: clamp(1.08rem, 1.32vw, 1.26rem);
    max-width: 600px;
    margin: 0 auto clamp(32px, 4vw, 48px);
}

.contact-hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-hero-btns .btn-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: clamp(12px, 1.5vw, 16px) clamp(24px, 3vw, 32px);
    border-radius: 30px;
    background: linear-gradient(90deg, #3B82F6, #7C3AED);
    color: #fff;
    font-weight: 600;
    font-size: clamp(1.02rem, 1.2vw, 1.14rem);
    transition: all 0.5s;
}

.contact-hero-btns .btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.contact-hero-btns .btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: clamp(12px, 1.5vw, 16px) clamp(24px, 3vw, 32px);
    border-radius: 30px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    font-weight: 600;
    font-size: clamp(1.02rem, 1.2vw, 1.14rem);
    transition: all 0.5s;
}

.contact-hero-btns .btn-ghost:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* Process Section */
.process-section {
    padding: clamp(50px, 7vw, 80px) 0;
    background: var(--bg-primary);
    text-align: center;
}

.process-section h2 {
    font-size: clamp(1.8rem, 3.6vw, 2.4rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.process-section > .container > p {
    color: var(--text-secondary);
    font-size: clamp(1.02rem, 1.2vw, 1.14rem);
    margin-bottom: clamp(30px, 4vw, 50px);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(16px, 2vw, 24px);
    position: relative;
}

.process-grid::before {
    content: '';
    position: absolute;
    top: calc(clamp(20px, 2.5vw, 30px) + clamp(28px, 3.5vw, 40px));
    left: 0;
    right: 0;
    border-top: 2px solid #C7D2FE;
    z-index: 0;
}

.process-step {
    text-align: center;
    padding: clamp(20px, 2.5vw, 30px) clamp(12px, 1.5vw, 16px);
    position: relative;
}

.process-icon {
    position: relative;
    z-index: 1;
    margin: 0 auto clamp(14px, 1.8vw, 20px);
    display: inline-block;
}

.process-number {
    position: absolute;
    top: 4px;
    right: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #6366F1;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 2;
}

.process-icon img {
    width: clamp(56px, 7vw, 80px);
    height: clamp(56px, 7vw, 80px);
    object-fit: contain;
    position: relative;
    z-index: 0;
}

.process-step h3 {
    font-size: clamp(1.08rem, 1.32vw, 1.2rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.process-step p {
    font-size: clamp(0.96rem, 1.14vw, 1.02rem);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Pricing Section */
.pricing-section {
    padding: clamp(50px, 7vw, 80px) 0;
    background: var(--bg-secondary);
}

.pricing-section > .container > .section-title p {
    color: var(--text-secondary);
    margin-top: 8px;
    font-size: clamp(1.02rem, 1.2vw, 1.14rem);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(12px, 1.5vw, 20px);
}

.pricing-card {
    background: #fff;
    border-radius: 16px;
    padding: clamp(24px, 3vw, 32px);
    border: 2px solid #E2E8F0;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    cursor: pointer;
    display: grid;
    grid-row: span 6;
    grid-template-rows: subgrid;
    row-gap: 0;
}

.pricing-card.highlighted {
    border-color: #6366F1;
    position: relative;
    transform: translateY(-24px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.2);
}

.pricing-card.popular::before {
    content: 'PHỔ BIẾN NHẤT';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #6366F1;
    color: #fff;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.pricing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    min-height: 34px;
}

.pricing-discount {
    background: #EDE9FE;
    color: #6366F1;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
}

.pricing-card h3 {
    font-size: clamp(0.96rem, 1.14vw, 1.05rem);
    font-weight: 600;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
}

.pricing-card .pricing-desc {
    font-size: clamp(0.9rem, 1.08vw, 0.96rem);
    color: var(--text-tertiary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.pricing-original-price {
    font-size: 1.14rem;
    color: #94A3B8;
    text-decoration: line-through;
    margin-bottom: 4px;
}

.pricing-original-price.hidden {
    text-decoration: none;
}

.pricing-price {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
    word-break: break-word;
}

.pricing-card.highlighted .pricing-price {
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-card .pricing-cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    background: #fff;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.02rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.5s;
    margin-bottom: 20px;
}

.pricing-card .pricing-cta:hover {
    border-color: #6366F1;
    color: #6366F1;
}

.pricing-card.highlighted .pricing-cta {
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: #fff;
    border-color: transparent;
}

.pricing-card.highlighted .pricing-cta:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.pricing-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(0.94rem, 1.08vw, 1.02rem);
    color: var(--text-secondary);
}

.pricing-features li svg {
    width: 20px;
    height: 20px;
    padding: 3px;
    flex-shrink: 0;
    color: #6366F1;
    background: #EEF2FF;
    border-radius: 50%;
}

.pricing-features li.disabled {
    color: var(--text-tertiary);
    opacity: 0.5;
}

.pricing-features li.disabled svg {
    color: var(--text-tertiary);
}

/* Contact CTA Form Section */
.contact-cta-section {
    padding: clamp(50px, 7vw, 80px) 0;
    background: var(--bg-secondary);
    color: #fff;
}

.contact-cta-section > .container {
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(129, 140, 248, 0.8), transparent),
        radial-gradient(ellipse 70% 60% at 20% 100%, rgba(88, 40, 170, 0.85), transparent),
        #4527A0;
    border-radius: 20px;
    padding: clamp(32px, 5vw, 56px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3), 0 8px 24px rgba(79, 70, 229, 0.2);
}

.contact-cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(20px, 3vw, 40px);
    align-items: stretch;
}

.contact-cta-left {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.contact-cta-left h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.contact-cta-left > p {
    color: rgba(255,255,255,0.8);
    font-size: clamp(1.02rem, 1.2vw, 1.14rem);
    margin-bottom: clamp(20px, 2.5vw, 30px);
}

.contact-guarantees {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-guarantee {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.contact-guarantee .showcase-feature-icon {
    flex-shrink: 0;
}

.contact-guarantee strong {
    display: block;
    margin-bottom: 2px;
}

.contact-guarantee p {
    font-size: 1.02rem;
    color: rgba(255,255,255,0.7);
}

.contact-direct {
    margin-top: auto;
}

.contact-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    margin-bottom: 16px;
}

.contact-direct-label {
    font-size: 1.02rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.contact-email {
    font-weight: 600;
    font-size: 1.2rem;
}

/* Contact Form */
.contact-form-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: clamp(24px, 3vw, 36px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-form-card h3 {
    font-size: clamp(1.32rem, 1.68vw, 1.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.contact-form-card .form-group input,
.contact-form-card .form-group select,
.contact-form-card .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 1.08rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.5s;
}

.contact-form-card .form-group select {
    appearance: none;
    cursor: pointer;
}

.contact-form-card .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.contact-form-card .form-group input:focus,
.contact-form-card .form-group select:focus,
.contact-form-card .form-group textarea:focus {
    border-color: #6366F1;
}

/* Target Audience Section */
.target-section {
    padding: clamp(50px, 7vw, 80px) 0;
    background: var(--bg-primary);
    text-align: center;
}

.target-section .section-label {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6366F1;
    background: #EEF2FF;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.target-section h2 {
    font-size: clamp(1.8rem, 3.6vw, 2.4rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: clamp(30px, 4vw, 50px);
}

.target-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(16px, 2vw, 24px);
    text-align: left;
}

.target-card {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: clamp(24px, 3vw, 32px);
}

.target-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.target-card:first-child .target-card-icon {
    background: #3B82F6;
    color: #fff;
}

.target-card:last-child .target-card-icon {
    background: #6366F1;
    color: #fff;
}

.target-card-icon svg {
    width: 24px;
    height: 24px;
}

.target-card h3 {
    font-size: clamp(1.2rem, 1.44vw, 1.32rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.target-card p {
    font-size: clamp(0.96rem, 1.14vw, 1.05rem);
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.6;
}

.target-card ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.target-card ul li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.02rem;
    color: var(--text-secondary);
}

.target-card ul li svg {
    width: 22px;
    height: 22px;
    padding: 4px;
    border-radius: 50%;
    flex-shrink: 0;
}

.target-card:first-child ul li svg {
    background: #EFF6FF;
    color: #3B82F6;
}

.target-card:last-child ul li svg {
    background: #EEF2FF;
    color: #6366F1;
}

[data-theme="dark"] .pricing-card,
[data-theme="dark"] .target-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .pricing-card .pricing-cta {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .process-icon {
    background: rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .target-section .section-label {
    background: rgba(99, 102, 241, 0.15);
}

/* ============================================
   CHAT BUBBLES — Zalo & Messenger
   ============================================ */
.chat-bubbles {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}
.chat-bubble {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}
.chat-bubble:hover {
    transform: scale(1.12);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
}
.chat-bubble svg { width: 26px; height: 26px; }
.chat-bubble-zalo {
    background: #0068FF;
    color: #fff;
}
.chat-bubble-zalo img { width: 28px; height: 28px; }
.chat-bubble-messenger {
    background: linear-gradient(135deg, #FF6968, #A855F7, #0095F6);
    color: #fff;
}

/* ============================================
   DARK MODE — ALL HARDCODED OVERRIDES
   ============================================ */

/* ── Homepage ─────────────────────────────── */
[data-theme="dark"] .hero-badge {
    background: var(--card-bg);
    border-color: rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .hero h1 {
    color: var(--text-primary);
}

[data-theme="dark"] .hero::after {
    background: linear-gradient(135deg,
        rgba(99, 102, 241, 0.04) 0%,
        rgba(168, 85, 247, 0.06) 25%,
        rgba(59, 130, 246, 0.04) 50%,
        rgba(99, 102, 241, 0.06) 75%,
        rgba(168, 85, 247, 0.04) 100%);
    background-size: 400% 400%;
}

[data-theme="dark"] .hero-cta {
    background: #E2E8F0;
    color: #0F172A;
}

[data-theme="dark"] .hero-cta:hover {
    background: #6366F1;
    color: #fff;
}

[data-theme="dark"] .hero-description {
    color: var(--text-secondary);
}

[data-theme="dark"] .section-title h2 {
    color: var(--text-primary);
}

[data-theme="dark"] .services .container {
    border-color: var(--border-color);
}

[data-theme="dark"] .service-card {
    border-color: var(--border-color);
    background: var(--card-bg);
}

[data-theme="dark"] .service-card h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .service-card:nth-child(1) .service-icon,
[data-theme="dark"] .service-card:nth-child(2) .service-icon,
[data-theme="dark"] .service-card:nth-child(3) .service-icon,
[data-theme="dark"] .service-card:nth-child(4) .service-icon {
    background: rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .templates {
    background: var(--bg-secondary);
    background-image: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.05) 30%, transparent 65%);
}

[data-theme="dark"] .templates .section-title p {
    color: var(--text-secondary);
}

[data-theme="dark"] .template-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .template-card.slide-active {
    border-color: #6366F1;
}

[data-theme="dark"] .template-info h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .template-info p {
    color: var(--text-secondary);
}

[data-theme="dark"] .slider-btn {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .slider-btn-mobile {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .benefit-card {
    background: var(--card-bg);
}

[data-theme="dark"] .benefit-card:nth-child(1) .benefit-icon,
[data-theme="dark"] .benefit-card:nth-child(2) .benefit-icon,
[data-theme="dark"] .benefit-card:nth-child(3) .benefit-icon,
[data-theme="dark"] .benefit-card:nth-child(4) .benefit-icon {
    background: rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .footer-bottom {
    border-top-color: var(--border-color);
}

/* ── Products page ────────────────────────── */
/* Type buttons dark */
[data-theme="dark"] .filters-type .filter-btn {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

[data-theme="dark"] .filters-type .filter-btn:hover {
    border-color: #6366F1;
    color: #6366F1;
}

[data-theme="dark"] .filters-type .filter-btn.active {
    background: #6366F1;
    border-color: #6366F1;
    color: #fff;
}

/* Category buttons dark */
[data-theme="dark"] .filters-category .filter-btn {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-secondary);
}

[data-theme="dark"] .filters-category .filter-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #818CF8;
}

[data-theme="dark"] .filters-category .filter-btn.active {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #818CF8;
}

[data-theme="dark"] .filter-btn-other {
    color: var(--text-tertiary);
}

[data-theme="dark"] .filter-btn-other:hover {
    color: var(--text-tertiary);
}

[data-theme="dark"] .product-card-image {
    background: linear-gradient(135deg, #1E293B, #334155);
}

[data-theme="dark"] .product-badge.new {
    background: rgba(37, 99, 235, 0.2);
    color: #60A5FA;
}

[data-theme="dark"] .product-badge.hot {
    background: rgba(220, 38, 38, 0.2);
    color: #FCA5A5;
}

[data-theme="dark"] .product-badge.free {
    background: rgba(5, 150, 105, 0.2);
    color: #6EE7B7;
}

/* ── Product detail page ──────────────────── */
[data-theme="dark"] .price-badge.free {
    background: rgba(5, 150, 105, 0.15);
    border-color: rgba(5, 150, 105, 0.3);
    color: #6EE7B7;
}

[data-theme="dark"] .price-badge.paid {
    background: rgba(217, 119, 6, 0.15);
    color: #FCD34D;
}

[data-theme="dark"] .sidebar-features li svg {
    background: rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .modal-icon.mail {
    background: rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .modal-icon.success {
    background: rgba(5, 150, 105, 0.15);
}

/* ── Contact page ─────────────────────────── */
[data-theme="dark"] .pricing-discount {
    background: rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .pricing-card h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .pricing-original-price {
    color: var(--text-tertiary);
}

[data-theme="dark"] .process-grid::before {
    border-top-color: rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .pricing-features li svg {
    background: rgba(99, 102, 241, 0.15);
}

[data-theme="dark"] .target-card:first-child ul li svg {
    background: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .target-card:last-child ul li svg {
    background: rgba(99, 102, 241, 0.15);
}

/* ── Form messages ────────────────────────── */
.form-msg-success {
    background: #DCFCE7;
    color: #16A34A;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 1.08rem;
    text-align: center;
}

.form-msg-error {
    background: #FEE2E2;
    color: #EF4444;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 1.08rem;
    text-align: center;
}

[data-theme="dark"] .form-msg-success {
    background: rgba(5, 150, 105, 0.15);
    color: #6EE7B7;
}

[data-theme="dark"] .form-msg-error {
    background: rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
}

/* ============================================
   PRODUCT POPUP (products.html)
   ============================================ */
.product-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    z-index: 1500;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
    overflow-y: auto;
}

.product-popup-overlay.active {
    display: flex;
}

.product-popup {
    background: var(--card-bg);
    border-radius: 16px;
    max-width: 1140px;
    width: 100%;
    position: relative;
    animation: modalIn 0.3s ease;
    margin: auto;
}

.product-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: var(--text-tertiary);
    transition: color 0.3s, background 0.3s;
}

.product-popup-close:hover {
    color: var(--text-primary);
    background: var(--border-color);
}

.product-popup-close svg {
    width: 18px;
    height: 18px;
}

.product-popup-body {
    padding: clamp(24px, 3vw, 36px);
}

.product-popup-body .popup-header {
    margin-bottom: clamp(16px, 2vw, 24px);
    padding-right: 40px;
}

.product-popup-body .popup-header h2 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.product-popup-body .popup-header p {
    font-size: 0.95rem;
    color: var(--text-tertiary);
}

.product-popup-body .popup-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: clamp(20px, 2.5vw, 32px);
    align-items: start;
}

.product-popup-body .popup-sidebar {
    background: var(--bg-secondary);
    border-radius: clamp(12px, 1.5vw, 16px);
    border: 1px solid var(--border-color);
    padding: clamp(16px, 2vw, 24px);
}

.product-popup-body .popup-gallery {
    border-radius: clamp(12px, 1.5vw, 16px);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.product-popup-body .popup-gallery .gallery-main {
    overflow: hidden;
    position: relative;
}

.product-popup-body .popup-gallery .gallery-main img {
    width: 100%;
    height: auto;
    display: block;
}

.product-popup-body .popup-gallery .gallery-arrow {
    opacity: 0;
}

.product-popup-body .popup-gallery .gallery-main:hover .gallery-arrow {
    opacity: 1;
}

/* Loading spinner inside popup */
.product-popup-body .popup-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.product-popup-body .popup-loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   ADDITIONAL RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-page .container-section {
        max-width: 100%;
    }

    .product-popup-body .popup-layout {
        grid-template-columns: 1fr;
    }

    .product-popup-body .popup-sidebar {
        position: static;
    }

    .detail-sidebar {
        position: static;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-cta-grid {
        grid-template-columns: 1fr;
    }

    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-popup-overlay {
        padding: 12px;
    }

    .product-popup-body .popup-header h2 {
        font-size: 1.15rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card.highlighted {
        transform: translateY(0);
    }


    .target-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filters-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 16px;
        border-radius: 10px;
        border: 1px solid #E5E7EB;
        background: #F9FAFB;
        color: #374151;
        font-size: 0.9rem;
        font-weight: 600;
        font-family: inherit;
        cursor: pointer;
        transition: all 0.3s;
        width: 100%;
        justify-content: center;
    }

    .filters-toggle:active {
        background: #F3F4F6;
    }

    .filters-toggle-arrow {
        margin-left: auto;
        transition: transform 0.3s;
    }

    .filters-toggle.open .filters-toggle-arrow {
        transform: rotate(180deg);
    }

    .filters-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        display: none;
        padding-top: 16px;
    }

    .filters-wrapper.open {
        display: flex;
    }

    .filters-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .filters-group.filters-group--category {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
        box-shadow: none;
        border-bottom: none;
        border-radius: 0;
        padding: 0;
        background: transparent;
    }

    .filters-row {
        flex-wrap: wrap;
    }

    .filters-divider {
        width: 100%;
        height: 1px;
    }

    [data-theme="dark"] .filters-toggle {
        border-color: var(--border-color);
        background: var(--bg-secondary);
        color: var(--text-primary);
    }

    .action-bar {
        flex-wrap: wrap;
    }

    .gallery-thumbs {
        flex-wrap: wrap;
        overflow-x: visible;
    }

    .gallery-arrow {
        opacity: 1;
    }

    .contact-cta-section > .container {
        padding: clamp(24px, 4vw, 36px);
    }

    .contact-cta-left {
        height: auto;
    }

    .contact-direct {
        margin-top: 24px;
    }
}

@media (max-width: 480px) {
    .process-grid {
        grid-template-columns: 1fr;
    }

    .process-grid::before {
        display: none;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .contact-hero-btns {
        flex-direction: column;
        align-items: center;
    }

    /* Mobile animation reductions */
    .anim-slide-left:not(.anim-visible) {
        transform: translateX(-24px);
    }

    .anim-slide-right:not(.anim-visible) {
        transform: translateX(24px);
    }

    .hero-reveal:not(.visible) {
        transform: translateY(10px);
    }

    @keyframes showcaseFloat {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-6px); }
    }
}

/* ============================================
   INVITATION THEME — Tông hồng cho thiệp mời
   Thêm class .invitation-theme vào <body>
   ============================================ */
.invitation-theme .products-hero {
    background: radial-gradient(ellipse 60% 70% at 50% 40%, rgba(232, 160, 191, 0.2), #FFFFFF 70%);
}
.invitation-theme .detail-page {
    background: linear-gradient(180deg, #FFF5F7 0%, #FFFFFF 100%);
}
[data-theme="dark"] .invitation-theme .products-hero {
    background: var(--bg-primary);
}
[data-theme="dark"] .invitation-theme .detail-page {
    background: var(--bg-primary);
}

/* ── Invitation grid — portrait phone-screen cards ── */
.invitation-theme .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(12px, 1.5vw, 16px);
}

.invitation-theme .product-card {
    border-radius: clamp(16px, 2vw, 20px);
}

.invitation-theme .product-card-image {
    aspect-ratio: 9 / 16;
}

.invitation-theme .product-card-info {
    display: none;
}

@media (max-width: 1024px) {
    .invitation-theme .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .invitation-theme .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Chat bubbles responsive ── */
@media (max-width: 480px) {
    .chat-bubbles { bottom: 16px; right: 16px; gap: 10px; }
    .chat-bubble { width: 46px; height: 46px; }
    .chat-bubble svg { width: 22px; height: 22px; }
    .chat-bubble-zalo img { width: 24px; height: 24px; }
}
