
:root {
  --c-deep-green: #3b82f6;
  --c-mid-green: #8b5cf6;
  --c-light-green: #00b894;
  --c-pale-green: #dbeafe;
  --c-bg: #f0f2f9;
  --c-gold: #e84393;
  --c-gold-hover: #d63384;
  --c-white: #ffffff;
  --c-text: #1e293b;
  --c-text-muted: #64748b;
  --c-text-header: rgba(255,255,255,0.9);
  --c-text-header-accent: rgba(255,255,255,0.7);
  --c-red: #d63031;
  --c-border: #e8ecf3;
  --c-pink: #e84393;
  --c-orange: #e67e22;
  --c-green: #00b894;
  --c-yellow: #fdcb6e;
  --c-purple: #8b5cf6;
  --c-blue: #3b82f6;
  --c-price: #1e293b;
  --shadow-card: 0 2px 8px rgba(59,130,246,0.1);
  --shadow-card-hover: 0 8px 24px rgba(59,130,246,0.15);
  --radius-card: 12px;
  --radius-badge: 4px;
  --radius-pill: 20px;
  --radius-button: 24px;
  --font-main: "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --max-width: 1200px;
}

/* === Reset & Base === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100%;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.is-gallery-locked {
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

input, textarea, select {
  font: inherit;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  padding: 8px 12px;
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--c-mid-green);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
}

/* === Header === */
.header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #1e293b, #334155);
  padding: 10px 24px;
  color: var(--c-text-header);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--c-white);
  flex-shrink: 0;
}

.logo-mark {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #ffffff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-white);
}

.logo-text small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--c-text-header-accent);
  letter-spacing: 0.5px;
}

.search-bar {
  position: relative;
  flex: 1;
  display: flex;
  max-width: 600px;
  background: var(--c-white);
  border-radius: var(--radius-button);
  overflow: hidden;
}

.search-suggestions { position: fixed; z-index: 90; max-height: 340px; overflow-y: auto; border: 1px solid var(--c-border); border-radius: 10px; background: #fff; color: var(--c-text); box-shadow: 0 14px 34px rgba(15,23,42,.18); }
.search-suggestion { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border-bottom: 1px solid var(--c-border); font-size: 13px; }
.search-suggestion:hover, .search-suggestion:focus { background: var(--c-pale-green); outline: none; }
.search-suggestion__type { color: var(--c-text-muted); font-size: 10px; font-weight: 700; }

.search-bar select {
  border: none;
  border-right: 1px solid var(--c-border);
  border-radius: 0;
  padding: 8px 12px;
  background: #f0f2f9;
  font-size: 13px;
  color: var(--c-text);
  min-width: 90px;
}

.search-bar input {
  flex: 1;
  border: none;
  border-radius: 0;
  padding: 8px 14px;
  font-size: 14px;
  min-width: 0;
}

.search-bar input:focus {
  box-shadow: none;
}

.search-bar button {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  color: #ffffff;
  font-weight: 700;
  padding: 8px 20px;
  font-size: 14px;
  border: none;
  border-radius: 0;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.search-bar button:hover {
  opacity: 0.9;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.header-actions a {
  color: var(--c-text-header-accent);
  font-size: 13px;
  white-space: nowrap;
  transition: color 0.2s;
}

.header-actions a:hover {
  color: var(--c-white);
}

.header-session {
  display: flex;
  align-items: center;
  gap: 12px;
}

.session-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--c-white);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-icon-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: var(--c-text-header-accent);
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}

.header-icon-link:hover {
  color: var(--c-white);
  background: rgba(255,255,255,0.16);
  border-color: rgba(255,255,255,0.28);
  transform: translateY(-1px);
}

.header-icon-link svg {
  width: 19px;
  height: 19px;
}

.header-icon-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #e84393, #d63384);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* === Nav Bar === */
.nav-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--c-white);
  padding: 6px 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--c-border);
}

.nav-bar a {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  color: var(--c-text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  border-radius: var(--radius-pill);
  border-bottom: none;
}

.nav-bar a:hover {
  background: var(--c-pale-green);
  color: var(--c-deep-green);
}

.nav-bar a.active {
  background: linear-gradient(135deg, #e84393, #8b5cf6);
  color: var(--c-white);
  border-bottom-color: transparent;
  font-weight: 700;
}

/* === Container & Layout === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

.page-main {
  padding: 24px 0;
  min-height: 400px;
}

.section {
  margin-bottom: 40px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--c-deep-green);
}

.section-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--c-deep-green);
}

.section-header a {
  font-size: 13px;
  color: var(--c-mid-green);
  font-weight: 500;
}

.section-header a:hover {
  text-decoration: underline;
}

.section-title-pink .section-header { border-bottom-color: #e84393; }
.section-title-pink .section-header h2 { color: #e84393; }
.section-title-pink .section-header a { color: #e84393; }
.section-title-blue .section-header { border-bottom-color: #3b82f6; }
.section-title-blue .section-header h2 { color: #3b82f6; }
.section-title-blue .section-header a { color: #3b82f6; }
.section-title-orange .section-header { border-bottom-color: #e67e22; }
.section-title-orange .section-header h2 { color: #e67e22; }
.section-title-orange .section-header a { color: #e67e22; }
.section-title-green .section-header { border-bottom-color: #00b894; }
.section-title-green .section-header h2 { color: #00b894; }
.section-title-green .section-header a { color: #00b894; }
.section-title-purple .section-header { border-bottom-color: #8b5cf6; }
.section-title-purple .section-header h2 { color: #8b5cf6; }
.section-title-purple .section-header a { color: #8b5cf6; }
.section-title-yellow .section-header { border-bottom-color: #fdcb6e; }
.section-title-yellow .section-header h2 { color: #a16207; }
.section-title-yellow .section-header a { color: #a16207; }

/* === Banner === */
.main-banner {
  position: relative;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 25%, #e84393 50%, #e67e22 75%, #00b894 100%);
  color: var(--c-white);
  padding: 48px 40px;
  border-radius: var(--radius-card);
  margin-bottom: 32px;
  overflow: hidden;
}

.main-banner::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  pointer-events: none;
}

.main-banner h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
}

.main-banner p {
  font-size: 15px;
  opacity: 0.9;
  margin-bottom: 16px;
}

.badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-row span {
  display: inline-block;
  background: linear-gradient(135deg, #e84393, #8b5cf6);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

.badge-row span:nth-child(1) { background: linear-gradient(135deg, #e84393, #d63384); }
.badge-row span:nth-child(2) { background: linear-gradient(135deg, #3b82f6, #8b5cf6); }
.badge-row span:nth-child(3) { background: linear-gradient(135deg, #00b894, #00a884); }

/* === Product Grid & Cards === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.product-card {
  background: var(--c-white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.25s, transform 0.25s;
  position: relative;
}

.product-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.product-img {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: #f5f5f5;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-img img {
  transform: scale(1.05);
}

.product-info {
  padding: 12px;
}

.product-info .shop-name {
  font-size: 11px;
  color: var(--c-text-muted);
  margin-bottom: 4px;
}

.product-info h3 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-info .price {
  font-size: 18px;
  font-weight: 800;
  color: var(--c-price);
}

.product-info .price-original {
  font-size: 12px;
  color: var(--c-text-muted);
  text-decoration: line-through;
  margin-left: 6px;
}

.product-info .stars {
  font-size: 12px;
  color: #fdcb6e;
  margin-top: 4px;
}

.product-info .shipping {
  font-size: 11px;
  color: #00b894;
  margin-top: 4px;
  font-weight: 500;
}

.sale-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e67e22;
  color: var(--c-white);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-badge);
  z-index: 1;
}

.ranking-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(135deg, #e84393, #d63384);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-badge);
  z-index: 1;
}

/* === Category Grid === */
.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  background: var(--c-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s, transform 0.2s;
  text-align: center;
  cursor: pointer;
}

.category-item:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.category-icon {
  width: 48px;
  height: 48px;
  background: var(--c-pale-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--c-deep-green);
}
.category-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.category-item:nth-child(6n+1) .category-icon { background: #fce4ec; color: #e84393; }
.category-item:nth-child(6n+2) .category-icon { background: #dbeafe; color: #3b82f6; }
.category-item:nth-child(6n+3) .category-icon { background: #fef3c7; color: #a16207; }
.category-item:nth-child(6n+4) .category-icon { background: #a7f3d0; color: #00b894; }
.category-item:nth-child(6n+5) .category-icon { background: #ede9fe; color: #8b5cf6; }
.category-item:nth-child(6n+6) .category-icon { background: #fed7aa; color: #e67e22; }

.category-item span {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
}

/* === Ranking === */
.ranking-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.ranking-card {
  position: relative;
  background: var(--c-white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.search-rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--c-deep-green);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(20, 80, 48, .24);
}

.rank-num {
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--c-white);
  background: var(--c-text-muted);
  border-radius: 0 0 8px 0;
  z-index: 1;
}

.rank-1 .rank-num {
  background: #ffd700;
  color: #5d4200;
}

.rank-2 .rank-num {
  background: #b0b0b0;
  color: #333;
}

.rank-3 .rank-num {
  background: #cd7f32;
  color: var(--c-white);
}

/* === Store Cards === */
.store-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.store-card {
  background: var(--c-white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.25s, transform 0.25s;
}

.store-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.store-header {
  background: linear-gradient(135deg, #8b5cf6, #e84393);
  color: var(--c-white);
  padding: 20px 16px;
  font-size: 16px;
  font-weight: 700;
}

.store-info {
  padding: 16px;
  font-size: 13px;
  color: var(--c-text-muted);
  line-height: 1.5;
}

/* === Product Detail === */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #f5f5f5;
}

.gallery-main.has-image {
  cursor: zoom-in;
  touch-action: pan-y;
}

.gallery-main.has-image:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.48);
  outline-offset: 4px;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: galleryFade 0.22s ease;
}

.gallery-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border: none;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.gallery-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gallery-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: var(--c-deep-green);
  font-size: 12px;
  font-weight: 700;
}

.gallery-count {
  color: var(--c-text-muted);
  font-size: 12px;
  font-weight: 600;
}

.gallery-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gallery-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.16);
  background: #fff;
  color: var(--c-deep-green);
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s, border-color 0.2s, transform 0.2s, opacity 0.2s;
}

.gallery-control:hover:not(:disabled),
.gallery-control:focus-visible:not(:disabled) {
  background: var(--c-pale-green);
  border-color: rgba(59, 130, 246, 0.28);
  transform: translateY(-1px);
}

.gallery-control:disabled {
  opacity: 0.42;
  cursor: default;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 41, 59, 0.82);
  backdrop-filter: blur(10px);
}

.gallery-lightbox-card {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.gallery-lightbox-close {
  align-self: flex-end;
  padding: 9px 12px;
  border: 1px solid rgba(59, 130, 246, 0.14);
  border-radius: 999px;
  background: #fff;
  color: var(--c-deep-green);
  font-size: 13px;
  font-weight: 700;
}

.gallery-lightbox-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #f4f7f2;
  touch-action: pan-y;
}

.gallery-lightbox-figure img {
  max-width: 100%;
  max-height: calc(100vh - 220px);
  object-fit: contain;
}

@keyframes galleryFade {
  from {
    opacity: 0;
    transform: scale(1.015);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.gallery-thumbs.is-lightbox {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.gallery-thumb {
  padding: 0;
  border: none;
  background: transparent;
  line-height: 0;
  border-radius: 6px;
  flex: 0 0 auto;
}

.gallery-thumbs.is-lightbox .gallery-thumb {
  scroll-snap-align: center;
}

.gallery-thumb img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}

.gallery-thumb:hover img,
.gallery-thumb:focus-visible img {
  border-color: var(--c-mid-green);
}

.gallery-thumb.active img {
  border-color: var(--c-deep-green);
}

.gallery-thumbs.is-lightbox .gallery-thumb img {
  width: 72px;
  height: 72px;
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-info h1 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

.detail-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--c-price);
}

.detail-price .original {
  font-size: 16px;
  color: var(--c-text-muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 8px;
}

.detail-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #fdcb6e;
}

.variant-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variant-btn {
  padding: 8px 16px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  background: var(--c-white);
  transition: all 0.2s;
  cursor: pointer;
}

.variant-btn:hover {
  border-color: var(--c-mid-green);
}

.variant-btn.active {
  background: var(--c-deep-green);
  color: var(--c-white);
  border-color: var(--c-deep-green);
}

.quantity-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.quantity-control button {
  width: 36px;
  height: 36px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.quantity-control input {
  width: 48px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
  border-radius: 0;
  padding: 6px;
}

.add-to-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #e84393, #d63384);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: var(--radius-button);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  width: 100%;
}

.add-to-cart-btn:hover {
  background: linear-gradient(135deg, #d63384, #c2185b);
}

.favorite-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-button);
  font-size: 14px;
  background: var(--c-white);
  transition: all 0.2s;
  cursor: pointer;
}

.favorite-btn:hover {
  border-color: var(--c-red);
  color: var(--c-red);
}

.delivery-info {
  background: var(--c-pale-green);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--c-mid-green);
  line-height: 1.6;
}

.tab-nav {
  display: flex;
  border-bottom: 2px solid var(--c-border);
  margin-bottom: 20px;
  gap: 0;
}

.tab-nav button {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-muted);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab-nav button:hover {
  color: var(--c-text);
}

.tab-nav button.active {
  color: var(--c-deep-green);
  border-bottom-color: var(--c-deep-green);
  font-weight: 700;
}

.tab-content {
  padding: 16px 0;
}

.rich-description { font-size: 14px; line-height: 1.8; }
.rich-description p { margin: 0 0 8px; }
.rich-description h2, .rich-description h3, .rich-description h4 { margin: 22px 0 10px; line-height: 1.45; }
.rich-description h2 { font-size: 20px; }
.rich-description h3 { font-size: 17px; }
.rich-description h4 { font-size: 15px; }
.rich-description figure { margin: 18px 0; }
.rich-description figure img { display: block; max-width: 100%; height: auto; border-radius: 10px; }
.rich-description figcaption { margin-top: 6px; color: var(--c-text-muted); font-size: 12px; }
.rich-description-spacer { height: 8px; }
.product-specifications { margin-top: 24px; }
.product-specifications h3 { margin-bottom: 10px; font-size: 17px; }
.spec-table-wrap { overflow-x: auto; }
.product-specifications table { width: 100%; min-width: 360px; border-collapse: collapse; }
.product-specifications th, .product-specifications td { border: 1px solid var(--c-border); padding: 10px 12px; text-align: left; vertical-align: top; }
.product-specifications th { width: 34%; background: var(--c-pale-green); }
.legal-table { width: 100%; border-collapse: collapse; }
.legal-table th, .legal-table td { border: 1px solid var(--c-border); padding: 12px 14px; text-align: left; vertical-align: top; }
.legal-table th { width: 30%; background: var(--c-pale-green); }
.btn.is-following { border-color: var(--c-mid-green); background: var(--c-pale-green); color: var(--c-deep-green); }

.review-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-item {
  padding: 16px;
  background: var(--c-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.review-form {
  padding: 20px;
  background: var(--c-pale-green);
  border-radius: var(--radius-card);
  margin-top: 20px;
}

.related-products {
  margin-top: 40px;
}

/* === Search Page === */
.search-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}

.filter-sidebar {
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--shadow-card);
  align-self: start;
  position: sticky;
  top: 16px;
}

.filter-group {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-border);
}

.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-group h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--c-deep-green);
}

.filter-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0;
  cursor: pointer;
}

.sort-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 10px 16px;
  background: var(--c-white);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}

.sort-bar select {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 32px;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-white);
  border: 1px solid var(--c-border);
  transition: all 0.2s;
}

.pagination a:hover {
  border-color: var(--c-mid-green);
  color: var(--c-mid-green);
}

.pagination a.active {
  background: var(--c-deep-green);
  color: var(--c-white);
  border-color: var(--c-deep-green);
}

.filter-toggle-btn {
  display: none;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: 6px;
  color: var(--c-deep-green);
  cursor: pointer;
  margin-bottom: 12px;
}
.filter-close-btn, .filter-backdrop { display: none; }

.search-count {
  font-size: 13px;
  color: var(--c-text-muted);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--c-text-muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--c-mid-green);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* === Category Pages === */
.category-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.category-card {
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
}

.category-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.category-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.category-card .sub-count {
  font-size: 12px;
  color: var(--c-text-muted);
}

/* === Auth Pages === */
.auth-card {
  max-width: 440px;
  margin: 40px auto;
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 40px 32px;
  box-shadow: var(--shadow-card);
}

.auth-card h2 {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 28px;
  color: var(--c-deep-green);
}

.form-field {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--c-text);
}

.form-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 14px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="date"].form-input {
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus {
  border-color: var(--c-mid-green);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}

.form-input.has-error {
  border-color: var(--c-red);
  box-shadow: 0 0 0 3px rgba(214,48,49,0.1);
}

.field-error {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--c-red);
  line-height: 1.4;
}

.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--c-text-muted);
  line-height: 1.4;
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background: var(--c-deep-green);
  color: var(--c-white);
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: background 0.2s;
}

.submit-btn:hover {
  background: var(--c-mid-green);
}

.auth-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--c-mid-green);
}

.auth-link:hover {
  text-decoration: underline;
}

/* === Cart === */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--c-white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  margin-bottom: 12px;
}

.cart-item-img {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f5f5f5;
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.cart-item-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--c-price);
}

.cart-quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--c-border);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
}

.cart-quantity button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  background: #f5f5f5;
}

.cart-quantity input {
  width: 40px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--c-border);
  border-right: 1px solid var(--c-border);
  border-radius: 0;
  padding: 4px;
  font-size: 14px;
}

.cart-remove {
  font-size: 12px;
  color: var(--c-red);
  cursor: pointer;
  background: none;
  border: none;
  margin-top: 8px;
}

.cart-remove:hover {
  text-decoration: underline;
}

.cart-summary {
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.cart-summary.sticky {
  position: sticky;
  top: 16px;
}

.cart-total {
  font-size: 24px;
  font-weight: 800;
  color: var(--c-price);
  text-align: right;
  padding: 16px 0;
  border-top: 2px solid var(--c-border);
  margin-top: 12px;
}

.cart-checkout-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-button);
  cursor: pointer;
  text-align: center;
  margin-top: 12px;
  transition: background 0.2s;
}

.cart-checkout-btn:hover {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.empty-cart {
  text-align: center;
  padding: 60px 20px;
  color: var(--c-text-muted);
  font-size: 16px;
}

/* === Checkout === */
.checkout-steps {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
}

.checkout-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  color: var(--c-text-muted);
  position: relative;
}

.checkout-step::after {
  content: "";
  width: 40px;
  height: 2px;
  background: var(--c-border);
  margin-left: 12px;
}

.checkout-step:last-child::after {
  display: none;
}

.checkout-step.active {
  color: var(--c-deep-green);
  font-weight: 700;
}

.checkout-step.done {
  color: var(--c-light-green);
}

.checkout-section {
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.checkout-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--c-deep-green);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-border);
}

.payment-intent-note {
  background: var(--c-pale-green);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  color: var(--c-text);
  font-size: 13px;
  line-height: 1.7;
  padding: 14px 16px;
}

.stripe-payment-panel {
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 18px;
}

.stripe-payment-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 6px;
}

.stripe-payment-status {
  color: var(--c-text-muted);
  font-size: 13px;
  margin: 10px 0 14px;
  min-height: 20px;
}

#stripePaymentElement {
  margin: 12px 0 16px;
}

.address-card {
  padding: 16px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 8px;
}

.address-card:hover {
  border-color: var(--c-mid-green);
}

.address-card.selected {
  border-color: var(--c-deep-green);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
  background: var(--c-pale-green);
}

.payment-card {
  padding: 16px;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
  margin-bottom: 8px;
}

.payment-card:hover {
  border-color: var(--c-mid-green);
}

.payment-card.selected {
  border-color: var(--c-deep-green);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.15);
  background: var(--c-pale-green);
}

.order-preview {
  background: #fafafa;
  border-radius: 8px;
  padding: 16px;
  margin-top: 12px;
}

.place-order-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
  border: none;
  border-radius: var(--radius-button);
  cursor: pointer;
  margin-top: 24px;
  transition: background 0.2s;
}

.place-order-btn:hover {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.order-complete-card {
  max-width: 560px;
  margin: 40px auto;
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 48px 32px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.order-complete-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--c-deep-green);
  margin-bottom: 12px;
}

/* === Account === */
.account-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
}

.account-menu-wrap {
  min-width: 0;
  align-self: start;
  position: sticky;
  top: 16px;
}

.account-menu {
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 8px;
  box-shadow: var(--shadow-card);
  align-self: start;
  position: sticky;
  top: 16px;
}

.account-menu-wrap .account-menu {
  position: static;
}

.account-menu-scrollbar {
  display: none;
}

.account-menu a,
.account-menu button {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 6px;
  color: var(--c-text);
  transition: background 0.2s;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
}

.account-menu a:hover,
.account-menu button:hover {
  background: var(--c-pale-green);
}

.account-menu a.active {
  background: var(--c-deep-green);
  color: var(--c-white);
  font-weight: 600;
}

.account-menu button {
  color: var(--c-deep-green);
  font-weight: 600;
}

.account-section {
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  min-width: 0;
}

.account-section h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--c-deep-green);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-border);
}

.favorite-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.favorite-product-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: var(--c-white);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.favorite-product-thumbnail {
  display: flex;
  aspect-ratio: 1 / 1;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f5f7fb;
  color: var(--c-text-muted);
}

.favorite-product-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.favorite-product-card:hover .favorite-product-thumbnail img {
  transform: scale(1.03);
}

.favorite-product-body {
  padding: 12px;
}

.favorite-product-name {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  font-weight: 700;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.favorite-product-shop {
  margin-top: 6px;
  overflow: hidden;
  color: var(--c-text-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-product-price {
  margin-top: 6px;
  color: var(--c-price);
  font-size: 16px;
  font-weight: 800;
}

.favorite-product-remove {
  width: calc(100% - 24px);
  margin: 0 12px 12px;
}

.account-summary-card {
  display: flex;
  min-height: 92px;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  color: var(--c-text);
  background: linear-gradient(145deg, var(--c-white), var(--c-pale-green));
}

.account-summary-card span { color: var(--c-deep-green); font-size: 20px; font-weight: 800; }

.order-table {
  width: 100%;
  border-collapse: collapse;
}

.order-table th {
  background: var(--c-pale-green);
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-deep-green);
  border-bottom: 2px solid var(--c-border);
}

.order-table td {
  padding: 10px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--c-border);
}

.order-status-bar {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 20px 0;
}

.order-status-step {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  font-size: 12px;
  color: var(--c-text-muted);
  position: relative;
  border-bottom: 3px solid var(--c-border);
}

.order-status-step.active {
  color: var(--c-deep-green);
  font-weight: 700;
  border-bottom-color: var(--c-deep-green);
}

.order-status-step.done {
  color: var(--c-light-green);
  border-bottom-color: var(--c-light-green);
}

.notification-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification-item {
  padding: 14px 16px;
  background: var(--c-white);
  border-radius: 8px;
  border: 1px solid var(--c-border);
  font-size: 13px;
}

.notification-item.unread {
  border-left: 3px solid var(--c-gold);
  background: #fffde7;
}

/* === Utility === */
.flash {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), opacity 0.4s ease;
  pointer-events: none;
}

.flash.is-visible {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.flash.is-success {
  background: var(--c-deep-green);
  color: #fff;
}

.flash.is-error {
  background: var(--c-red);
  color: #fff;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-badge);
  background: var(--c-pale-green);
  color: var(--c-deep-green);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-size: 13px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-pill);
  background: var(--c-white);
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover {
  border-color: var(--c-mid-green);
}

.chip.active {
  background: var(--c-deep-green);
  color: var(--c-white);
  border-color: var(--c-deep-green);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel {
  background: var(--c-white);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--c-text-muted);
  font-size: 15px;
}

.static-page {
  background: var(--c-white, #ffffff);
  border-radius: var(--radius-card);
  padding: 32px 24px;
  box-shadow: var(--shadow-card);
  margin: 24px 0;
}

.static-page h1 {
  font-size: 22px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--c-border);
}

.static-page-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--c-text-muted);
}

.guide-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
}

.guide-nav a {
  padding: 8px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-button);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text);
  text-decoration: none;
  background: #f8fafc;
}

.guide-nav a.active {
  color: var(--c-white);
  border-color: transparent;
  background: var(--c-deep-green);
}

.guide-section {
  display: none;
  padding: 20px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  background: #ffffff;
}

.guide-section.active {
  display: block;
}

.guide-section h2 {
  margin: 0 0 12px;
  font-size: 18px;
  color: var(--c-deep-green);
}

.guide-section p,
.guide-section li {
  font-size: 14px;
  line-height: 1.8;
  color: var(--c-text-muted);
}

.guide-section ul {
  padding-left: 20px;
  margin: 8px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-button);
  background: var(--c-white);
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover {
  background: #f0f2f9;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: var(--c-white);
  border-color: transparent;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  border-color: transparent;
}

.btn-danger {
  background: var(--c-red);
  color: var(--c-white);
  border-color: var(--c-red);
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
}

.btn-outline {
  background: transparent;
  color: var(--c-deep-green);
  border-color: var(--c-deep-green);
}

.btn-outline:hover {
  background: var(--c-pale-green);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 12px 28px;
  font-size: 16px;
}

.ghost-button {
  background: none;
  border: none;
  color: var(--c-mid-green);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 8px;
}

.ghost-button:hover {
  text-decoration: underline;
}

.mini-button {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 4px;
  border: 1px solid var(--c-border);
  background: var(--c-white);
  cursor: pointer;
}

.mini-button:hover {
  background: #f5f5f5;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--c-text-muted);
  font-size: 14px;
}

.loading::before {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid var(--c-border);
  border-top-color: var(--c-deep-green);
  border-radius: 50%;
  margin-right: 10px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === Footer === */
.footer {
  background: #1e293b;
  color: var(--c-text-header);
  margin-top: 60px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.footer h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 12px;
}

.footer a {
  display: block;
  font-size: 13px;
  color: var(--c-text-header-accent);
  padding: 3px 0;
  transition: color 0.2s;
}

.footer a:hover {
  color: #e84393;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 12px;
  color: var(--c-text-header-accent);
}

/* === Responsive === */
.support-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--c-blue), var(--c-purple));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(59, 130, 246, .3);
}
.support-fab__badge { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--c-red); font-size: 11px; line-height: 20px; }
.support-panel {
  position: fixed;
  right: 22px;
  bottom: 84px;
  z-index: 60;
  width: min(430px, calc(100vw - 28px));
  height: min(680px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(15, 23, 42, .22);
}
.support-page { min-height: 620px; overflow: hidden; border: 1px solid var(--c-border); border-radius: 16px; background: #fff; }
.support-shell { display: flex; height: 100%; min-height: 0; flex-direction: column; }
.support-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--c-border); background: #fff; }
.support-head__title { font-size: 15px; font-weight: 800; }
.support-head__sub { font-size: 11px; color: var(--c-text-muted); }
.support-icon-btn { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 999px; color: var(--c-text-muted); }
.support-icon-btn:hover { background: var(--c-bg); }
.support-tabs { display: flex; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--c-border); }
.support-tab { padding: 6px 12px; border-radius: 999px; background: var(--c-bg); color: var(--c-text-muted); font-size: 12px; font-weight: 700; }
.support-tab.active { background: var(--c-blue); color: #fff; }
.support-list, .support-messages, .support-form-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; }
.support-list-item { display: block; width: 100%; margin-bottom: 8px; padding: 12px; border: 1px solid transparent; border-radius: 12px; background: #f8fafc; text-align: left; }
.support-list-item:hover { border-color: #bfdbfe; }
.support-list-item__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.support-list-item__subject { min-width: 0; overflow: hidden; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.support-list-item__preview { margin-top: 5px; overflow: hidden; color: var(--c-text-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.support-status { display: inline-flex; margin-top: 8px; padding: 3px 8px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: 10px; font-weight: 800; }
.support-unread-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--c-red); }
.support-empty { padding: 48px 20px; text-align: center; color: var(--c-text-muted); }
.support-new { margin: 12px; padding: 11px 16px; border-radius: 999px; background: var(--c-blue); color: #fff; font-weight: 800; }
.support-field { display: block; margin-bottom: 14px; }
.support-field > span { display: block; margin-bottom: 5px; color: var(--c-text-muted); font-size: 12px; font-weight: 700; }
.support-field input, .support-field select, .support-field textarea { width: 100%; }
.support-upload { padding: 12px; border: 1px dashed #cbd5e1; border-radius: 12px; }
.support-help { display: block; margin-top: 4px; color: var(--c-text-muted); font-size: 10px; }
.support-submit { width: 100%; padding: 11px 16px; border-radius: 999px; background: var(--c-blue); color: #fff; font-weight: 800; }
.support-submit:disabled { opacity: .5; cursor: not-allowed; }
.support-error { margin: 10px 12px 0; padding: 9px 11px; border: 1px solid #fecaca; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: 12px; }
.support-message { display: flex; margin-bottom: 12px; }
.support-message.mine { justify-content: flex-end; }
.support-bubble { max-width: 88%; padding: 10px 12px; border: 1px solid var(--c-border); border-radius: 15px 15px 15px 4px; background: #fff; font-size: 13px; }
.support-message.mine .support-bubble { border: none; border-radius: 15px 15px 4px 15px; background: var(--c-blue); color: #fff; }
.support-bubble__sender { margin-bottom: 3px; color: var(--c-blue); font-size: 10px; font-weight: 800; }
.support-bubble__time { margin-top: 5px; color: var(--c-text-muted); font-size: 9px; }
.support-message.mine .support-bubble__time { color: rgba(255,255,255,.7); }
.support-attachments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 7px; }
.support-attachment { overflow: hidden; border-radius: 8px; background: rgba(255,255,255,.2); }
.support-attachment img { display: block; width: 100%; max-height: 160px; object-fit: cover; }
.support-attachment span { display: block; overflow: hidden; padding: 4px 6px; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.support-reply { padding: 10px 12px; border-top: 1px solid var(--c-border); background: #fff; }
.support-reply textarea { width: 100%; resize: none; }
.support-reply__actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; }
.support-resolve { color: var(--c-text-muted); font-size: 11px; font-weight: 700; }
.back-to-top { position: fixed; right: 24px; bottom: 84px; z-index: 50; display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--c-border); border-radius: 999px; background: #fff; color: var(--c-blue); font-size: 20px; font-weight: 900; box-shadow: var(--shadow-card-hover); opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0); }

@media (max-width: 1024px) and (min-width: 769px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .store-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .header-top {
    flex-wrap: wrap;
    padding: 10px 12px;
    gap: 10px;
  }

  .logo {
    order: 1;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
  }

  .session-chip {
    display: none;
  }

  .search-bar {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .search-bar select {
    display: none;
  }

  .search-bar input {
    min-width: 0;
    width: 100%;
  }

  .search-bar button {
    flex: 0 0 auto;
    padding: 8px 14px;
  }

  .nav-bar {
    padding: 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nav-bar::-webkit-scrollbar {
    display: none;
  }

  .nav-bar a {
    padding: 8px 14px;
    font-size: 13px;
  }

  .container {
    padding: 0 10px;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-img {
    height: 140px;
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .ranking-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .store-grid {
    grid-template-columns: 1fr;
  }

  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .order-detail-grid {
    grid-template-columns: 1fr;
  }

  .gallery-lightbox {
    padding: 12px;
  }

  .gallery-lightbox-card {
    padding: 14px;
    border-radius: 18px;
  }

  .gallery-controls {
    width: 100%;
    justify-content: flex-end;
  }

  .search-layout {
    grid-template-columns: 1fr;
  }

  .filter-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    border-radius: 0;
    overflow-y: auto;
  }

  .filter-close-btn { position: sticky; top: 8px; z-index: 2; display: inline-flex; float: right; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 999px; background: var(--c-bg); }
  .filter-backdrop { position: fixed; inset: 0; z-index: 99; background: rgba(15,23,42,.45); }
  .filter-backdrop.open { display: block; }

  .filter-sidebar.open {
    display: block;
  }

  .filter-toggle-btn {
    display: block;
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }

  .account-layout {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .account-menu {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: 4px;
    padding: 4px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent 100%);
  }

  .account-menu-wrap {
    position: static;
    padding: 0 4px 7px;
    overflow: hidden;
    border-radius: var(--radius-card);
    background: var(--c-white);
    box-shadow: var(--shadow-card);
  }

  .account-menu-wrap .account-menu {
    padding-inline: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .account-menu-scrollbar {
    display: block;
    position: relative;
    height: 6px;
    margin: 3px 4px 0;
    overflow: hidden;
    border-radius: 999px;
    background: var(--c-pale-green);
  }

  .account-menu-scrollbar-thumb {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--c-mid-green);
    transform: translateX(0);
    transition: width 0.15s ease;
    will-change: width, transform;
  }

  .account-menu::-webkit-scrollbar { display: none; width: 0; height: 0; }

  .account-menu a,
  .account-menu button {
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 13px;
  }

  .account-section {
    padding: 20px 14px;
    overflow: hidden;
  }

  .favorite-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .account-section form > div[style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .main-banner {
    padding: 28px 20px;
  }

  .main-banner h2 {
    font-size: 20px;
  }

  .main-banner p {
    font-size: 13px;
  }

  .auth-card {
    margin: 20px 10px;
    padding: 28px 20px;
  }

  .category-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .order-table {
    font-size: 12px;
  }

  .order-table th, .order-table td {
    padding: 8px 6px;
  }

  .support-fab { right: 12px; bottom: 12px; min-width: 48px; padding: 0 14px; }
  .support-panel { inset: 8px; width: auto; height: auto; border-radius: 14px; }
  .support-page { min-height: 70vh; }
  .back-to-top { right: 14px; bottom: 72px; }
}
