/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Arial, sans-serif;
}

/* BACKGROUND */
body {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  min-height: 100vh;
  color: #fff;
}

/* HEADER */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  position: relative;
}


.logo {
  font-size: 20px;
  font-weight: bold;
}
.cart-btn {
  background: linear-gradient(45deg, #00f2fe, #4facfe);
  padding: 8px 14px;
  border-radius: 20px;
  color: #000;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.cart-btn:hover {
  transform: scale(1.05);
}

/* PRODUCT SECTION */
.product-section {
  padding: 30px;
  flex: 1; /* ⭐ QUAN TRỌNG */
}


.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* PRODUCT CARD */
.product-card {
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transition: 0.3s;
  position: relative;
  overflow: hidden;
}
.product-card::before {
  pointer-events: none;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: 0.4s;
}

.product-card:hover::before {
  opacity: 1;
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
}

.product-img {
  height: 120px;              /* chiều cao khung */
  width: 100%;
  border-radius: 12px;
  overflow: hidden;           /* CỰC QUAN TRỌNG */
  background: #0b1c22;        /* nền tối */
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;   /* 👈 CHÌA KHÓA */
}


.product-name {
  margin-top: 12px;
  font-weight: bold;
}

.product-price {
  color: #00f2fe;
  margin: 8px 0;
  font-weight: bold;
}

/* BUTTONS */
.btn {
  width: 100%;
  padding: 8px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 6px;
  transition: 0.3s;
}

.btn-cart {
  background: #ffffff;
  color: #000;
}

.btn-buy {
  background: linear-gradient(45deg, #ffb347, #ffcc33);
}

.btn:hover {
  transform: scale(1.05);
}
/* ===== CHECKOUT UI ===== */
.checkout-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-wrapper {
  width: 100%;
  max-width: 900px;
  padding: 20px;
}

.checkout-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  color: #fff;
}

.checkout-card h2 {
  text-align: center;
  margin-bottom: 25px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.checkout-form label {
  font-size: 14px;
  opacity: 0.8;
}

.checkout-form input,
.checkout-form select {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  margin: 6px 0 14px;
}

.btn-submit {
  margin-top: 10px;
  padding: 12px;
  border-radius: 25px;
  border: none;
  background: linear-gradient(45deg, #00f2fe, #4facfe);
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.btn-submit:hover {
  transform: scale(1.05);
}

/* QR */
.checkout-qr {
  display: none;
  background: rgba(0,0,0,0.3);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}

.checkout-qr img {
  width: 220px;
  margin: 15px auto;
  background: #fff;
  padding: 10px;
  border-radius: 12px;
}

.countdown {
  color: #ffcc00;
  font-weight: bold;
}

/* Mobile */
@media (max-width: 768px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}
#cartCount {
  background: red;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
  margin-left: 5px;
}
/* ================================
   TRACK ORDER UI
================================ */

.track-card {
  max-width: 500px;
  margin: auto;
}

#result {
  margin-top: 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 15px;
  animation: fadeIn 0.4s ease;
}

#result p {
  margin: 6px 0;
}

#result ul {
  margin-top: 10px;
  padding-left: 18px;
}

#result li {
  margin-bottom: 6px;
}

.status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
}

.status.wait {
  background: #ff9800;
  color: #000;
}

.status.done {
  background: #00e676;
  color: #000;
}

.status.cod {
  background: #4facfe;
  color: #000;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ================================
   TRACK ORDER BUTTON (HEADER)
================================ */

.track-btn {
  background: linear-gradient(135deg, #8e2de2, #4facfe);
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 15px rgba(79,172,254,0.6);
  transition: all 0.3s ease;
}

.track-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 25px rgba(142,45,226,0.9);
}
/* ================================
   HEADER ACTION GROUP
================================ */

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px; /* khoảng cách giữa giỏ & tra cứu */
}
/* ================================
   TRACK ORDER - SHOPEE STYLE
================================ */

.track-result {
  margin-top: 20px;
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px;
}

.track-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.track-id {
  font-weight: bold;
  font-size: 16px;
}

.status-badge {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: bold;
}

.status-cod { background: #4facfe; color: #000; }
.status-wait { background: #ffb347; color: #000; }
.status-paid { background: #00e676; color: #000; }

/* Timeline */
.timeline {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.2);
  transform: translateY(-50%);
}

.step {
  position: relative;
  text-align: center;
  width: 25%;
  z-index: 1;
}

.step span {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #777;
  line-height: 28px;
  font-size: 14px;
}

.step.active span {
  background: #00f2fe;
  color: #000;
}

.step p {
  margin-top: 6px;
  font-size: 12px;
}

/* Info blocks */
.track-info {
  font-size: 14px;
  margin-bottom: 10px;
}

.track-products {
  margin-top: 10px;
}

.track-products li {
  margin-bottom: 6px;
}

.track-total {
  margin-top: 15px;
  font-size: 18px;
  font-weight: bold;
  text-align: right;
}
.account-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.auth-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.auth-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  padding: 20px;
  border-radius: 16px;
  width: 320px;
}

.auth-card input {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 8px;
  border: none;
}

.auth-card button {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: none;
  background: #00f2fe;
  cursor: pointer;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.auth-tabs button {
  flex: 1;
  background: rgba(255,255,255,0.15);
}
/* ================================
   ACCOUNT PANEL
================================ */

.account-panel {
  position: absolute;
  top: 60px;
  right: 20px;
  width: 220px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(12px);
  border-radius: 12px;
  padding: 10px;
  display: none;
  z-index: 1000;
}

.account-panel a,
.account-panel button {
  display: block;
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  background: transparent;
  border: none;
  color: #fff;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
}

.account-panel a:hover,
.account-panel button:hover {
  background: rgba(255,255,255,0.1);
}

.account-info {
  padding: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  margin-bottom: 6px;
}

.account-info small {
  display: block;
  opacity: 0.7;
}

.logout-btn {
  color: #ff6b6b;
}
/* ===============================
   ACCOUNT MOBILE UI
================================ */

.account-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, #141e30, #243b55);
  padding: 20px;
  color: #fff;
}

.account-container {
  max-width: 420px;
  margin: auto;
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(12px);
}

.account-container h2 {
  text-align: center;
  margin-bottom: 15px;
}

.account-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 15px;
}

.account-tabs button {
  flex: 1;
  padding: 8px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 13px;
}

.account-tabs button.active {
  background: #00f2fe;
  color: #000;
  font-weight: bold;
}

.tab-content label {
  font-size: 13px;
  opacity: 0.8;
}

.tab-content input {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: none;
  margin: 6px 0 12px;
}

.tab-content button {
  width: 100%;
  padding: 10px;
  border-radius: 999px;
  border: none;
  background: #00f2fe;
  font-weight: bold;
}
/* ===============================
   ACCOUNT CARD – FINAL FIX
================================ */

#accountSection {
  padding: 30px 15px;
  background: transparent; /* ăn nền web */
}

.account-container {
  position: absolute;
  top: 72px;            /* ngay dưới header */
  right: 24px;          /* sát bên phải */
  width: 280px;

  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  border-radius: 16px;
  padding: 16px;
  color: #fff;

  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  z-index: 999;
}


/* TITLE */
.account-container h3 {
  text-align: center;
  margin-bottom: 14px;
}

/* INFO VIEW */
.account-info-view p {
  font-size: 14px;
  margin-bottom: 6px;
  opacity: 0.9;
}

/* ACTIONS */
.account-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.account-actions a,
.account-actions button {
  width: 100%;
  padding: 11px;
  border-radius: 14px;
  border: none;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: 0.25s;
}

.account-actions a:hover,
.account-actions button:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-1px);
}

/* EDIT FORM */
#accountEdit {
  margin-top: 15px;
}

#accountEdit label {
  font-size: 13px;
  opacity: 0.8;
}

#accountEdit input {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: none;
  margin: 6px 0 12px;
}

#accountEdit button {
  width: 100%;
  padding: 10px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(45deg, #00f2fe, #4facfe);
  font-weight: bold;
  margin-bottom: 6px;
}

/* LOGOUT */
.logout-btn {
  background: rgba(255, 80, 80, 0.3) !important;
  color: #fff;
}
/* ===============================
   MY ORDERS – SHOPEE STYLE
================================ */

.orders-page {
  padding: 16px;
  max-width: 420px;
  margin: auto;
}

/* Tabs */
.order-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.order-tabs button {
  flex: 1;
  padding: 10px;
  border-radius: 999px;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 13px;
}

.order-tabs button.active {
  background: #00f2fe;
  color: #000;
  font-weight: bold;
}

/* Card */
.order-card {
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}

.order-top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}

.order-status {
  color: #00f2fe;
  font-weight: bold;
}

.order-items {
  font-size: 14px;
  opacity: 0.9;
}

.order-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 15px;
}

.empty {
  text-align: center;
  opacity: 0.7;
  margin-top: 30px;
}
/* ===============================
  /* ===============================
   FOOTER – TRÙNG NỀN SHOP (FIX MÙ)
================================ */

.footer {
  margin-top: 80px;
  background:
    radial-gradient(
      circle at top,
      rgba(56,189,248,0.12),
      transparent 45%
    ),
    linear-gradient(
      180deg,
      #0b1f2a 0%,
      #071821 40%,
      #020617 100%
    );
  color: #dbeafe;
  padding: 60px 20px 30px;
}

.footer-container {
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}

.footer-col h4 {
  color: #38bdf8;
  margin-bottom: 14px;
  font-size: 16px;
}

.footer-col p,
.footer-col li {
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.9;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li {
  margin-bottom: 8px;
  transition: 0.3s;
  cursor: pointer;
}

.footer-col li:hover {
  color: #38bdf8;
  transform: translateX(4px);
}

.footer-bottom {
  margin-top: 35px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
  text-align: center;
  font-size: 13px;
  opacity: 0.65;
}

/* MOBILE */
@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ===============================
   FLOATING CALL / ZALO
================================ */

.floating-actions {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.floating-actions a {
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: bold;
  text-decoration: none;
  color: #000;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: glowPulse 2s infinite;
}

/* CALL */
.call-btn {
  background: linear-gradient(135deg, #22c55e, #4ade80);
  box-shadow: 0 0 20px rgba(34,197,94,0.7);
}

/* ZALO */
.zalo-btn {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  box-shadow: 0 0 20px rgba(59,130,246,0.7);
}

/* ANIMATION */
@keyframes glowPulse {
  0% {
    box-shadow: 0 0 12px rgba(255,255,255,0.4);
  }
  50% {
    box-shadow: 0 0 28px rgba(255,255,255,0.9);
    transform: translateY(-2px);
  }
  100% {
    box-shadow: 0 0 12px rgba(255,255,255,0.4);
  }
}
/* ================= ADMIN STATS ================= */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-box {
  background: rgba(255,255,255,0.08);
  padding: 20px;
  border-radius: 16px;
  text-align: center;
}

.stat-box h4 {
  color: #38bdf8;
  margin-bottom: 8px;
}

.stat-box p {
  font-size: 22px;
  font-weight: bold;
}

/* ================= CHARTS ================= */
.admin-charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-bottom: 40px;
}

.chart-box {
  background: rgba(255,255,255,0.08);
  padding: 20px;
  border-radius: 16px;
}

.chart-box h4 {
  margin-bottom: 10px;
  color: #38bdf8;
}

/* MOBILE */
@media (max-width: 768px) {
  .admin-stats,
  .admin-charts {
    grid-template-columns: 1fr;
  }
}
/* ================= MONTH ORDER TABLE ================= */
.month-orders {
  margin-top: 30px;
  background: rgba(255,255,255,0.06);
  padding: 20px;
  border-radius: 16px;
}

.month-orders h4 {
  margin-bottom: 15px;
  color: #38bdf8;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
}

.admin-table th {
  color: #93c5fd;
  text-align: left;
}

.admin-table tr:hover {
  background: rgba(255,255,255,0.05);
}
/* ===============================
   PRODUCT QUANTITY STATUS
================================ */

.product-qty {
  margin: 8px 0;
  font-size: 14px;
  color: #22c55e;
  font-weight: 500;
}

.product-qty.out {
  color: #ef4444;
}

/* Disable button when out of stock */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}
.logo img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
}
.topbar {
  display: flex;
  align-items: center;   /* căn giữa theo chiều dọc */
  padding: 12px 20px;
}

.logo {
  display: flex;
  align-items: center;   /* QUAN TRỌNG: hết lệch */
  gap: 10px;
}

.logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.logo span {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1;        /* tránh chữ bị tụt */
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 999;
  backdrop-filter: blur(6px);
}
