:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --ink: #17202a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --accent: #f59e0b;
  --accent-soft: #fff7ed;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar {
  background: #0f172a;
  color: #e5e7eb;
  font-size: 13px;
}

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

.topbar-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #334155;
  font-weight: 700;
}

.main-nav a:hover {
  background: #ecfeff;
  color: var(--primary-dark);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 800;
}

.cart-count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #111827;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  background: #f0fdf4;
  color: #166534;
  font-size: 13px;
  font-weight: 800;
}

.btn,
.btn-outline,
.btn-danger,
.btn-muted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 118, 110, 0.22);
}

.btn:hover,
.btn-outline:hover,
.btn-danger:hover,
.btn-muted:hover {
  transform: translateY(-1px);
}

.btn-outline {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn-danger {
  background: #fff1f2;
  color: var(--danger);
  border-color: #fecdd3;
}

.btn-muted {
  background: #f1f5f9;
  color: #334155;
}

.btn-wide {
  width: 100%;
}

.site-main {
  min-height: 64vh;
}

.hero {
  background:
    linear-gradient(120deg, rgba(15, 23, 42, 0.92), rgba(15, 118, 110, 0.78)),
    url("../img/hinh1.webp") center/cover;
  color: #fff;
}

.hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 48px;
  align-items: center;
  min-height: 560px;
  padding: 72px 0 86px;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-panel {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(16px);
}

.hero-panel strong {
  display: block;
  font-size: 38px;
  line-height: 1;
}

.hero-panel span {
  display: block;
  margin-top: 8px;
  color: #dbeafe;
}

.section {
  padding: 56px 0;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--primary);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: 0;
}

.section-copy {
  margin: 10px 0 0;
  max-width: 640px;
  color: var(--muted);
  line-height: 1.7;
}

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

.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #eef2f7;
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.04);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #ecfeff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.product-card .badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.product-body {
  display: grid;
  gap: 10px;
  grid-template-rows: auto auto auto auto auto;
  padding: 16px;
}

.product-title {
  margin: 0;
  min-height: 48px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
}

.product-desc {
  margin: 0;
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.product-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.rating {
  color: var(--accent);
  letter-spacing: 1px;
  white-space: nowrap;
}

.product-price {
  color: var(--danger);
  font-size: 19px;
  font-weight: 900;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.inline-form {
  margin: 0;
}

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

.category-tile {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-weight: 800;
}

.category-tile span {
  color: var(--muted);
  font-weight: 700;
}

.shop-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 24px;
}

.filter-panel,
.summary-card,
.form-card,
.empty-state,
.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.filter-panel {
  position: sticky;
  top: 100px;
  align-self: start;
  padding: 18px;
}

.filter-title {
  margin: 0 0 14px;
  font-size: 18px;
}

.category-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.category-list a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: #334155;
  font-weight: 700;
}

.category-list a:hover,
.category-list a.active {
  background: #ccfbf1;
  color: var(--primary-dark);
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 18px;
}

.field,
.textarea,
.select {
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  outline: none;
}

.textarea {
  min-height: 112px;
  padding: 12px 13px;
  resize: vertical;
}

.field:focus,
.textarea:focus,
.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 36px;
  align-items: start;
}

.gallery {
  display: grid;
  gap: 14px;
}

.gallery-main {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 1 / 0.78;
  background: #eef2f7;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gallery-thumbs img {
  width: 100%;
  aspect-ratio: 1 / 0.78;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: cover;
}

.detail-info {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 14px 0 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

.detail-price {
  margin: 18px 0;
  color: var(--danger);
  font-size: 30px;
  font-weight: 900;
}

.detail-desc {
  color: var(--muted);
  line-height: 1.8;
}

.quantity-row {
  display: grid;
  grid-template-columns: 110px 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.trust-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.trust-item {
  padding: 14px;
  border-radius: var(--radius);
  background: #f8fafc;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

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

.cart-list {
  display: grid;
  gap: 14px;
}

.cart-item {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 130px 130px 44px;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.cart-item img {
  width: 108px;
  height: 108px;
  border-radius: var(--radius);
  object-fit: cover;
}

.cart-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.cart-meta {
  color: var(--muted);
  font-size: 14px;
}

.cart-price,
.cart-line-total {
  font-weight: 900;
}

.summary-card,
.form-card {
  padding: 22px;
}

.summary-card h3,
.form-card h3 {
  margin: 0 0 18px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: #475569;
}

.summary-row.total {
  border-bottom: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

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

.form-group {
  display: grid;
  gap: 8px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

.payment-options {
  display: grid;
  gap: 10px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.payment-option input {
  width: auto;
  margin: 0;
}

.alert {
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  font-weight: 700;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
}

.site-alert {
  margin-top: 18px;
}

.auth-section {
  background:
    linear-gradient(135deg, rgba(240, 253, 250, 0.92), rgba(255, 247, 237, 0.84)),
    url("../img/hinh5.webp") center/cover;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 34px;
  align-items: center;
  min-height: 620px;
}

.auth-copy h1 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.auth-copy p {
  max-width: 560px;
  color: #475569;
  font-size: 18px;
  line-height: 1.7;
}

.auth-note {
  display: grid;
  gap: 6px;
  width: min(100%, 420px);
  margin-top: 22px;
  padding: 16px;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  background: rgba(255, 247, 237, 0.92);
}

.auth-note span {
  color: #9a3412;
  font-weight: 700;
}

.auth-card {
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin: 0;
  font-size: 30px;
}

.auth-switch {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

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

.empty-state {
  display: grid;
  place-items: center;
  min-height: 300px;
  padding: 36px;
  text-align: center;
}

.empty-state h2 {
  margin: 0 0 10px;
}

.success-hero {
  display: grid;
  gap: 16px;
  justify-items: center;
  padding: 48px;
  border-radius: var(--radius);
  background: #ecfdf5;
  text-align: center;
}

.success-icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 34px;
  font-weight: 900;
}

.content-page {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 24px;
}

.info-card {
  padding: 26px;
  line-height: 1.75;
}

.info-card h1,
.info-card h2 {
  margin-top: 0;
}

.site-footer {
  margin-top: 48px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
  padding: 38px 0;
}

.footer-inner h3,
.footer-inner h4 {
  color: #fff;
  margin-top: 0;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 14px 0;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 980px) {
  .hero-inner,
  .detail-layout,
  .cart-layout,
  .checkout-layout,
  .content-page,
  .shop-layout,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .grid-products,
  .category-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-panel {
    position: static;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar-inner,
  .nav-inner,
  .section-head,
  .main-nav,
  .nav-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .main-nav {
    width: 100%;
    gap: 4px;
  }

  .main-nav a,
  .cart-link {
    justify-content: center;
  }

  .hero-inner {
    min-height: auto;
    padding: 48px 0;
  }

  .grid-products,
  .category-strip,
  .form-grid,
  .trust-list,
  .gallery-thumbs,
  .quantity-row {
    grid-template-columns: 1fr;
  }

  .cart-item {
    grid-template-columns: 88px minmax(0, 1fr);
  }

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

  .cart-price,
  .cart-line-total,
  .cart-item .field,
  .cart-item .btn-danger {
    grid-column: 2;
  }
}
