/* ====================================================
   🦋 蝴蝶精舍 Pure Thai Worldwide Amulets
   Premium Dark Theme — Designer Edition
   ==================================================== */

/* ─── Variables ─── */
:root {
  --bg: #0a0a0f;
  --bg-card: #12121e;
  --bg-hover: #1a1a2e;
  --border: #1e1e30;
  --border-light: #2a2a3e;
  --gold: #d4af37;
  --gold-bright: #ffd700;
  --gold-dark: #b8962f;
  --red: #6b0f1a;
  --red-dark: #4a0000;
  --text: #e0e0e0;
  --text-muted: #888;
  --text-dim: #555;
  --success: #27ae60;
  --danger: #e74c3c;
  --wa: #25d366;
  --font: 'Kanit', sans-serif;
  --font-deco: 'Prompt', 'Kanit', sans-serif;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-gold: 0 0 20px rgba(212,175,55,0.15);
  --transition: all 0.25s ease;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-top: 72px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ─── Navigation ─── */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 72px;
  background: linear-gradient(180deg, #000 0%, #0d0d18 100%);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.header-inner {
  max-width: 1300px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; gap: 1rem;
}

.logo { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.logo-brand {
  font-family: var(--font-deco);
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold), var(--gold-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-text small { font-size: 0.55rem; color: var(--text-dim); display: block; }

/* Nav Menu */
.nav-menu { flex: 1; display: flex; justify-content: center; }
.menu-list { display: flex; gap: 0.15rem; align-items: center; }
.menu-item { position: relative; }

.menu-item a.nav-link {
  display: flex; flex-direction: column; align-items: center;
  padding: 0.45rem 0.8rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
  border-radius: 6px;
}

.menu-item a.nav-link .front { display: block; }
.menu-item a.nav-link .back {
  font-size: 0.48rem;
  color: var(--text-dim);
  opacity: 0;
  max-height: 0;
  transition: var(--transition);
}

.menu-item a.nav-link:hover,
.menu-item a.nav-link.active {
  color: var(--gold);
}

.menu-item a.nav-link:hover .back,
.menu-item a.nav-link.active .back {
  opacity: 0.6;
  max-height: 20px;
}

.menu-item a.nav-link::after {
  content: ''; position: absolute; bottom: 0;
  left: 50%; right: 50%;
  height: 2px; background: var(--gold);
  transition: var(--transition);
  border-radius: 1px;
}

.menu-item a.nav-link:hover::after,
.menu-item a.nav-link.active::after {
  left: 15%; right: 15%;
}

/* Submenu */
.submenu {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  min-width: 170px;
  padding: 0.4rem 0;
  box-shadow: var(--shadow);
  z-index: 100;
}

.menu-item.dropDown:hover .submenu { display: block; }

.submenu a {
  display: block;
  padding: 0.45rem 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
  transition: var(--transition);
}

.submenu a:hover {
  background: rgba(212,175,55,0.06);
  color: var(--gold);
  padding-left: 1.3rem;
}

/* Header Actions */
.header-actions {
  display: flex; align-items: center; gap: 0.3rem;
  flex-shrink: 0;
}

.action-btn {
  background: transparent; border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 0.4rem;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.action-btn:hover {
  background: rgba(212,175,55,0.08);
  color: var(--gold);
  transform: scale(1.1);
}

.cart-count {
  position: absolute; top: -2px; right: -2px;
  background: var(--danger); color: #fff;
  font-size: 0.5rem;
  min-width: 16px; height: 16px;
  border-radius: 50%;
  display: none;
  align-items: center; justify-content: center;
  font-weight: 700;
}

/* Search */
.search-box { position: relative; }
.search-icon {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem; pointer-events: none;
}
.search-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 0.4rem 1rem 0.4rem 2rem;
  color: var(--text);
  font-size: 0.75rem;
  width: 160px;
  transition: var(--transition);
}
.search-input:focus {
  outline: none; border-color: var(--gold);
  width: 220px;
  background: rgba(255,255,255,0.08);
}
.search-input::placeholder { color: var(--text-dim); }

/* Mobile Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column; gap: 4px;
  background: transparent; border: none;
  cursor: pointer; padding: 8px;
  z-index: 1001;
}
.mobile-menu-btn span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: var(--transition);
}
.mobile-menu-btn.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

/* ─── Page Banner ─── */
.page-banner {
  background: linear-gradient(135deg, var(--red-dark) 0%, #000 100%);
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-bottom: 2px solid var(--gold);
}

.page-banner h1 {
  font-family: var(--font-deco);
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.page-banner p {
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ─── Breadcrumb ─── */
.breadcrumb {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}

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

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.3rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: pointer; border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #000;
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #128C7E; transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold); color: #000; }

.btn-sm { padding: 0.35rem 0.9rem; font-size: 0.75rem; }
.btn-lg { padding: 0.8rem 1.8rem; font-size: 1rem; }

/* ─── Cards ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
}

.card:hover { border-color: var(--gold); }

/* ─── Product Grid ─── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.35s ease;
  text-decoration: none;
  color: var(--text);
}

.product-card:hover {
  border-color: var(--gold);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(212,175,55,0.12);
}

.product-card .pc-img-wrap {
  width: 100%; aspect-ratio: 1;
  background: linear-gradient(135deg, var(--red-dark), var(--bg-card));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

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

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

.product-card .pc-info { padding: 0.8rem; }
.product-card .pc-name {
  font-size: 0.8rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.3;
  min-height: 2.1em;
}

.product-card .pc-price {
  color: var(--gold);
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.product-card .pc-sku {
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* ─── Forms ─── */
.form-group { margin-bottom: 0.8rem; }
.form-group label {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.6rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--font);
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(212,175,55,0.1);
}

.form-textarea { min-height: 100px; resize: vertical; }

/* ─── Table ─── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.table th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}

.table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
}

.table tr:hover { background: rgba(212,175,55,0.02); }

/* ─── Footer ─── */
.footer {
  background: linear-gradient(180deg, var(--bg-card) 0%, #000 100%);
  border-top: 2px solid var(--gold);
  margin-top: 3rem;
  padding: 3rem 0 0;
}

.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-col h4 {
  color: var(--gold);
  font-family: var(--font-deco);
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}

.footer-col p, .footer-col a {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.8;
  display: block;
}

.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  text-align: center;
  padding: 1.2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

.footer-bottom p { color: var(--text-dim); font-size: 0.72rem; }

/* ─── Mobile ─── */
@media (max-width: 768px) {
  body { padding-top: 60px; }
  .header { height: 60px; }

  .logo-brand { font-size: 0.9rem; }
  .logo-text small { display: none; }

  .search-box { display: none; }

  .mobile-menu-btn { display: flex !important; }

  .nav-menu {
    display: none;
    position: fixed;
    top: 60px; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.97);
    padding: 1rem;
    overflow-y: auto;
    z-index: 999;
  }

  .nav-menu.open { display: flex !important; flex-direction: column; }

  .menu-list {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .menu-item { width: 100%; }

  .menu-item a.nav-link {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    flex-direction: row;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
  }

  .menu-item a.nav-link .back { display: none; }
  .menu-item a.nav-link::after { display: none; }

  .submenu {
    position: static;
    border: none;
    box-shadow: none;
    background: rgba(0,0,0,0.3);
    padding-left: 0.5rem;
  }

  .menu-item.dropDown.open .submenu { display: block; }
  .menu-item.dropDown:active .submenu,
  .menu-item.dropDown:focus-within .submenu { display: block; }

  .menu-item.dropDown > a.nav-link::after {
    content: '▼';
    font-size: 0.5rem;
    color: var(--text-dim);
    display: inline-block !important;
    position: static;
    background: none;
    height: auto;
    margin-left: 0.5rem;
  }

  /* Grid */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .product-card .pc-info { padding: 0.5rem; }
  .product-card .pc-name { font-size: 0.7rem; }
  .product-card .pc-price { font-size: 0.8rem; }

  /* Banner */
  .page-banner { padding: 1.5rem 0.8rem; }
  .page-banner h1 { font-size: 1.3rem; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 480px) {
  .product-grid { gap: 0.4rem; }
  .product-card .pc-name { font-size: 0.65rem; }
  .header-inner { padding: 0 0.5rem; }
}

/* ═══ Premium Design Enhancements ═══ */

/* Consistent container */
.content-wrap {
  max-width: 1300px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Better product cards */
.product-card {
  background: linear-gradient(180deg, #141420 0%, #0f0f18 100%);
  border: 1px solid #1e1e30;
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(212,175,55,0.12), 0 4px 10px rgba(0,0,0,0.3);
}

.product-card .pc-img-wrap {
  background: linear-gradient(135deg, #1a0a0a 0%, #0d0d18 100%);
}

.product-card .pc-name {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.product-card .pc-price {
  font-size: 1rem;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Page banner refinements */
.page-banner {
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at center, rgba(212,175,55,0.03) 0%, transparent 70%);
  animation: shimmer 8s ease infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(5%, 5%); }
}

/* Button enhancements */
.btn-gold {
  position: relative;
  overflow: hidden;
}

.btn-gold::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: 0.6s;
}

.btn-gold:hover::after {
  transform: translateX(100%);
}

/* Mobile improvements */
@media (max-width: 768px) {
  .product-card .pc-img-wrap { min-height: 140px; }
  .content-wrap { padding: 1rem 0.8rem; }
  
  .page-banner h1 { font-size: 1.4rem; }
  .page-banner p { font-size: 0.75rem; }
  
  .product-grid {
    gap: 0.6rem;
  }
}

@media (max-width: 480px) {
  .product-grid { gap: 0.4rem; }
  .product-card .pc-info { padding: 0.4rem; }
  .product-card .pc-name { font-size: 0.65rem; }
}

/* ═══ Premium Product Cards ═══ */
.product-card {
  background: linear-gradient(180deg, #18182a 0%, #12121e 100%) !important;
  border: 1px solid #2a2a40 !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  overflow: hidden;
}

.product-card:hover {
  border-color: #d4af37 !important;
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 16px 40px rgba(212,175,55,0.15), 0 6px 15px rgba(0,0,0,0.3) !important;
}

.product-card .pc-img-wrap {
  background: linear-gradient(135deg, #1a0a0a 0%, #0d0d1a 100%) !important;
  position: relative;
}

.product-card .pc-img-wrap::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(transparent, #18182a);
  pointer-events: none;
}

.product-card .pc-img-wrap img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

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

.product-card .pc-info {
  padding: 0.8rem 0.9rem 1rem !important;
  position: relative;
}

.product-card .pc-name {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  line-height: 1.35;
  color: #e8e8e8;
  margin-bottom: 0.2rem;
}

.product-card .pc-sku {
  font-size: 0.6rem !important;
  color: #555 !important;
  letter-spacing: 0.3px;
}

.product-card .pc-price {
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  background: linear-gradient(90deg, #d4af37, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 0.3rem;
  display: inline-block;
}

/* Category tabs premium */
.cat-tab {
  padding: 0.45rem 1.1rem !important;
  border-radius: 25px !important;
  font-size: 0.78rem !important;
  font-weight: 500;
  transition: all 0.3s ease !important;
}

.cat-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212,175,55,0.15);
}

/* Search/filter bar premium */
.filter-bar input, .filter-bar select {
  border-radius: 25px !important;
  padding: 0.5rem 1rem !important;
  background: #18182a !important;
  border: 1px solid #2a2a40 !important;
  transition: all 0.3s ease !important;
}

.filter-bar input:focus, .filter-bar select:focus {
  border-color: #d4af37 !important;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
  background: #1e1e30 !important;
}

/* Product detail page */
.pd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem !important;
}

.pd-img {
  width: 100% !important;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 18px !important;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.pd-title {
  font-size: 1.6rem !important;
  font-weight: 700 !important;
  line-height: 1.3;
  color: #f0f0f0;
}

.pd-price {
  font-size: 2.2rem !important;
  background: linear-gradient(90deg, #d4af37, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pd-desc {
  border-left: 3px solid #d4af37 !important;
  border-radius: 0 12px 12px 0 !important;
}

/* Product info column */
.pd-info {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.pd-sku {
  font-size: 0.8rem;
  color: #5a5750;
  font-family: Kanit, sans-serif;
}

.pd-cat {
  display: inline-block;
  background: rgba(201,169,78,0.12);
  color: #c9a94e;
  padding: 0.25rem 0.8rem;
  border-radius: 20px;
  font-size: 0.78rem;
  width: fit-content;
  font-family: Kanit, sans-serif;
}

/* ═══ All Pages Premium Design ═══ */

/* About page cards */
.about-card, [class*="about-"] .card {
  background: linear-gradient(180deg, #18182a 0%, #12121e 100%) !important;
  border: 1px solid #2a2a40 !important;
  border-radius: 14px !important;
  transition: all 0.35s ease;
}

.about-card:hover {
  border-color: #d4af37 !important;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(212,175,55,0.12);
}

/* Cart items */
.cart-item {
  background: linear-gradient(180deg, #18182a 0%, #12121e 100%) !important;
  border: 1px solid #2a2a40 !important;
  border-radius: 14px !important;
  transition: all 0.3s ease;
}

.cart-item:hover {
  border-color: rgba(212,175,55,0.3) !important;
}

/* Member card */
.mb-card, [class*="member-"] .card {
  background: linear-gradient(180deg, #18182a 0%, #12121e 100%) !important;
  border: 1px solid #2a2a40 !important;
  border-radius: 14px !important;
}

/* Favorites items */
.fav-item {
  background: linear-gradient(180deg, #18182a 0%, #12121e 100%) !important;
  border: 1px solid #2a2a40 !important;
  border-radius: 14px !important;
  transition: all 0.3s ease;
}

.fav-item:hover {
  border-color: #d4af37 !important;
  transform: translateY(-3px);
}

/* Contact info card */
.contact-info-card, [class*="contact-"] .card {
  background: linear-gradient(180deg, #18182a 0%, #12121e 100%) !important;
  border: 1px solid #2a2a40 !important;
  border-radius: 14px !important;
}

/* Product detail page */
.pd-img {
  box-shadow: 0 8px 30px rgba(0,0,0,0.5) !important;
}

.pd-desc {
  border-left: 3px solid #d4af37 !important;
  background: linear-gradient(90deg, rgba(212,175,55,0.03), transparent) !important;
}

/* Product thumbnails */
.pd-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}
.pd-thumb {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  opacity: 0.6;
  transition: 0.2s;
}
.pd-thumb.active,
.pd-thumb:hover {
  border-color: #d4af37;
  opacity: 1;
}

/* Page banner shine */
.page-banner {
  position: relative;
  overflow: hidden;
}

.page-banner::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.5), transparent);
}

/* Fix mobile menu */
@media (max-width: 768px) {
  .nav-menu.open {
    display: flex !important;
    animation: fadeIn 0.2s ease;
  }
  
  .menu-item {
    width: 100%;
  }
  
  .menu-item a.nav-link {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  
  .menu-item.dropDown > a.nav-link::after {
    display: inline-block !important;
    margin-left: auto;
  }
  
  /* Product grid mobile */
  .product-grid {
    gap: 0.5rem;
    padding: 0 0.3rem;
  }
  
  .product-card .pc-info {
    padding: 0.4rem 0.5rem !important;
  }
}

/* Footer premium */
.footer {
  background: linear-gradient(180deg, #0d0d18 0%, #000 100%) !important;
  border-top: 2px solid #d4af37 !important;
}

.footer-col h4 {
  font-size: 0.9rem !important;
  margin-bottom: 0.8rem !important;
}

.footer-col a, .footer-col p {
  font-size: 0.78rem !important;
}

/* ═══ Final layout fixes - all pages ═══ */

/* Force all page wrappers to have proper spacing */
.page-banner + * {
  margin-top: 0 !important;
}

/* Fix homepage */
.page-loading.hidden + *, 
#pageContent > * {
  max-width: 100% !important;
  overflow-x: hidden;
}

/* Ensure all content areas are max-width constrained */
[class*="container"], [class*="wrapper"], [class*="content"]:not([class*="header"]):not([class*="footer"]) {
  max-width: 1300px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 1.5rem !important;
  padding-right: 1.5rem !important;
}

/* Fix cart/favorites/product pages */
#cartContent, #favContent, #pc, #productContent {
  max-width: 1300px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Member */
.mb-wrap, .member-container, [class*="member-"] {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Better buttons everywhere */
button, .btn {
  outline: none !important;
}

/* Fix mobile */
@media (max-width: 768px) {
  [class*="container"], [class*="wrapper"], [class*="content"]:not([class*="header"]):not([class*="footer"]),
  #cartContent, #favContent, #pc, #productContent {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .mb-wrap, .member-container {
    padding: 1rem !important;
  }
}

@media (max-width: 480px) {
  .product-grid {
    gap: 0.4rem !important;
  }
}

/* ════════════════════════════════════════════════
   🦋 灵缘佛舍 — 暗金主题新增样式 (2026-05-07)
   ════════════════════════════════════════════════ */

/* ─── Hero ─── */
.hero {
  position: relative; min-height: 85vh; display: flex;
  align-items: center; justify-content: center; text-align: center;
  overflow: hidden; background: #0a0a0f;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(201,169,78,0.12), transparent 70%),
              radial-gradient(ellipse 40% 60% at 50% 60%, rgba(201,169,78,0.04), transparent 60%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; padding: 40px 20px; max-width: 800px; }
.hero-badge {
  display: inline-block; padding: 6px 20px;
  border: 1px solid var(--gold); border-radius: 20px;
  font-family: Kanit, sans-serif; font-size: 0.7rem;
  letter-spacing: 3px; color: var(--gold);
  margin-bottom: 24px; text-transform: uppercase;
}
.hero-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 900;
  color: var(--gold);
  text-shadow: 0 0 40px rgba(201,169,78,0.3);
  margin-bottom: 16px; letter-spacing: 6px; line-height: 1.2;
}
.hero-sub {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(1rem, 2vw, 1.4rem); color: var(--text-muted);
  margin-bottom: 8px; letter-spacing: 4px; line-height: 1.6;
}
.hero-sub2 {
  font-family: Kanit, sans-serif;
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  color: var(--text-dim); letter-spacing: 2px; margin-bottom: 36px;
}

/* ─── Logo ─── */
.logo-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { font-size: 1.5rem; }
.logo-sub {
  font-family: Kanit, sans-serif; font-size: 0.6rem;
  color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase;
}

/* ─── Hamburger ─── */
.hamburger {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--gold); border-radius: 2px; transition: 0.3s;
}

/* ─── Section ─── */
.section { padding: 80px 20px; position: relative; }
.section-dark { background: #111118; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700;
  color: var(--gold); letter-spacing: 3px; margin-bottom: 12px;
}
.section-sub {
  font-family: Kanit, sans-serif; font-size: 0.85rem;
  color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase;
}
.section-divider {
  width: 60px; height: 2px; background: var(--gold);
  margin: 16px auto; border-radius: 2px;
}

/* ─── Container ─── */
.container { max-width: 1200px; margin: 0 auto; }

/* ─── Nav Menu hamburger visibility ─── */
@media (max-width: 900px) {
  .hamburger { display: flex !important; }
  .nav-menu {
    position: fixed; top: 72px; left: 0; right: 0;
    background: rgba(10,10,15,0.98); backdrop-filter: blur(20px);
    padding: 20px; border-bottom: 1px solid rgba(201,169,78,0.25);
    transform: translateY(-120%); opacity: 0;
    transition: 0.4s ease; z-index: 999;
  }
  .nav-menu.open { transform: translateY(0); opacity: 1; }
  .menu-list { flex-direction: column; gap: 4px; }
  .menu-item.dropDown .submenu {
    position: static; opacity: 1; visibility: visible;
    border: none; background: transparent; padding-left: 16px;
    box-shadow: none; display: none;
  }
  .menu-item.dropDown.open .submenu { display: block; }
  .menu-item.dropDown > a.nav-link::after { display: none !important; }
}

/* ─── Page Banner unified ─── */
.page-banner {
  position: relative;
  background: linear-gradient(135deg, #1a0620 0%, #0d0d18 100%);
  padding: 80px 20px 60px;
  text-align: center;
  border-bottom: 2px solid var(--gold);
  overflow: hidden;
}
.page-banner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(201,169,78,0.08), transparent 70%);
  pointer-events: none;
}
.page-banner h1 {
  font-family: 'Noto Serif SC', serif;
  font-size: 2.2rem; font-weight: 700;
  color: var(--gold); letter-spacing: 3px;
  margin-bottom: 8px; position: relative;
}
.page-banner p {
  color: var(--text-muted); font-size: 0.9rem;
  position: relative; max-width: 500px; margin: 0 auto;
}

/* ─── Scroll Reveal ─── */
.reveal { opacity: 0; transform: translateY(40px); transition: 0.8s cubic-bezier(0.4,0,0.2,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── Header scrolled ─── */
.header.scrolled { background: rgba(10,10,15,0.96); }

/* ─── Loading ─── */
#pageLoading {
  position: fixed; top:0; left:0; right:0; bottom:0;
  background: #0a0a0f; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s ease;
}
#pageLoading.hidden { opacity:0; pointer-events:none; }
.loading-ring {
  width: 60px; height: 60px;
  border: 2px solid #2a2824;
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: loadingSpin 0.8s linear infinite;
}
@keyframes loadingSpin { to { transform: rotate(360deg); } }

/* ─── Contact Bar ─── */
.contact-bar {
  background: linear-gradient(90deg, #4a1515, #6b2020);
  padding: 6px 20px; text-align: center;
  font-size: 0.8rem; letter-spacing: 0.5px;
  font-family: Kanit, sans-serif;
}
.contact-bar span, .contact-bar a { color: #e0c878; }

/* ═══ Non-homepage pages ═══ */
body.ejs-page { padding-top: 72px; }
.ejs-page .page-banner { padding: 40px 20px; }

@media (max-width: 768px) {
  body { padding-top: 60px; }
  .header { height: 60px !important; }
  .hamburger { display: flex !important; }
  .nav-menu.open { display: flex !important; }
  .hero-title { font-size: clamp(1.8rem, 6vw, 2.5rem); }
  .section { padding: 50px 16px; }
  .section-header { margin-bottom: 30px; }
}

/* ════════════════════════════════════════════
   Lightbox 全屏图片预览
   ════════════════════════════════════════════ */
#krubaLightbox .lb-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99999;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lbFadeIn 0.25s ease;
}
@keyframes lbFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
#krubaLightbox .lb-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
}
#krubaLightbox .lb-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  user-select: none;
}
#krubaLightbox .lb-img.loaded {
  opacity: 1;
}
#krubaLightbox .lb-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 28px;
  font-weight: 300;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}
#krubaLightbox .lb-close:hover {
  background: rgba(255,255,255,0.3);
}
#krubaLightbox .lb-close:active {
  background: rgba(255,255,255,0.5);
}
#krubaLightbox .lb-counter {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin-top: 12px;
  font-family: var(--font);
  letter-spacing: 1px;
}
#krubaLightbox .lb-prev,
#krubaLightbox .lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 42px;
  font-weight: 300;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  line-height: 1;
  user-select: none;
}
#krubaLightbox .lb-prev { left: 20px; }
#krubaLightbox .lb-next { right: 20px; }
#krubaLightbox .lb-prev:hover,
#krubaLightbox .lb-next:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-50%) scale(1.1);
}
#krubaLightbox .lb-prev:active,
#krubaLightbox .lb-next:active {
  transform: translateY(-50%) scale(0.95);
}
@media (max-width: 768px) {
  #krubaLightbox .lb-prev,
  #krubaLightbox .lb-next {
    width: 44px;
    height: 44px;
    font-size: 30px;
  }
  #krubaLightbox .lb-prev { left: 8px; }
  #krubaLightbox .lb-next { right: 8px; }
  #krubaLightbox .lb-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
}

/* ===== POPUP SYSTEM ===== */
.kpop-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  animation: kpopFadeIn 0.3s ease;
}
@keyframes kpopFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.kpop-modal {
  position: relative;
  background: linear-gradient(135deg, #1a1a2e 0%, #2a1a0e 100%);
  border: 1px solid var(--gold, #d4af37);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.3);
  transform: scale(0.9);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.kpop-modal.kpop-visible {
  transform: scale(1);
  opacity: 1;
}
.kpop-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none;
  color: var(--text-muted, #888); font-size: 1.5rem;
  cursor: pointer; padding: 0.3rem; line-height: 1;
  transition: 0.2s;
}
.kpop-close:hover { color: var(--gold, #d4af37); }
.kpop-icon { font-size: 3.5rem; margin-bottom: 0.5rem; }
.kpop-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.5rem; font-weight: 900;
  color: var(--gold, #d4af37);
  margin-bottom: 0.2rem;
}
.kpop-subtitle {
  font-size: 0.85rem;
  color: var(--text-dim, #888);
  margin-bottom: 0.5rem;
}
.kpop-desc {
  font-size: 0.85rem;
  color: var(--text-muted, #aaa);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.kpop-coupon {
  display: inline-block;
  background: rgba(212, 175, 55, 0.15);
  border: 2px dashed var(--gold, #d4af37);
  color: var(--gold, #d4af37);
  font-family: 'Kanit', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 3px;
  padding: 0.5rem 1.5rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}
.kpop-discount {
  font-size: 0.75rem;
  color: var(--success, #27ae60);
  margin-bottom: 1.2rem;
}
.kpop-btn {
  display: block;
  background: linear-gradient(135deg, var(--gold, #d4af37), #b8952e);
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.8rem;
  border-radius: 10px;
  text-decoration: none;
  transition: 0.2s;
  margin-bottom: 0.8rem;
}
.kpop-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(212, 175, 55, 0.4);
}
.kpop-footer {
  font-size: 0.72rem;
  color: var(--text-dim, #666);
}

/* ===== MOBILE ENHANCEMENTS ===== */
/* Phone < 480px */
@media (max-width: 480px) {
  .page-banner { padding: 70px 16px 40px; }
  .page-banner h1 { font-size: 1.5rem; }
  .page-banner p { font-size: 0.78rem; }
  .section { padding: 50px 16px; }
  .section-title { font-size: 1.3rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .product-card { border-radius: 10px; }
  .pc-info { padding: 0.5rem; }
  .pc-name { font-size: 0.72rem; -webkit-line-clamp: 2; }
  .pc-price { font-size: 0.85rem; }
  .pc-sku { font-size: 0.6rem; }
  .pc-wa { font-size: 0.7rem; padding: 0.35rem; }
  /* Product detail page */
  .pd-grid { grid-template-columns: 1fr !important; gap: 1rem; }
  .pd-title { font-size: 1.2rem !important; }
  .pd-price { font-size: 1.5rem !important; }
  .pd-desc { font-size: 0.82rem !important; padding: 0.8rem !important; }
  .pd-thumb { width: 50px !important; height: 50px !important; object-fit: cover; }
  /* Buttons full width on mobile */
  .pd-info button,
  .pd-info .btn-wa { font-size: 0.82rem !important; padding: 0.7rem !important; }
  /* Cart page */
  .cart-item { flex-direction: column; gap: 0.5rem; }
  .cart-item-img { width: 60px; height: 60px; }
  /* Checkout */
  .checkout-container { grid-template-columns: 1fr !important; }
  .checkout-card { padding: 1rem; }
  .payment-option { padding: 0.7rem; }
  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  /* Header nav */
  .header { padding: 0 12px; }
  .header-inner { height: 60px; }
  .logo-text { font-size: 1rem; }
  .logo-sub { font-size: 0.6rem; }
  .nav-menu { top: 60px; }
  /* Cart icon */
  .cart-icon { font-size: 1.1rem; }
  .cart-badge { font-size: 0.6rem; min-width: 16px; height: 16px; }
  /* Search */
  .search-input { width: 120px; font-size: 0.72rem; }
  .hero-section { padding: 60px 16px 40px; }
  .hero-title { font-size: 1.6rem; }
  .hero-subtitle { font-size: 0.8rem; }
}

/* Small tablets 480-768px */
@media (min-width: 481px) and (max-width: 768px) {
  .pd-grid { grid-template-columns: 1fr !important; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .checkout-container { grid-template-columns: 1fr !important; }
  .page-banner { padding: 75px 20px 45px; }
  .page-banner h1 { font-size: 1.6rem; }
}

/* ===== General Mobile Improvements ===== */
@media (max-width: 768px) {
  .page-banner { padding: 1rem 0.8rem !important; }
  .page-banner h1 { font-size: 1.2rem !important; }
  .page-banner p { font-size: 0.7rem !important; }
  .btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
  input, select, textarea { font-size: 16px !important; }
}
@keyframes lbIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
