@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Noto+Sans+TC:wght@300;400;500;700;900&display=swap');

:root {
  --font-sans: 'Outfit', 'Noto Sans TC', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Color Palette */
  --primary-gradient: linear-gradient(135deg, #FF5A5F 0%, #FF8A00 100%);
  --primary: #FF5A5F;
  --primary-hover: #E11D48;
  --primary-light: #FFF1F2;
  
  --secondary: #6366F1;
  --secondary-hover: #4F46E5;
  
  --bg: #F8FAFC;
  --bg-gradient: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
  --surface: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.85);
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  
  --text: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  
  --danger: #EF4444;
  --warning: #F59E0B;
  --success: #10B981;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 20px rgba(255, 90, 95, 0.15);
  
  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
  100% { transform: translateY(0px); }
}

@keyframes pulse-slow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* Storefront Page Header */
.storefront-page {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 1)),
    radial-gradient(circle at 20% 0%, rgba(255, 90, 95, 0.08), transparent 30%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.storefront-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.storefront-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.storefront-logo .logo-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.storefront-logo strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  padding: 9px 12px;
  border-radius: 6px;
}

.site-nav a:hover {
  color: var(--text);
  background: #F1F5F9;
}

.admin-link {
  height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 0 16px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.admin-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Storefront Page Main Content */
.storefront-main {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 64px;
  flex-grow: 1;
}

/* Hero Section */
.storefront-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: end;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.5)),
    url('https://i.imgur.com/TotZP3U.jpeg');
  background-size: cover;
  background-position: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 430px;
  padding: 56px;
  text-align: left;
  margin-bottom: 36px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero-content {
  max-width: 680px;
}

.hero-kicker {
  color: #FBBF24;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-content h1 {
  font-size: 52px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0;
  color: #ffffff;
  margin-bottom: 16px;
}

.storefront-intro {
  color: rgba(255, 255, 255, 0.9);
  max-width: 620px;
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
}

.hero-button.primary {
  color: #0F172A;
  background: #ffffff;
  border-color: #ffffff;
}

.hero-panel {
  display: grid;
  gap: 0;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.hero-panel div {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.hero-panel div:last-child {
  border-bottom: 0;
}

.hero-panel strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 5px;
}

.hero-panel span {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.content-section {
  margin: 40px 0;
}

.storefront-main > .content-section {
  clear: both;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.section-kicker {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.section-heading h2 {
  font-size: 30px;
  line-height: 1.25;
  font-weight: 900;
}

.section-heading p:not(.section-kicker) {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.65;
  max-width: 660px;
  margin-top: 6px;
}

.section-link {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 12px;
  background: #ffffff;
}

.section-link:hover {
  color: var(--primary);
}

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
  align-items: stretch;
}

.activity-card,
.night-market-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.activity-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.activity-card:hover,
.night-market-card:hover {
  border-color: #94A3B8;
  box-shadow: var(--shadow-md);
}

.storefront-main .activity-card:first-child {
  grid-row: span 2;
}

.storefront-main .activity-card:first-child .activity-image {
  aspect-ratio: 16 / 11;
}

.storefront-main .activity-card:first-child .activity-title {
  font-size: 20px;
  min-height: 58px;
}

.storefront-main .activity-card:first-child .activity-body {
  padding: 20px;
}

.activity-image {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background: #E2E8F0;
  color: var(--text-muted);
  font-weight: 900;
  text-decoration: none;
  overflow: hidden;
}

.activity-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.activity-card:hover .activity-image img {
  transform: scale(1.04);
}

.activity-body {
  padding: 17px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.activity-meta,
.night-market-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}

.activity-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
  font-weight: 800;
  text-decoration: none;
}

.activity-title:hover {
  color: var(--primary);
}

.activity-body p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.compact-activity-grid .activity-card {
  position: relative;
}

.compact-activity-grid .activity-image {
  aspect-ratio: 16 / 9;
}

.compact-activity-grid .activity-body {
  padding: 14px 16px 16px;
  min-height: 112px;
}

.compact-activity-grid .activity-title {
  -webkit-line-clamp: 2;
}

.storefront-main .compact-activity-grid .activity-card:first-child {
  grid-column: auto;
  grid-row: auto;
}

.storefront-main .compact-activity-grid .activity-card:first-child .activity-image {
  aspect-ratio: 16 / 9;
}

.storefront-main .compact-activity-grid .activity-card:first-child .activity-title {
  font-size: 16px;
  min-height: 0;
}

.storefront-main .compact-activity-grid .activity-card:first-child .activity-body {
  padding: 14px 16px 16px;
}

.night-market-section {
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.night-market-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
  align-items: stretch;
}

.night-market-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 142px;
}

.night-market-card h3 {
  font-size: 16px;
  line-height: 1.35;
  margin-bottom: 8px;
}

.night-market-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.night-market-card h3 a:hover {
  color: var(--primary);
}

.night-market-card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.night-market-meta {
  margin: auto 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.night-market-meta a {
  color: #ffffff;
  background: var(--text);
  border-radius: 6px;
  padding: 6px 10px;
  text-decoration: none;
  white-space: nowrap;
}

.night-market-meta span {
  margin-right: auto;
}

.product-section {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  margin-top: 48px;
}

.article-main {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 40px 0 80px;
  flex-grow: 1;
}

.directory-main {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  padding: 40px 0 80px;
  flex-grow: 1;
}

.directory-header {
  padding: 34px 0 26px;
  border-bottom: 1px solid var(--line-strong);
  margin-bottom: 28px;
}

.directory-header h1 {
  font-size: 42px;
  line-height: 1.2;
  font-weight: 900;
  margin-bottom: 12px;
}

.directory-header p:not(.section-kicker) {
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.75;
  max-width: 760px;
}

.weekday-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.weekday-filter a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.weekday-filter a:hover,
.weekday-filter a.active {
  border-color: var(--text);
  background: var(--text);
  color: #ffffff;
}

.directory-grid {
  margin-top: 0;
}

.directory-main .activity-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.directory-main .activity-card:first-child {
  grid-row: auto;
}

.directory-main .activity-card:first-child .activity-image {
  aspect-ratio: 16 / 10;
}

.directory-main .activity-card:first-child .activity-title {
  font-size: 16px;
  min-height: 0;
}

.directory-main .activity-card:first-child .activity-body {
  padding: 17px;
}

.directory-main .night-market-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content-article {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  padding: 0;
  overflow: hidden;
}

.article-cover {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  background: #ffffff;
  display: block;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  padding: 40px;
  align-items: start;
}

.article-content {
  min-width: 0;
}

.article-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #F8FAFC;
}

.article-kicker {
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.content-article h1 {
  font-size: 40px;
  line-height: 1.35;
  font-weight: 900;
  margin-bottom: 20px;
}

.article-lead {
  color: #334155;
  font-size: 18px;
  line-height: 1.75;
  margin: 22px 0;
}

.article-facts {
  display: grid;
  gap: 10px;
  padding: 0;
}

.article-facts div {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.article-facts div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.article-facts dt {
  color: var(--text-muted);
  font-weight: 800;
}

.article-facts dd {
  margin: 0;
  color: var(--text);
}

.article-body {
  margin: 24px 0 32px;
}

.article-body p {
  color: #334155;
  font-size: 16px;
  line-height: 1.9;
  margin-bottom: 16px;
}

/* Search Form Control */
.front-controls {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 16px;
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: none;
  width: 100%;
  margin: 20px 0 0;
  text-align: left;
  transition: all var(--transition-normal);
}

.front-controls:focus-within {
  box-shadow: 0 0 0 3px rgba(255, 90, 95, 0.12);
  border-color: rgba(255, 90, 95, 0.35);
}

.front-controls label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 0;
  padding: 0;
}

.front-controls label span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 700;
  padding-left: 8px;
}

.front-controls input,
.front-controls select {
  background: transparent;
  border: 0;
  box-shadow: none;
  min-height: 38px;
  font-size: 15px;
  padding: 0 8px;
  font-weight: 600;
  width: 100%;
}

.front-controls input:focus,
.front-controls select:focus {
  border: 0;
  box-shadow: none;
}

.front-controls .front-search-label {
  border-right: 1px solid var(--line);
}

.front-controls .primary-button {
  border-radius: 6px;
  height: 44px;
  padding: 0 28px;
  font-size: 15px;
  background: var(--primary-gradient);
  box-shadow: none;
  transition: all var(--transition-fast);
}

.front-controls .primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 90, 95, 0.35);
}

/* Status & Refresh Row */
.front-status-row {
  min-height: 40px;
  margin: 16px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--surface);
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: none;
}

.request-state {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.request-state::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-light);
}

.request-state.loading {
  color: var(--secondary);
}

.request-state.loading::before {
  background: var(--secondary);
  animation: pulse-slow 1.5s infinite;
}

.request-state.error {
  color: var(--danger);
}

.request-state.error::before {
  background: var(--danger);
}

.request-state.ok {
  color: var(--success);
}

.request-state.ok::before {
  background: var(--success);
}

.front-refresh-info {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Product Grid */
.product-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform var(--transition-bounce), box-shadow var(--transition-normal), border-color var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl), 0 10px 30px -10px rgba(0,0,0,0.1);
  border-color: rgba(255, 90, 95, 0.25);
}

.product-image {
  aspect-ratio: 1 / 1;
  background: #F1F5F9;
  display: grid;
  place-items: center;
  color: var(--text-light);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.product-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 45px;
  transition: color var(--transition-fast);
}

.product-title:hover {
  color: var(--primary);
}

.product-meta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.product-meta span:first-child {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: #F1F5F9;
  padding: 4px 10px;
  border-radius: 20px;
}

.product-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: currentColor;
}

.front-load-more {
  margin-top: 40px;
  min-height: 48px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.front-load-more-link {
  color: #ffffff;
  background: var(--text);
  border-radius: 6px;
  padding: 10px 16px;
  text-decoration: none;
  font-weight: 900;
}

.front-load-more-link:hover {
  background: var(--primary);
}

.products-main .product-section {
  margin: 0;
}

.product-promo-section {
  margin-top: 28px;
}

.promo-product-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* Product Detail Page */
.product-detail-main {
  width: min(1000px, calc(100% - 48px));
  margin: 0 auto;
  padding: 40px 0 80px;
  flex-grow: 1;
}

/* Storefront Page Footer */
.storefront-footer {
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 24px 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.storefront-footer p {
  max-width: 800px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--primary);
}

.product-detail {
  display: grid;
  grid-template-columns: minmax(300px, 440px) 1fr;
  gap: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 40px;
  align-items: start;
}

.product-detail-media {
  aspect-ratio: 1 / 1;
  background: #F1F5F9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.product-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.product-detail-media img:hover {
  transform: scale(1.04);
}

.product-detail-content {
  display: flex;
  flex-direction: column;
}

.detail-category {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 14px;
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 20px;
  align-self: flex-start;
}

.product-detail-content h1 {
  font-size: 26px;
  line-height: 1.4;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
}

.detail-price {
  font-size: 32px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 24px;
  letter-spacing: 0;
  text-decoration: line-through;
  text-decoration-thickness: 3px;
  text-decoration-color: currentColor;
}

.detail-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 800;
}

.badge-rocket {
  background: #E0F2FE;
  color: #0284C7;
  border: 1px solid #BAE6FD;
}

.badge-free {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.product-detail-content p {
  font-size: 15px;
  line-height: 1.8;
  color: #475569;
  margin-bottom: 32px;
}

.detail-list {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  margin-bottom: 36px;
}

.detail-list div {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  font-size: 14px;
}

.detail-list dt {
  font-weight: 700;
  color: var(--text-muted);
}

.detail-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 500;
}

.detail-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 20px -5px rgba(255, 90, 95, 0.3);
  transition: all var(--transition-normal);
}

.detail-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(255, 90, 95, 0.4);
}

.detail-cta::after {
  content: " →";
  font-size: 18px;
  transition: transform var(--transition-fast);
}

.detail-cta:hover::after {
  transform: translateX(4px);
}

.product-detail-missing {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

.product-detail-missing h1 {
  font-size: 28px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.product-detail-missing p {
  margin-bottom: 32px;
}


/* Admin Console Shell Layout */
.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  background: #0F172A;
  color: #F8FAFC;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  border-right: 1px solid #1E293B;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(255, 90, 95, 0.25);
}

.brand-title {
  font-weight: 800;
  font-size: 18px;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.brand-subtitle {
  font-size: 12px;
  color: #64748B;
  margin-top: 2px;
}

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

.nav-button {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: #94A3B8;
  cursor: pointer;
  text-align: left;
  font-weight: 700;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.nav-button:hover {
  color: #F8FAFC;
  background: #1E293B;
}

.nav-button.active {
  color: #ffffff;
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(255, 90, 95, 0.2);
}

.status-block {
  margin-top: auto;
  padding: 16px;
  border: 1px solid #1E293B;
  background: #1E293B;
  border-radius: var(--radius-md);
}

.status-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #64748B;
  margin-bottom: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: #334155;
  font-size: 13px;
  font-weight: 700;
  color: #F1F5F9;
}

.status-pill.ready {
  background: #064E3B;
  color: #34D399;
}

.status-pill.missing {
  background: #7F1D1D;
  color: #F87171;
}

.status-note {
  color: #94A3B8;
  font-size: 12px;
  margin-top: 8px;
  font-family: monospace;
}

/* Workspace Console Panel */
.workspace {
  min-width: 0;
  padding: 40px;
  background: var(--bg-gradient);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}

.topbar h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}

.topbar p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

.topbar-actions {
  display: flex;
  gap: 12px;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
  transition: all var(--transition-fast);
}

.icon-button:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.tool-grid,
.stack-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  align-items: end;
}

.tool-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  box-shadow: none;
  border: 0;
  padding: 0;
}

.stack-form {
  display: grid;
  gap: 20px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

label span {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text);
  padding: 10px 16px;
  outline: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 90, 95, 0.15);
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

.check-row {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  min-height: 44px;
}

.check-row input {
  width: 20px;
  min-height: 20px;
  accent-color: var(--primary);
}

.primary-button {
  height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(255, 90, 95, 0.2);
  transition: all var(--transition-fast);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 90, 95, 0.3);
}

.primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.secondary-button {
  height: 42px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.secondary-button:hover {
  color: var(--text);
  border-color: var(--text-muted);
  background: #F8FAFC;
}

.output-section {
  margin-top: 32px;
  background: #0F172A;
  color: #38BDF8;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid #1E293B;
  overflow: hidden;
}

.output-header {
  background: #1E293B;
  min-height: 48px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #334155;
}

.output-header h2 {
  color: #F1F5F9;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

pre {
  margin: 0;
  padding: 20px;
  font-family: Menlo, Monaco, Consolas, "Fira Code", monospace;
  font-size: 13px;
  line-height: 1.6;
  max-height: 480px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Login Page Styling */
.login-page {
  background: radial-gradient(circle at 10% 20%, rgba(255, 90, 95, 0.05) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
              #0F172A;
  color: #F8FAFC;
  min-height: 100vh;
}

.login-shell {
  display: grid;
  place-items: center;
  padding: 40px 24px;
  min-height: 100vh;
}

.login-card {
  background: rgba(30, 41, 59, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid #334155;
  border-radius: var(--radius-xl);
  padding: 40px;
  width: min(440px, 100%);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login-card label span {
  color: #94A3B8;
}

.login-card input {
  background: #0F172A;
  border-color: #334155;
  color: #F8FAFC;
}

.login-card input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 90, 95, 0.15);
}

.login-brand {
  margin-bottom: 12px;
}

.login-brand .brand-title {
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
}

.login-brand .brand-subtitle {
  color: #64748B;
}

.login-message {
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  min-height: 20px;
}

/* Media Queries for Responsiveness */
@media (max-width: 940px) {
  .storefront-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .activity-grid,
  .directory-main .activity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .night-market-grid,
  .directory-main .night-market-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .promo-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel {
    max-width: 520px;
  }

  .article-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .article-sidebar {
    position: static;
  }

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 16px 24px;
    gap: 20px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    border-bottom: 1px solid #1E293B;
  }

  .nav {
    flex-direction: row;
    gap: 8px;
  }

  .nav-button {
    height: 38px;
    padding: 0 12px;
  }

  .status-block {
    display: none;
  }

  .workspace {
    padding: 24px;
  }

  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .storefront-header {
    padding: 16px 24px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
  }

  .storefront-hero {
    padding: 48px 24px;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .front-controls {
    grid-template-columns: 1fr;
    border-radius: var(--radius-lg);
    padding: 20px;
  }

  .front-controls .front-search-label {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
  }

  .front-controls label {
    margin-bottom: 8px;
  }

  .activity-grid,
  .night-market-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .storefront-main .activity-card:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
  }

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

  .content-article {
    padding: 0;
  }

  .content-article h1 {
    font-size: 28px;
  }

  .article-layout {
    padding: 24px;
  }

  .article-facts div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (max-width: 620px) {
  .sidebar {
    flex-direction: column;
    height: auto;
    align-items: stretch;
  }

  .brand {
    justify-content: center;
  }

  .nav {
    justify-content: center;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

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

  .storefront-main {
    width: min(100% - 28px, 1200px);
    padding-top: 24px;
  }

  .storefront-hero {
    padding: 30px 20px;
  }

  .hero-content h1 {
    font-size: 31px;
  }

  .storefront-intro {
    font-size: 16px;
    line-height: 1.7;
  }

  .hero-panel {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-button {
    width: 100%;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .activity-grid,
  .night-market-grid,
  .promo-product-grid,
  .directory-main .activity-grid,
  .directory-main .night-market-grid {
    grid-template-columns: 1fr;
  }

  .night-market-section {
    padding: 18px;
  }

  .product-section {
    padding: 18px;
  }

  .article-main {
    width: min(100% - 28px, 920px);
    padding-top: 24px;
  }

  .directory-main {
    width: min(100% - 28px, 1200px);
    padding-top: 20px;
  }

  .directory-header h1 {
    font-size: 32px;
  }

  .article-layout {
    padding: 20px;
  }

  .nav-button span:not(.icon) {
    display: none;
  }

  .nav-button {
    width: auto;
    justify-content: center;
  }
}
