/* ============================================================
   ẨM THỰC PHAN THIẾT - MAIN CSS DESIGN SYSTEM
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --primary:       #E8521A;
  --primary-dark:  #C73F08;
  --primary-light: #FF7A3D;
  --secondary:     #1A3A5C;
  --secondary-light:#234F7A;
  --accent:        #D4860A;
  --accent-dark:   #B8720A;

  --bg-dark:       #F8F4EF;
  --bg-surface:    #FFFFFF;
  --bg-card:       #FFFAF6;
  --bg-hover:      #FFF0E8;

  --text-primary:  #1A1208;
  --text-secondary:#4A3728;
  --text-muted:    #8A7060;

  --border:        rgba(0,0,0,0.10);
  --border-hover:  rgba(232,82,26,0.45);

  --shadow-sm:     0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:     0 8px 32px rgba(0,0,0,0.12);
  --shadow-lg:     0 24px 64px rgba(0,0,0,0.15);
  --shadow-glow:   0 0 40px rgba(232,82,26,0.15);

  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     20px;
  --radius-xl:     30px;
  --radius-full:   999px;

  --transition:    0.3s cubic-bezier(0.4,0,0.2,1);
  --transition-fast: 0.15s ease;

  --font-heading:  'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body:     'Plus Jakarta Sans', system-ui, sans-serif;

  --nav-height:    72px;
  --container:     1280px;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #F0EBE4; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ── Typography ───────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--text-primary);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-primary-c { color: var(--primary); }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-sm { padding: 48px 0; }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header .tag {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(255,107,44,0.15);
  border: 1px solid rgba(255,107,44,0.3);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Navigation ──────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(248,244,239,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-logo .logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

.nav-logo .logo-text {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.1;
}

.nav-logo .logo-sub {
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: var(--font-body);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  white-space: nowrap;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-cart-btn {
  position: relative;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition-fast);
  font-size: 1.1rem;
}

.nav-cart-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--border-hover); }

.cart-badge {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

.nav-hamburger {
  display: none;
  width: 42px; height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  cursor: pointer;
}

.nav-hamburger span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition-fast);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 20px rgba(255,107,44,0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  box-shadow: 0 8px 30px rgba(255,107,44,0.45);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--border-hover); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--bg-dark);
  font-weight: 700;
}
.btn-accent:hover { box-shadow: 0 8px 30px rgba(255,209,102,0.4); transform: translateY(-1px); }

.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; border-radius: var(--radius-md); }
.btn-icon { padding: 10px; border-radius: var(--radius-sm); }
.btn-full { width: 100%; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.card:hover .card-img { transform: scale(1.06); }
.card-img-wrap { overflow: hidden; position: relative; }

.card-body { padding: 20px; }
.card-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.card-text { font-size: 0.875rem; color: var(--text-secondary); }

/* ── Product Card ─────────────────────────────────────────── */
.product-card .card-img-wrap { aspect-ratio: 1; }
.product-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-sale { background: var(--primary); color: white; }
.badge-new  { background: #10B981; color: white; }
.badge-hot  { background: #EF4444; color: white; }
.badge-preorder { background: var(--secondary); color: var(--accent); border: 1px solid var(--accent); }

.product-price {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.price-current {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

.price-original {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-discount {
  font-size: 0.75rem;
  background: rgba(255,107,44,0.15);
  color: var(--primary);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* ── Grid ─────────────────────────────────────────────────── */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ── Rating Stars ─────────────────────────────────────────── */
.stars {
  display: flex;
  gap: 2px;
  color: var(--accent);
  font-size: 0.9rem;
}
.stars .empty { color: var(--text-muted); }

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition-fast);
  outline: none;
}

.form-control::placeholder { color: var(--text-muted); }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,107,44,0.15); }
.form-control.error { border-color: #EF4444; }

.form-error {
  margin-top: 5px;
  font-size: 0.78rem;
  color: #EF4444;
}

textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B7F8E' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ── Tags / Pills ─────────────────────────────────────────── */
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  cursor: pointer;
}
.tag-pill:hover, .tag-pill.active {
  background: rgba(255,107,44,0.15);
  border-color: rgba(255,107,44,0.4);
  color: var(--primary);
}

/* ── Toast Notifications ──────────────────────────────────── */
#toast-container {
  position: fixed;
  top: calc(var(--nav-height) + 16px);
  right: 16px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.3s ease;
  backdrop-filter: blur(10px);
}

.toast-success { background: rgba(16,185,129,0.95); color: white; border: 1px solid rgba(52,211,153,0.3); }
.toast-error   { background: rgba(239,68,68,0.95); color: white; border: 1px solid rgba(252,165,165,0.3); }
.toast-info    { background: rgba(59,130,246,0.95); color: white; border: 1px solid rgba(147,197,253,0.3); }
.toast-warning { background: rgba(245,158,11,0.95); color: white; border: 1px solid rgba(253,211,77,0.3); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Loading Spinner ──────────────────────────────────────── */
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.page-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}
.page-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--text-muted); }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 1.1rem; font-weight: 600; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: flex-end; }

/* ── Hero Gradient Overlay ────────────────────────────────── */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26,18,8,0.25) 0%,
    rgba(26,18,8,0.45) 40%,
    rgba(26,18,8,0.78) 80%,
    rgba(26,18,8,0.92) 100%
  );
}

/* ── Glassmorphism Card ───────────────────────────────────── */
.glass {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.5);
}

/* ── Section Divider ──────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 60px 0;
}

/* ── Price Display ────────────────────────────────────────── */
.price-tag {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

/* ── Status Badges ────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}
.status-pending    { background: rgba(245,158,11,0.2); color: #F59E0B; }
.status-confirmed  { background: rgba(59,130,246,0.2); color: #3B82F6; }
.status-processing { background: rgba(139,92,246,0.2); color: #8B5CF6; }
.status-shipped    { background: rgba(16,185,129,0.2); color: #10B981; }
.status-delivered  { background: rgba(16,185,129,0.3); color: #34D399; }
.status-cancelled  { background: rgba(239,68,68,0.2); color: #EF4444; }

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 24px;
}
.empty-state .icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); font-size: 0.9rem; }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo-text { font-size: 1.3rem; font-family: var(--font-heading); }
.footer-brand p { font-size: 0.88rem; color: var(--text-muted); margin-top: 12px; line-height: 1.7; }

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: var(--transition-fast);
}
.footer-col ul a:hover { color: var(--text-primary); padding-left: 4px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.social-links { display: flex; gap: 10px; }
.social-links a {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-fast);
  font-size: 0.9rem;
}
.social-links a:hover { background: var(--primary); border-color: var(--primary); color: white; }

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}
@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.animate-fade-up { animation: fadeInUp 0.6s ease both; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-float   { animation: float 3s ease-in-out infinite; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #EDE8E3 25%, #F5F0EB 50%, #EDE8E3 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

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

  /* Mobile Nav Fixes */
  .nav-logo .logo-text, .nav-logo .logo-sub { display: none; }
  #nav-login-btn { padding: 8px 12px; font-size: 0; gap: 0; }
  #nav-login-btn i { font-size: 1rem; margin: 0; }
  #nav-user-menu .btn { font-size: 0; padding: 8px 12px; gap: 0; }
  #nav-user-menu .btn i { font-size: 1rem; margin: 0; }

  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height); left: 0; right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    z-index: 999;
  }

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

  .section { padding: 56px 0; }
  .container { padding: 0 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4, .grid-auto { grid-template-columns: 1fr; }
  .btn-lg { padding: 14px 24px; }
}
