/* --- Beansmith Co. | Singapore Coffee Accessories --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f8f5ec;
  --bg-card: #ffffff;
  --primary: #5d3a1f;
  --primary-dark: #3a2412;
  --accent: #c8843a;
  --accent-light: #e3a865;
  --text: #2a1f15;
  --text-muted: #6b5a4a;
  --border: #e8dfd0;
  --beige: #f3ebd9;
  --shadow-sm: 0 2px 8px rgba(61, 41, 18, 0.08);
  --shadow-md: 0 6px 24px rgba(61, 41, 18, 0.12);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; height: auto; display: block; }

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

/* ====== Header ====== */
.header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: 1240px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
}
.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}
.nav { display: flex; gap: 32px; }
.nav a {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}
.nav a:hover { color: var(--primary-dark); }
.header-actions { display: flex; gap: 12px; align-items: center; }
.cart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--primary-dark);
  color: white;
  border-radius: 30px;
  font-weight: 500;
  font-size: 14px;
  transition: background 0.2s, transform 0.15s;
}
.cart-btn:hover { background: var(--primary); transform: translateY(-1px); }
.cart-badge {
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ====== Hero ====== */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 64px 0 48px;
}
.hero-left h1 {
  font-family: 'Playfair Display', serif;
  font-size: 56px;
  line-height: 1.1;
  color: var(--primary-dark);
  font-weight: 700;
  letter-spacing: -1.5px;
  margin-bottom: 22px;
}
.hero-left h1 span {
  color: var(--accent);
  font-style: italic;
}
.hero-lead {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 30px;
  max-width: 480px;
}
.hero-cta-group { display: flex; gap: 14px; }
.btn-primary {
  background: var(--accent);
  color: white;
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--primary); transform: translateY(-1px); }
.btn-secondary {
  background: white;
  color: var(--primary-dark);
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--primary); }
.hero-right {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero-right img { width: 100%; height: 100%; object-fit: cover; }

.hero-badges {
  display: flex;
  gap: 18px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.hero-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ====== Trust strip ====== */
.trust-strip {
  background: white;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
  margin-bottom: 64px;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
}
.trust-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--beige);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 18px;
  flex-shrink: 0;
}
.trust-text strong { display: block; font-size: 14px; font-weight: 600; color: var(--primary-dark); }
.trust-text span { font-size: 12px; color: var(--text-muted); }

/* ====== Section headings ====== */
.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  color: var(--primary-dark);
  font-weight: 700;
  letter-spacing: -0.5px;
}
.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ====== Category banner ====== */
.cat-banner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 64px;
}
.cat-card {
  position: relative;
  height: 220px;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
}
.cat-card:hover { transform: translateY(-3px); }
.cat-card img { width: 100%; height: 100%; object-fit: cover; }
.cat-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(58, 36, 18, 0.55), rgba(58, 36, 18, 0.25));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}
.cat-card-title {
  font-family: 'Playfair Display', serif;
  color: white;
  font-size: 24px;
  font-weight: 700;
}
.cat-card-desc {
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  margin-top: 4px;
}

/* ====== Product grid ====== */
.products-section { padding-bottom: 72px; }
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 10px 18px;
  border-radius: 30px;
  background: white;
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover {
  background: var(--primary-dark);
  color: white;
  border-color: var(--primary-dark);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.product-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.product-img {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--beige);
}
.product-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s;
}
.product-card:hover .product-img img { transform: scale(1.06); }
.product-body { padding: 18px 18px 22px; display: flex; flex-direction: column; flex: 1; }
.product-cat {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 1.2px;
  font-weight: 600;
  margin-bottom: 6px;
}
.product-name {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 6px;
  line-height: 1.3;
}
.product-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
  flex: 1;
}
.product-foot { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-size: 18px; font-weight: 700; color: var(--primary-dark); }
.add-btn {
  background: var(--primary-dark);
  color: white;
  padding: 9px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}
.add-btn:hover { background: var(--accent); }

/* ====== Cart drawer ====== */
.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  background: white;
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
}
.cart-drawer.open { transform: translateX(0); }
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(42, 31, 21, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-head {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-head h2 {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--primary-dark);
}
.cart-close {
  font-size: 22px;
  color: var(--text-muted);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.cart-close:hover { background: var(--beige); }
.cart-body { padding: 18px 24px; flex: 1; overflow-y: auto; }
.cart-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 0;
  font-size: 15px;
}
.cart-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--beige);
  flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 600; color: var(--primary-dark); margin-bottom: 4px; }
.cart-item-price { font-size: 13px; color: var(--accent); font-weight: 600; }
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.qty-btn {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--beige);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
}
.qty-btn:hover { background: var(--accent-light); color: white; }
.qty-num { font-size: 13px; font-weight: 600; min-width: 16px; text-align: center; }
.cart-item-rm {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  align-self: flex-start;
  margin-left: 8px;
}
.cart-item-rm:hover { color: var(--accent); }

.cart-foot {
  padding: 18px 24px;
  border-top: 1px solid var(--border);
  background: var(--beige);
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.cart-summary-row.total {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.cart-freight-notice {
  font-size: 12px;
  color: var(--accent);
  background: white;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  display: none;
}
.cart-freight-notice.visible { display: block; }
.cart-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px;
  background: var(--primary-dark);
  color: white;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  margin-top: 12px;
  transition: background 0.2s;
}
.cart-checkout-btn:hover { background: var(--primary); }
.paypal-divider {
  text-align: center;
  position: relative;
  margin: 12px 0 8px;
  color: var(--text-muted);
  font-size: 12px;
}
.paypal-divider::before, .paypal-divider::after {
  content: '';
  position: absolute; top: 50%;
  width: 40%; height: 1px;
  background: var(--border);
}
.paypal-divider::before { left: 0; }
.paypal-divider::after { right: 0; }
.paypal-checkout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: #FFC439;
  color: #003087;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.2s;
}
.paypal-checkout-btn:hover { background: #e6b030; }

/* ====== Checkout modal ====== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(42, 31, 21, 0.6);
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal.open { display: flex; }
.modal-inner {
  background: white;
  border-radius: 20px;
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 22px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--beige);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.modal-close:hover { background: var(--accent-light); color: white; }
.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.modal-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.form-row { margin-bottom: 14px; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-input, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-textarea { resize: vertical; min-height: 70px; }
.form-consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--text-muted);
  margin: 16px 0 22px;
}
.form-consent input { margin-top: 2px; }
.btn-submit {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s;
}
.btn-submit:hover { background: var(--primary); }

.inquiry-success {
  text-align: center;
  padding: 24px 12px;
}
.inquiry-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #e1f1e3;
  margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  color: #2f6b46;
}
.inquiry-id {
  display: inline-block;
  background: var(--beige);
  padding: 8px 14px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  font-size: 15px;
  color: var(--primary-dark);
  margin: 16px 0;
}

/* ====== Footer ====== */
.footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 56px 0 28px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 32px;
}
.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: white;
  margin-bottom: 10px;
}
.footer-tag {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  max-width: 260px;
}
.footer-col h4 {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  color: white;
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent-light); }
.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* ====== Responsive ====== */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 40px 0; }
  .hero-left h1 { font-size: 40px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cat-banner { grid-template-columns: 1fr; }
  .nav { display: none; }
}
@media (max-width: 560px) {
  .hero-left h1 { font-size: 32px; }
  .product-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row.two-col { grid-template-columns: 1fr; }
  .modal-inner { padding: 22px; }
}
