/*
Theme Name: Franchise Clone
Description: 仿 WooTea 加盟網站主題
Version: 1.0
Author: Custom
*/

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

body {
  font-family: 'Noto Sans TC', '微軟正黑體', Arial, sans-serif;
  color: #222;
  background: #fff;
  font-size: 16px;
  line-height: 1.6;
}

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

img {
  max-width: 100%;
  display: block;
}

/* ===== TOP BAR ===== */
.top-bar {
  background: #222;
  color: #fff;
  text-align: right;
  padding: 8px 40px;
  font-size: 13px;
}

.top-bar a {
  color: #fff;
  margin-left: 24px;
  letter-spacing: 1px;
  transition: opacity 0.2s;
}

.top-bar a:hover {
  opacity: 0.7;
}

/* ===== HEADER / NAV ===== */
header.site-header {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
}

.site-logo a {
  display: block;
}

.site-logo img {
  height: 80px;
  width: auto;
  display: block;
  object-fit: contain;
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
}

nav.main-nav ul li a {
  font-size: 14px;
  letter-spacing: 1px;
  color: #333;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

nav.main-nav ul li a:hover {
  color: #8B6914;
  border-bottom-color: #8B6914;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: #222;
  display: block;
}

/* ===== HERO SLIDER ===== */
.hero-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f5f0e8;
}

.slides {
  display: flex;
  transition: transform 0.6s ease;
}

.slide {
  min-width: 100%;
  position: relative;
}

.slide-bg {
  width: 100%;
  height: 580px;
  object-fit: cover;
  background: linear-gradient(135deg, #f5f0e8 0%, #e8dcc8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}

.slide-content {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  color: #fff;
  z-index: 1;
}

.slide-content h1 {
  font-size: 52px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.slide-content p {
  font-size: 18px;
  color: rgba(255,255,255,0.9);
  margin-bottom: 28px;
  letter-spacing: 1px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.btn-primary {
  display: inline-block;
  background: #8B6914;
  color: #fff;
  padding: 14px 36px;
  font-size: 15px;
  letter-spacing: 2px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #6d520f;
}

.btn-outline {
  display: inline-block;
  border: 2px solid #222;
  color: #222;
  padding: 12px 34px;
  font-size: 15px;
  letter-spacing: 2px;
  margin-left: 12px;
  transition: background 0.2s, color 0.2s;
}

.btn-outline:hover {
  background: #222;
  color: #fff;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: none;
  width: 48px;
  height: 48px;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}

.slider-arrow:hover {
  background: #fff;
}

.slider-arrow.prev { left: 20px; }
.slider-arrow.next { right: 20px; }

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.slider-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.2s;
}

.slider-dots span.active {
  background: #8B6914;
}

/* ===== SECTION COMMON ===== */
section {
  padding: 80px 40px;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 3px;
  margin-bottom: 12px;
}

.section-header p {
  color: #666;
  font-size: 16px;
  letter-spacing: 1px;
}

.section-divider {
  text-align: center;
  margin: 12px 0 32px;
  color: #8B6914;
  font-size: 20px;
  letter-spacing: 8px;
}

/* ===== PRODUCTS SECTION ===== */
.products-section {
  background: #fafafa;
}

.products-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.product-card {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.product-img {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #f5f0e8;
}

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

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

.product-info {
  padding: 16px;
}

.product-badge {
  display: inline-block;
  background: #8B6914;
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.product-info h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.4;
}

/* ===== FEATURES SECTION ===== */
.features-section {
  background: #fff;
}

.features-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px 24px;
  text-align: center;
}

.feature-item {
  padding: 16px;
}

.feature-icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 16px;
  border: 3px solid #e8dcc8;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-item:hover .feature-icon {
  transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(139,105,20,0.2);
}

.feature-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-item h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.6;
  color: #333;
}

/* ===== FRANCHISE SECTION ===== */
.franchise-section {
  background: #2c2c2c;
  color: #fff;
  text-align: center;
}

.franchise-section .section-header h2 {
  color: #fff;
}

.franchise-section .section-header p {
  color: #bbb;
}

.franchise-steps {
  max-width: 1000px;
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  position: relative;
}

.franchise-steps::before {
  content: '';
  position: absolute;
  top: 36px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #8B6914;
}

.step-item {
  text-align: center;
  position: relative;
}

.step-num {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #8B6914;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  position: relative;
  z-index: 1;
}

.step-item h3 {
  font-size: 14px;
  letter-spacing: 1px;
  line-height: 1.5;
  color: #ddd;
}

/* ===== NEWS SECTION ===== */
.news-section {
  background: #f8f6f2;
}

.news-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.news-card {
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.2s;
}

.news-card:hover {
  transform: translateY(-4px);
}

.news-img {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #f0ebe0;
}

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

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

.news-body {
  padding: 20px;
}

.news-date {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.news-body h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.5px;
}

/* ===== LOCATIONS SECTION ===== */
.locations-section {
  background: #fff;
  text-align: center;
}

.locations-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.location-item {
  padding: 32px 20px;
  border: 1px solid #eee;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.location-item:hover {
  border-color: #8B6914;
  box-shadow: 0 4px 16px rgba(139,105,20,0.1);
}

.location-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.location-item h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.location-item p {
  font-size: 13px;
  color: #888;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
  background: #f8f6f2;
}

.contact-inner {
  max-width: 700px;
  margin: 0 auto;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #8B6914;
}

.contact-form textarea {
  height: 130px;
  resize: vertical;
}

.contact-form button {
  width: 100%;
  padding: 16px;
  background: #8B6914;
  color: #fff;
  border: none;
  font-size: 16px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background 0.2s;
}

.contact-form button:hover {
  background: #6d520f;
}

/* ===== FOOTER ===== */
footer.site-footer {
  background: #111;
  color: #aaa;
  padding: 48px 40px 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand .site-logo {
  color: #fff;
  margin-bottom: 16px;
  font-size: 22px;
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.8;
  color: #888;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  background: #333;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s;
  border-radius: 50%;
}

.footer-social a:hover {
  background: #8B6914;
}

.footer-col h4 {
  color: #fff;
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #888;
  font-size: 13px;
  transition: color 0.2s;
  letter-spacing: 0.5px;
}

.footer-col ul li a:hover {
  color: #8B6914;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #555;
  letter-spacing: 1px;
}

/* ===== NEWS POPUP ===== */
.news-card {
  cursor: pointer;
}

.news-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.news-popup-overlay.open {
  display: flex;
}

.news-popup {
  background: #fff;
  max-width: 560px;
  width: 100%;
  position: relative;
  animation: popupIn 0.25s ease;
}

@keyframes popupIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.news-popup img {
  width: 100%;
  display: block;
  max-height: 70vh;
  object-fit: contain;
  background: #f5f0e8;
}

.news-popup-title {
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #222;
  text-align: center;
}

.news-popup-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #222;
  color: #fff;
  border: none;
  font-size: 14px;
  cursor: pointer;
  z-index: 1;
  transition: background 0.2s;
}

.news-popup-close:hover {
  background: #8B6914;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 44px;
  height: 44px;
  background: #8B6914;
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  transition: background 0.2s;
}

.back-to-top.show {
  display: flex;
}

.back-to-top:hover {
  background: #6d520f;
}

/* ===== MOBILE ===== */
@media (max-width: 900px) {
  .header-inner { padding: 14px 20px; }
  nav.main-nav { display: none; }
  nav.main-nav.open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-top: 1px solid #eee; padding: 20px; }
  nav.main-nav.open ul { flex-direction: column; gap: 16px; }
  .hamburger { display: flex; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(4, 1fr); }
  .franchise-steps { grid-template-columns: repeat(3, 1fr); }
  .franchise-steps::before { display: none; }
  .news-grid { grid-template-columns: 1fr; }
  .locations-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .slide-content h1 { font-size: 32px; }
  .slide-bg { height: 400px; }
  section { padding: 60px 20px; }
  .top-bar { padding: 8px 20px; }
}

@media (max-width: 600px) {
  .products-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-icon { width: 100px; height: 100px; }
  .franchise-steps { grid-template-columns: repeat(2, 1fr); }
  .locations-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .slide-bg { height: 300px; }
  .slide-content h1 { font-size: 26px; }
}
