* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Assistant', sans-serif;
  font-weight: 400;
  color: var(--text);
  line-height: 1.7;
  background: var(--bg);
}
h1, h2, h3, h4 {
  font-family: 'Frank Ruhl Libre', serif;
  font-weight: 600;
  color: var(--navy);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: 1em; }

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--navy);
  border-bottom: 3px solid var(--blue-light);
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 5%;
  flex-wrap: wrap;
}
.logo {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.5em;
  color: #fff;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.logo span { color: var(--blue-light); }

.search-form {
  flex: 1;
  display: flex;
  min-width: 220px;
  max-width: 480px;
}
.search-form input {
  flex: 1;
  border: none;
  padding: 10px 14px;
  border-radius: 6px 0 0 6px;
  outline: none;
}
.search-form button {
  background: var(--blue-light);
  color: var(--navy);
  border: none;
  padding: 0 18px;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  font-weight: 600;
}

.header-actions { display: flex; align-items: center; gap: 18px; }
.header-actions a {
  color: #eaf6fb;
  font-size: 0.95em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.header-actions a:hover { color: var(--blue-light); }
.cart-badge {
  background: var(--blue-light);
  color: var(--navy);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.78em;
  font-weight: 700;
}

.site-nav {
  background: rgba(0,0,0,0.15);
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  padding: 10px 5%;
  flex-wrap: wrap;
}
.site-nav a {
  color: #dce9f2;
  font-size: 0.92em;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.site-nav a:hover { color: var(--blue-light); }

/* Hero */
.hero {
  background: linear-gradient(120deg, var(--navy), var(--blue) 70%);
  color: #fff;
  padding: 70px 5%;
  text-align: center;
}
.hero h1 { color: #fff; font-size: 2.3em; margin-bottom: 14px; }
.hero p { color: #d7e9f5; font-size: 1.1em; max-width: 640px; margin: 0 auto 26px; }
.btn {
  display: inline-block;
  background: var(--blue-light);
  color: var(--navy);
  padding: 13px 34px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
}
.btn:hover { opacity: 0.9; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--blue-light);
  color: var(--blue-light);
}

/* Sections */
.section { padding: 60px 5%; max-width: 1180px; margin: 0 auto; }
.section-title {
  font-size: 1.7em;
  margin-bottom: 30px;
  border-right: 5px solid var(--blue-light);
  padding-right: 14px;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.product-card:hover { box-shadow: 0 8px 20px rgba(10,37,64,0.12); transform: translateY(-2px); }
.product-thumb {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Frank Ruhl Libre', serif;
  font-size: 1.1em;
  text-align: center;
  padding: 10px;
}
.product-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-cat { font-size: 0.78em; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.product-name { font-size: 1.05em; font-weight: 600; color: var(--navy); }
.product-price { margin-top: auto; font-size: 1.15em; font-weight: 700; color: var(--blue); }
.product-actions { padding: 0 16px 16px; }
.product-actions .btn { width: 100%; padding: 10px; }

/* Filters */
.filters-bar {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 26px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
}
.filters-bar select, .filters-bar input {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* Forms */
.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 30px;
  max-width: 480px;
  margin: 0 auto;
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.92em; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.form-error { background: #fdecea; color: #b3261e; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 0.92em; }
.form-success { background: #e6f4ea; color: #1e7d32; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 0.92em; }

/* Table (admin & account) */
table.data-table { width: 100%; border-collapse: collapse; background: #fff; }
table.data-table th, table.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  font-size: 0.94em;
}
table.data-table th { background: var(--bg); color: var(--navy); }
.status-pill { padding: 3px 10px; border-radius: 999px; color: #fff; font-size: 0.82em; display: inline-block; }

/* Cart */
.cart-line { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-line .thumb { width: 64px; height: 64px; border-radius: 6px; flex-shrink: 0; }
.cart-line .qty-input { width: 60px; }
.cart-summary { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 20px; margin-top: 20px; max-width: 340px; margin-inline-start: auto; }
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.cart-summary .total { font-weight: 700; font-size: 1.2em; color: var(--blue); }

footer.site-footer {
  background: var(--navy);
  color: #cfe0eb;
  padding: 40px 5% 24px;
  margin-top: 60px;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; max-width: 1180px; margin: 0 auto 24px; }
.footer-grid h4 { color: #fff; margin-bottom: 10px; font-size: 1em; }
.footer-bottom { text-align: center; font-size: 0.85em; color: #8fa8ba; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 18px; }
.footer-bottom span { color: var(--blue-light); }

/* Assistant widget */
#assistant-toggle {
  position: fixed;
  bottom: 22px;
  left: 22px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(10,37,64,0.3);
  z-index: 300;
}
#assistant-panel {
  position: fixed;
  bottom: 90px;
  left: 22px;
  width: 320px;
  max-width: 90vw;
  height: 420px;
  max-height: 70vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 300;
}
#assistant-panel.open { display: flex; }
#assistant-panel .a-head { background: var(--navy); color: #fff; padding: 12px 16px; font-weight: 600; }
#assistant-panel .a-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
#assistant-panel .a-msg { padding: 8px 12px; border-radius: 10px; max-width: 85%; font-size: 0.92em; }
#assistant-panel .a-msg.bot { background: #fff; border: 1px solid var(--border); align-self: flex-start; }
#assistant-panel .a-msg.user { background: var(--blue); color: #fff; align-self: flex-end; }
#assistant-panel .a-input { display: flex; border-top: 1px solid var(--border); }
#assistant-panel .a-input input { flex: 1; border: none; padding: 12px; outline: none; }
#assistant-panel .a-input button { border: none; background: var(--blue-light); color: var(--navy); padding: 0 16px; cursor: pointer; font-weight: 700; }

.badge-empty { color: var(--muted); text-align: center; padding: 60px 20px; }

@media (max-width: 720px) {
  .header-top { flex-direction: column; align-items: stretch; }
  .search-form { max-width: none; order: 3; }
  .site-nav ul { gap: 16px; }
  .cart-summary { margin-inline-start: 0; max-width: none; }
  .product-detail-grid { grid-template-columns: 1fr !important; }
}
