/* Bargain Buys — storefront styles
   Palette: teal (brand) + market-stall orange (accent) + cream background.
   Display type: Archivo Black (bold, stamped, price-tag feel).
   Body type: Inter. */

:root {
  --teal: #2F7A78;
  --teal-dark: #204F4D;
  --teal-light: #E7F1F0;
  --orange: #F2A73B;
  --orange-dark: #C97F12;
  --cream: #FBF8F3;
  --charcoal: #232323;
  --muted: #6B6B63;
  --sale-red: #C4402F;
  --border: #E6E0D2;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Archivo Black', 'Inter', sans-serif;
  line-height: 1.1;
  margin: 0 0 0.5em;
  color: var(--teal-dark);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--orange);
  color: var(--charcoal);
  box-shadow: 0 5px 0 var(--orange-dark), 0 6px 10px rgba(0,0,0,0.18);
  border-bottom: none;
}
.btn-primary:hover { background: #F5B355; }
.btn-primary:active { transform: translateY(5px); box-shadow: 0 0 0 var(--orange-dark); }
.btn-secondary { background: transparent; color: var(--teal-dark); border-color: var(--teal); }
.btn-secondary:hover { background: var(--teal-light); }
.btn-small { padding: 8px 14px; font-size: 13px; background: var(--teal); color: #fff; border-radius: var(--radius); }
.btn-small:hover { background: var(--teal-dark); }
.btn-block { display: block; width: 100%; text-align: center; }
.btn:disabled { background: #ddd; color: #999; cursor: not-allowed; }

/* ---------- Top bar & header ---------- */
.topbar {
  background: var(--teal-dark);
  color: #fff;
  text-align: center;
  font-size: 13px;
  padding: 8px 12px;
}

.site-header { background: var(--cream); border-bottom: 3px solid var(--charcoal); position: sticky; top: 0; z-index: 20; overflow: visible; }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 14px 24px; position: relative; }

.brand { display: flex; align-items: center; flex-shrink: 0; position: relative; width: 110px; min-height: 56px; }
.brand-logo {
  position: absolute;
  left: -34px;
  top: 50%;
  transform: translateY(-38%);
  width: 140px;
  height: 140px;
  max-width: none;
  border-radius: 50%;
  border: 5px solid #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,0.28);
  background: #fff;
  object-fit: cover;
  z-index: 15;
}

.search-form { flex: 1; display: flex; max-width: 420px; }
.search-form input { flex: 1; padding: 10px 14px; border: 2px solid var(--border); border-right: none; border-radius: var(--radius) 0 0 var(--radius); font-family: inherit; font-size: 14px; }
.search-form button { padding: 10px 16px; background: var(--teal); color: #fff; border: 2px solid var(--teal); border-radius: 0 var(--radius) var(--radius) 0; font-weight: 600; cursor: pointer; }

.main-nav { display: flex; align-items: center; gap: 22px; font-weight: 600; }
.main-nav a.active { color: var(--orange-dark); }
.cart-link { position: relative; }
.cart-badge { position: absolute; top: -10px; right: -16px; background: var(--sale-red); color: #fff; font-size: 11px; font-weight: 700; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }

/* ---------- Hero ---------- */
.hero {
  background-color: var(--teal);
  background-image: url('../images/hero-pattern.png');
  background-repeat: repeat;
  color: #fff;
  padding: 64px 0;
  overflow: hidden;
}
.hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.hero-kicker { color: var(--orange); font-weight: 700; margin: 0 0 10px; letter-spacing: 0.02em; }
.hero-copy h1 { color: #fff; font-size: 42px; max-width: 520px; }
.hero-sub { max-width: 480px; color: #FFFFFF; font-size: 20px; line-height: 1.6; font-weight: 500; margin: 18px 0 28px; }

.hero-tag {
  flex-shrink: 0;
  width: 170px; height: 170px;
  background: var(--orange);
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transform: rotate(-8deg);
  border: 4px dashed var(--teal-dark);
}
.hero-tag-pct { font-family: 'Archivo Black', sans-serif; font-size: 56px; color: var(--charcoal); line-height: 1; }
.hero-tag-label { font-weight: 800; font-size: 13px; text-align: center; color: var(--charcoal); letter-spacing: 0.04em; }

/* ---------- Category strip ---------- */
.category-strip { display: flex; flex-wrap: wrap; gap: 10px; padding: 28px 24px; }
.category-chip { background: #fff; border: 2px solid var(--border); padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.category-chip:hover { border-color: var(--teal); color: var(--teal-dark); }

/* ---------- Product grid & cards ---------- */
.product-section { padding: 20px 24px 60px; }
.section-heading { font-size: 26px; margin-bottom: 22px; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }

.product-card { background: #fff; border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.product-card-image { position: relative; aspect-ratio: 1 / 1; background: #F1EEE5; overflow: hidden; }
.product-card-image img { width: 100%; height: 100%; object-fit: cover; }

.discount-tag {
  position: absolute; top: 10px; left: 0;
  background: var(--sale-red); color: #fff;
  font-weight: 800; font-size: 13px;
  padding: 5px 12px 5px 10px;
  clip-path: polygon(0 0, 100% 0, 86% 50%, 100% 100%, 0 100%);
}
.discount-tag-lg { font-size: 18px; padding: 8px 18px 8px 14px; top: 16px; }
.stock-tag { position: absolute; top: 10px; right: 10px; background: var(--charcoal); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 4px; }

.product-card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card-cat { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0; font-weight: 700; }
.product-card-title { font-weight: 700; font-size: 15px; color: var(--charcoal); }
.product-card-price { margin-top: auto; display: flex; align-items: baseline; gap: 8px; }
.price-now { font-family: 'Archivo Black', sans-serif; font-size: 19px; color: var(--teal-dark); }
.price-was { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.quick-add-form { margin-top: 6px; }

.empty-note { color: var(--muted); padding: 20px 0; }

/* ---------- Product detail ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 40px 24px 70px; align-items: start; }
.product-detail-image { position: relative; background: #F1EEE5; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1/1; }
.product-detail-info h1 { font-size: 28px; margin-top: 6px; }
.product-detail-price { display: flex; align-items: baseline; gap: 12px; margin: 14px 0; }
.product-detail-price .price-now { font-size: 30px; }
.product-detail-desc { color: #4B4B44; margin: 18px 0; }
.stock-note { font-weight: 700; font-size: 14px; }
.stock-note-low { color: var(--orange-dark); }
.stock-note-out { color: var(--sale-red); }
.reseller-note { background: var(--teal-light); border: 2px solid var(--teal); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; margin: 14px 0; color: var(--teal-dark); }
.reseller-note strong { color: var(--teal-dark); }
.cart-line-note { font-size: 12px; color: var(--teal-dark); font-weight: 700; margin-top: 2px; }

.add-to-cart-form { display: flex; align-items: center; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.add-to-cart-form label { font-weight: 600; font-size: 14px; }
.add-to-cart-form input[type=number] { width: 70px; padding: 10px; border: 2px solid var(--border); border-radius: var(--radius); font-family: inherit; }

.reassurance-list { list-style: none; padding: 0; margin: 22px 0 0; border-top: 1px solid var(--border); padding-top: 18px; }
.reassurance-list li { padding: 5px 0; font-size: 14px; color: var(--muted); }
.reassurance-list li::before { content: '✓ '; color: var(--teal); font-weight: 700; }

/* ---------- Shop layout ---------- */
.shop-header { padding: 36px 24px 8px; }
.shop-count { color: var(--muted); margin-top: -6px; }
.shop-layout { display: grid; grid-template-columns: 210px 1fr; gap: 32px; padding: 20px 24px 70px; align-items: start; }
.shop-filters { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 4px; }
.shop-filters h3 { font-size: 15px; margin-bottom: 10px; }
.filter-link { padding: 8px 10px; border-radius: var(--radius); font-weight: 600; font-size: 14px; color: var(--charcoal); }
.filter-link.active, .filter-link:hover { background: var(--teal-light); color: var(--teal-dark); }

/* ---------- Cart ---------- */
.cart-page { padding: 40px 24px 70px; }
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.cart-table th { text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); border-bottom: 2px solid var(--border); padding: 10px 8px; }
.cart-table td { padding: 14px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-product-cell { display: flex; align-items: center; gap: 12px; font-weight: 600; }
.cart-product-cell img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; background: #F1EEE5; }
.qty-input { width: 60px; padding: 7px; border: 2px solid var(--border); border-radius: 4px; }
.remove-link { color: var(--sale-red); font-size: 13px; font-weight: 700; }

.cart-summary { max-width: 360px; margin-left: auto; background: #fff; border: 2px solid var(--border); border-radius: var(--radius); padding: 20px; }
.cart-summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.cart-summary-total { font-family: 'Archivo Black', sans-serif; font-size: 18px; color: var(--teal-dark); border-top: 2px solid var(--border); margin-top: 8px; padding-top: 12px; }
.cart-summary .btn { margin-top: 16px; }

/* ---------- Checkout ---------- */
.checkout-page { padding: 40px 24px 70px; }
.checkout-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.checkout-form { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 2px solid var(--border); border-radius: var(--radius); padding: 26px; }
.checkout-form label { font-weight: 700; font-size: 13px; margin-top: 6px; }
.checkout-form input { padding: 11px 12px; border: 2px solid var(--border); border-radius: var(--radius); font-family: inherit; font-size: 14px; width: 100%; }
.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.checkout-secure-note { font-size: 12px; color: var(--muted); margin-top: 10px; }
.courier-option { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; border: 2px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-top: 8px; cursor: pointer; }
.courier-option:has(input:checked) { border-color: var(--teal); background: var(--teal-light); }
.courier-option input { width: auto; margin-top: 3px; }
.courier-option span { font-size: 14px; line-height: 1.5; color: var(--charcoal); }
.form-error { background: #FBE7E3; color: var(--sale-red); border: 2px solid var(--sale-red); padding: 12px 16px; border-radius: var(--radius); font-weight: 600; }

.checkout-summary { background: #fff; border: 2px solid var(--border); border-radius: var(--radius); padding: 22px; position: sticky; top: 90px; }
.checkout-summary-line { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; }
.checkout-summary-total { font-family: 'Archivo Black', sans-serif; font-size: 18px; color: var(--teal-dark); border-top: 2px solid var(--border); margin-top: 8px; padding-top: 12px; }

/* ---------- Order success ---------- */
.order-success { text-align: center; padding: 80px 24px; max-width: 520px; margin: 0 auto; }
.success-badge { width: 64px; height: 64px; background: var(--teal); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; margin: 0 auto 20px; }
.order-total-line { font-size: 16px; margin: 18px 0 28px; }

/* ---------- Static pages ---------- */
.static-page { padding: 50px 24px 70px; max-width: 720px; margin: 0 auto; }
.contact-list { list-style: none; padding: 0; }
.contact-list li { padding: 6px 0; }
.contact-list a { color: var(--teal-dark); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-dark); color: #E4F0EF; margin-top: 40px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding: 44px 24px; }
.footer-logo { width: 64px; height: 64px; margin-bottom: 12px; border-radius: 50%; }
.footer-col h4 { color: #fff; font-family: 'Inter', sans-serif; font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.footer-col a { display: block; padding: 4px 0; color: #C9E2DF; font-size: 14px; }
.footer-col p { font-size: 14px; color: #C9E2DF; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding: 16px 24px; font-size: 13px; color: #A9CAC7; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; }
  .brand { width: 66px; min-height: 44px; }
  .brand-logo { left: -20px; width: 88px; height: 88px; transform: translateY(-30%); border-width: 4px; }
  .search-form { order: 3; max-width: 100%; width: 100%; }
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-copy h1 { max-width: none; }
  .product-detail { grid-template-columns: 1fr; }
  .shop-layout { grid-template-columns: 1fr; }
  .shop-filters { position: static; flex-direction: row; flex-wrap: wrap; }
  .checkout-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}
