/* ============================================================
   TRÚC XINH – Navbar & Footer Styles
   ============================================================ */

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(254,240,227,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border-light);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.navbar.scrolled {
  background: rgba(254,240,227,0.98);
  box-shadow: var(--shadow-md);
}

.navbar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-10);
}

/* ── Logo ── */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo-img {
  height: 98px !important;
  width: auto;
  display: block;
}

.navbar-logo-text {
  display: flex;
  flex-direction: column;
}

.navbar-logo-main {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-secondary);
  line-height: 1.1;
}

.navbar-logo-sub {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

/* ── Nav Links ── */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  justify-content: center;
}

.nav-link {
  position: relative;
  padding: var(--space-3) var(--space-4);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  border-radius: var(--radius-full);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}

.nav-link:hover { color: var(--color-secondary); }
.nav-link.active { color: var(--color-accent); font-weight: 600; }
.nav-link.active::after { transform: scaleX(1); }
.nav-link.animate-underline::after {
  animation: underlineGrow 0.35s cubic-bezier(0.4,0,0.2,1) forwards;
}

/* ── Nav Actions ── */
.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.nav-action-btn {
  width: 46px; height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  color: var(--color-secondary);
  font-size: 1.25rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  position: relative;
  text-decoration: none;
  border: none;
}
.nav-action-btn:hover {
  background: rgba(113,59,54,0.08);
  color: var(--color-accent);
}

.nav-auth,
.nav-user {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-user form {
  margin: 0;
}

.nav-user-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-secondary);
  font-size: var(--text-sm);
  font-weight: 700;
}

.nav-auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.35);
  color: var(--color-secondary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.nav-auth-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(255,255,255,0.7);
}

.nav-auth-primary {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

.nav-auth-primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: var(--color-white);
}

/* ── Cart Badge ── */
.cart-badge {
  position: absolute;
  top: -2px; right: -4px;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  display: none;
  animation: scaleIn 0.2s var(--transition-spring);
}
.cart-badge.show { display: flex; }

/* ── Mobile Menu Toggle ── */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 38px; height: 38px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}
.navbar-toggle:hover { background: rgba(113,59,54,0.08); }
.navbar-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--color-secondary);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}
.navbar-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.navbar-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Drawer ── */
.navbar-drawer {
  position: fixed;
  top: var(--nav-height); left: 0; right: 0; bottom: 0;
  background: rgba(254,240,227,0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  transform: translateX(-100%);
  transition: transform var(--transition-base);
  padding: var(--space-6);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.navbar-drawer.open { transform: translateX(0); }
.drawer-link {
  display: flex;
  align-items: center;
  padding: var(--space-4) var(--space-3);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  border-bottom: 1px solid var(--color-border-light);
  text-decoration: none;
}
.drawer-link:hover,
.drawer-link.active {
  background: rgba(200,55,74,0.06);
  color: var(--color-accent);
  padding-left: var(--space-5);
}

.drawer-user {
  color: var(--color-text-muted);
  cursor: default;
}

.drawer-user:hover {
  padding-left: var(--space-3);
  background: transparent;
  color: var(--color-text-muted);
}

.drawer-form {
  margin: 0;
}

.drawer-button {
  width: 100%;
  background: transparent;
  border: 0;
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .navbar-nav { display: none; }
  .nav-auth,
  .nav-user { display: none; }
  .navbar-toggle { display: flex; }
  .navbar-inner { gap: var(--space-3); }
}

/* ════════════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════════════ */
.footer {
  background: linear-gradient(180deg, var(--color-bg-dark) 0%, #1a0a08 100%);
  color: rgba(255,255,255,0.75);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: var(--space-8);
}

.footer-brand {}
.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  text-decoration: none;
}
.footer-logo-text {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-white);
}
.footer-desc {
  font-size: var(--text-sm);
  line-height: 1.8;
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--space-6);
  max-width: 280px;
}
.footer-social { display: flex; gap: var(--space-3); }
.footer-social-link {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all var(--transition-base);
  border: 1px solid rgba(255,255,255,0.12);
  text-decoration: none;
}
.footer-social-link:hover {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.footer-col-title {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--space-5);
  position: relative;
  padding-bottom: var(--space-3);
}
.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 30px; height: 2px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-link {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  transition: color var(--transition-fast), padding-left var(--transition-fast);
  text-decoration: none;
}
.footer-link:hover {
  color: var(--color-highlight);
  padding-left: var(--space-2);
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--space-3);
}
.footer-contact-icon {
  color: var(--color-highlight);
  font-size: var(--text-base);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.35);
  gap: var(--space-4);
}

@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
}
@media (max-width: 640px) {
  .footer-top { grid-template-columns: 1fr; gap: var(--space-6); }
  .footer-bottom { flex-direction: column; text-align: center; }
}
