/* VUDEV APP CSS - Premium Aesthetics */

.vudev-main-content {
    min-height: calc(100vh - 250px);
    padding-top: 130px; /* Giảm gap giữa Header và nội dung */
    padding-bottom: 0px; /* Giảm gap Footer */
}

/* Base Page Layouts */
.page-container {
    width: calc(100% - 48px);
    max-width: 1280px;
    margin: 0 auto;
}

@media (max-width: 860px) {
    .page-container { width: calc(100% - 24px); }
    .vudev-main-content { padding-top: 100px; }
}

@media (max-width: 480px) {
    .page-container { width: calc(100% - 16px); }
    .vudev-main-content { padding-top: 85px; }
}

/* Base Data Table Responsive Global */
@media (max-width: 768px) {
    .table-hover-row th,
    .table-hover-row td {
        padding: 0.85rem 1rem !important;
        white-space: nowrap !important; /* Tránh chữ xuống dòng lộn xộn khi bảng bị hẹp */
        font-size: 0.9rem !important;
    }
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem 0 1rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #0f172a, #4f46e5);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

[data-theme="dark"] .page-title {
    background: linear-gradient(135deg, #f8fafc, #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
}

.page-desc {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* Base Card UI (can be used for products, accounts, etc) */
.premium-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

[data-theme="dark"] .premium-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
}

/* Content Blocks for Terms/About */
.content-doc {
    background: #ffffff;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.05);
    color: #334155;
    line-height: 1.8;
}

[data-theme="dark"] .content-doc {
    background: #1e293b;
    color: #cbd5e1;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.3);
}

.content-doc h2 { color: #0f172a; margin: 2rem 0 1rem; font-size: 1.5rem; }
.content-doc h3 { color: #1e293b; margin: 1.5rem 0 0.75rem; font-size: 1.25rem; }
[data-theme="dark"] .content-doc h2 { color: #f8fafc; }
[data-theme="dark"] .content-doc h3 { color: #f1f5f9; }
.content-doc p { margin-bottom: 1.25rem; }
.content-doc ul { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.content-doc li { margin-bottom: 0.5rem; }

/* ========== Product Grid ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.product-grid .premium-card {
    padding: 1.25rem;
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Footer styles transferred to dedicated assets/css/footer.css */

/* ========== Product Card Component Shared Styles ========== */
a.premium-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: var(--glass-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    padding: 0 !important;
}

a.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

html.dark a.premium-card:hover { box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3); }

.card-image-wrapper {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: var(--input-bg);
}

.card-image {
    width: 100%; height: 100%; object-fit: cover; opacity: 0.95; transition: transform 0.5s ease;
}

a.premium-card:hover .card-image { transform: scale(1.05); }

.fall-back-gradient {
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    display: flex; align-items: center; justify-content: center;
}

.fallback-text {
    color: #ffffff; font-size: 1.5rem; font-weight: 900; text-align: center; padding: 1rem;
}

.discount-badge {
    position: absolute; top: 8px; left: 8px;
    background: linear-gradient(135deg, #ef4444, #f43f5e);
    color: white; font-size: 0.75rem; font-weight: 800;
    padding: 4px 8px; border-radius: 6px; z-index: 2;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.heart-btn {
    position: absolute; top: 8px; right: 8px;
    background: rgba(255, 255, 255, 0.9); border: none;
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 2; color: #94a3b8;
    transition: all 0.2s ease; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

html.dark .heart-btn { background: rgba(15, 23, 42, 0.8); color: #64748b; }
.heart-btn:hover { color: #ef4444; transform: scale(1.1); }
.heart-btn svg { width: 14px; height: 14px; }

.card-body { padding: 12px; display: flex; flex-direction: column; flex-grow: 1; }

.product-name {
    font-size: 0.95rem; font-weight: 600; color: var(--text-color);
    line-height: 1.4; margin-bottom: 8px; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 2.8em;
}

.product-stats { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 0.75rem; }
.stars { display: flex; align-items: center; gap: 2px; color: #f59e0b; }
.stars svg { width: 10px; height: 10px; }
.rating-number { margin-left: 2px; color: var(--text-muted); font-weight: 500; }
.sold-count { color: var(--text-muted); }

.price-area { display: flex; flex-direction: column; margin-top: auto; }
.original-price { font-size: 0.8rem; color: #94a3b8; text-decoration: line-through; margin-bottom: 2px; }
.current-price { font-size: 1.15rem; font-weight: 800; color: var(--primary-color); display: flex; align-items: baseline; }
