:root {
  --navy: #0b2a4a;
  --teal: #0e7c86;
  --teal-dark: #0a5d64;
  --sand: #f6f2ea;
  --ink: #1c2733;
  --muted: #5b6b7a;
  --line: #dde3e8;
  --warn-bg: #fff6e0;
  --warn-line: #e3b505;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.55;
}

a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

/* ---------- header ---------- */
header.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-size: 1.25rem; font-weight: 700; letter-spacing: .3px; }
.brand-slogan { font-size: .8rem; color: #bcd6e8; font-style: italic; }
.main-nav { margin-left: auto; display: flex; gap: 18px; }
.main-nav a { color: #e8f1f8; font-size: .95rem; }
.cart-button {
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: .95rem;
  cursor: pointer;
}
.cart-button:hover { background: var(--teal-dark); }
.cart-count {
  background: #fff;
  color: var(--navy);
  border-radius: 999px;
  padding: 0 7px;
  font-weight: 700;
  margin-left: 4px;
}

/* ---------- layout ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 56px; }
h1 { font-size: 1.7rem; margin: 0 0 8px; }
h2.section-title { font-size: 1.35rem; margin: 36px 0 14px; border-bottom: 2px solid var(--line); padding-bottom: 6px; }

/* ---------- hero ---------- */
.hero {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--navy);
  color: #fff;
}
.hero img { display: block; width: 100%; max-height: 340px; object-fit: cover; opacity: .92; }
.hero-text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px 22px;
  background: linear-gradient(transparent, rgba(4, 22, 40, .82));
}
.hero-text h1 { margin: 0; font-size: 1.9rem; }
.hero-text p { margin: 4px 0 0; color: #d7e7f2; }

/* ---------- product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}
.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
}
.product-card:hover { box-shadow: 0 4px 18px rgba(11, 42, 74, .12); }
.product-card img { width: 100%; height: 180px; object-fit: cover; background: var(--sand); }
.product-card-body { padding: 12px 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card-name { font-weight: 600; color: var(--ink); }
.product-card-price { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-top: auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-block { display: block; width: 100%; margin-top: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- product page ---------- */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.product-photo img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.product-price { font-size: 1.6rem; font-weight: 700; color: var(--navy); margin: 8px 0 14px; }
.product-desc { white-space: normal; }
.product-desc ul { margin: 8px 0; padding-left: 20px; }
.qty-row { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.qty-row input[type="number"] { width: 70px; padding: 8px; font-size: 1rem; border: 1px solid var(--line); border-radius: 6px; }
.prop65 {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 18px;
  font-size: .9rem;
}
.added-note { color: var(--teal-dark); font-weight: 600; margin-top: 10px; display: none; }

/* ---------- cart / checkout ---------- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.cart-table img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.qty-controls { display: inline-flex; align-items: center; gap: 8px; }
.qty-controls button {
  width: 28px; height: 28px;
  border: 1px solid var(--line); background: #fff; border-radius: 6px; cursor: pointer; font-size: 1rem; line-height: 1;
}
.qty-controls .qty-remove { width: auto; padding: 0 8px; font-size: .85rem; color: #a33; }
.summary-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: #fbfcfd;
}
.summary-row { display: flex; justify-content: space-between; padding: 4px 0; }
.summary-row.total { border-top: 2px solid var(--line); margin-top: 8px; padding-top: 10px; font-size: 1.15rem; font-weight: 700; }
.ship-option {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 10px 0;
  cursor: pointer;
}
.ship-option.disabled { opacity: .55; cursor: not-allowed; background: #f4f4f4; }
.ship-option .ship-note { display: block; font-size: .88rem; color: var(--muted); margin-top: 4px; }
.notice {
  background: #eef6f7;
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 16px 0;
}
.confirmation {
  background: #ecf8ee;
  border: 1px solid #4caf50;
  border-radius: var(--radius);
  padding: 18px;
  margin: 16px 0;
}
.empty-note { color: var(--muted); padding: 18px 0; }

/* ---------- drawer ---------- */
.cart-drawer { display: none; }
.cart-drawer.open { display: block; }
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(8, 24, 40, .5); z-index: 50;
}
.drawer-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(380px, 92vw);
  background: #fff; z-index: 51;
  display: flex; flex-direction: column;
  box-shadow: -4px 0 18px rgba(0,0,0,.2);
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 1.15rem; }
.drawer-close { background: none; border: 0; font-size: 1.6rem; cursor: pointer; }
.drawer-items { flex: 1; overflow-y: auto; padding: 10px 16px; }
.drawer-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.drawer-item img { width: 58px; height: 58px; object-fit: cover; border-radius: 6px; }
.drawer-item-main { flex: 1; font-size: .92rem; }
.drawer-item-price { color: var(--muted); }
.drawer-item-total { font-weight: 700; }
.drawer-foot { padding: 14px 16px; border-top: 1px solid var(--line); }
.drawer-subtotal { font-size: 1.05rem; }

/* ---------- policy pages ---------- */
.policy { max-width: 760px; }
.policy h2 { margin-top: 26px; }

/* ---------- footer ---------- */
footer.site-footer { background: var(--sand); border-top: 1px solid var(--line); }
.footer-inner {
  max-width: 1100px; margin: 0 auto; padding: 22px 16px;
  display: flex; gap: 24px; flex-wrap: wrap; justify-content: space-between;
  font-size: .92rem; color: var(--muted);
}
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

@media (max-width: 720px) {
  .product-layout { grid-template-columns: 1fr; }
  .main-nav { margin-left: 0; }
  .hero-text h1 { font-size: 1.4rem; }
  .cart-table thead { display: none; }
  .cart-table td { display: block; border-bottom: 0; padding: 4px 8px; }
  .cart-table tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
}
