/* ==========================================================================
   PRINCESS CASTLE - LUXURY PINK & GOLD THEME
   ========================================================================== */

:root {
  --primary-pink: #F8E3E8;
  --soft-pink: #FFF5F7;
  --deep-pink: #D47A94;
  --accent-gold: #D4AF37;
  --light-gold: #F3E5AB;
  --dark-gold: #AA820A;
  --text-main: #3D2B33;
  --text-muted: #7E6B74;
  --white: #FFFFFF;
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: rgba(212, 175, 55, 0.25);
  --gold-gradient: linear-gradient(135deg, #D4AF37 0%, #F6E27A 50%, #CB9B21 100%);
  --pink-gradient: linear-gradient(135deg, #FFF0F5 0%, #FCE4EC 100%);
  --shadow-luxury: 0 10px 30px rgba(212, 122, 148, 0.15);
  --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* 預防任何水平卷軸並美化垂直卷軸 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important; /* 確保無下方水平卷軸 */
  font-family: 'Playfair Display', 'Noto Serif TC', 'PingFang TC', 'Microsoft JhengHei', serif, sans-serif;
  color: var(--text-main);
  background-color: var(--soft-pink);
  scroll-behavior: smooth;
}

/* 時尚簡約客製右側卷軸 */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: #FCE8EE;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #D4AF37, #D47A94);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #AA820A, #B35471);
}

/* ==========================================================================
   NAVIGATION BAR (固定頂部、毛玻璃奢華金邊)
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 12px 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 245, 247, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.08);
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  padding: 8px 35px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 25px rgba(212, 122, 148, 0.12);
}

/* Logo */
.logo-container {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 10px;
}
.logo-svg {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 2px 4px rgba(212, 175, 55, 0.4));
  transition: transform 0.4s ease;
}
.logo-container:hover .logo-svg {
  transform: scale(1.08) rotate(-3deg);
}
.brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #B35471, #AA820A);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}

/* Menu Items */
.nav-menu {
  display: flex;
  list-style: none;
  gap: 6px;
  align-items: center;
}

.nav-link {
  position: relative;
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 20px;
  transition: var(--transition-smooth);
  display: inline-block;
  overflow: hidden;
}

/* 動態滑鼠懸停光澤按鈕效果 */
.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.25), transparent);
  transition: 0.5s;
}

.nav-link:hover::before {
  left: 100%;
}

.nav-link:hover {
  color: #B35471;
  background: rgba(248, 227, 232, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 122, 148, 0.15);
}

.nav-link.active {
  background: var(--gold-gradient);
  color: #2c1b21;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(212, 175, 55, 0.35);
}

/* Right Function Icons */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-btn {
  background: var(--white);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.action-btn:hover {
  background: var(--gold-gradient);
  color: #fff;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #D47A94;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: bold;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
}

/* ==========================================================================
   HERO FULLSCREEN SLIDER
   ========================================================================== */
.hero-section {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.slider-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease-in-out, transform 8s ease;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
}

.slide.active {
  opacity: 1;
  transform: scale(1);
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(20, 10, 15, 0.35) 0%, rgba(20, 10, 15, 0.6) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
}

.hero-content {
  max-width: 850px;
  color: #FFFFFF;
  animation: fadeInUp 1s ease forwards;
}

.hero-subtitle {
  font-size: 1.15rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--light-gold);
  margin-bottom: 12px;
}

.hero-title {
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 30px;
}

.hero-btn {
  display: inline-block;
  padding: 14px 38px;
  background: var(--gold-gradient);
  color: #2D1A22;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 1px;
  border-radius: 30px;
  border: 1px solid var(--light-gold);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
  transition: var(--transition-smooth);
}

.hero-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.6);
  background: #FFFFFF;
  color: #AA820A;
}

/* Slider Controls */
.slider-dots {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid rgba(212, 175, 55, 0.6);
}

.dot.active {
  width: 32px;
  border-radius: 8px;
  background: var(--gold-gradient);
}

/* ==========================================================================
   SHARED SECTION STYLES
   ========================================================================== */
.section {
  padding: 85px 5% 70px;
  position: relative;
}

.section-alt {
  background: linear-gradient(180deg, #FFF5F7 0%, #FDEDF2 100%);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
}

.section-tag {
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--dark-gold);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.3rem;
  color: var(--text-main);
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
  font-weight: 700;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: var(--gold-gradient);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 14px;
}

/* ==========================================================================
   1. 今日特惠 (DAILY DEALS) & CARDS
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px;
}

.product-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.18);
  box-shadow: var(--shadow-luxury);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(212, 122, 148, 0.22);
  border-color: var(--accent-gold);
}

.card-img-wrap {
  width: 100%;
  height: 240px;
  overflow: hidden;
  position: relative;
  background: #f8f8f8;
}

.card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.card-badge-sale {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #E65C83, #D47A94);
  color: #fff;
  font-size: 0.78rem;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

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

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-main);
  line-height: 1.4;
}

.price-box {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.current-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #B35471;
}

.original-price {
  font-size: 0.85rem;
  color: #aaa;
  text-decoration: line-through;
}

.add-cart-btn {
  width: 100%;
  padding: 10px;
  background: var(--soft-pink);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.add-cart-btn:hover {
  background: var(--gold-gradient);
  color: #2D1A22;
  border-color: var(--accent-gold);
}

/* ==========================================================================
   2. 熱銷商品 (HOT SALES & RANKING)
   ========================================================================== */
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #2D1A22;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(212, 175, 55, 0.4);
  z-index: 2;
}

.sales-tag {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ==========================================================================
   3. 品牌旗艦 (BRAND FLAGSHIP)
   ========================================================================== */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.brand-card {
  background: #FFF;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: var(--shadow-luxury);
  transition: var(--transition-smooth);
}

.brand-card:hover {
  transform: translateY(-6px);
}

.brand-banner {
  height: 160px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 15px;
}

.brand-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.brand-heading {
  position: relative;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-content {
  padding: 20px;
}

.brand-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.brand-products {
  display: flex;
  gap: 12px;
}

.brand-prod-item {
  flex: 1;
  background: var(--soft-pink);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.brand-prod-item img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 6px;
}

.brand-prod-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   4 & 5. 護膚彩妝 / 香氛美體 (FILTER TABS)
   ========================================================================== */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 35px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 22px;
  background: #FFF;
  border: 1px solid var(--glass-border);
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tab-btn.active, .tab-btn:hover {
  background: var(--gold-gradient);
  color: #2D1A22;
  box-shadow: 0 3px 12px rgba(212, 175, 55, 0.3);
}

/* ==========================================================================
   6. AI 美容顧問 (AI BEAUTY CONSULTANT)
   ========================================================================== */
.ai-consultant-card {
  max-width: 850px;
  margin: 0 auto;
  background: #FFF;
  border-radius: 20px;
  padding: 35px;
  box-shadow: 0 15px 45px rgba(212, 122, 148, 0.18);
  border: 1px solid rgba(212, 175, 55, 0.3);
  position: relative;
}

.ai-intro {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
}

.ai-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gold-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

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

.ai-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
}

.ai-input, .ai-select {
  width: 100%;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid #E5D5DC;
  background: var(--soft-pink);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition-smooth);
}

.ai-input:focus, .ai-select:focus {
  border-color: var(--accent-gold);
  background: #FFF;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.ai-submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--gold-gradient);
  border: none;
  border-radius: 30px;
  color: #2D1A22;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  letter-spacing: 1px;
  box-shadow: 0 5px 20px rgba(212, 175, 55, 0.35);
  transition: var(--transition-smooth);
}

.ai-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.ai-result-box {
  margin-top: 25px;
  padding: 20px;
  border-radius: 14px;
  background: #FFF8FA;
  border-left: 4px solid var(--accent-gold);
  display: none;
}

/* ==========================================================================
   7. 即期特賣 (CLEARANCE)
   ========================================================================== */
.expiry-tag {
  font-size: 0.8rem;
  color: #E65C83;
  font-weight: 600;
  margin-bottom: 6px;
}

/* ==========================================================================
   8. 關於我們 (ABOUT US)
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.about-text h3 {
  font-size: 1.8rem;
  color: #B35471;
  margin-bottom: 16px;
}

.about-text p {
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.services-list {
  list-style: none;
  margin-bottom: 25px;
}

.services-list li {
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--text-main);
}

.services-list li::before {
  content: '✦';
  color: var(--accent-gold);
  font-weight: bold;
}

.contact-card {
  background: #FFF;
  border-radius: 18px;
  padding: 30px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: var(--shadow-luxury);
}

.contact-card h4 {
  font-size: 1.25rem;
  margin-bottom: 15px;
  color: var(--dark-gold);
}

.contact-info-item {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #23161C;
  color: #E2D3DB;
  padding: 50px 5% 25px;
  text-align: center;
  border-top: 2px solid var(--accent-gold);
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--light-gold);
  letter-spacing: 3px;
  margin-bottom: 15px;
}

.footer-copy {
  font-size: 0.85rem;
  color: #8C7A84;
  margin-top: 30px;
}

/* ==========================================================================
   MODALS (LOGIN, CART, SEARCH)
   ========================================================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #FFF;
  border-radius: 20px;
  padding: 35px;
  max-width: 450px;
  width: 100%;
  position: relative;
  box-shadow: 0 15px 40px rgba(0,0,0,0.25);
  border: 1px solid var(--accent-gold);
  animation: modalScale 0.3s ease;
}

@keyframes modalScale {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
}

/* ==========================================================================
   RESPONSIVE DESIGN (RWD)
   ========================================================================== */
@media (max-width: 1024px) {
  .nav-menu {
    position: fixed;
    top: 65px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 65px);
    background: rgba(255, 245, 247, 0.98);
    backdrop-filter: blur(15px);
    flex-direction: column;
    padding: 30px 20px;
    transition: left 0.4s ease;
    overflow-y: auto;
    gap: 12px;
  }
  .nav-menu.open {
    left: 0;
  }
  .mobile-toggle {
    display: block;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
  .brand-name {
    font-size: 1.15rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
}
