/* ========================================
   TecnoCenter Academy - Cursos Online
   Light & Dark Theme
======================================== */

/* ---------- VARIABLES ---------- */
:root,
[data-theme="light"] {
    --bg-primary: #f8f9fc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0f2f7;
    --bg-card: #ffffff;
    --bg-card-hover: #f5f7fb;
    --bg-navbar: rgba(255,255,255,0.92);
    --bg-modal: #ffffff;
    --bg-overlay: rgba(0,0,0,0.5);
    --bg-input: #f5f7fb;

    --text-primary: #1a1d2e;
    --text-secondary: #5a5f7a;
    --text-tertiary: #8a8fa8;
    --text-inverse: #ffffff;

    --border-color: #e2e5ef;
    --border-light: #eef0f7;

    --accent: #6c5ce7;
    --accent-hover: #5a4bd1;
    --accent-light: #f0edff;
    --accent-gradient: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);

    --success: #00b894;
    --success-light: #e6f9f4;
    --warning: #fdcb6e;
    --danger: #e17055;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.12);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 100px;
}

[data-theme="dark"] {
    --bg-primary: #0f1117;
    --bg-secondary: #181a24;
    --bg-tertiary: #1e2030;
    --bg-card: #1e2030;
    --bg-card-hover: #262840;
    --bg-navbar: rgba(15,17,23,0.92);
    --bg-modal: #181a24;
    --bg-overlay: rgba(0,0,0,0.7);
    --bg-input: #262840;

    --text-primary: #eef0f7;
    --text-secondary: #a0a4b8;
    --text-tertiary: #6b6f88;
    --text-inverse: #0f1117;

    --border-color: #2a2d42;
    --border-light: #232538;

    --accent: #a29bfe;
    --accent-hover: #6c5ce7;
    --accent-light: #1e1a3a;
    --accent-gradient: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);

    --success: #55efc4;
    --success-light: #0d3d2e;
    --warning: #ffeaa7;
    --danger: #ff7675;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.35);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.4);
}

/* ---------- RESET ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- NAVBAR ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-navbar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 1.6rem;
}

.logo-text strong {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: var(--bg-tertiary);
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--accent-light);
}

[data-theme="light"] .theme-icon-dark,
[data-theme="dark"] .theme-icon-light {
    display: none;
}

.cart-btn {
    position: relative;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 1rem;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.cart-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.cart-count {
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.nav-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

.nav-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.nav-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- HERO ---------- */
.hero {
    padding: 140px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-bg-shapes {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #a29bfe;
    bottom: -50px;
    left: -50px;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: #fd79a8;
    top: 50%;
    left: 50%;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.hero-image {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-end;
}

.hero-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    padding: 20px 28px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    animation: floatCard 6s ease-in-out infinite;
}

.hero-card-2 {
    animation-delay: -2s;
    margin-right: 40px;
}

.hero-card-3 {
    animation-delay: -4s;
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.hero-card-icon {
    font-size: 2rem;
}

.hero-card-text {
    display: flex;
    flex-direction: column;
}

.hero-card-text strong {
    font-size: 1rem;
}

.hero-card-text small {
    color: var(--text-tertiary);
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.25s;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108,92,231,0.35);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
}

/* ---------- SECTIONS ---------- */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* ---------- HOW IT WORKS ---------- */
.how-it-works {
    background: var(--bg-secondary);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step-card {
    text-align: center;
    padding: 40px 24px;
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    position: relative;
    transition: all 0.3s;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.step-card h3 {
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ---------- CATEGORIES ---------- */
.categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.25s;
}

.category-card:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.category-card.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

.category-card.active .cat-count {
    background: rgba(255,255,255,0.25);
    color: white;
}

.cat-icon {
    font-size: 1.2rem;
}

.cat-count {
    background: var(--bg-tertiary);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
}

/* ---------- COURSES ---------- */
.courses {
    background: var(--bg-secondary);
}

.courses-toolbar {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    align-items: center;
}

.search-box {
    flex: 1;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 4px var(--accent-light);
}

.sort-select {
    padding: 14px 20px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 170px;
}

.sort-select:focus {
    border-color: var(--accent);
    outline: none;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* ---------- COURSE CARD ---------- */
.course-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.course-thumb {
    width: 100%;
    height: 180px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: var(--accent-light);
    position: relative;
}

.course-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.course-card:hover .course-thumb img {
    transform: scale(1.05);
}

.course-thumb-gradient {
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-thumb {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-new {
    background: var(--success);
    color: white;
}

.badge-popular {
    background: var(--warning);
    color: #333;
}

.badge-sale {
    background: var(--danger);
    color: white;
}

.course-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 8px;
}

.course-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.course-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.course-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.course-price {
    display: flex;
    flex-direction: column;
}

.course-price .price-current {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent);
}

.course-price .price-original {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    text-decoration: line-through;
}

.course-actions {
    display: flex;
    gap: 8px;
}

.btn-add-cart {
    padding: 10px 20px;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.25s;
}

.btn-add-cart:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(108,92,231,0.3);
}

.btn-add-cart.added {
    background: var(--success);
    pointer-events: none;
}

.btn-detail {
    padding: 10px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 1rem;
    transition: all 0.2s;
}

.btn-detail:hover {
    background: var(--accent-light);
    color: var(--accent);
}

/* ---------- COURSES EMPTY ---------- */
.courses-empty {
    text-align: center;
    padding: 60px 20px;
}

.courses-empty .empty-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 16px;
}

.courses-empty h3 {
    margin-bottom: 8px;
}

.courses-empty p {
    color: var(--text-secondary);
}

/* ---------- TESTIMONIALS ---------- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.testimonial-card {
    background: var(--bg-secondary);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all 0.3s;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.testimonial-stars {
    margin-bottom: 16px;
    font-size: 1rem;
}

.testimonial-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.testimonial-author strong {
    display: block;
    font-size: 0.9rem;
}

.testimonial-author small {
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

/* ---------- FAQ ---------- */
.faq-list {
    max-width: 720px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    background: var(--bg-secondary);
    transition: all 0.2s;
}

.faq-item[open] {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.faq-question {
    padding: 20px 24px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--accent);
    transition: transform 0.2s;
}

.faq-item[open] .faq-question::after {
    content: '−';
}

.faq-answer {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ---------- CONTACT ---------- */
.contact {
    background: var(--bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-icon {
    font-size: 1.6rem;
    margin-top: 2px;
}

.contact-item strong {
    display: block;
    margin-bottom: 4px;
}

.contact-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s;
    resize: vertical;
}

.form-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 4px var(--accent-light);
}

/* ---------- FOOTER ---------- */
.footer {
    background: var(--bg-tertiary);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-light);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-col p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-col h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 4px 0;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

/* ---------- CART SIDEBAR ---------- */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.cart-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 90vw;
    height: 100vh;
    background: var(--bg-modal);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-xl);
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.cart-header h3 {
    font-size: 1.1rem;
}

.cart-close {
    font-size: 1.8rem;
    color: var(--text-tertiary);
    padding: 4px;
    transition: color 0.2s;
}

.cart-close:hover {
    color: var(--danger);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.cart-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-tertiary);
}

.cart-empty span {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    align-items: center;
}

.cart-item-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--accent-light);
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.9rem;
}

.cart-item-remove {
    color: var(--text-tertiary);
    font-size: 1.2rem;
    padding: 4px;
    transition: color 0.2s;
}

.cart-item-remove:hover {
    color: var(--danger);
}

.cart-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-light);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.cart-total strong {
    font-size: 1.3rem;
    color: var(--accent);
}

/* ---------- MODAL ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: var(--bg-modal);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-tertiary);
    z-index: 10;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-header {
    text-align: center;
    margin-bottom: 28px;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.modal-detail {
    max-width: 640px;
}

/* ---------- CHECKOUT ---------- */
.checkout-summary {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
}

.checkout-summary h4 {
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-light);
}

.checkout-item:last-of-type {
    border-bottom: none;
}

.checkout-total {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 2px solid var(--accent);
    font-size: 1.1rem;
}

.checkout-total strong {
    color: var(--accent);
}

/* ---------- QR PAYMENT ---------- */
.qr-payment {
    text-align: center;
}

.qr-amount {
    font-size: 1.1rem;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--accent-light);
    border-radius: var(--radius-md);
}

.qr-amount strong {
    font-size: 1.8rem;
    color: var(--accent);
    display: block;
    margin-top: 4px;
}

.qr-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.qr-image {
    width: 260px;
    height: 260px;
    border-radius: var(--radius-md);
    border: 3px solid var(--border-color);
}

.qr-loading {
    position: absolute;
    inset: 0;
    background: var(--bg-modal);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    gap: 12px;
}

.qr-loading.hidden {
    display: none;
}

.qr-instructions {
    text-align: left;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.qr-instructions p {
    font-size: 0.9rem;
    padding: 4px 0;
    color: var(--text-secondary);
}

.payment-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    background: var(--accent-light);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 12px;
}

.payment-timer {
    font-size: 0.85rem;
    color: var(--text-tertiary);
}

.payment-timer strong {
    color: var(--danger);
}

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- PAYMENT SUCCESS ---------- */
.payment-success {
    text-align: center;
    padding: 20px 0;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.payment-success h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: var(--success);
}

.payment-success > p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.success-details {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.success-details .detail-line {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.9rem;
}

.success-email {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px !important;
}

/* ---------- DETAIL MODAL ---------- */
.detail-hero {
    width: calc(100% + 80px);
    margin: -40px -40px 0;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow: hidden;
}

.detail-body {
    padding-top: 24px;
}

.detail-category {
    color: var(--accent);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.detail-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.detail-features {
    list-style: none;
    margin-bottom: 20px;
}

.detail-features li {
    padding: 8px 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-light);
}

.detail-features li:last-child {
    border-bottom: none;
}

.detail-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.detail-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.detail-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid var(--border-light);
}

.detail-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent);
}

.detail-price-original {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    text-decoration: line-through;
    margin-left: 8px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-image {
        display: none;
    }
    
    .hero-title {
        font-size: 2.4rem;
    }
    
    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-navbar);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--border-light);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-menu-btn {
        display: flex;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }
    
    .courses-toolbar {
        flex-direction: column;
    }
    
    .sort-select {
        width: 100%;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .modal {
        padding: 24px;
        border-radius: var(--radius-lg);
    }
    
    .detail-hero {
        width: calc(100% + 48px);
        margin: -24px -24px 0;
    }
    
    .categories-grid {
        gap: 8px;
    }
    
    .category-card {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* ---------- WHATSAPP FLOAT ---------- */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}
