/* Giao diện Sơn Gỗ & Lớp Phủ Cao Cấp - Custom Premium Vanilla CSS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    /* Mặc định - Chế độ tối (Dark Mode) */
    --bg-primary: #0b0f19;
    --bg-secondary: rgba(17, 24, 39, 0.75);
    --accent-primary: #10b981; /* Emerald */
    --accent-secondary: #0ea5e9; /* Sky Blue */
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #0ea5e9 100%);
    --accent-hover-gradient: linear-gradient(135deg, #059669 0%, #0284c7 100%);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(12px);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --card-bg-hover: rgba(30, 41, 59, 0.8);
}

[data-theme="light"] {
    /* Chế độ sáng (Light Mode) */
    --bg-primary: #f1f5f9;
    --bg-secondary: rgba(255, 255, 255, 0.85);
    --accent-primary: #059669;
    --accent-secondary: #0284c7;
    --accent-gradient: linear-gradient(135deg, #059669 0%, #0284c7 100%);
    --accent-hover-gradient: linear-gradient(135deg, #047857 0%, #0369a1 100%);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: rgba(0, 0, 0, 0.06);
    --card-shadow: 0 8px 32px 0 rgba(148, 163, 184, 0.15);
    --card-bg-hover: rgba(255, 255, 255, 0.95);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Header & Giao diện tổng quan */
.app-header {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(11, 15, 25, 0) 100%);
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .app-header {
    background: linear-gradient(180deg, rgba(226, 232, 240, 0.8) 0%, rgba(241, 245, 249, 0) 100%);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.brand-badge {
    background: var(--accent-gradient);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    margin-bottom: 0.8rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.app-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.app-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    max-width: 700px;
    font-weight: 400;
}

/* Nút Chuyển Giao Diện (Theme Switcher) */
.theme-switch-btn {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--card-shadow);
    backdrop-filter: var(--glass-blur);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-switch-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
}

.theme-switch-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Thanh Điều Hướng Tab (Tab Navigation) */
.tab-nav-wrapper {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: var(--glass-blur);
}

[data-theme="light"] .tab-nav-wrapper {
    background: rgba(255, 255, 255, 0.5);
}

.tab-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    list-style: none;
    padding: 0 1rem 0.5rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) rgba(255, 255, 255, 0.05);
}

.tab-nav::-webkit-scrollbar {
    display: block;
    height: 6px;
}

.tab-nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.tab-nav::-webkit-scrollbar-thumb {
    background: var(--accent-gradient);
    border-radius: 10px;
    box-shadow: 0 0 5px var(--accent-primary);
}

.tab-btn {
    padding: 1rem 1.1rem;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.tab-btn svg {
    width: 18px;
    height: 18px;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent-primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-gradient);
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

/* Khu vực nội dung chính */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.tab-panel.active {
    display: block;
}

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

/* Thẻ Thông Tin (Card & Container) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.premium-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    backdrop-filter: var(--glass-blur);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.premium-card:hover {
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.3);
    background-color: var(--card-bg-hover);
}

.premium-card:hover::before {
    opacity: 1;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
}

.card-title svg {
    color: var(--accent-primary);
    width: 22px;
    height: 22px;
}

/* Số liệu thống kê động (Dynamic Stats) */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--card-shadow);
    backdrop-filter: var(--glass-blur);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: scale(1.02);
    border-color: var(--accent-secondary);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.stat-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.stat-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Interactive 3D Coating Stack (Mô phỏng lớp phủ) */
.coating-simulation-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
    margin: 2.5rem 0;
    align-items: center;
}

.coating-stack {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.4rem;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

.coating-layer {
    padding: 1.2rem;
    border-radius: 8px;
    text-align: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.coating-layer:hover {
    transform: scale(1.03) translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.coating-layer.active {
    box-shadow: 0 0 15px var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Màu sắc các lớp sơn */
.layer-substrate { background: #b45309; } /* Gỗ mộc */
.layer-filler { background: #a1a1aa; }    /* Wood Filler */
.layer-basecoat { background: #78716c; }  /* Basecoat */
.layer-stain { background: #7c2d12; }     /* Stain/Glaze */
.layer-sealer { background: rgba(56, 189, 248, 0.8); } /* Sealer */
.layer-topcoat { background: rgba(16, 185, 129, 0.9); } /* Topcoat */

.layer-details-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Trình giả lập bù màu lệch (Color Tuning Simulator) */
.simulator-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--card-shadow);
    margin: 2.5rem 0;
}

.sim-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.form-select, .form-input {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

[data-theme="light"] .form-select, [data-theme="light"] .form-input {
    background: #ffffff;
}

.form-select:focus, .form-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.sim-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-left: 1px solid var(--border-color);
    padding-left: 2.5rem;
    text-align: center;
}

.color-circles {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: center;
}

.color-circle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.color-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transition: all 0.5s ease;
}

.color-circle-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.plus-sign {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.sim-formula {
    background: rgba(0, 0, 0, 0.15);
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: 100%;
}

.sim-formula h4 {
    font-family: var(--font-heading);
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
}

/* Lưới lọc thông tin (Filter Matrix) */
.filter-dashboard {
    margin-bottom: 2.5rem;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    color: var(--text-primary);
    outline: none;
    box-shadow: var(--card-shadow);
}

.search-input:focus {
    border-color: var(--accent-secondary);
}

.filter-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.filter-tag:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.filter-tag.active {
    background: var(--accent-gradient);
    color: #ffffff;
    border-color: transparent;
}

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
}

.matrix-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.matrix-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.matrix-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-primary);
}

.matrix-badge.us {
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
}

.matrix-badge.eu {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.matrix-badge.corp {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

/* Tiến trình 6 giai đoạn (Timeline) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 2rem auto;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 0.3rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 3px solid var(--accent-primary);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-dot {
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

.timeline-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.timeline-stage {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.timeline-title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.timeline-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Bảng so sánh (Compare Table) */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin: 2rem 0;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: var(--bg-secondary);
}

.premium-table th {
    background: rgba(15, 23, 42, 0.6);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .premium-table th {
    background: rgba(226, 232, 240, 0.8);
}

.premium-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.premium-table tr:last-child td {
    border-bottom: none;
}

.premium-table tr:hover td {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .premium-table tr:hover td {
    background-color: rgba(0, 0, 0, 0.01);
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 3rem 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4rem;
}

/* Các chi tiết tiện ích hỗ trợ */
.flex-split {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.flex-split > * {
    flex: 1;
    min-width: 250px;
}

.warning-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 1rem 1.2rem;
    border-radius: 8px;
    margin: 1rem 0;
    color: #f59e0b;
    font-size: 0.9rem;
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.warning-box svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* Điều chỉnh Responsive */
@media (max-width: 900px) {
    .coating-simulation-wrapper, .simulator-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .sim-display {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 2rem;
    }
}

@media (max-width: 600px) {
    .app-title {
        font-size: 1.7rem;
    }
    .theme-switch-btn {
        position: relative;
        right: auto;
        top: auto;
        margin-top: 1rem;
    }
    .brand-badge {
        font-size: 0.7rem;
    }
}

/* Modal Chi Tiết Tiêu Chuẩn (Premium Glassmorphic Modal) */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 15, 25, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.5rem;
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    position: relative;
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    backdrop-filter: var(--glass-blur);
}

.modal-backdrop.open .modal-card {
    transform: scale(1) translateY(0);
}

.modal-close-btn {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    background: none;
    border: none;
    font-size: 2.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    z-index: 10;
}

.modal-close-btn:hover {
    color: #ef4444;
}

.modal-header {
    padding: 2.25rem 2.25rem 1.25rem 2.25rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

.modal-category {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-primary);
}

.modal-body {
    padding: 2.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.modal-section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.modal-section-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-section-title svg {
    color: currentColor;
    width: 20px;
    height: 20px;
}

#modalDesc {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.modal-details-content {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 12px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

[data-theme="light"] .modal-details-content {
    background: rgba(255, 255, 255, 0.5);
}

.matrix-card {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.matrix-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.15);
}

/* Phong Cách Nội Thất Gỗ 2025 - 2026 Layout */
.styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    margin-top: 1.5rem;
}

.style-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    backdrop-filter: var(--glass-blur);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.style-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-secondary);
    box-shadow: 0 15px 30px rgba(14, 165, 233, 0.15);
}

.style-image-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.style-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.style-card:hover .style-img {
    transform: scale(1.08);
}

.style-content {
    padding: 1.75rem;
    display: flex;
    flex-grow: 1;
    flex-direction: column;
}

.style-tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(14, 165, 233, 0.1);
    color: var(--accent-secondary);
    align-self: flex-start;
    margin-bottom: 0.75rem;
}

.style-desc-list {
    list-style-type: none;
    padding-left: 0;
    margin: 1rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.style-desc-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.style-desc-list li strong {
    color: var(--text-primary);
}

.youtube-btn {
    margin-top: auto;
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

.youtube-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.35);
}

.youtube-btn svg {
    fill: currentColor;
    width: 20px;
    height: 20px;
}

/* ========================================== */
/* Trình Giả Lập Phối Màu Gỗ (Stain & Style Visualizer) CSS */
/* ========================================== */
.visualizer-wrapper {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
    align-items: start;
}

.vis-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.vis-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Vùng Upload ảnh kéo thả */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent-secondary);
    background: rgba(14, 165, 233, 0.05);
}

/* Viewport chính giả lập màu gỗ */
.vis-viewport-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
}

.vis-viewport {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: #111827;
}

.vis-img-base {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vis-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    mix-blend-mode: multiply; /* Hòa trộn thớ gỗ cực kỳ xuất sắc */
    transition: background-color 0.4s ease, opacity 0.3s ease;
}

.vis-gloss-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0.15) 100%);
    transition: opacity 0.3s ease;
    mix-blend-mode: overlay;
}

.vis-viewport-footer {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.4);
}

/* Lưới các thẻ swatch màu kết quả */
.swatches-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.swatch-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.swatch-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-secondary);
}

.swatch-card.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.swatch-preview-box {
    position: relative;
    width: 100%;
    height: 110px;
    overflow: hidden;
    background: #1e293b;
}

.swatch-img-base {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swatch-color-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    mix-blend-mode: multiply;
}

.swatch-info {
    padding: 0.8rem 1rem;
    text-align: center;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.swatch-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swatch-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Thích ứng Responsive cho Visualizer */
@media (max-width: 992px) {
    .visualizer-wrapper {
        grid-template-columns: 1fr;
    }
    .swatches-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .swatches-grid {
        grid-template-columns: 1fr;
    }
    .vis-viewport {
        height: 280px;
    }
}
