:root {
  --brand: #0f766e;
  --brand-dark: #0b5a54;
  --brand-light: #14b8a6;
  --accent: #f59e0b;
  --ink: #111827;
  --muted: #6b7280;
  --bg: #f7f8fa;
  --card: #ffffff;
  --border: #e5e7eb;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(17, 24, 39, 0.06);
  --shadow-lg: 0 12px 32px rgba(17, 24, 39, 0.12);
}

* { box-sizing: border-box; }

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

a { color: inherit; text-decoration: none; }

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

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 1180px;
  margin: 0 auto;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand-dark);
  white-space: nowrap;
}

.logo-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-weight: 800;
  font-size: 1.08rem;
  color: var(--ink);
}

.logo-tagline {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--brand);
  text-transform: uppercase;
}

nav.main-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

nav.main-nav a {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}

nav.main-nav a:hover, nav.main-nav a.active {
  color: var(--brand-dark);
  border-color: var(--brand-light);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--brand-dark);
  font-size: 0.95rem;
}

.cart-count {
  background: var(--accent);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
}

/* Language switcher */
.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.lang-btn {
  background: white;
  border: none;
  padding: 6px 11px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.lang-btn.active {
  background: var(--brand);
  color: white;
}
.lang-btn:not(.active):hover {
  background: var(--bg);
  color: var(--brand-dark);
}

/* Hero */
.hero {
  background: radial-gradient(1200px 400px at 20% -10%, #d1fae5 0%, transparent 60%),
              linear-gradient(160deg, #ecfdf5 0%, #f7f8fa 55%);
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: 2.4rem;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--ink);
}

.hero h1 span { color: var(--brand-dark); }

.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 26px;
  max-width: 46ch;
}

.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.badge {
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.hero-visual {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.hero-visual .tile {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .1s, box-shadow .15s, background .15s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand);
  color: white;
}
.btn-primary:hover { background: var(--brand-dark); }

.btn-outline {
  background: white;
  border-color: var(--border);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand-dark); }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

/* Section */
.section { padding: 52px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 12px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: 1.5rem; margin: 0; }
.section-head p { color: var(--muted); margin: 4px 0 0; }

/* Category chips */
.chip-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: white;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.chip.active, .chip:hover {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.product-thumb {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.product-thumb svg { width: 100%; height: 100%; }
.thumb-img { width: 100%; height: 100%; object-fit: contain; }

.product-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }

.product-cat { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); font-weight: 700; }
.product-name { font-weight: 700; font-size: 1rem; margin: 0; }
.product-short { color: var(--muted); font-size: 0.87rem; flex: 1; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.price { font-weight: 800; font-size: 1.1rem; color: var(--ink); }

/* Product detail */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
}
.product-detail .thumb-large {
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 40px;
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
}
.product-detail .thumb-large svg { width: 70%; height: 70%; }
.spec-table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.spec-table td { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.spec-table td:first-child { color: var(--muted); width: 40%; }
.qty-row { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.qty-input { width: 64px; padding: 10px; border-radius: 8px; border: 1px solid var(--border); text-align: center; font-size: 1rem; }

/* Cart */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-size: 0.8rem; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); padding: 10px 8px; }
.cart-table td { padding: 14px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-item-name { font-weight: 700; }
.cart-item-cat { font-size: 0.8rem; color: var(--muted); }
.cart-thumb { width: 56px; height: 56px; border-radius: 8px; background: linear-gradient(135deg, #ecfdf5, #f0fdfa); display: flex; align-items: center; justify-content: center; padding: 8px; }
.remove-link { color: #dc2626; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.cart-summary { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 0.95rem; }
.summary-total { font-weight: 800; font-size: 1.15rem; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

/* Checkout */
.checkout-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.form-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--border); font-size: 0.95rem; font-family: inherit;
}
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Payment methods */
.payment-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.form-row label.payment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 12px;
  cursor: pointer;
  background: white;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0;
  transition: border-color .15s, box-shadow .15s;
}
.payment-option:has(input:checked) {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.15);
}
.payment-option input { accent-color: var(--brand); margin: 0; }
.payment-badge {
  min-width: 46px;
  height: 22px;
  padding: 0 6px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: white;
  flex-shrink: 0;
}
@media (max-width: 520px) {
  .payment-methods { grid-template-columns: 1fr; }
}
.notice-box {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: 14px 16px; font-size: 0.88rem; margin-bottom: 20px;
}
.success-box {
  background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; border-radius: var(--radius); padding: 40px; text-align: center;
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: #d1d5db;
  padding: 44px 0 26px;
  margin-top: 60px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.site-footer h4 { color: white; font-size: 0.95rem; margin: 0 0 12px; }
.site-footer a { color: #9ca3af; display: block; padding: 4px 0; font-size: 0.9rem; }
.site-footer a:hover { color: white; }
.footer-bottom { border-top: 1px solid #374151; padding-top: 18px; font-size: 0.82rem; color: #9ca3af; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* Chatbot */
#chatbot-launcher {
  position: fixed; bottom: 22px; right: 22px; z-index: 100;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--brand); color: white; border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.4);
  cursor: pointer; font-size: 1.5rem;
}
#chatbot-panel {
  position: fixed; bottom: 92px; right: 22px; z-index: 100;
  width: 360px; max-width: calc(100vw - 32px); height: 480px; max-height: calc(100vh - 140px);
  background: white; border-radius: 16px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: none; flex-direction: column; overflow: hidden;
}
#chatbot-panel.open { display: flex; }
.chat-header {
  background: linear-gradient(135deg, var(--brand-light), var(--brand-dark));
  color: white; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
}
.chat-header .title { font-weight: 700; font-size: 0.95rem; }
.chat-header .subtitle { font-size: 0.75rem; opacity: 0.85; }
.chat-close { background: none; border: none; color: white; font-size: 1.2rem; cursor: pointer; }
.chat-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #f9fafb; }
.chat-msg { max-width: 82%; padding: 9px 12px; border-radius: 12px; font-size: 0.87rem; line-height: 1.4; }
.chat-msg.bot { background: white; border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 3px; }
.chat-msg.user { background: var(--brand); color: white; align-self: flex-end; border-bottom-right-radius: 3px; }
.chat-msg.typing { color: var(--muted); font-style: italic; }
.chat-msg.system { align-self: center; background: #fff7ed; border: 1px solid #fdba74; color: #9a3412; font-size: 0.8rem; text-align: center; max-width: 92%; }
.chat-input-row { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.chat-input-row input { flex: 1; padding: 10px 12px; border-radius: 999px; border: 1px solid var(--border); font-size: 0.87rem; }
.chat-input-row button { background: var(--brand); color: white; border: none; border-radius: 999px; width: 40px; height: 40px; cursor: pointer; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  nav.main-nav { order: 3; width: 100%; justify-content: center; }
}
