/* 弄茶閣 - 響應式樣式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #fbd106;
  --primary-dark: #e6c200;
  --text: #333;
  --text-light: #666;
  --bg: #f9f9f9;
  --white: #fff;
  --red: #e74c3c;
  --green: #27ae60;
  --shadow: 0 2px 8px rgba(0,0,0,0.1);
  --radius: 8px;
}

html { font-size: 16px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans TC', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Header */
.header {
  background: var(--white);
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text);
}

.nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav a {
  font-size: 0.95rem;
  color: var(--text-light);
  transition: color 0.2s;
}

.nav a:hover { color: var(--text); }

.nav-btn {
  background: var(--primary);
  color: #333;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid #eee;
  padding: 16px;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
}

.mobile-menu a {
  padding: 10px 0;
  color: var(--text);
  font-weight: 500;
}

/* Top Banner */
.top-banner {
  background: #fff7e6;
  padding: 12px 0;
  border-bottom: 1px solid #ffe08a;
}

.top-banner .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.banner-text {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag {
  background: var(--primary);
  color: #333;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: bold;
}

.line-id {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
}

.banner-actions {
  display: flex;
  gap: 8px;
}

.btn-outline {
  border: 1px solid #ddd;
  background: var(--white);
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-yellow {
  background: var(--primary);
  color: #333;
  border: none;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #333;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.btn-line {
  background: #00c300;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-line i { color: var(--primary); }

/* Auth Page */
.auth-page {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.auth-card {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-header h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
}

.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

/* Product Detail */
.product-detail {
  padding: 24px 0;
}

.product-images {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.main-image {
  width: 100%;
  height: 400px;
  background: #eee;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.thumb-list img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.6;
}

.thumb-list img:hover { opacity: 1; }

.product-info {
  margin-top: 24px;
}

.product-header {
  margin-bottom: 16px;
}

.product-header h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.product-meta {
  display: flex;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.divider { color: #ccc; }

.product-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-light);
}

.price-section h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.price-list {
  margin-bottom: 16px;
}

.price-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.service-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.service-tags .tag {
  font-size: 0.8rem;
  padding: 4px 10px;
  border: 1px solid #ddd;
  border-radius: 12px;
  color: var(--text-light);
}

.services-section h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.service-item {
  font-size: 0.85rem;
  padding: 8px;
  background: var(--white);
  border: 1px solid #eee;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-light);
}

.reviews-section {
  margin-top: 32px;
}

.reviews-section h3 {
/* Admin Layout */
.admin-header { background: var(--white); }

.admin-layout {
  display: flex;
  gap: 0;
}

.admin-sidebar {
  width: 240px;
  background: #2c3e50;
  color: #fff;
  min-height: calc(100vh - 60px);
}

.admin-sidebar .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  color: #bdc3c7;
  border-bottom: 1px solid #34495e;
  transition: background 0.2s;
}

.admin-sidebar .nav-item:hover,
.admin-sidebar .nav-item.active {
  background: #34495e;
  color: #fff;
}

.admin-sidebar .nav-item i { width: 20px; }

.admin-content {
  flex: 1;
  padding: 24px;
  background: var(--bg);
  min-height: calc(100vh - 60px);
}

.admin-section h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--white);
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.stat-label {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-top: 6px;
}

.admin-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.admin-table th,
.admin-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.admin-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: var(--text-light);
}

.status-active { color: var(--green); }
.status-inactive { color: var(--text-light); }
.status-out_of_stock { color: var(--red); }

.upload-card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 500px;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content h3 {
  margin-bottom: 20px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
}
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.reviews-grid img {
  width: 100%;
/* RWD */
@media (max-width: 768px) {
  html { font-size: 14px; }

  .nav { display: none; }
  .mobile-menu-btn { display: block; }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .main-image { height: 300px; }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    min-height: auto;
  }

  .admin-content {
    padding: 16px;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-table {
    font-size: 0.85rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 8px 12px;
  }

  .top-banner .container {
    flex-direction: column;
    align-items: flex-start;
  }

  .banner-actions { width: 100%; }
  .banner-actions button { flex: 1; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 16px; }
  .modal-content { padding: 16px; margin: 16px; }
}
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  background: #eee;
}

/* FAQ Page */
.faq-page {
  padding: 24px 0;
}

.page-title {
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.faq-item {
  background: var(--white);
  border: 1px solid #eee;
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
}

.faq-question i {
  transition: transform 0.2s;
}

.faq-answer {
  padding: 0 16px 16px;
  display: none;
}

.faq-answer p {
  color: var(--text-light);
  font-size: 0.95rem;
}
.btn-sm {
  padding: 4px 10px;
  font-size: 0.85rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

.btn-sm.btn-danger { background: var(--red); color: #fff; }

/* Section Title */
.section-title {
  font-size: 1.25rem;
  margin: 24px 0 16px;
  font-weight: 700;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1px solid #ddd;
  background: var(--white);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
}

.filter-btn.active {
  background: var(--primary);
  color: #333;
  border-color: var(--primary);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.product-card:hover { transform: translateY(-4px); }

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.product-card-content {
  padding: 12px;
}

.product-card-content h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  font-weight: 600;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.price {
  font-weight: 700;
  color: var(--red);
}

.status-tag {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: #eee;
  color: var(--text);
}

.no-products {
  text-align: center;
  padding: 40px;
  color: var(--text-light);
}

/* Footer */
.footer {
  background: var(--white);
  border-top: 1px solid #eee;
  padding: 24px 0;
  margin-top: 40px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-light);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  margin-right: 16px;
  color: var(--text-light);
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
