:root {
  /* Colors */
  --primary-color: #1a3a5c;
  --primary-dark: #0f2438;
  --secondary-color: #d4a574;
  --accent-color: #e67e22;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  --bg-light: #f8f9fa;
  --bg-cream: #faf6f1;
  --white: #ffffff;
  --border-color: #e0e0e0;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 4rem;

  /* Typography */
  --font-family: "Noto Sans TC", sans-serif;
  --font-size-base: 16px;
  --font-size-sm: 14px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  --font-size-2xl: 32px;
  --font-size-3xl: 48px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Header */
.header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--primary-color);
}

.logo img {
  width: 50px;
  height: 50px;
  border-radius: 8px;
}

.cart-toggle {
  position: relative;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: var(--spacing-sm);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-toggle:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--accent-color);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 20px;
  text-align: center;
}

/* Hero Section */
.hero {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: var(--white);
  padding: var(--spacing-xl) 0;
  text-align: center;
}

.hero-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.badge-item {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: var(--font-size-sm);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-lg);
  opacity: 0.95;
  line-height: 1.8;
}

.cta-button {
  display: inline-block;
  background: var(--accent-color);
  color: var(--white);
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-md);
}

.cta-button:hover {
  background: #d35400;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Section Title */
.section-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-lg);
  color: var(--primary-color);
}

/* Features Section */
.features {
  padding: var(--spacing-xl) 0;
  background: var(--bg-light);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-md);
}

.feature-card {
  background: var(--white);
  padding: var(--spacing-lg);
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  margin: 0 auto var(--spacing-md);
}

.feature-card h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-sm);
  color: var(--primary-color);
}

.feature-card p {
  color: var(--text-light);
}

/* Story Section */
.story {
  padding: var(--spacing-xl) 0;
}

.story-light {
  background: var(--bg-cream);
}

.story-dark {
  background: var(--primary-color);
  color: var(--white);
}

.story-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  align-items: center;
}

.story-content.reverse {
  direction: rtl;
}

.story-content.reverse > * {
  direction: ltr;
}

.story-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.story-text h2 {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--spacing-md);
  line-height: 1.3;
}

.story-text p {
  margin-bottom: var(--spacing-md);
  line-height: 1.8;
}

.story-dark .story-text h2,
.story-dark .story-text p {
  color: var(--white);
}

.highlight {
  font-weight: 600;
  font-size: var(--font-size-lg);
  color: var(--accent-color);
}

.story-dark .highlight {
  color: var(--secondary-color);
}

.hashtags {
  color: var(--secondary-color);
  font-size: var(--font-size-sm);
  font-style: italic;
}

/* Products Section */
.products {
  padding: var(--spacing-xl) 0;
  background: var(--bg-light);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--spacing-md);
}

.product-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  border: 1px solid var(--border-color);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--secondary-color);
}

.product-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.product-info {
  padding: var(--spacing-md);
}

.product-name {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--primary-color);
}

.product-price {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: var(--spacing-md);
}

.add-to-cart {
  width: 100%;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.add-to-cart:hover {
  background: var(--primary-dark);
}

.add-to-cart:active {
  transform: scale(0.98);
}

/* Contact Section */
.contact {
  padding: var(--spacing-xl) 0;
  background: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.contact-item {
  text-align: center;
  padding: var(--spacing-md);
}

.contact-icon {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--spacing-md);
}

.contact-item h3 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--spacing-sm);
  color: var(--primary-color);
}

.contact-item p {
  color: var(--text-light);
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.social-link {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-md);
  background: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: 20px;
  font-size: var(--font-size-sm);
  transition: var(--transition-fast);
}

.social-link:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: var(--white);
  text-align: center;
  padding: var(--spacing-md) 0;
}

/* Shopping Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: right var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.cart-header h3 {
  font-size: var(--font-size-xl);
  color: var(--primary-color);
}

.cart-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
  color: var(--text-light);
  transition: var(--transition-fast);
}

.cart-close:hover {
  color: var(--text-dark);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md);
}

.cart-item {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--primary-color);
}

.cart-item-price {
  color: var(--accent-color);
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.quantity-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-color);
  background: var(--white);
  border-radius: 4px;
  cursor: pointer;
  font-size: var(--font-size-lg);
  transition: var(--transition-fast);
}

.quantity-btn:hover {
  background: var(--bg-light);
}

.quantity {
  min-width: 30px;
  text-align: center;
  font-weight: 600;
}

.remove-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: var(--font-size-sm);
  transition: var(--transition-fast);
}

.remove-btn:hover {
  color: #e74c3c;
}

.cart-empty {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--text-light);
}

.cart-footer {
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-md);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-lg);
  font-weight: 700;
}

.total-price {
  color: var(--accent-color);
}

.checkout-button {
  width: 100%;
  background: var(--accent-color);
  color: var(--white);
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-size: var(--font-size-lg);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.checkout-button:hover {
  background: #d35400;
}

.checkout-button:disabled {
  background: var(--text-light);
  cursor: not-allowed;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Order Summary Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-normal);
  padding: var(--spacing-md);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--white);
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  border-bottom: 2px solid var(--border-color);
  background: var(--bg-light);
}

.modal-header h3 {
  font-size: var(--font-size-xl);
  color: var(--primary-color);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
  color: var(--text-light);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--text-dark);
  transform: rotate(90deg);
}

.modal-body {
  padding: var(--spacing-md);
  max-height: 60vh;
  overflow-y: auto;
}

.copy-success {
  background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
  color: var(--white);
  padding: var(--spacing-md);
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-sm);
}

.order-summary {
  background: var(--bg-light);
  padding: var(--spacing-md);
  border-radius: 8px;
  margin-bottom: var(--spacing-md);
}

.order-item {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border-color);
}

.order-item:last-child {
  border-bottom: none;
  padding-top: var(--spacing-md);
  margin-top: var(--spacing-sm);
  font-weight: 700;
  font-size: var(--font-size-lg);
  color: var(--primary-color);
}

.order-item-name {
  color: var(--text-dark);
}

.order-item-price {
  color: var(--accent-color);
  font-weight: 600;
}

.modal-instructions {
  text-align: center;
  color: var(--text-light);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
  border-top: 2px solid var(--border-color);
  background: var(--bg-light);
}

.modal-button {
  flex: 1;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-button.secondary {
  background: var(--white);
  color: var(--text-dark);
  border: 2px solid var(--border-color);
}

.modal-button.secondary:hover {
  background: var(--bg-light);
  border-color: var(--text-light);
}

.modal-button.primary {
  background: var(--accent-color);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.modal-button.primary:hover {
  background: #d35400;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.modal-button:active {
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: var(--font-size-2xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-base);
  }

  .section-title {
    font-size: var(--font-size-xl);
  }

  .story-content {
    grid-template-columns: 1fr;
  }

  .story-content.reverse {
    direction: ltr;
  }

  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .modal-content {
    max-width: 100%;
    margin: var(--spacing-sm);
  }

  .modal-footer {
    flex-direction: column;
    padding-bottom: calc(
      var(--spacing-md) + 60px
    ); /* Extra space for mobile nav / safe area */
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }

  .logo span {
    font-size: var(--font-size-base);
  }

  .hero {
    padding: var(--spacing-md) 0;
  }

  .features,
  .story,
  .products,
  .contact {
    padding: var(--spacing-md) 0;
  }

  .modal-overlay {
    padding: var(--spacing-sm);
  }
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: 900;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--accent-color);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Loading Skeleton */
.skeleton {
  background: #f0f0f0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.product-skeleton {
  height: 400px;
  border-radius: 12px;
  margin-bottom: var(--spacing-md);
}

/* Cart Icon Pulse */
@keyframes pulse-cart {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.cart-toggle.pulse {
  animation: pulse-cart 0.4s ease-out;
}

/* Testimonials */
.testimonials {
  padding: var(--spacing-xl) 0;
  background: var(--bg-cream);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
}

.testimonial-card {
  background: var(--white);
  padding: var(--spacing-lg);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  position: relative;
}

.testimonial-card::before {
  content: "“";
  position: absolute;
  top: 10px;
  left: 20px;
  font-size: 60px;
  color: var(--secondary-color);
  opacity: 0.2;
  font-family: serif;
}

.testimonial-text {
  font-style: italic;
  color: var(--text-dark);
  position: relative;
  z-index: 1;
}

.testimonial-author {
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.testimonial-stars {
  color: #f1c40f;
}

/* FAQ Section */
.faq {
  padding: var(--spacing-xl) 0;
  background: var(--white);
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-sm) 0;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  padding: var(--spacing-md) 0;
  text-align: left;
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--primary-color);
  cursor: pointer;
  transition: var(--transition-fast);
}

.faq-question:hover {
  color: var(--accent-color);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  color: var(--text-light);
  line-height: 1.8;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding-bottom: var(--spacing-md);
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Mobile Bottom Navigation */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--white);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  display: none;
  grid-template-columns: repeat(3, 1fr);
  z-index: 999;
  padding: var(--spacing-xs) 0;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-dark);
  font-size: 10px;
  gap: 2px;
}

.mobile-nav-item svg {
  color: var(--primary-color);
}

.mobile-nav-item.highlight svg {
  color: var(--accent-color);
}

@media (max-width: 768px) {
  .mobile-nav {
    display: grid;
  }

  body {
    padding-bottom: 60px; /* Space for mobile nav */
  }

  .back-to-top {
    bottom: 5rem; /* Lift above mobile nav */
  }
}

/* Product Badges */
.product-card {
  position: relative;
}

.product-label {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent-color);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}

.product-label.hot {
  background: #e74c3c;
}

.product-label.new {
  background: #27ae60;
}
