/* ═══════════════════════════════════════════════════════════════════
   Du ký – style.css  (ASP.NET Core MVC version)
   Giữ nguyên style gốc + bổ sung cho Razor Views
   ═══════════════════════════════════════════════════════════════════ */

/* ── Custom color variables ─────────────────────────────────────── */
:root {
    --sidebar-bg:   #111827;
    --accent:       #3b82f6;
    --accent-hover: #2563eb;
    --bg-main:      #f3f4f6;
    --border-color: #e5e7eb;
    --text-main:    #1f2937;
    --text-muted:   #6b7280;
    --success-main: #10b981;
    --warning-main: #f59e0b;
    --danger-main:  #ef4444;
}

/* ── Material Symbols ────────────────────────────────────────────── */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ── Scrollbar hiding ────────────────────────────────────────────── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ── Line clamp ──────────────────────────────────────────────────── */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Aspect ratio ────────────────────────────────────────────────── */
.aspect-video { aspect-ratio: 16 / 9; }

/* ── Sidebar transition ──────────────────────────────────────────── */
#sidebar {
    transition: transform 0.3s ease;
}

/* ── Hover / Active scale ────────────────────────────────────────── */
.hover\:scale-105:hover  { transform: scale(1.05); }
.hover\:scale-110:hover  { transform: scale(1.10); }
.active\:scale-95:active { transform: scale(0.95); }

/* ── Table ───────────────────────────────────────────────────────── */
table { border-collapse: collapse; }

/* ── Alert auto-hide animation ───────────────────────────────────── */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
#alert-success {
    animation: slideDown 0.25s ease both;
}

/* ── Nav active indicator ────────────────────────────────────────── */
.nav-item {
    position: relative;
    transition: background-color 0.15s, color 0.15s;
}

/* ── Prose (article detail) ──────────────────────────────────────── */
.prose h1, .prose h2, .prose h3 {
    font-weight: 700;
    color: var(--text-main);
    margin-top: 1.25em;
    margin-bottom: 0.5em;
    line-height: 1.3;
}
.prose h1 { font-size: 1.5rem; }
.prose h2 { font-size: 1.25rem; }
.prose h3 { font-size: 1.05rem; }

.prose p {
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 1em;
}
.prose ul, .prose ol {
    padding-left: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 1em;
}
.prose ul { list-style-type: disc; }
.prose ol { list-style-type: decimal; }
.prose li { margin-bottom: 0.375em; line-height: 1.6; }

.prose img {
    max-width: 100%;
    border-radius: 12px;
    margin: 1.5em 0;
    border: 1px solid var(--border-color);
}
.prose a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.prose strong { font-weight: 700; color: var(--text-main); }
.prose blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 1.25em 0;
}

/* ── Form focus ring (fallback) ──────────────────────────────────── */
input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
    border-color: var(--accent);
}

/* ── Product card hover ──────────────────────────────────────────── */
.product-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.product-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* ── Placeholder image ───────────────────────────────────────────── */
img[src="/images/placeholder.png"],
img[src=""] {
    background: var(--bg-main);
    object-fit: contain;
    padding: 8px;
    opacity: 0.5;
}

/* ── Loading spinner ─────────────────────────────────────────────── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive table horizontal scroll ─────────────────────────── */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Admin sidebar compact ───────────────────────────────────────── */
@media (max-width: 1023px) {
    #sidebar {
        transform: translateX(-100%);
    }
    #sidebar.open {
        transform: translateX(0);
    }
}
