* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; margin: 0; color: #1a1a1a; background: #f7f7f5; }
a { color: #0b6b3a; text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { background: #0b3d2e; color: #fff; padding: 12px 16px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.topbar .brand { font-weight: 800; font-size: 20px; color: #fff; }
.topbar nav { display: flex; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.topbar nav a { color: #fff; padding: 6px 10px; border-radius: 6px; }
.topbar nav a.active { background: #15803d; }
.lang { margin-left: 8px; }
/* Filter bar: one line directly below the top menu bar. */
.filterbar { background: #fff; border-bottom: 1px solid #ddd; padding: 10px 16px; position: sticky; top: 0; z-index: 5; }
.filterbar-form { display: flex; gap: 12px; align-items: center; flex-wrap: nowrap; overflow-x: auto; max-width: 1200px; margin: 0 auto; }
.filterbar-form label { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-weight: 600; flex-shrink: 0; }
.filterbar-form select, .filterbar-form button { width: auto; margin: 0; flex-shrink: 0; }
.filterbar-form select { max-width: 190px; }
.filter-count { margin-left: auto; white-space: nowrap; color: #555; flex-shrink: 0; }
.hero { background: #e8f5e9; padding: 18px; text-align: center; }
.slider { max-width: 1000px; margin: 16px auto; position: relative; overflow: hidden; border-radius: 12px; background: #fff; }
.slide { display: none; position: relative; }
/* The whole slide image (and caption) is one link to its category. */
.slide.active { display: block; }
.slide-link { display: block; position: relative; z-index: 1; }
.slide-link img { width: 100%; height: 300px; object-fit: cover; display: block; cursor: pointer; }
.slide-caption { position: absolute; left: 16px; bottom: 16px; background: rgba(0,0,0,.7); color: #fff; padding: 10px 14px; border-radius: 8px; }
.slider-btn { position: absolute; top: 45%; z-index: 2; background: #fff; border: 0; font-size: 22px; padding: 6px 12px; border-radius: 50%; cursor: pointer; }
.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }
.slider-dots { text-align: center; padding: 8px; }
.slider-dots button { border: 0; width: 12px; height: 12px; border-radius: 50%; margin: 0 3px; background: #ccc; cursor: pointer; }
.slider-dots button.active { background: #0b6b3a; }
.page { max-width: 1200px; margin: 0 auto; padding: 16px; }
.main { min-width: 0; }
.main-full { width: 100%; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.card { background: #fff; border: 1px solid #e5e5e5; border-radius: 14px; padding: 0; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.card-image { position: relative; }
.card img { width: 100%; height: 240px; object-fit: cover; display: block; background: #eee; }
.discount-badge { position: absolute; top: 10px; left: 10px; background: #dc2626; color: #fff; font-weight: 800; font-size: 13px; padding: 4px 9px; border-radius: 6px; }
.card-body { padding: 14px; }
.card-body h3 { margin: 6px 0; font-size: 17px; line-height: 1.4; }
.card-meta { color: #666; margin: 6px 0; }
/* Card description: max 2 lines on the shop page. Full text is on the Details page. */
.card-desc { color: #555; margin: 10px 0; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-body .btn.secondary { text-align: center; }
/* Product detail page + gallery */
.detail { display: flex; gap: 24px; background: #fff; border: 1px solid #e5e5e5; border-radius: 14px; padding: 20px; align-items: flex-start; }
.gallery { flex: 1; min-width: 0; }
.gallery #main-image { width: 100%; height: 380px; object-fit: cover; border-radius: 10px; background: #eee; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid #eee; }
.detail-info { flex: 1; min-width: 0; }
.detail-desc { line-height: 1.7; white-space: pre-wrap; }
@media (max-width: 760px) {
  .detail { flex-direction: column; }
  .gallery #main-image { height: 260px; }
}
.btn-block, .card button.btn-block { width: 100%; text-align: center; padding: 12px; font-size: 15px; font-weight: 700; }
.price { font-weight: 800; font-size: 18px; }
.old { color: #888; text-decoration: line-through; margin-left: 6px; }
.badge { display: inline-block; background: #fef08a; padding: 2px 8px; border-radius: 20px; font-size: 12px; }
.badge.sample { background: #fee2e2; }
button, .btn { background: #0b6b3a; color: #fff; border: 0; padding: 9px 14px; border-radius: 8px; cursor: pointer; display: inline-block; }
button.secondary, .btn.secondary { background: #eee; color: #222; }
input, select, textarea { width: 100%; padding: 9px; margin: 6px 0 12px; border: 1px solid #ccc; border-radius: 8px; }
form.inline { display: inline; }
form.inline input { width: auto; }
.cart-table { width: 100%; border-collapse: collapse; background: #fff; }
.cart-table th, .cart-table td { border-bottom: 1px solid #eee; padding: 8px; text-align: left; }
.notice { background: #fff7ed; border: 1px solid #fdba74; padding: 12px; border-radius: 8px; margin: 12px 0; }
.admin-box { max-width: 720px; margin: 24px auto; background: #fff; padding: 20px; border-radius: 10px; }
@media (max-width: 760px) {
  .slide-link img { height: 200px; }
}

/* --- 2026-11-06 upgrade: account / orders / support / cookies --- */
.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9999; background: #111827; color: #fff; padding: 12px 16px; border-radius: 12px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.cookie-banner .cookie-btns { margin-left: auto; display: flex; gap: 8px; }
.order-steps { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.order-step { background: #eee; color: #555; padding: 6px 10px; border-radius: 20px; font-size: 13px; }
.order-step.done { background: #0b6b3a; color: #fff; }
.order-arrow { color: #999; }

/* --- 2026-11-06 voice assistant --- */
.voice-widget { position: fixed; left: 16px; bottom: 16px; z-index: 9998; }
.voice-btn { width: 56px; height: 56px; border-radius: 50%; font-size: 26px; background: #0b6b3a; color: #fff; border: 0; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.voice-btn.listening { background: #dc2626; animation: voice-pulse 1s infinite; }
@keyframes voice-pulse { 0% { box-shadow: 0 0 0 0 rgba(220,38,38,.5); } 100% { box-shadow: 0 0 0 14px rgba(220,38,38,0); } }
.voice-panel { position: absolute; left: 0; bottom: 64px; width: 320px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid #ddd; border-radius: 12px; padding: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.voice-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.voice-status { color: #333; margin: 8px 0; }
.voice-text { color: #0b6b3a; font-weight: 600; margin: 8px 0; word-break: break-word; }
.voice-help { font-size: 14px; line-height: 1.6; color: #333; margin-top: 10px; }
.voice-chat { max-height: 180px; overflow-y: auto; margin: 8px 0; display: flex; flex-direction: column; gap: 6px; }
.voice-msg { padding: 8px 10px; border-radius: 10px; font-size: 14px; line-height: 1.5; }
.voice-msg.user { background: #e8f5e9; align-self: flex-end; }
.voice-msg.assistant { background: #eef2ff; align-self: flex-start; }

/* --- 2026-11-12: Live Chat (text + voice) + StarTech-style gallery --- */
.photo-count-badge { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.72); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 6px; }
.gallery-main { position: relative; background: #fff; border: 1px solid #e5e5e5; border-radius: 10px; overflow: hidden; }
.gallery #main-image { height: 420px; object-fit: contain; background: #fff; border-radius: 0; }
.gallery-count { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.72); color: #fff; font-size: 13px; font-weight: 700; padding: 4px 9px; border-radius: 6px; }
.gallery-nav { position: absolute; top: 45%; background: #fff; color: #1a1a1a; border: 1px solid #ddd; font-size: 24px; padding: 4px 13px; border-radius: 50%; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.thumbs button { padding: 0; background: none; border: 2px solid #eee; border-radius: 8px; cursor: pointer; overflow: hidden; }
.thumbs button.active { border-color: #0b6b3a; }
.thumbs button img { width: 72px; height: 72px; object-fit: cover; display: block; border: 0; border-radius: 0; }
.gallery-note { color: #666; font-size: 13px; margin: 8px 0 0; }
@media (max-width: 760px) { .gallery #main-image { height: 280px; } }
.voice-panel { width: 360px; }
.voice-speak-row { display: flex; align-items: center; gap: 6px; font-size: 14px; margin: 4px 0; }
.voice-speak-row input { margin: 0; }
.voice-note { background: #fff7ed; border: 1px solid #fdba74; padding: 8px 10px; border-radius: 8px; font-size: 13px; line-height: 1.5; margin: 8px 0; }
.voice-note:empty { display: none; }
.voice-chat { max-height: 220px; min-height: 60px; border: 1px solid #eee; border-radius: 10px; padding: 8px; background: #fafafa; }
.voice-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.voice-quick button { background: #e8f5e9; color: #0b3d2e; font-size: 13px; padding: 6px 10px; border-radius: 20px; }
.chat-form { display: flex; gap: 6px; align-items: center; margin: 8px 0; }
.chat-form input { flex: 1; margin: 0; min-width: 0; }
.chat-mic { flex-shrink: 0; font-size: 18px; padding: 9px 12px; }
.chat-mic.listening { background: #dc2626; animation: voice-pulse 1s infinite; }
.chat-send { flex-shrink: 0; }
