:root {
  --jui-black: #1c1c1a;
  --jui-black-2: #242420;
  --jui-black-3: #34342e;
  --jui-gold: #c79a3f;
  --jui-gold-dark: #a9812f;
  --jui-gold-darker: #8a6a24;
  --jui-text: #232320;
  --jui-text-soft: #4a4844;
  --jui-muted: #6b685f;
  --jui-muted-2: #8a8880;
  --jui-border: #eae7e0;
  --jui-bg-light: #f7f6f3;
  --jui-danger: #b23c3c;
  --jui-success: #3d6b34;
}

body {
  font-family: 'Prompt', 'Noto Sans Thai', 'Segoe UI', sans-serif;
  color: var(--jui-text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--jui-gold-dark);
  text-decoration: none;
}
a:hover {
  color: var(--jui-gold-darker);
}

::placeholder {
  color: #9a978f;
}

.btn-gold {
  background-color: var(--jui-gold);
  border-color: var(--jui-gold);
  color: var(--jui-black);
  font-weight: 600;
}
.btn-gold:hover {
  background-color: var(--jui-gold-dark);
  border-color: var(--jui-gold-dark);
  color: var(--jui-black);
}

.btn-dark-jui {
  background-color: var(--jui-black);
  border-color: var(--jui-black);
  color: #fff;
  font-weight: 600;
}
.btn-dark-jui:hover {
  background-color: var(--jui-black-2);
  border-color: var(--jui-black-2);
  color: #fff;
}

.text-gold { color: var(--jui-gold-dark) !important; }
.bg-jui-black { background-color: var(--jui-black) !important; }
.bg-jui-light { background-color: var(--jui-bg-light) !important; }

/* ---------- Header / Nav ---------- */
.jui-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--jui-black);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.jui-brand {
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 700;
  letter-spacing: 0.5px;
}
.jui-brand .jui-brand-white { color: #fff; }
.jui-brand .jui-brand-gold { color: var(--jui-gold); }
.jui-brand-dark .jui-brand-white { color: var(--jui-text); }
.jui-brand-dark .jui-brand-gold { color: var(--jui-gold-darker); }

.jui-nav-link {
  color: #e8e6e1;
  font-weight: 400;
  font-size: 15px;
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
  white-space: nowrap;
}
.jui-nav-link:hover {
  color: var(--jui-gold);
}
.jui-nav-link.active {
  color: var(--jui-gold);
  font-weight: 600;
  border-bottom-color: var(--jui-gold);
}

.jui-phone-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f0ede6;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--jui-black-3);
  padding: 8px 16px;
  border-radius: 4px;
}
.jui-phone-pill:hover { color: var(--jui-gold); }
.jui-phone-pill.dropdown-toggle::after { margin-left: 8px; }

.jui-contact-dropdown {
  border: none;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  padding: 6px;
  margin-top: 8px;
}
.jui-contact-dropdown .dropdown-item {
  border-radius: 6px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 500;
}
.jui-contact-dropdown .dropdown-item:hover,
.jui-contact-dropdown .dropdown-item:focus {
  background: var(--jui-bg-light);
  color: var(--jui-gold-darker);
}

.navbar-toggler.jui-toggler {
  border: none;
  padding: 8px;
}
.navbar-toggler.jui-toggler:focus { box-shadow: none; }

.jui-mobile-menu {
  background: var(--jui-black-2);
}
.jui-mobile-menu .jui-nav-link {
  display: block;
  padding: 14px 4px;
  font-size: 16px;
  border-bottom: 1px solid var(--jui-black-3);
}

/* ---------- Hero ---------- */
.jui-hero {
  position: relative;
  width: 100%;
  min-height: clamp(460px, 68vh, 700px);
  overflow: hidden;
  background: var(--jui-black);
  display: flex;
  align-items: center;
}
.jui-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 20, 18, 0.5) 0%, rgba(20, 20, 18, 0.88) 100%);
  pointer-events: none;
}
.jui-hero-content {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  padding: 48px 24px;
  color: #fff;
}
.jui-hero-badge {
  display: inline-block;
  padding: 6px 18px;
  border: 1px solid var(--jui-gold-dark);
  border-radius: 999px;
  color: #d8b975;
  font-size: 13px;
  letter-spacing: 1.5px;
  margin-bottom: 22px;
}
.jui-hero-title {
  font-size: clamp(28px, 5vw, 50px);
  font-weight: 700;
  line-height: 1.3;
}
.jui-hero-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: #e5e2da;
  font-weight: 300;
}

/* ---------- Placeholder images ---------- */
.jui-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #e9e6de 0%, #d8d3c6 100%);
  color: #8a8776;
  font-size: 13px;
  padding: 10px;
  width: 100%;
  overflow: hidden;
}

/* ---------- Product gallery (card slider) ---------- */
.jui-gallery {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #eee;
}
.jui-gallery-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.jui-gallery-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}
.jui-gallery-slide.jui-gallery-nozoom {
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .jui-gallery-track {
    transition: none;
  }
}
.jui-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.jui-gallery-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}
.jui-gallery-prev {
  left: 8px;
}
.jui-gallery-next {
  right: 8px;
}
.jui-gallery-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}
.jui-gallery-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
.jui-gallery-dot.active {
  background: #fff;
  width: 8px;
  height: 8px;
}

/* ---------- Lightbox (full image viewer) ---------- */
.jui-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
}
.jui-lightbox.open {
  display: flex;
}
.jui-lightbox-img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  user-select: none;
}
.jui-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.jui-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}
.jui-lightbox-arrow {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  margin: 0 16px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.jui-lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
}
.jui-lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 12px;
  border-radius: 999px;
}

/* ---------- Cards ---------- */
.jui-card {
  position: relative;
  border: 1px solid var(--jui-border);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.jui-badge-soft {
  display: inline-block;
  background: var(--jui-bg-light);
  color: var(--jui-gold-darker);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
}
.jui-num-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--jui-black);
  color: var(--jui-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 17px;
}

.jui-cta-band {
  background: linear-gradient(135deg, #1c1c1a 0%, #2b2419 55%, #4a3a1a 100%);
  border-top: 1px solid var(--jui-gold);
  border-bottom: 1px solid var(--jui-gold);
}

/* ---------- Reveal-on-scroll ---------- */
.jui-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.jui-reveal.jui-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Footer ---------- */
.jui-footer {
  background: var(--jui-black);
  color: #c9c6bd;
}
.jui-footer a {
  color: #9a978e;
}
.jui-footer a:hover {
  color: var(--jui-gold);
}
.jui-footer-bottom {
  border-top: 1px solid var(--jui-black-3);
  color: #75736a;
  font-size: 13px;
}

/* ---------- Floating buttons ---------- */
.jui-floating-actions {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.jui-fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.jui-fab-facebook {
  background: #1877f2;
  color: #fff;
}
.jui-fab-call {
  background: var(--jui-gold);
  color: var(--jui-black);
}
.jui-fab-line {
  background: #06c755;
  color: #fff;
}

/* ---------- Category pill filters ---------- */
.jui-filter-pill {
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid #d8d5cd;
  background: #fff;
  color: #3a3a38;
}
.jui-filter-pill.active {
  border-color: var(--jui-gold-dark);
  background: var(--jui-gold-dark);
  color: #fff;
}

/* ---------- Admin ---------- */
.jui-admin-tab {
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  background: var(--jui-bg-light);
  color: #3a3835;
}
.jui-admin-tab.active {
  background: var(--jui-black);
  color: var(--jui-gold);
}

.jui-alert-success {
  background: #f0f7ee;
  color: var(--jui-success);
  border: 1px solid rgba(61, 107, 52, 0.2);
  border-radius: 6px;
  padding: 12px 16px;
}

.jui-badge-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.jui-badge-status.is-active {
  background: rgba(199, 154, 63, 0.15);
  color: var(--jui-gold-darker);
}
.jui-badge-status.is-hidden {
  background: #efefef;
  color: var(--jui-muted);
}

.jui-thumb {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(135deg, #e9e6de 0%, #d8d3c6 100%);
}
.jui-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.jui-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #8a8776;
  font-size: 10px;
  text-align: center;
  padding: 4px;
}

/* ---------- Admin: pagination ---------- */
.jui-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.jui-page-link {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid var(--jui-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--jui-text);
  background: #fff;
}
.jui-page-link:hover {
  border-color: var(--jui-gold-dark);
  color: var(--jui-gold-darker);
}
.jui-page-link.active {
  background: var(--jui-gold-dark);
  border-color: var(--jui-gold-dark);
  color: #fff;
}
.jui-page-link.disabled {
  opacity: 0.4;
  pointer-events: none;
}
.jui-page-ellipsis {
  padding: 0 4px;
  color: var(--jui-muted);
}

/* ---------- Admin: product form sections ---------- */
.jui-form-section {
  border-top: 1px solid var(--jui-border);
  padding-top: 20px;
  margin-top: 20px;
}
.jui-form-section:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.jui-form-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--jui-text);
  margin-bottom: 14px;
}
