/* =========================
   1. CÀI ĐẶT CHUNG
========================= */

:root {
  --primary: #087f9a;
  --primary-dark: #07566e;
  --primary-light: #e1f4f3;
  --navy: #10374b;
  --text: #304b59;
  --muted: #718894;
  --white: #ffffff;
  --background: #f2f8f8;
  --border: #dcebed;
  --shadow: 0 14px 38px rgba(11, 58, 78, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  width: 100%;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.section {
  padding: 85px 0;
}

.categories-section,
.products-section,
.catalog-section {
  padding: 65px 0;
}

.eyebrow {
  display: inline-block; /*đặt phần tử thành khối nội tuyến để có thể áp dụng các thuộc tính chiều rộng và chiều cao*/
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.7px; /*định nghĩa khoảng cách giữa các ký tự trong văn bản*/
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-heading h2,
.about-text h2,
.newsletter h2 {
  color: var(--navy);
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.3;
  letter-spacing: -0.8px;
}

.section-heading p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.text-link {
  flex-shrink: 0; /*đảm bảo liên kết không bị co lại khi không gian hạn chế*/
  color: var(--primary); /*đặt màu của liên kết thành màu chính*/
  font-size: 13px;
  font-weight: 700;
}

.text-link:hover {
  color: var(--primary-dark);
}

/* =========================
   2. THANH THÔNG BÁO
========================= */

.topbar {
  padding: 8px 20px;
  background: var(--primary-dark);
  color: var(--white);
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.2px;
}

/* =========================
   3. HEADER
========================= */

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--navy);
}

.logo img {
  width: 84px;
  height: 84px;
  border-radius: 6px;
  object-fit: contain;
}

.search-form {
  display: flex;
  flex: 0 1 340px;
  width: 100%;
  height: 44px;
  overflow: hidden;
  border: 1px solid #dce7e9;
  border-radius: 8px;
  background: #f8fbfb;
}

.search-form input {
  width: 100%;
  min-width: 0;
  padding: 0 14px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 12px;
}

.search-form input:focus {
  box-shadow: inset 0 0 0 1px var(--primary);
}

.search-form button,
.newsletter-form button {
  padding: 0 20px;
  border: 0;
  background: var(--primary);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  transition: background 0.2s ease;
}

.search-form button:hover,
.newsletter-form button:hover {
  background: var(--primary-dark);
}

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

.auth-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-link {
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.auth-link:hover {
  color: var(--primary);
}

.cart-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.cart-count {
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 10px;
  font-weight: 700;
}

.cart-icon {
  color: var(--primary);
  font-size: 21px;
}

.cart-link:hover {
  color: var(--primary);
}

/* =========================
   4. MENU ĐIỀU HƯỚNG
========================= */

.navbar {
  position: relative;
  z-index: 2;
  flex: 0 0 190px;
}

.nav-content {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
}

.nav-toggle-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 20px;
  height: 20px;
}

.nav-toggle-icon span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-link {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--primary-light);
  color: var(--primary);
}

/* =========================
   5. BANNER CHÍNH
========================= */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  background:
    radial-gradient(
      circle at 85% 10%,
      rgba(172, 229, 225, 0.55),
      transparent 28%
    ),
    linear-gradient(120deg, #f0fbfa 0%, #f8fcfc 55%, #e4f5f4 100%);
}

.hero::before {
  position: absolute;
  top: -120px;
  left: -100px;
  width: 350px;
  height: 350px;
  border: 1px solid rgba(8, 126, 139, 0.08);
  border-radius: 50%;
  content: "";
}

.hero-content {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 21px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.hero-image {
  position: relative;
  min-width: 0;
  width: 100%;
  flex: 1;
}

.hero-image > img {
  height: auto;
  min-height: 180px;
  border-radius: 18px;
  box-shadow: 0 25px 60px rgba(16, 65, 77, 0.17);
}

.banner-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(18, 52, 72, 0.48);
  color: var(--white);
  font-size: 34px;
  line-height: 1;
  transition: background 0.2s ease;
}

.banner-arrow:hover {
  background: rgba(18, 52, 72, 0.78);
}

.banner-previous {
  left: 14px;
}

.banner-next {
  right: 14px;
}

.banner-pagination {
  position: absolute;
  right: 0;
  bottom: 17px;
  left: 0;
  display: flex;
  justify-content: center;
  gap: 9px;
}

.banner-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: rgba(18, 52, 72, 0.25);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.banner-dot.active {
  transform: scale(1.1);
  background: var(--white);
}

/* =========================
   7. DANH MỤC HẢI SẢN
========================= */

.categories-section {
  background: var(--white);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.category-card {
  position: relative;
  height: 260px;
  overflow: hidden;
  border-radius: 12px;
  background: #dce9e9;
  isolation: isolate;
}

.category-card::after {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(5, 31, 42, 0.88) 0%,
    rgba(5, 31, 42, 0.15) 65%,
    transparent 100%
  );
  content: "";
}

.category-card img {
  height: 100%;
  transition: transform 0.45s ease;
}

.category-card:hover img {
  transform: scale(1.07);
}

.category-overlay {
  position: absolute;
  z-index: 1;
  right: 20px;
  bottom: 20px;
  left: 20px;
  color: var(--white);
}

.category-overlay h3 {
  font-size: 20px;
}

.category-overlay span {
  display: inline-block;
  margin-top: 6px;
  color: #d9f6f2;
  font-size: 11px;
  font-weight: 600;
}

/* =========================
   8. SẢN PHẨM
========================= */

.products-section {
  background: var(--background);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.product-card {
  overflow: hidden;
  border: 1px solid #e9eff0;
  border-radius: 12px;
  background: var(--white);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.product-image {
  position: relative;
  overflow: hidden;
  height: 220px;
  background: #edf4f4;
}

.product-image > img {
  height: 100%;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image > img {
  transform: scale(1.05);
}

.product-tag {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 5px;
  background: var(--primary);
  color: var(--white);
  font-size: 9px;
  font-weight: 700;
}

.tag-new {
  background: #e8a03c;
}

.favorite {
  position: absolute;
  z-index: 1;
  top: 11px;
  right: 11px;
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: #65757c;
  font-size: 23px;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.favorite:hover {
  background: #fff0f0;
  color: #e24f5a;
}

.favorite.is-favorite {
  background: #fff0f0;
  color: #e24f5a;
}

.product-info {
  padding: 17px;
}

.product-category {
  color: var(--primary);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.1px;
}

.product-info h3 {
  margin-top: 6px;
  color: var(--navy);
  font-size: 15px;
}

.product-description {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.review-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.review-stars {
  color: #e7a52d;
  letter-spacing: 1px;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.price strong {
  color: var(--primary-dark);
  font-size: 15px;
}

.price span {
  margin-left: 4px;
  color: var(--muted);
  font-size: 10px;
}

.add-cart {
  display: grid;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 24px;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.add-cart:hover {
  background: var(--primary);
  color: var(--white);
}

.product-reviews {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.review-toggle {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.review-toggle:hover,
.review-login-note a {
  color: var(--primary-dark);
  text-decoration: underline;
}

.review-panel {
  margin-top: 12px;
}

.review-panel[hidden] {
  display: none;
}

.review-panel-heading,
.review-item-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.review-panel-heading h4 {
  color: var(--navy);
  font-size: 12px;
}

.review-panel-heading > span,
.review-item time,
.review-empty,
.review-login-note {
  color: var(--muted);
  font-size: 10px;
}

.review-list {
  display: grid;
  gap: 10px;
  margin: 10px 0;
}

.review-item {
  padding: 9px;
  border-radius: 7px;
  background: var(--background);
}

.review-item-heading strong {
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 11px;
}

.review-item time {
  display: block;
  margin-top: 2px;
}

.review-item > p {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 11px;
}

.review-empty {
  margin: 8px 0;
}

.review-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.review-form label {
  display: grid;
  gap: 4px;
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
}

.review-form select,
.review-form textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 11px;
}

.review-form textarea {
  resize: vertical;
}

.review-submit {
  justify-self: start;
  padding: 7px 11px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
}

.review-submit:hover {
  background: var(--primary-dark);
}

.review-message {
  margin-top: 8px;
  color: var(--primary-dark);
  font-size: 10px;
}

.catalog-section {
  background: var(--white);
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.catalog-filter {
  min-width: 76px;
  padding: 9px 17px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.catalog-filter:hover,
.catalog-filter.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

.catalog-filter:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.catalog-empty {
  margin: 0 0 24px;
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.catalog-card[hidden] {
  display: none;
}

/* =========================
   9. GIỚI THIỆU
========================= */

.about-section {
  padding: 90px 0;
  background: var(--white);
}

.about-content {
  display: grid;
  grid-template-columns: 0.95fr 1fr;
  align-items: center;
  gap: 75px;
}

.about-image {
  position: relative;
}

.about-image::before {
  position: absolute;
  z-index: 0;
  top: -17px;
  left: -17px;
  width: 65%;
  height: 65%;
  border-radius: 14px;
  background: var(--primary-light);
  content: "";
}

.about-image img {
  position: relative;
  z-index: 1;
  height: 400px;
  border-radius: 14px;
}

.about-text h2 {
  margin-bottom: 18px;
}

.about-text > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.about-list {
  display: grid;
  gap: 13px;
  margin: 24px 0 28px;
  list-style: none;
}

.about-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #415560;
  font-size: 12px;
}

.about-list li span {
  display: grid;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

/* =========================
   10. ĐĂNG KÝ NHẬN TIN
========================= */

.newsletter {
  padding: 48px 0;
  background: #eaf7f6;
}

.newsletter-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.newsletter h2 {
  font-size: clamp(23px, 2.5vw, 30px);
}

.newsletter p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.newsletter-form {
  display: flex;
  width: min(420px, 100%);
  min-height: 49px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid #d4e5e5;
  border-radius: 8px;
  background: var(--white);
}

.newsletter-form input {
  width: 100%;
  min-width: 0;
  padding: 0 15px;
  border: 0;
  outline: none;
  font-size: 11px;
}

.newsletter-form input:focus {
  box-shadow: inset 0 0 0 1px var(--primary);
}

.newsletter-modal[hidden] {
  display: none;
}

.newsletter-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 35, 48, 0.58);
}

.newsletter-modal-box {
  width: min(100%, 400px);
  padding: 30px 26px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
  text-align: center;
  animation: newsletter-modal-appear 0.18s ease-out;
}

.newsletter-modal-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 30px;
  font-weight: 700;
}

.newsletter-modal-box h2 {
  color: var(--navy);
  font-size: 22px;
}

.newsletter-modal-box p {
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

@keyframes newsletter-modal-appear {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* =========================
   11. FOOTER
========================= */

.footer {
  background: #102f40;
  color: #d2e0e5;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 1fr 1.15fr;
  gap: 45px;
  padding-top: 58px;
  padding-bottom: 48px;
}

.footer-brand > p {
  margin-top: 20px;
  color: #b2c5cc;
  font-size: 11px;
  line-height: 1.9;
}

.footer-brand .footer-slogan {
  margin-top: 12px;
  color: #7edbd0;
  font-weight: 700;
}

.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 13px;
}

.footer-column h3 {
  margin-bottom: 5px;
  color: var(--white);
  font-size: 13px;
}

.footer-column a,
.footer-column p {
  color: #b2c5cc;
  font-size: 10px;
  line-height: 1.8;
}

.footer-column a {
  transition: color 0.2s ease;
}

.footer-column a:hover {
  color: #7edbd0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.footer-bottom p {
  color: #9eb5bf;
  font-size: 10px;
}

/* =========================
   12. RESPONSIVE TABLET
========================= */

@media (min-width: 768px) and (max-width: 1023px) {
  .header-content {
    gap: 12px;
  }

  .search-form {
    flex-basis: 240px;
  }

  .header-actions {
    gap: 12px;
  }

  .auth-links {
    gap: 8px;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .category-card {
    height: 220px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .product-image {
    height: 250px;
  }

  .about-content {
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 35px;
  }
}

/* =========================
   13. RESPONSIVE ĐIỆN THOẠI
========================= */

@media (max-width: 767.98px) {
  .container {
    width: calc(100% - 30px);
  }

  .section {
    padding: 55px 0;
  }

  .categories-section,
  .products-section,
  .catalog-section {
    padding: 42px 0;
  }

  .topbar {
    font-size: 10px;
  }

  .header-content {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 12px;
    padding-top: 8px;
    padding-bottom: 8px;
    min-height: auto;
  }

  .header-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 12px;
  }

  .cart-link {
    font-size: 10px;
  }

  .search-form {
    min-width: 0;
    flex: initial;
    width: 100%;
    height: 42px;
  }

  .search-form button {
    padding: 0 13px;
    font-size: 11px;
  }

  .hero {
    padding: 45px 0 50px;
  }

  .hero-content {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .navbar {
    width: 100%;
    flex-basis: auto;
  }

  .nav-toggle {
    min-height: 52px;
  }

  .nav-content {
    position: static;
    display: none;
    width: 100%;
    margin-top: 8px;
  }

  .navbar.is-open .nav-content {
    display: block;
  }

  .navbar.is-open .nav-toggle {
    border-color: var(--primary);
  }

  .nav-toggle-icon {
    transition: transform 0.2s ease;
  }

  .navbar.is-open .nav-toggle-icon {
    transform: rotate(90deg);
  }

  .hero-image {
    width: 100%;
  }

  .section-heading {
    align-items: flex-start;
    gap: 12px;
  }

  .section-heading h2,
  .about-text h2 {
    font-size: 27px;
  }

  .section-heading p {
    font-size: 12px;
  }

  .section-heading > .text-link {
    margin-top: 30px;
    font-size: 10px;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .category-card {
    height: 190px;
  }

  .category-overlay {
    right: 12px;
    bottom: 13px;
    left: 12px;
  }

  .category-overlay h3 {
    font-size: 16px;
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .catalog-filters {
    gap: 8px;
    margin-bottom: 20px;
  }

  .catalog-filter {
    min-width: 64px;
    padding: 8px 13px;
    font-size: 11px;
  }

  .product-image {
    height: 165px;
  }

  .product-info {
    padding: 12px;
  }

  .product-info h3 {
    font-size: 13px;
  }

  .product-description {
    min-height: 35px;
    font-size: 10px;
  }

  .product-bottom {
    gap: 5px;
    margin-top: 12px;
    padding-top: 11px;
  }

  .price strong {
    font-size: 12px;
  }

  .price span {
    font-size: 9px;
  }

  .add-cart {
    width: 31px;
    height: 31px;
  }

  .product-tag {
    top: 8px;
    left: 8px;
    padding: 4px 6px;
    font-size: 8px;
  }

  .favorite {
    top: 8px;
    right: 8px;
    width: 29px;
    height: 29px;
    font-size: 20px;
  }

  .about-section {
    padding: 60px 0;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .about-image img {
    height: 290px;
  }

  .about-text > p {
    font-size: 12px;
  }

  .newsletter {
    padding: 40px 0;
  }

  .newsletter-content {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
  }

  .newsletter-form {
    width: 100%;
    min-height: 46px;
  }

  .newsletter-form button {
    padding: 0 15px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 20px;
    padding-top: 42px;
    padding-bottom: 35px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .footer-column h3 {
    font-size: 12px;
  }

  .footer-column a,
  .footer-column p {
    font-size: 10px;
  }

  .footer-bottom-content {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}

/* =========================
   TINH CHỈNH GIAO DIỆN
========================= */

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(8, 127, 140, 0.18);
  color: var(--navy);
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(8, 127, 140, 0.38);
  outline-offset: 3px;
}

.topbar {
  padding: 9px 20px;
  background: linear-gradient(90deg, #075e6b, #087f8c);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.35px;
}

.logo img {
  border-radius: 10px;
}

.search-form,
.newsletter-form {
  border-color: #dce7e8;
  border-radius: 10px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.search-form:focus-within,
.newsletter-form:focus-within {
  border-color: rgba(8, 127, 140, 0.58);
  box-shadow: 0 0 0 4px rgba(8, 127, 140, 0.08);
}

.search-form input,
.newsletter-form input {
  font-size: 13px;
}

.search-form button,
.newsletter-form button {
  font-size: 13px;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.auth-link,
.cart-link {
  font-size: 12px;
}

.cart-count {
  min-width: 22px;
  height: 22px;
  font-size: 11px;
}

.nav-content {
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(18, 52, 72, 0.13);
}

.nav-toggle {
  border-radius: 10px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.nav-toggle:hover {
  border-color: rgba(8, 127, 140, 0.45);
  background: #fbfefe;
  box-shadow: 0 5px 16px rgba(18, 52, 72, 0.06);
}

.nav-link {
  min-height: 44px;
  border-radius: 8px;
  font-size: 13px;
}

.hero {
  padding-top: 64px;
  padding-bottom: 64px;
  background:
    radial-gradient(
      circle at 88% 14%,
      rgba(172, 229, 225, 0.62),
      transparent 30%
    ),
    linear-gradient(120deg, #eef9f8 0%, #f8fcfc 55%, #e6f4f3 100%);
}

.hero-image > img {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  box-shadow: 0 28px 65px rgba(16, 65, 77, 0.19);
}

.section-heading {
  margin-bottom: 36px;
}

.section-heading h2,
.about-text h2,
.newsletter h2 {
  letter-spacing: -0.6px;
}

.section-heading p {
  font-size: 15px;
}

.text-link {
  font-size: 14px;
}

.category-card {
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(18, 52, 72, 0.06);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(18, 52, 72, 0.15);
}

.category-overlay h3 {
  font-size: 21px;
  letter-spacing: -0.2px;
}

.category-overlay span {
  font-size: 12px;
}

.product-grid {
  gap: 22px;
}

.product-card {
  border-color: #e6eded;
  border-radius: 15px;
  box-shadow: 0 5px 18px rgba(18, 52, 72, 0.035);
}

.product-card:hover {
  box-shadow: 0 18px 38px rgba(18, 52, 72, 0.12);
}

.product-image {
  background: #edf4f3;
}

.product-tag {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.2px;
}

.product-info {
  padding: 19px;
}

.product-category {
  font-size: 10px;
}

.product-info h3 {
  font-size: 16px;
  line-height: 1.45;
}

.product-description {
  font-size: 12px;
  line-height: 1.65;
}

.price strong {
  font-size: 16px;
}

.price span {
  font-size: 11px;
}

.add-cart {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}

.catalog-filter {
  min-height: 42px;
  padding-right: 19px;
  padding-left: 19px;
  font-size: 13px;
}

.catalog-filter:hover {
  transform: translateY(-1px);
}

.about-section {
  padding-top: 96px;
  padding-bottom: 96px;
}

.about-image img {
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(18, 52, 72, 0.12);
}

.about-text > p {
  font-size: 15px;
}

.about-list li {
  font-size: 14px;
}

.btn {
  min-height: 50px;
  border-radius: 10px;
  font-size: 13px;
}

.btn-primary {
  box-shadow: 0 8px 18px rgba(8, 127, 140, 0.18);
}

.newsletter {
  background:
    radial-gradient(circle at 8% 100%, rgba(8, 127, 140, 0.08), transparent 35%),
    #edf7f6;
}

.newsletter p {
  font-size: 14px;
}

.newsletter-form {
  min-height: 52px;
}

.footer-brand > p,
.footer-column a,
.footer-column p {
  font-size: 12px;
}

.footer-column h3 {
  font-size: 14px;
}

.footer-bottom p {
  font-size: 11px;
}

@media (max-width: 1023px) {
  .section-heading p {
    font-size: 14px;
  }

  .product-grid {
    gap: 18px;
  }
}

@media (max-width: 767.98px) {
  .hero {
    padding-top: 38px;
    padding-bottom: 42px;
  }

  .section-heading {
    margin-bottom: 24px;
  }

  .section-heading p {
    font-size: 13px;
  }

  .section-heading > .text-link {
    font-size: 11px;
  }

  .category-card {
    border-radius: 13px;
  }

  .category-overlay h3 {
    font-size: 16px;
  }

  .product-grid {
    gap: 12px;
  }

  .product-info {
    padding: 12px;
  }

  .product-info h3 {
    font-size: 14px;
  }

  .product-description {
    font-size: 11px;
  }

  .catalog-filter {
    min-height: 38px;
    font-size: 12px;
  }

  .about-section {
    padding-top: 62px;
    padding-bottom: 62px;
  }

  .about-text > p {
    font-size: 13px;
  }

  .about-list li {
    font-size: 13px;
  }

  .newsletter p {
    font-size: 13px;
  }

  .footer-brand > p,
  .footer-column a,
  .footer-column p {
    font-size: 11px;
  }
}

/* =========================
   BẢNG MÀU ĐẠI DƯƠNG
========================= */

.topbar {
  background: linear-gradient(100deg, #073c58 0%, #075f78 52%, #07899a 100%);
}

.header {
  background: rgba(255, 255, 255, 0.98);
  border-bottom-color: #d9e9eb;
  box-shadow: 0 6px 24px rgba(10, 62, 82, 0.06);
}

.hero {
  background:
    radial-gradient(
      circle at 88% 12%,
      rgba(89, 198, 190, 0.3),
      transparent 30%
    ),
    radial-gradient(
      circle at 8% 100%,
      rgba(83, 166, 198, 0.15),
      transparent 36%
    ),
    linear-gradient(125deg, #e6f5f5 0%, #f4fbfa 48%, #d9eff0 100%);
}

.hero::before {
  border-color: rgba(8, 127, 154, 0.12);
}

.nav-link:hover,
.nav-link.active {
  background: linear-gradient(110deg, #e4f5f4, #edf7fa);
  color: var(--primary-dark);
}

.nav-toggle:hover {
  border-color: rgba(8, 127, 154, 0.45);
  background: #f5fbfb;
}

.search-form button,
.newsletter-form button,
.btn-primary,
.button-primary {
  background: linear-gradient(115deg, #087f9a, #079b9d);
}

.search-form button:hover,
.newsletter-form button:hover,
.btn-primary:hover,
.button-primary:hover {
  background: linear-gradient(115deg, #07566e, #087f87);
}

.products-section,
.auth-page,
.admin-page {
  background: linear-gradient(180deg, #f2f8f8 0%, #f8fbfb 100%);
}

.category-card {
  background: #d7ecee;
}

.category-card::after {
  background: linear-gradient(
    to top,
    rgba(5, 38, 55, 0.88) 0%,
    rgba(5, 48, 62, 0.17) 66%,
    transparent 100%
  );
}

.product-card {
  border-color: #deebed;
}

.product-image {
  background: linear-gradient(145deg, #eaf5f5, #deeff1);
}

.product-tag {
  background: #087f9a;
}

.tag-new {
  background: #e88b57;
}

.price strong,
.cart-item-info strong,
.cart-item-total {
  color: #087789;
}

.add-cart {
  background: linear-gradient(145deg, #e4f5f3, #e5f1f7);
  color: #087789;
}

.add-cart:hover {
  background: linear-gradient(115deg, #087f9a, #079b9d);
  color: var(--white);
}

.catalog-filter:hover,
.catalog-filter.active {
  border-color: #087f9a;
  background: linear-gradient(115deg, #087f9a, #079b9d);
}

.about-image::before {
  background: linear-gradient(145deg, #dff2f1, #e6f2f7);
}

.about-list li span,
.newsletter-modal-icon,
.payment-success-icon {
  background: #e1f4f3;
  color: #087789;
}

.newsletter {
  background:
    radial-gradient(
      circle at 92% 20%,
      rgba(82, 184, 179, 0.18),
      transparent 32%
    ),
    linear-gradient(110deg, #e5f4f2, #edf7f8);
}

.footer {
  background: linear-gradient(120deg, #082d43 0%, #0b4359 58%, #075766 100%);
}

.footer-bottom {
  border-top-color: rgba(212, 244, 245, 0.15);
}

.cart-items,
.cart-summary,
.payment-success,
.auth-card,
.admin-stat,
.admin-section {
  border-color: #deebed;
  box-shadow: 0 12px 32px rgba(11, 58, 78, 0.07);
}

.cart-item-controls button,
.admin-cancel-edit,
.admin-product-actions button {
  border-color: #dcebed;
}

.cart-item-controls button:hover,
.admin-cancel-edit:hover,
.admin-product-actions button:hover {
  border-color: #83c5ca;
  background: #eef8f7;
}

.cart-summary .cart-summary-total strong,
.admin-stat strong {
  color: #087789;
}

@media (max-width: 767.98px) {
  .header {
    background: #ffffff;
  }

  .hero {
    background:
      radial-gradient(
        circle at 90% 8%,
        rgba(89, 198, 190, 0.24),
        transparent 32%
      ),
      linear-gradient(135deg, #e8f6f5, #f4fafa 62%, #e1f1f3);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================
   14. ĐIỆN THOẠI NHỎ
========================= */

@media (max-width: 360px) {
  .container {
    width: calc(100% - 24px);
  }

  .header-actions {
    gap: 8px;
  }

  .auth-links {
    gap: 6px;
  }

  .auth-link {
    font-size: 10px;
  }

  .cart-link {
    gap: 3px;
  }

  .category-card {
    height: 160px;
  }

  .product-image {
    height: 135px;
  }

  .product-info {
    padding: 9px;
  }

  .price strong {
    font-size: 11px;
  }
}

/* =========================
   15. TRANG GIỎ HÀNG
========================= */

.cart-page {
  min-height: 100vh;
  background: var(--background);
}

.cart-page .header-content {
  min-height: 76px;
}

.cart-continue-link {
  margin-left: auto;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
}

.cart-main {
  padding: 56px 0 80px;
}

.cart-page-heading {
  margin-bottom: 28px;
}

.cart-page-heading h1 {
  color: var(--navy);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.25;
}

.cart-page-heading p {
  margin-top: 8px;
  color: var(--muted);
}

.cart-feedback {
  margin: -12px 0 20px;
  color: #b23a48;
  font-size: 13px;
  font-weight: 600;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 24px;
}

.cart-items,
.cart-summary {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.cart-items {
  padding: 18px;
}

.cart-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item:first-child {
  padding-top: 0;
}

.cart-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.cart-item > img {
  width: 92px;
  height: 78px;
  border-radius: 8px;
  object-fit: cover;
}

.cart-item-info > span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.cart-item-info h2 {
  margin: 2px 0 4px;
  color: var(--navy);
  font-size: 16px;
}

.cart-item-info strong,
.cart-item-total {
  color: var(--primary-dark);
  font-size: 14px;
  white-space: nowrap;
}

.cart-item-info small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-item-controls button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  color: var(--primary-dark);
  font-size: 18px;
}

.cart-item-controls input {
  width: 58px;
  height: 32px;
  padding: 0 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.cart-item-controls input:focus {
  border-color: var(--primary);
  outline: 2px solid rgba(8, 127, 140, 0.15);
}

.cart-remove {
  border: 0;
  background: none;
  color: #b23a48;
  font-size: 12px;
}

.cart-summary {
  padding: 22px;
}

.cart-summary h2 {
  margin-bottom: 18px;
  color: var(--navy);
  font-size: 18px;
}

.cart-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 13px 0;
  color: var(--muted);
  font-size: 13px;
}

.cart-summary > div strong {
  color: var(--text);
  text-align: right;
}

.cart-summary .cart-summary-total {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--navy);
  font-size: 15px;
  font-weight: 700;
}

.cart-summary .cart-summary-total strong {
  color: var(--primary-dark);
  font-size: 17px;
}

.cart-summary .checkout-button {
  width: 100%;
  margin-top: 10px;
}

.checkout-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button-primary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 0;
  border-radius: 7px;
  background: var(--primary);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.cart-summary > p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.cart-empty {
  display: grid;
  min-height: 310px;
  justify-items: center;
  align-content: center;
  text-align: center;
}

.cart-empty > span {
  margin-bottom: 12px;
  font-size: 42px;
}

.cart-empty h2 {
  color: var(--navy);
  font-size: 20px;
}

.cart-empty p {
  margin: 7px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.cart-layout[hidden] {
  display: none;
}

.payment-success {
  display: grid;
  justify-items: center;
  padding: 42px 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: center;
}

.payment-success-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 32px;
  font-weight: 700;
}

.payment-success h2 {
  color: var(--navy);
  font-size: 24px;
}

.payment-success p {
  margin-top: 8px;
  color: var(--text);
  font-size: 14px;
}

.payment-success .payment-demo-note {
  margin: 14px 0 20px;
  color: var(--muted);
  font-size: 11px;
}

.payment-success .payment-track-link {
  margin-bottom: 10px;
}

.orders-page {
  min-height: 100vh;
  background: var(--background);
}

.orders-page .header-content {
  min-height: 76px;
}

.orders-main {
  padding: 48px 0 72px;
}

.orders-page-heading {
  margin-bottom: 24px;
}

.orders-page-heading h1 {
  color: var(--navy);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.25;
}

.orders-page-heading p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.customer-orders {
  display: grid;
  gap: 16px;
}

.customer-order,
.customer-orders-empty {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.customer-order.is-highlighted {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 127, 154, 0.12);
}

.customer-order-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.customer-order-heading .eyebrow {
  margin-bottom: 2px;
  font-size: 9px;
}

.customer-order-heading h2 {
  color: var(--navy);
  font-size: 17px;
}

.customer-order-status {
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.customer-order-date {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.customer-order-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0;
  list-style: none;
}

.customer-order-progress li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.customer-order-progress li::before {
  position: absolute;
  z-index: 0;
  top: 14px;
  left: calc(-50% + 14px);
  width: calc(100% - 28px);
  height: 2px;
  background: var(--border);
  content: "";
}

.customer-order-progress li:first-child::before {
  display: none;
}

.customer-order-progress li > span:first-child {
  z-index: 1;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  font-size: 11px;
  font-weight: 700;
}

.customer-order-progress li.is-complete,
.customer-order-progress li.is-current {
  color: var(--primary-dark);
  font-weight: 700;
}

.customer-order-progress li.is-complete::before {
  background: var(--primary);
}

.customer-order-progress li.is-complete > span:first-child,
.customer-order-progress li.is-current > span:first-child {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

.customer-order-items {
  display: grid;
  gap: 8px;
  padding: 13px 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.customer-order-items li,
.customer-order-total {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text);
  font-size: 12px;
}

.customer-order-items li span {
  color: var(--muted);
  text-align: right;
}

.customer-order-total {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-weight: 700;
}

.customer-order-total strong {
  color: var(--primary-dark);
}

.customer-order-cancel {
  min-height: 38px;
  margin-top: 16px;
  padding: 0 14px;
  border: 1px solid #d7a2a2;
  border-radius: 6px;
  background: var(--white);
  color: #a52a2a;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.customer-order-cancel:hover,
.customer-order-cancel:focus-visible {
  background: #fff0f0;
}

.customer-order-message:not(:empty) {
  margin: 0 0 14px;
  color: #a52a2a;
  font-size: 12px;
}

.customer-order-cancel-dialog {
  width: min(460px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  color: var(--text);
  box-shadow: var(--shadow);
}

.customer-order-cancel-dialog::backdrop {
  background: rgba(13, 35, 48, 0.55);
}

.customer-order-cancel-form {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.customer-order-cancel-form h2 {
  color: var(--navy);
  font-size: 20px;
}

.customer-order-cancel-form p {
  color: var(--muted);
  font-size: 13px;
}

.customer-order-cancel-form label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.customer-order-cancel-form .customer-order-cancel-other[hidden] {
  display: none;
}

.customer-order-cancel-form select,
.customer-order-cancel-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline-color: var(--primary);
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.customer-order-cancel-form textarea {
  resize: vertical;
}

.customer-order-cancel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.customer-order-cancel-actions button {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.customer-order-cancel-actions .customer-order-cancel-submit {
  border-color: #a52a2a;
  background: #a52a2a;
  color: var(--white);
}

.customer-order-cancelled {
  margin: 18px 0;
  padding: 12px;
  border-radius: 7px;
  background: #fff0f0;
  color: #a52a2a;
  font-size: 12px;
  font-weight: 700;
}

.customer-orders-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 42px 22px;
  text-align: center;
}

.customer-orders-empty h2 {
  color: var(--navy);
  font-size: 20px;
}

.customer-orders-empty p {
  color: var(--muted);
  font-size: 13px;
}

/* =========================
   16. TÀI KHOẢN VÀ QUẢN TRỊ
========================= */

.auth-greeting {
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.auth-logout {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.auth-page,
.admin-page {
  min-height: 100vh;
  background: var(--background);
}

.auth-page .header-content {
  min-height: 76px;
}

.auth-back-link {
  margin-left: auto;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
}

.auth-main {
  display: grid;
  min-height: calc(100vh - 158px);
  place-items: center;
  padding: 42px 15px;
}

.auth-card {
  width: min(100%, 440px);
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  color: var(--navy);
  font-size: 30px;
  line-height: 1.25;
}

.auth-intro {
  margin: 8px 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.auth-form {
  display: grid;
  gap: 9px;
}

.auth-form label {
  margin-top: 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  outline-color: var(--primary);
  background: var(--white);
  color: var(--text);
}

.auth-form .button-primary {
  width: 100%;
  margin-top: 5px;
}

.auth-message:not(:empty) {
  padding: 9px 11px;
  border-radius: 6px;
  background: #fff0f0;
  color: #a52a2a;
  font-size: 12px;
}

.auth-switch {
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.auth-switch a {
  color: var(--primary-dark);
  font-weight: 700;
}

.admin-header-title {
  margin-left: 20px;
  color: var(--navy);
  font-size: 16px;
  font-weight: 700;
}

.admin-main {
  padding: 42px 0 70px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 26px;
}

.admin-sidebar {
  position: sticky;
  top: 105px;
}

.admin-menu {
  display: grid;
  gap: 6px;
  padding: 16px 12px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(160deg, #ffffff 0%, #f4fbfb 100%);
  box-shadow: 0 12px 30px rgba(11, 58, 78, 0.08);
  counter-reset: admin-menu-item;
}

.admin-menu::before {
  content: "ĐIỀU HƯỚNG";
  margin: 0 10px 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
}

.admin-menu a {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.admin-menu a::before {
  counter-increment: admin-menu-item;
  content: "0" counter(admin-menu-item);
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border-radius: 7px;
  background: #edf5f6;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2px;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.admin-menu a:hover,
.admin-menu a:focus-visible {
  outline: none;
  border-color: #d7ebed;
  background: #f1f9f9;
  color: var(--primary-dark);
  transform: translateX(2px);
}

.admin-menu a:hover::before,
.admin-menu a:focus-visible::before {
  background: var(--primary-dark);
  color: var(--white);
}

.admin-menu a[href="#admin-overview"],
.admin-layout:has(#admin-inventory:target) .admin-menu a[href="#admin-inventory"],
.admin-layout:has(#admin-orders:target) .admin-menu a[href="#admin-orders"],
.admin-layout:has(#admin-product-editor:target) .admin-menu a[href="#admin-product-editor"],
.admin-layout:has(#admin-products:target) .admin-menu a[href="#admin-products"],
.admin-layout:has(#admin-users:target) .admin-menu a[href="#admin-users"] {
  border-color: #d7ebed;
  background: linear-gradient(105deg, #e8f6f5, #f5fbfb);
  color: var(--primary-dark);
}

.admin-menu a[href="#admin-overview"]::before,
.admin-layout:has(#admin-inventory:target) .admin-menu a[href="#admin-inventory"]::before,
.admin-layout:has(#admin-orders:target) .admin-menu a[href="#admin-orders"]::before,
.admin-layout:has(#admin-product-editor:target) .admin-menu a[href="#admin-product-editor"]::before,
.admin-layout:has(#admin-products:target) .admin-menu a[href="#admin-products"]::before,
.admin-layout:has(#admin-users:target) .admin-menu a[href="#admin-users"]::before {
  background: var(--primary-dark);
  color: var(--white);
}

.admin-page-heading,
.admin-section {
  scroll-margin-top: 100px;
}

.admin-page-heading,
.admin-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-page-heading {
  margin-bottom: 26px;
}

.admin-page-heading h1 {
  color: var(--navy);
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.25;
}

.admin-welcome {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stat,
.admin-section {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.admin-stat {
  display: grid;
  gap: 5px;
  padding: 20px;
}

.admin-stat span,
.admin-section-heading span {
  color: var(--muted);
  font-size: 12px;
}

.admin-orders-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.admin-order-filter {
  display: grid;
  gap: 5px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.admin-order-filter select {
  min-width: 180px;
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline-color: var(--primary);
  background: var(--white);
  color: var(--text);
  font: inherit;
}

.admin-stat strong {
  color: var(--primary-dark);
  font-size: 28px;
  line-height: 1.2;
}

.admin-section {
  margin-top: 18px;
  padding: 20px;
}

.admin-product-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-product-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.admin-product-form-grid input,
.admin-product-form-grid select,
.admin-product-form-grid textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline-color: var(--primary);
  background: var(--white);
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
}

.admin-product-form-grid textarea {
  resize: vertical;
}

.admin-form-description {
  grid-column: 1 / -1;
}

.admin-featured-toggle {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
  align-self: end;
  min-height: 42px;
}

.admin-featured-toggle input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--primary);
}

.admin-product-form-actions {
  display: flex;
  gap: 10px;
}

.admin-cancel-edit,
.admin-product-actions button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.admin-product-message:not(:empty) {
  margin: 12px 0;
  color: var(--primary-dark);
  font-size: 12px;
}

.admin-section-heading {
  margin-bottom: 14px;
}

.admin-section-heading h2 {
  color: var(--navy);
  font-size: 18px;
}

.admin-report-date {
  display: grid;
  gap: 5px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.admin-report-date input,
.admin-order-status {
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  outline-color: var(--primary);
  background: var(--white);
  color: var(--text);
  font: inherit;
}

.admin-report-summary {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: 12px;
}

.admin-order-message:not(:empty) {
  margin-bottom: 12px;
  color: #a52a2a;
  font-size: 12px;
}

.admin-order-filter-empty {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.admin-order-cancel-reason {
  display: block;
  max-width: 220px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  white-space: normal;
}

.admin-orders tbody tr[hidden] {
  display: none;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th,
.admin-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  white-space: nowrap;
}

.admin-table th {
  color: var(--muted);
  font-size: 11px;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-products td:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-products td:first-child img {
  width: 42px;
  height: 38px;
  border-radius: 5px;
}

.admin-product-actions {
  display: flex;
  gap: 6px;
}

.admin-product-actions .admin-edit-product {
  border-color: var(--primary-light);
  color: var(--primary-dark);
}

.admin-product-actions .admin-delete-product {
  border-color: #f1d3d3;
  color: #a52a2a;
}

.admin-security-note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 767.98px) {
  .cart-page .header-content {
    display: flex;
    flex-wrap: wrap;
    min-height: 72px;
  }

  .cart-page .logo img {
    width: 64px;
    height: 64px;
  }

  .cart-continue-link {
    font-size: 11px;
  }

  .cart-main {
    padding: 38px 0 55px;
  }

  .orders-main {
    padding: 34px 0 52px;
  }

  .customer-order,
  .customer-orders-empty {
    padding: 16px;
  }

  .customer-order-progress {
    gap: 3px;
    margin: 18px 0;
  }

  .customer-order-progress li {
    font-size: 9px;
  }

  .customer-order-items li,
  .customer-order-total {
    font-size: 11px;
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-items {
    padding: 12px;
  }

  .cart-item {
    grid-template-columns: 66px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .cart-item > img {
    width: 66px;
    height: 66px;
  }

  .cart-item-info h2 {
    font-size: 13px;
  }

  .cart-item-info strong,
  .cart-item-total {
    font-size: 12px;
  }

  .cart-item-controls {
    grid-column: 2;
    grid-row: 2;
    gap: 7px;
  }

  .cart-item-controls button {
    width: 26px;
    height: 26px;
  }

  .cart-item-controls input {
    width: 52px;
    height: 28px;
  }

  .cart-item-total {
    grid-column: 3;
    grid-row: 2;
  }

  .cart-remove {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .cart-summary {
    padding: 18px;
  }

  .auth-page .header-content {
    display: flex;
  }

  .auth-main {
    min-height: calc(100vh - 146px);
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .auth-card h1 {
    font-size: 26px;
  }

  .admin-header-title {
    display: none;
  }

  .admin-main {
    padding: 30px 0 50px;
  }

  .admin-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-menu {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 5px;
    padding: 7px;
    scrollbar-width: thin;
  }

  .admin-menu::before {
    display: none;
  }

  .admin-menu a {
    flex-shrink: 0;
    min-height: 38px;
    gap: 7px;
    padding: 0 9px;
    font-size: 11px;
  }

  .admin-menu a::before {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
    font-size: 8px;
  }

  .admin-page-heading {
    align-items: flex-start;
  }

  .admin-page-heading > .button-primary {
    min-height: 38px;
    padding: 0 10px;
    font-size: 11px;
  }

  .admin-stats {
    gap: 9px;
  }

  .admin-stat {
    padding: 13px 10px;
  }

  .admin-stat span {
    font-size: 10px;
  }

  .admin-stat strong {
    font-size: 22px;
  }

  .admin-section {
    padding: 14px;
  }

  .admin-product-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-form-description {
    grid-column: auto;
  }

  .admin-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .admin-orders-tools {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .admin-order-filter,
  .admin-order-filter select {
    width: 100%;
  }

  .admin-report-date,
  .admin-report-date input {
    width: 100%;
  }
}
