/* Reset nhẹ nhàng */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: #f5f5f5;
  color: #222;
}

/* Container chung */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* HEADER */
.site-header {
  background: #1e2f52;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

header .logo img {
  height: 50px;
  margin-right: 10px;
}
header .logo {
  display: flex;
  align-items: center;
}

.logo span {
  font-size: 24px;       /* 👈 tăng size chữ */
  font-weight: 700;      /* đậm hơn */
  color: #f9fafb;        /* trắng sáng */
  letter-spacing: 0.04em;/* giãn nhẹ chữ cho sang */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               sans-serif;
}



/* MENU */
.main-nav a {
  color: #e5e7eb;
  text-decoration: none;
  margin-left: 16px;
  font-size: 14px;
}

.main-nav a:hover {
  color: #38bdf8;
}

.admin-link {
  border: 1px solid #38bdf8;
  padding: 4px 8px;
  border-radius: 4px;
}

/* HERO / BANNER */
.hero {
  background: linear-gradient(135deg, #111827, #047857);
  color: #fff;
  padding: 60px 0;
}

.hero-inner {
  display: flex;
  align-items: center;
  min-height: 100px;
}

.hero h1 {
  font-size: 36px;
  margin-bottom: 12px;
}

.hero p {
  margin-bottom: 20px;
  max-width: 480px;
}

/* BUTTON */
.btn-primary {
  display: inline-block;
  padding: 10px 20px;
  background: #22c55e;
  color: #111827;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
}

.btn-primary:hover {
  background: #16a34a;
}

/* SECTION CHUNG */
.section {
  padding: 40px 0;
}

.section h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

/* GRID SẢN PHẨM */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease; /* 👈 quan trọng */
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-10px); /* nhô lên một chút */
  box-shadow: 0 10px 20px rgba(0,0,0,0.18);
}


.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

.product-card h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.product-card .category {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.product-card .price {
  font-weight: 700;
  margin-bottom: 10px;
}

.btn-outline {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #111827;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
}

.btn-outline:hover {
  background: #111827;
  color: #fff;
}


/* Special Offers Section */
.special-offers {
  padding: 2rem 0;
  background-color: #f4f4f4;
}

.special-offers h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #333;
}

.offer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.offer-item {
  background-color: #fff;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  width: calc(50% - 2rem);
  box-sizing: border-box;
  transition: transform 0.3s, box-shadow 0.3s;
}

.offer-item:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.offer-item img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
}

.offer-item h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.2rem;
  color: #333;
}

.offer-item p {
  margin: 0.5rem 0;
  color: #ff5733;
  font-weight: bold;
}

/*CONTACT*/
.contact h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.contact-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact-info,
.contact-form {
    flex: 1;
    padding: 1rem;
    box-sizing: border-box;
    margin-bottom: 2rem;
}

.contact-info h3,
.contact-form h3 {
    margin-top: 0;
}

.contact-info p,
.contact-info a {
    color: #333;
    margin-bottom: 1rem;
}

.contact-info a img {
    width: 28px;
    margin-right: 0.5rem;
}

.contact-form form {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.contact-form button {
    padding: 0.75rem 1.5rem;
    background-color: #130d2a;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.contact-form button:hover {
    background-color: #0a0923;
    transform: scale(1.1);
}
.contact-form {
    position: relative;
}

/* ===== TRANG GIỚI THIỆU ===== */
.about-page h1 {
  font-size: 28px;
  margin-bottom: 10px;
}

.about-lead {
  font-size: 15px;
  color: #374151;
  line-height: 1.6;
  margin-bottom: 18px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.about-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.about-card h2 {
  font-size: 16px;
  margin-bottom: 6px;
}

.about-card p {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.5;
}

.about-highlight {
  background: #ecfdf5;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
}

.about-highlight h3 {
  font-size: 16px;
  margin-bottom: 6px;
}

.about-highlight ul {
  padding-left: 18px;
  font-size: 14px;
  color: #374151;
}

.about-cta {
  font-size: 14px;
  color: #111827;
}

.about-cta a {
  color: #16a34a;
  text-decoration: none;
  font-weight: 600;
}

.about-cta a:hover {
  text-decoration: underline;
}


/* ===== THỐNG KÊ ADMIN ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.stat-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.stat-label {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}

.stat-value.small {
  font-size: 14px;
  font-weight: 500;
}

/* Ẩn/hiện các màn admin */
.admin-view {
  display: none;
}

.admin-view.active {
  display: block;
}

/* ===== DASHBOARD TỔNG QUAN ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr);
  gap: 16px;
  margin-top: 16px;
}

.dashboard-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.dashboard-card h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.dashboard-table th,
.dashboard-table td {
  font-size: 13px;
}

.dashboard-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dashboard-list li {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid #f3f4f6;
}

.dashboard-list li:last-child {
  border-bottom: none;
}

.dashboard-list span.qty {
  color: #6b7280;
}







/* Footer */
footer {
  background-color: #130f39;
  color: #fff;
  padding: 2rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.footer-section {
  flex: 1;
  margin-right: 20px;
}

.footer-section h3 {
  margin-top: 0;
  color: #fff;
}

.footer-section p,
.footer-section a {
  color: #fff;
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #777;
  padding-top: 1rem;
  color: #777;
}

/* Responsive cơ bản */
@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .main-nav a {
    margin-left: 0;
    margin-right: 12px;
  }

  .hero {
    padding: 40px 0;
  }

  .hero h1 {
    font-size: 28px;
  }
}
/* =============== ADMIN LAYOUT =============== */
.admin-body {
  background: #f3f4f6;
}

.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* SIDEBAR */
.admin-sidebar {
  width: 220px;
  background: #111827;
  color: #e5e7eb;
  padding: 20px;
}

.admin-sidebar h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

.admin-sidebar ul {
  list-style: none;
}

.admin-sidebar li {
  padding: 8px 0;
  font-size: 14px;
  cursor: pointer;
  color: #9ca3af;
}

.admin-sidebar li.active {
  color: #22c55e;
  font-weight: 600;
}

/* MAIN */
.admin-main {
  flex: 1;
  padding: 20px 30px;
}

.admin-main h1 {
  font-size: 22px;
  margin-bottom: 16px;
}

/* KHỐI NỘI DUNG ADMIN */
.admin-section {
  background: #ffffff;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

/* FORM ADMIN */
.admin-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;   /* 👈 CHỈNH LẠI: căn giữa theo chiều dọc */
}
/* ===== FORM ĐĂNG NHẬP / ĐĂNG KÝ ===== */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  height: 40px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
}

.auth-form .btn-primary {
  align-self: flex-start;   /* nút nằm bên trái như input */
  padding: 8px 20px;
  height: auto;
}



.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form input[type="file"] {
  padding: 6px 10px;
  height: 36px;
  box-sizing: border-box;
}

.admin-form .btn-primary {
  height: 36px;
  padding: 0 16px;
  align-self: center;
}


/* BẢNG ADMIN */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

.admin-table th {
  background: #f3f4f6;
  font-weight: 600;
}

/* NÚT XÓA NHỎ */
.btn-small {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  border: none;
  background: #ef4444;
  color: #fff;
  cursor: pointer;
}

.btn-small:hover {
  background: #b91c1c;
}
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
/* ===== AUTH TABS (Đăng nhập / Đăng ký) ===== */
.auth-tabs {
  display: flex;
  margin-top: 8px;
  border-radius: 999px;
  background: #e5e7eb;
  padding: 3px;
}

.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 14px;
  cursor: pointer;
  color: #4b5563;
}

.auth-tab.active {
  background: #111827;
  color: #f9fafb;
}

/* Thông báo lỗi / thành công trong form auth */
.auth-error {
  display: none;
  margin-top: 8px;
  font-size: 13px;
  color: #b91c1c;
}

.auth-success {
  display: none;
  margin-top: 8px;
  font-size: 13px;
  color: #15803d;
}
/* ===== THANH LỌC & TÌM KIẾM SẢN PHẨM ===== */
.product-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 13px;
  cursor: pointer;
}

.filter-btn:hover {
  background: #e5e7eb;
}

.filter-btn.active {
  background: #111827;
  color: #f9fafb;
  border-color: #111827;
}

.search-group input {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  min-width: 180px;
}
.cart-link {
  margin-left: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
  text-decoration: none;
  color: #e5e7eb;
}

.cart-link:hover {
  background: #e5e7eb;
  color: #111827;
}
/* ===== TRANG GIỎ HÀNG ===== */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.cart-table th,
.cart-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 14px;
  text-align: left;
}

.cart-table th {
  background: #f3f4f6;
  font-weight: 600;
}

.cart-table img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
}

.cart-qty-input {
  width: 60px;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
}

.cart-summary-box {
  margin-top: 16px;
  background: #ffffff;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.btn-danger {
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  background: #ef4444;
  color: #ffffff;
  font-size: 13px;
  cursor: pointer;
}

.btn-danger:hover {
  background: #b91c1c;
}
/* ===== THANH TOÁN / CHECKOUT ===== */
.checkout-box {
  margin-top: 16px;
  background: #ffffff;
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.checkout-box h2 {
  font-size: 18px;
  margin-bottom: 8px;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.checkout-row label {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

.checkout-row label span {
  color: #b91c1c;
}

.checkout-row input,
.checkout-row textarea,
.checkout-row select {
  width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.checkout-row textarea {
  resize: vertical;
}

.checkout-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
/* Khung xem trước ảnh trong admin */
/* Khung xem trước ảnh trong admin */
#image-preview-wrapper {
  margin-top: 0;                 /* bỏ dư khoảng trên */
  display: flex;
  flex-direction: row;           /* 👈 từ column -> row */
  align-items: center;           /* căn giữa label + ảnh */
  gap: 6px;
  font-size: 13px;
  color: #4b5563;
}

/* Ảnh preview */
#p-image-preview {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  display: block;
}
.product-detail-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 13px;
  color: #2563eb;
  text-decoration: none;
}

.product-card .product-detail-link:hover {
  text-decoration: underline;
}
/* ===== TRANG CHI TIẾT SẢN PHẨM ===== */
.product-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
  margin-top: 16px;
}

.product-detail-image {
  flex: 0 0 320px;
  max-width: 100%;
}

.product-detail-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.product-detail-info {
  flex: 1;
  min-width: 260px;
}

.product-detail-info h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.product-detail-category {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 4px;
}

.product-detail-price {
  font-size: 20px;
  font-weight: 600;
  color: #16a34a;
  margin: 8px 0 12px;
}

.product-detail-desc {
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
  margin-bottom: 12px;
}

.product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.back-link {
  font-size: 13px;
  color: #2563eb;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}
.admin-desc-wrapper {
  flex: 1 1 100%;             /* chiếm nguyên một hàng dưới 3 ô trên */
}

.admin-desc-wrapper textarea {
  width: 100%;
  resize: vertical;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  box-sizing: border-box;
}
/* ===== HERO SLIDESHOW TRANG CHỦ ===== */
.hero {
  padding-top: 16px;
  padding-bottom: 24px;
}

.hero-slider {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 340px;
  background: #0c1f8b;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Caption */
.hero-caption {
  position: absolute;
  left: 24px;
  bottom: 20px;
  max-width: 360px;
  background: rgba(15, 23, 42, 0.82);
  padding: 12px 16px;
  border-radius: 12px;
  color: #f9fafb;
  font-size: 14px;
}

.hero-caption h1 {
  font-size: 20px;
  margin-bottom: 4px;
}

/* Nút điều hướng */
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(15, 23, 42, 0.6);
  color: #f9fafb;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 18px;
}

.hero-prev {
  left: 10px;
}

.hero-next {
  right: 10px;
}

.hero-nav:hover {
  background: rgba(15, 23, 42, 0.9);
}

/* Dots */
.hero-dots {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 10px;
  display: flex;
  gap: 6px;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  background: rgba(249, 250, 251, 0.5);
  cursor: pointer;
}

.hero-dot.active {
  width: 16px;
  background: #22c55e;
}

/* Mobile */
@media (max-width: 768px) {
  .hero-slider {
    height: 220px;
  }

  .hero-caption {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    font-size: 13px;
    padding: 10px 12px;
  }

  .hero-caption h1 {
    font-size: 18px;
  }
}



