:root {
  --blue: #0b3ea8;
  --blue-dark: #082e80;
  --blue-light: #e8f0ff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --border: #e5e7eb;
  --sale: #e0245e;
  --bg: #f5f6f8;
  --radius: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #fff;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 50;
}
.header-top {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  max-width: 1280px;
  margin: 0 auto;
}
.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--blue);
  white-space: nowrap;
}
.logo span { font-weight: 400; }
.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 10px 18px;
  gap: 8px;
  max-width: 700px;
}
.search-bar input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 14px;
}
.search-bar button {
  background: none;
  border: none;
  color: var(--blue);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  white-space: nowrap;
  position: relative;
}
.header-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 15px;
  color: var(--blue);
  background: none;
  border: none;
}
.header-action .cart-count {
  background: var(--sale);
  color: #fff;
  font-size: 11px;
  border-radius: 10px;
  padding: 1px 6px;
  margin-left: 2px;
}
.header-nav {
  display: flex;
  gap: 28px;
  padding: 0 24px 14px;
  max-width: 1280px;
  margin: 0 auto;
  overflow-x: auto;
}
.header-nav a {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text);
  padding-bottom: 4px;
}
.header-nav a:hover, .header-nav a.active {
  color: var(--blue);
  border-bottom: 2px solid var(--blue);
}

/* Sits in normal document flow inside .plp-main, above the <h1> title — not
   position:fixed — so it can never overlap page content; it just pushes the
   title down. JS sets margin-left so its arrow lines up with the nav link. */
.nav-callout {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--blue-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  padding: 10px 14px;
  border-radius: 8px;
  margin: 0 0 18px;
  opacity: 0;
  transition: opacity .2s;
  margin-left: 0px ! Important;
}
.nav-callout.show { opacity: 1; }
.nav-callout::before {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 24px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid var(--blue-dark);
  transform: rotate(179deg);
}
.nav-callout button {
  background: none;
  border: none;
  color: #fff;
  font-size: 15px;
  line-height: 1;
  opacity: .8;
  flex-shrink: 0;
}
.nav-callout button:hover { opacity: 1; }

/* account dropdown */
.account-menu {
  position: absolute;
  top: 36px;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  width: 240px;
  padding: 8px 0;
  display: none;
}
.account-menu.open { display: block; }
.account-menu a, .account-menu button.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 18px;
  font-size: 14px;
  background: none;
  border: none;
}
.account-menu a:hover, .account-menu button.menu-item:hover { background: var(--bg); }
.account-menu .greeting {
  padding: 12px 18px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

/* ---------- Members-only login banner ---------- */
.members-banner-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 24px 0;
  display: flex!important;
}
.members-banner {
  background: #eefaf0;
  border: 1px solid #bfe8c6;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 20px;
}
.members-banner:hover { background: #e2f5e5; }

/* ---------- Hero row (carousel + stacked promo banners) ---------- */
.hero-row {
  display: flex;
  /* grid-template-columns: 1fr 1fr; */
  gap: 16px;
  padding: 24px;
  max-width: 1280px;
  margin: 0 auto;
}

/* ---------- Carousel ---------- */
.carousel {
  position: relative;
  background: linear-gradient(180deg, #2fa8e0 0%, #6fc6ea 60%, #fff 100%);
  overflow: hidden;
  border-radius: var(--radius);
  width: 55%;
}
.carousel-track {
  display: flex;
  transition: transform .5s ease;
}
.carousel-slide {
  min-width: 100%;
}
.carousel-slide img {
  width: 100%;
  display: block;
   min-height: 330px; 
}
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 14px 0;
}
.carousel-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #cbd5e1;
  border: none;
  padding: 0;
}
.carousel-dots button.active { background: var(--blue); width: 22px; border-radius: 5px; }
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.85);
  border: none;
  border-radius: 50%;
  width: 40px; height: 40px;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.carousel-arrow.prev { left: 16px; }
.carousel-arrow.next { right: 16px; }

.promo-strip {
  display: flex;
  flex-direction: column;
  gap: 16px;
      width: 45%;
}
.promo-strip img {
  border-radius: var(--radius);
  width: 100%;
  /* flex: 1 1 0;
  min-height: 0; */
  /*object-fit: cover;*/
  height: 174px;
}

/* ---------- Section ---------- */
.section {
  padding: 32px 24px 8px;
  max-width: 1280px;
  margin: 0 auto;
}
.section-title {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  margin: 0 0 20px;
}
/* ---------- Product grid / card ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}
.product-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow .15s;
}
.product-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.08); }
.product-card .thumb {
  aspect-ratio: 1 / 1;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  position: relative;
}
.product-card .thumb img { max-height: 100%; object-fit: contain;width: auto;
  height: 200px; }
.badge-sale {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--sale);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}
.product-card .info { padding: 12px 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.product-card .vendor { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.product-card .title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  min-height: 2.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.price { font-size: 17px; font-weight: 800; }
.compare-at { font-size: 12px; color: var(--muted); text-decoration: line-through; }
.discount { font-size: 12px; color: var(--sale); font-weight: 700; }
.out-of-stock { font-size: 12px; color: var(--muted); margin-top: 4px; }
.add-to-cart-btn {
  margin-top: 8px;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 700;
}
.add-to-cart-btn:disabled { background: #cbd5e1; cursor: not-allowed; }
.card-actions { display: flex; gap: 8px; margin-top: 8px; }
.card-actions .add-to-cart-btn { margin-top: 0; flex: 1; }
.compare-btn {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.rating { font-size: 12px; color: #f5a623; margin-top: 2px; }
.rating .count { color: var(--muted); margin-left: 4px; }

.see-more-wrap { text-align: center; margin: 24px 0 8px; }
.see-more-wrap button {
  background: none;
  border: 1px solid var(--border);
  padding: 10px 28px;
  border-radius: 22px;
  font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--blue-dark);
  color: #fff;
  margin-top: 48px;
}
.footer-top {
  padding: 40px 24px;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 24px;
}
.footer-rewards h3 { font-size: 20px; margin: 0 0 6px; }
.footer-rewards p { color: #c7d3f0; font-size: 13px; margin: 0 0 16px; }
.footer-rewards img { border-radius: var(--radius); max-width: 260px; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: #ffd23f; margin: 0 0 14px; }
.footer-col a, .footer-col p { display: block; font-size: 14px; color: #dbe4f8; margin-bottom: 10px; }
.footer-social { display: flex; gap: 12px; margin-bottom: 18px; }
.footer-social a {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 1280px;
  margin: 0 auto;
  font-size: 13px;
  color: #c7d3f0;
}
.footer-bottom a { margin-right: 16px; }

/* ---------- Login modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .5);
  display: none;
  justify-content: center;
  z-index: 200;
  padding: 40px 20px;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 400px;
  padding: 32px 28px 28px;
  position: relative;
  margin: auto;
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--muted);
}
.modal-box h2 { text-align: center; font-size: 22px; margin: 0 0 6px; }
.modal-sub { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 22px; }
.modal-sub a, .form-toggle a { color: var(--blue); font-weight: 600; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
}
.field input:focus { border-color: var(--blue); }
.field-error { color: var(--sale); font-size: 12px; margin-top: 4px; display: none; }
.modal-submit {
  width: 100%;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 0;
  font-size: 15px;
  font-weight: 700;
  margin-top: 6px;
}
.modal-submit:disabled { background: #b9c8ea; }
.modal-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 20px 0 16px;
  color: var(--muted);
  font-size: 12px;
}
.modal-divider::before, .modal-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.social-row { display: flex; justify-content: center; gap: 16px; }
.social-row button {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 16px;
}
.form-toggle { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.toast {
  position: fixed;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-6px); }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 0;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); }
.breadcrumb .current { color: var(--text); font-weight: 600; }

/* ---------- PLP ---------- */
.plp-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 60px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}
.filter-panel h3 { font-size: 20px; margin: 0 0 16px; }
.filter-group {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.filter-group summary {
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary::after { content: "⌄"; color: var(--muted); }
.filter-group[open] summary::after { content: "⌃"; }
.filter-options { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.filter-options label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.filter-options a.active-filter { color: var(--blue) !important; font-weight: 700; }

.plp-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.plp-results-bar .results-count { color: var(--text); font-size: 15px; }
.sort-select {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
}
.plp-title { font-size: 26px; font-weight: 800; margin: 0 0 4px; }

/* ---------- PDP ---------- */
.pdp-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 60px;
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 48px;
}
.pdp-gallery .main-image {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.pdp-gallery .main-image img { max-height: 100%; object-fit: contain; }
.pdp-info .vendor-tag { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pdp-info h1 { font-size: 26px; margin: 6px 0 8px; line-height: 1.3; }
.pdp-info .sku { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.pdp-price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.pdp-price-row .price { font-size: 30px; font-weight: 800; }
.pdp-badges { display: flex; gap: 10px; margin-bottom: 24px; }
.pdp-badges span {
  background: var(--blue-light);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
}
.pdp-actions { display: flex; gap: 12px; margin-bottom: 28px; }
.pdp-actions button {
  flex: 1;
  padding: 15px 0;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  border: none;
}
.btn-add-cart { background: var(--blue); color: #fff; }
.btn-buy-now { background: #ffd23f; color: #1a1a1a; }
.pdp-info .description { color: var(--text); font-size: 14px; line-height: 1.6; margin-bottom: 24px; }
.specs-table { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.specs-table h3 { font-size: 16px; padding: 14px 18px; margin: 0; border-bottom: 1px solid var(--border); }
.specs-table .spec-row {
  display: flex;
  padding: 12px 18px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.specs-table .spec-row:last-child { border-bottom: none; }
.specs-table .spec-row .k { width: 160px; color: var(--muted); flex-shrink: 0; }
.specs-table .spec-row .v { color: var(--text); }

/* ---------- Cart page ---------- */
.cart-layout {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px 60px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}
.cart-line {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.cart-line .thumb {
  width: 90px; height: 90px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  padding: 8px;
  flex-shrink: 0;
}
.cart-line .thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cart-line .line-info { flex: 1; min-width: 0; }
.cart-line .line-info .title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.cart-line .line-info .unit-price { font-size: 13px; color: var(--muted); }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; }
.qty-stepper button {
  width: 30px; height: 30px;
  background: none; border: none; font-size: 16px; font-weight: 700;
}
.qty-stepper span { width: 32px; text-align: center; font-size: 14px; }
.cart-line .line-total { width: 100px; text-align: right; font-weight: 700; }
.cart-line .remove-btn { background: none; border: none; color: var(--sale); font-size: 13px; margin-left: 12px; }
.cart-summary {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.cart-summary h3 { margin: 0 0 16px; font-size: 17px; }
.cart-summary .row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 10px; }
.cart-summary .row.total { font-size: 18px; font-weight: 800; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.cart-summary button {
  width: 100%;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 700;
  margin-top: 8px;
}
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state a { color: var(--blue); font-weight: 700; }

/* ---------- Buy Now / Checkout page ---------- */
.buynow-layout {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px 60px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}
.buynow-layout h2 { font-size: 22px; margin: 0 0 20px; }
.buynow-form .field input, .buynow-form .field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
}
.buynow-form .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.order-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 10px;
  color: var(--text);
}
.order-item .name { flex: 1; }
.confirmation {
  text-align: center;
  padding: 60px 20px;
  max-width: 480px;
  margin: 0 auto;
}
.confirmation .icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin: 0 auto 20px;
}
.confirmation h2 { font-size: 22px; margin: 0 0 8px; }
.confirmation p { color: var(--muted); margin: 0 0 24px; }
.confirmation .order-id { font-weight: 700; color: var(--text); }
.confirmation a.btn-home {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  padding: 13px 32px;
  border-radius: 8px;
  font-weight: 700;
}

@media (max-width: 860px) {
  .header-top { flex-wrap: wrap; }
  .search-bar { order: 3; max-width: none; width: 100%; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .hero-row { grid-template-columns: 1fr; }
  .promo-strip { flex-direction: row; }
  .plp-layout, .pdp-layout, .cart-layout, .buynow-layout { grid-template-columns: 1fr; }
}
