:root {
  --bg: #ffffff;
  --bg-elevated: #f8f8f8;
  --accent: #ff7a18;
  --accent-strong: #ff3f00;
  --accent-soft: rgba(255, 122, 24, 0.12);
  --text: #1a1a1a;
  --text-muted: #666666;
  --border: rgba(0, 0, 0, 0.08);
  --grid-size: 28px;
}

* { box-sizing: border-box; }

html { background: var(--bg); min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(transparent 96%, rgba(255, 122, 24, 0.04) 96%),
    linear-gradient(90deg, transparent 96%, rgba(255, 122, 24, 0.04) 96%);
  background-size: var(--grid-size) var(--grid-size);
  opacity: 0.8;
  pointer-events: none;
  z-index: 0;
}

.page { position: relative; z-index: 1; flex: 1; }

/* Header */
.shop-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 0 rgba(255, 122, 24, 0.15);
}

.shop-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.shop-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.shop-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
}

.shop-brand-name { color: var(--text); }

.shop-search {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  position: relative;
}

.shop-search-input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.shop-search-input::placeholder { color: var(--text-muted); }
.shop-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.shop-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.shop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.shop-nav a {
  padding: 8px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.shop-nav a:hover { color: var(--accent); background: var(--accent-soft); }

.shop-utils {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.shop-util-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.shop-util-link:hover { color: var(--accent); }

.shop-icon-btn {
  color: var(--text-muted);
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
}

.shop-icon-btn:hover { color: var(--accent); background: var(--accent-soft); }

button.shop-icon-btn { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }

/* Account login modal */
.shop-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.shop-modal-backdrop.is-open { display: flex; }
.shop-modal {
  width: 100%;
  max-width: 380px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
}
.shop-modal-title { margin: 0 0 20px; font-size: 1.25rem; font-weight: 600; color: var(--text); }
.shop-modal-form label { display: block; font-size: 0.85rem; font-weight: 500; margin-bottom: 6px; color: var(--text-muted); }
.shop-modal-form input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 16px;
}
.shop-modal-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.shop-modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 8px; }
.shop-modal-cancel {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.shop-modal-cancel:hover { border-color: var(--accent); color: var(--accent); }
.shop-modal-submit {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.shop-modal-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255, 122, 24, 0.35); }

/* Hero */
.shop-hero {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 16px;
}

.shop-hero-banner {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 140px;
  padding: 24px 32px;
  background: linear-gradient(135deg, var(--bg-elevated) 0%, rgba(255, 122, 24, 0.08) 100%);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-hero-banner::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shine 5s ease-in-out infinite;
}

@keyframes shine {
  0%, 100% { left: -100%; }
  50% { left: 100%; }
}

.shop-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.shop-hero-title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--text);
}

.shop-hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
}

.shop-hero-cta {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(255, 122, 24, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.shop-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 122, 24, 0.45);
}

/* Category filters */
.shop-categories {
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 24px 32px;
}

.shop-categories-inner {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.shop-cat-pill {
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.shop-cat-pill:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* Review summary on main page */
.shop-review-summary {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 24px;
  text-align: center;
}

.shop-review-summary-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.shop-review-summary-link:hover { color: var(--accent); }

.shop-review-stars {
  display: inline-flex;
  gap: 2px;
}

.shop-review-stars svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.shop-review-count { font-weight: 500; }

/* Product grid */
.shop-products {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.shop-products-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 24px;
  padding: 0 4px;
}

.shop-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.shop-product-grid--empty {
  display: block;
  padding: 48px 24px;
  text-align: center;
}

.shop-no-products {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.shop-product-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
}

.shop-product-card:hover {
  border-color: rgba(255, 122, 24, 0.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.shop-product-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  transition: left 0.5s ease;
}

.shop-product-card:hover::after { left: 100%; }

.shop-product-image {
  aspect-ratio: 1;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.shop-product-image svg {
  width: 48px;
  height: 48px;
  opacity: 0.35;
}

.shop-product-info {
  padding: 18px;
}

.shop-product-name {
  font-weight: 600;
  font-size: 1rem;
  margin: 0 0 6px;
  color: var(--text);
}

.shop-product-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Footer */
.shop-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  background: var(--bg-elevated);
  color: var(--text);
}

.shop-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.shop-footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.shop-footer-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
}

.shop-footer-nav {
  display: flex;
  gap: 24px;
}

.shop-footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.shop-footer-nav a:hover { color: var(--accent); }

.shop-footer-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .shop-nav { display: none; }
  .shop-header-inner { gap: 16px; }
  .shop-search { max-width: none; }
}

/* Support chat widget */
.support-chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 122, 24, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.support-chat-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(255, 122, 24, 0.5);
}
.support-chat-toggle svg { width: 28px; height: 28px; }
.support-chat-panel {
  display: none;
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 98;
  width: 340px;
  max-width: calc(100vw - 48px);
  max-height: 420px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  flex-direction: column;
  overflow: hidden;
}
.support-chat-panel.is-open { display: flex; }
.support-chat-header {
  padding: 14px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.support-chat-header small {
  display: block;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.support-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  max-height: 280px;
}
.support-chat-msg {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
  max-width: 90%;
}
.support-chat-msg.bot {
  align-self: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
}
.support-chat-msg.user {
  align-self: flex-end;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 122, 24, 0.25);
  color: var(--text);
}
.support-chat-msg .disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-style: italic;
}
.support-chat-input-wrap {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.support-chat-input-wrap form { display: flex; gap: 8px; }
.support-chat-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.9rem;
}
.support-chat-input:focus {
  outline: none;
  border-color: var(--accent);
}
.support-chat-send {
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
}
.support-chat-send:hover { opacity: 0.95; }
.support-chat-faq-link {
  display: block;
  margin-top: 12px;
  font-size: 0.85rem;
}
.support-chat-faq-link a { color: var(--accent); }
