/* MATTA — bazaar / wholesale catalogue look (not generic “AI startup”) */
:root {
  --ink: #1c1917;
  --ink-muted: #57534e;
  --paper: #f3efe6;
  --paper-card: #fffcf7;
  --line: #d6d0c4;
  --accent: #7c2d12;
  --accent-hover: #5c220d;
  --link: #1d4ed8;
  --danger: #b91c1c;
  --ok: #14532d;
  --radius: 2px;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, .section-title, .pd-title, .brand-logo { font-family: var(--font-display); }

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

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper-card);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 20px; padding: 8px 0;
}
.brand { display: flex; flex-direction: column; line-height: 1.15; text-decoration: none !important; }
.brand-logo {
  font-size: 22px; font-weight: 600; color: var(--ink);
  letter-spacing: 0.02em;
}
.brand-logo.small { font-size: 19px; }
.brand-tld { color: var(--accent); font-weight: 700; }
.brand-tag { font-size: 11px; color: var(--ink-muted); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.06em; }
.brand-by  { font-size: 10px; color: var(--accent); font-weight: 600; letter-spacing: 0.08em; margin-top: 2px; text-transform: uppercase; }

.main-nav {
  display: flex; gap: 22px; flex: 1; justify-content: center;
}
.main-nav a {
  color: var(--ink); font-weight: 500; font-size: 14px; padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--accent); text-decoration: none; }
.main-nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch {
  display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.lang-switch button {
  border: 0; background: transparent; padding: 6px 11px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--ink-muted);
}
.lang-switch button.active { background: var(--ink); color: #fff; }

.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius); color: var(--ink);
}
.icon-btn:hover { background: rgba(0,0,0,0.05); }
.cart-badge {
  position: absolute; top: 2px; right: 0;
  background: var(--danger); color: #fff;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: var(--radius); font-size: 10px; font-weight: 700;
  display: none; align-items: center; justify-content: center;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer;
  font-weight: 600; font-size: 14px; text-decoration: none !important;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; text-decoration: none; }
.btn-gold { background: #92400e; color: #fff; border-color: #92400e; }
.btn-gold:hover { background: #78350f; border-color: #78350f; color: #fff; text-decoration: none; }
.btn-outline {
  background: transparent; color: var(--ink); border: 1px solid var(--line);
}
.btn-outline:hover { border-color: var(--ink); background: rgba(0,0,0,0.03); text-decoration: none; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn-sm { padding: 7px 12px; font-size: 13px; }

/* ============ Hero ============ */
.hero {
  background: var(--paper-card);
  border-bottom: 1px solid var(--line);
  padding: 48px 0 56px;
}
.hero-inner { max-width: 720px; }
.hero-kicker {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-muted); margin: 0 0 12px;
}
.hero h1 {
  font-size: clamp(26px, 4vw, 36px); font-weight: 600; margin: 0 0 14px;
  line-height: 1.2; color: var(--ink);
}
.hero-lead { font-size: 16px; color: var(--ink-muted); margin: 0 0 24px; max-width: 560px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============ Sections ============ */
.section { padding: 44px 0; }
.section-muted {
  background: rgba(255,252,247,0.85);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-partners { padding: 36px 0 48px; }
.section-title { font-size: 22px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.02em; }
.section-title-center { text-align: center; margin-bottom: 20px; }
.section-sub { color: var(--ink-muted); margin: 0 0 24px; font-size: 14px; }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  margin-bottom: 22px; gap: 16px;
}

.partner-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}
.partner-pill {
  font-size: 12px; font-weight: 600; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper-card); color: var(--ink-muted);
}

/* ============ Categories ============ */
.cat-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(6, 1fr);
}
.cat-card {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 10px; text-align: center;
  transition: border-color 0.15s;
  cursor: pointer; text-decoration: none !important; color: var(--ink);
}
.cat-card:hover { border-color: var(--accent); text-decoration: none; }
.cat-icon {
  width: 52px; height: 52px; margin: 0 auto 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.cat-name { font-weight: 600; font-size: 13px; }
.cat-desc { font-size: 11px; color: var(--ink-muted); margin-top: 4px; line-height: 1.35; }

/* ============ Product cards ============ */
.product-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(4, 1fr);
}
.product-card {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color 0.15s;
}
.product-card:hover { border-color: #a8a29e; text-decoration: none; }
.product-img {
  aspect-ratio: 1 / 1; background: #e7e2da; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding: 12px 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.product-sku {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-muted); font-variant-numeric: tabular-nums;
}
.product-sku:empty { display: none; }
.product-title {
  font-size: 13px; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 36px;
}
.product-meta { font-size: 11px; color: var(--ink-muted); line-height: 1.35; }
.product-price {
  font-size: 16px; font-weight: 700; color: var(--accent);
  margin-top: auto; font-variant-numeric: tabular-nums;
}
.product-price .unit { font-size: 11px; font-weight: 500; color: var(--ink-muted); }

.product-badge {
  position: absolute; top: 6px; left: 6px;
  background: var(--ink); color: #fff; font-size: 9px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 7px; border-radius: var(--radius);
}

/* ============ Trust strip ============ */
.trust-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}
.trust-item {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px;
}
.trust-icon {
  width: 36px; height: 36px; border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.trust-title { font-family: var(--font-display); font-weight: 600; margin: 0 0 6px; font-size: 15px; }
.trust-sub { color: var(--ink-muted); font-size: 13px; margin: 0; line-height: 1.45; }

/* ============ Filters ============ */
.toolbar {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 18px;
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
}
.toolbar label { font-size: 12px; color: var(--ink-muted); margin-right: 4px; }
.toolbar select {
  padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper-card); font-size: 13px; color: var(--ink);
}
.toolbar .spacer { flex: 1; }

/* ============ Product detail ============ */
.pd-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
}
.pd-img {
  aspect-ratio: 1 / 1; background: #e7e2da; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.pd-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-title { font-size: 24px; font-weight: 600; margin: 0 0 10px; line-height: 1.25; }
.pd-price { font-size: 28px; font-weight: 700; color: var(--accent); margin: 10px 0; font-variant-numeric: tabular-nums; }
.pd-price .unit { font-size: 13px; font-weight: 500; color: var(--ink-muted); }
.pd-attrs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin: 14px 0; font-size: 13px; }
.pd-attrs dt { color: var(--ink-muted); font-size: 12px; }
.pd-attrs dd { margin: 0; font-weight: 500; }
.pd-actions { display: flex; gap: 8px; margin: 18px 0; flex-wrap: wrap; }
.qty-input {
  display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.qty-input button { width: 34px; height: 38px; border: 0; background: #ebe6dd; cursor: pointer; font-size: 15px; }
.qty-input input { width: 52px; height: 38px; border: 0; text-align: center; font-size: 13px; background: var(--paper-card); }

.seller-card {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin: 18px 0; display: flex; gap: 12px; align-items: center;
}
.seller-avatar {
  width: 42px; height: 42px; border-radius: var(--radius); background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}
.seller-meta { flex: 1; font-size: 12px; color: var(--ink-muted); }
.seller-name { font-size: 14px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.kyc-tick {
  display: inline-flex; align-items: center; gap: 3px;
  background: #ecfdf5; color: var(--ok); font-size: 10px; font-weight: 700;
  padding: 2px 6px; border-radius: var(--radius);
}
.kyc-tick svg { width: 11px; height: 11px; }

.pd-tabs {
  border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px;
  display: grid; gap: 10px;
}
.pd-tab-block {
  display: flex; gap: 10px; align-items: start;
  padding: 10px 12px; background: rgba(0,0,0,0.02); border-radius: var(--radius);
  border: 1px solid var(--line);
}
.pd-tab-block svg { color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.pd-tab-block strong { display: block; margin-bottom: 3px; font-size: 13px; }
.pd-tab-block span { color: var(--ink-muted); font-size: 12px; }

/* ============ Cart / checkout ============ */
.cart-list { background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius); }
.cart-row {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  border-bottom: 1px solid var(--line);
}
.cart-row:last-child { border-bottom: 0; }
.cart-row img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius); background: #e7e2da; }
.cart-row .info { flex: 1; min-width: 0; }
.cart-row .price { font-weight: 700; color: var(--accent); }
.cart-row .remove {
  background: none; border: 0; color: var(--ink-muted); cursor: pointer; padding: 4px;
}
.cart-row .remove:hover { color: var(--danger); }

.checkout-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: 24px;
}
.form-card, .summary-card {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.form-card h3, .summary-card h3 { margin: 0 0 14px; font-size: 16px; font-family: var(--font-display); }
.form-row { display: grid; gap: 5px; margin-bottom: 12px; }
.form-row label { font-size: 12px; color: var(--ink-muted); }
.form-row input, .form-row select, .form-row textarea {
  padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; font-family: inherit; background: var(--paper-card);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--ink);
}
.pay-radio { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-radio label {
  flex: 1; min-width: 120px; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px; cursor: pointer; display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600;
}
.pay-radio input { display: none; }
.pay-radio input:checked + .pay-pill-wrap { color: var(--accent); }
.pay-radio label:has(input:checked) { border-color: var(--accent); background: rgba(124,45,18,0.04); }
.pay-pill {
  display: inline-block; padding: 3px 8px; border-radius: var(--radius); font-size: 11px; font-weight: 700;
}
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-size: 16px; font-weight: 700; color: var(--accent); }

/* ============ Sellers list ============ */
.seller-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
.seller-block {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.seller-block .seller-name { font-size: 16px; }
.seller-block .row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.seller-block .row span:first-child { color: var(--ink-muted); }

/* ============ About ============ */
.about-card {
  background: var(--paper-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
}
.about-attrs { display: grid; grid-template-columns: 200px 1fr; gap: 10px 18px; margin: 18px 0; }
.about-attrs dt { color: var(--ink-muted); font-weight: 500; }
.about-attrs dd { margin: 0; font-weight: 600; }

/* ============ Account ============ */
.account-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.account-tabs a {
  padding: 9px 14px; color: var(--ink-muted); font-weight: 500;
  border-bottom: 2px solid transparent;
}
.account-tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.empty-state {
  text-align: center; padding: 48px 20px; color: var(--ink-muted);
}

/* ============ Footer ============ */
.site-footer {
  background: var(--ink); color: #d6d3d1; margin-top: 64px; padding: 40px 0 18px;
}
.site-footer .brand-logo { color: #fafaf9; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 28px;
  padding-bottom: 28px;
}
.footer-grid h4 { color: #fafaf9; font-size: 13px; margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid a { color: #d6d3d1; font-size: 13px; }
.footer-grid a:hover { color: #fff; }
.footer-grid p { margin: 4px 0; font-size: 13px; }
.footer-about { color: #a8a29e; font-size: 13px; margin: 8px 0 10px; line-height: 1.5; }
.footer-company { color: #a8a29e; font-size: 12px; }
.pay-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.footer-bottom {
  border-top: 1px solid #44403c; padding-top: 16px;
  font-size: 11px; color: #a8a29e; text-align: center;
}
.footer-bottom .dot { margin: 0 8px; opacity: 0.5; }

/* ============ Legal docs ============ */
.legal-doc h2 { font-size: 17px; margin: 22px 0 8px; color: var(--accent); font-family: var(--font-display); }
.legal-doc h3 { font-size: 14px; margin: 14px 0 6px; }
.legal-doc p, .legal-doc ul, .legal-doc ol { font-size: 14px; line-height: 1.65; color: var(--ink); }
.legal-doc ul, .legal-doc ol { padding-left: 20px; }
.legal-doc li { margin-bottom: 4px; }
.legal-doc a { text-decoration: underline; }

/* ============ Toast ============ */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: var(--radius);
  font-size: 13px; opacity: 0; pointer-events: none; transition: all 0.25s; z-index: 1000;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ Misc ============ */
.alert {
  background: #fef9c3; border: 1px solid #fde047; color: #713f12;
  padding: 11px 14px; border-radius: var(--radius); margin-bottom: 14px; font-size: 13px;
}

.img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .pd-grid { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .seller-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
}
@media (max-width: 600px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: 1fr; }
  .seller-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .container { padding: 0 14px; }
  .header-inner { gap: 8px; }
  .brand-tag { display: none; }
  .section { padding: 32px 0; }
}

@media print {
  .site-header, .site-footer { display: none; }
}
