/* ============================================================
   Sweet Gypsy Design — Base / Reset / Shared Styles
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  font-family: var(--body-font), sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--body-font), sans-serif;
  background: var(--cream);
  color: var(--text);
  font-weight: 300;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

/* ─── SECTION SHARED ─── */
section {
  padding: 7rem 6rem;
}

.section-tag {
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--heading-font), serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--brown);
  line-height: 1.2;
}

.section-title em {
  font-style: italic;
  color: var(--gold);
}

/* ─── BUTTONS ─── */
.btn-primary {
  background: var(--brown);
  color: var(--cream);
  padding: .9rem 2.2rem;
  text-decoration: none;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background .2s, transform .2s;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--gold);
  transform: translateY(-1px);
}

.btn-secondary {
  color: var(--brown-light);
  text-decoration: none;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: color .2s, gap .2s;
}

.btn-secondary:hover {
  color: var(--gold);
  gap: .75rem;
}

.btn-secondary::after {
  content: '→';
}

/* ─── PLACEHOLDER IMG (gradient) ─── */
.img-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--heading-font), serif;
  font-style: italic;
  font-size: 1rem;
  color: rgba(107, 76, 59, .5);
}

.ph-1 {
  background: linear-gradient(135deg, #E8D5C0 0%, #D4B896 100%);
}

.ph-2 {
  background: linear-gradient(135deg, #DEC9B0 0%, #C9A87A 100%);
}

.ph-3 {
  background: linear-gradient(135deg, #E5D5BC 0%, #CCAA80 100%);
}

.ph-4 {
  background: linear-gradient(135deg, #D8C4A8 0%, #C4A070 100%);
}

.ph-5 {
  background: linear-gradient(135deg, #EAD8C4 0%, #D0AD80 100%);
}

/* ─── UTILITY CLASSES (replacing inline styles for CSP compliance) ─── */
.h-full {
  height: 100%;
}

.text-center {
  text-align: center;
}

.hero-vertical-text {
  writing-mode: vertical-rl;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-size: .7rem;
  opacity: .4;
}

.flex-row-wrap {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.tab-img-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.story-img-wrap-1 {
  aspect-ratio: 3/4;
  margin-top: 2.5rem;
  border-radius: 3px;
  overflow: hidden;
}

.story-img-wrap-2 {
  aspect-ratio: 3/4;
  border-radius: 3px;
  overflow: hidden;
}

.story-img-wrap-1 img,
.story-img-wrap-2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.spacer-md {
  height: 1.5rem;
}

.mb-1 {
  margin-bottom: 1rem;
}

.wa-btn-style {
  background: #25D366;
  box-shadow: 0 4px 14px rgba(37, 211, 102, .3);
}

.social-line {
  color: #06C755;
  border-color: #06C755;
}

.social-wa {
  color: #25D366;
  border-color: #25D366;
}

/* Catalog error message (replaces inline style on error <p>) */
.catalog-error-msg {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 0;
}

/* ─── THAI LANGUAGE — Typography & Layout Overrides ─── */
/* Prompt font needs different weight/spacing treatment than Cormorant Garamond */

html.lang-th .section-title {
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: .01em;
}

html.lang-th .section-title em {
  font-style: normal;
  font-weight: 300;
}

html.lang-th .hero-title {
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: .02em;
}

html.lang-th .hero-title em {
  font-style: normal;
  font-weight: 300;
  color: var(--gold);
}

html.lang-th .hero-sub {
  font-weight: 300;
  line-height: 1.9;
  font-size: .9rem;
}

html.lang-th .hero-tag {
  font-weight: 400;
  letter-spacing: .15em;
}

html.lang-th .hero-badge {
  font-style: normal;
  font-weight: 300;
  line-height: 1.5;
}

html.lang-th .hero-badge p {
  font-style: normal;
  font-weight: 300;
  font-size: .9rem;
}

html.lang-th .stat-num {
  font-weight: 600;
}

html.lang-th .stat-label {
  font-weight: 400;
  letter-spacing: .05em;
}

/* Collections */
html.lang-th .inspi-name {
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.4;
}

html.lang-th .inspi-desc {
  font-weight: 300;
  line-height: 1.8;
}

html.lang-th .inspi-num {
  font-weight: 700;
}

/* Reviews */
html.lang-th .review-text {
  font-style: normal;
  font-weight: 300;
  line-height: 1.7;
  font-size: 1rem;
}

/* Story */
html.lang-th .story-content p {
  font-weight: 300;
  line-height: 1.9;
}

html.lang-th .story-quote {
  font-style: normal;
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.7;
}

/* How to Order */
html.lang-th .step-title {
  font-weight: 500;
}

html.lang-th .step-desc {
  font-weight: 300;
  line-height: 1.8;
}

html.lang-th .step::before {
  font-weight: 700;
}

/* Contact */
html.lang-th .contact-form-title {
  font-weight: 400;
  line-height: 1.35;
}

html.lang-th .contact-info-title {
  font-style: normal;
  font-weight: 400;
}

/* Line CTA */
html.lang-th .line-cta-text {
  font-style: normal;
  font-weight: 300;
  font-size: 1.5rem;
}

/* Nav */
html.lang-th .nav-logo {
  font-weight: 600;
}

html.lang-th .nav-links a {
  font-weight: 400;
  letter-spacing: .06em;
}

/* Buttons */
html.lang-th .btn-primary {
  font-weight: 400;
  letter-spacing: .08em;
}

html.lang-th .btn-secondary {
  font-weight: 400;
}

/* Marquee */
html.lang-th .marquee-item {
  font-weight: 300;
  letter-spacing: .12em;
}

/* ═══════════════════════════════════════════════════════════
   GLOBAL IMAGE LIGHTBOX VIEWER
   ═══════════════════════════════════════════════════════════ */
.global-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease-out, visibility 0.12s ease-out;
  will-change: opacity, visibility;
}

.global-lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.global-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 14, 10, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  touch-action: manipulation;
}

.global-lightbox-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 92vw;
  max-height: 92vh;
  padding: 1rem;
  transform: scale(0.97);
  transition: transform 0.12s ease-out;
  will-change: transform;
}

.global-lightbox.active .global-lightbox-content {
  transform: scale(1);
}

.global-lightbox-close {
  position: fixed !important;
  top: 1.5rem !important;
  right: 1.5rem !important;
  background: rgba(30, 20, 14, 0.85);
  border: 1.5px solid var(--gold, #c9a96e);
  color: var(--cream, #faf6f0);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease, background-color 0.1s ease;
  line-height: 1;
  z-index: 10000000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.global-lightbox-close:hover,
.global-lightbox-close:active {
  background: var(--gold, #c9a96e);
  color: #1e130c;
  transform: scale(1.1);
}

.global-lightbox-nav {
  position: fixed !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: rgba(30, 20, 14, 0.8);
  border: 1.5px solid var(--gold, #c9a96e);
  color: var(--cream, #faf6f0);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease, background-color 0.1s ease;
  z-index: 10000000;
  user-select: none;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.global-lightbox-nav:hover,
.global-lightbox-nav:active {
  background: var(--gold, #c9a96e);
  color: #1e130c;
  transform: translateY(-50%) scale(1.12);
}

.global-lightbox-nav.prev {
  left: 2rem !important;
}

.global-lightbox-nav.next {
  right: 2rem !important;
}

.global-lightbox-img-wrap {
  max-width: 82vw;
  max-height: 75vh;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85), 0 0 0 1.5px rgba(201, 169, 110, 0.45);
  background: #150d09;
  display: flex;
  align-items: center;
  justify-content: center;
}

.global-lightbox-img-wrap img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  border-radius: 16px;
  transition: none !important;
}

.global-lightbox-caption {
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(30, 20, 14, 0.8);
  border: 1px solid rgba(201, 169, 110, 0.35);
  padding: 0.45rem 1.4rem;
  border-radius: 30px;
  backdrop-filter: blur(8px);
  color: var(--cream, #faf6f0);
  font-family: var(--body-font), sans-serif;
  font-size: 0.95rem;
}

.global-lightbox-badge {
  background: rgba(201, 169, 110, 0.22);
  border: 1px solid var(--gold, #c9a96e);
  color: var(--gold, #c9a96e);
  padding: 0.25rem 0.85rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
}

.global-lightbox-counter {
  color: var(--gold, #c9a96e);
  opacity: 0.95;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  font-weight: 500;
}

/* Zoom cursor styling for inspectable images */
.zoomable-img,
.product-img-dynamic,
.aboutme-section-img img,
.story-imgs img,
.more-img-card img,
.more-gallery-item img,
#modal-main-img {
  cursor: zoom-in !important;
}

@media (max-width: 768px) {
  .global-lightbox-nav.prev {
    left: 0.5rem;
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }
  .global-lightbox-nav.next {
    right: 0.5rem;
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }
}

/* Footer */
html.lang-th .footer-bar {
  font-weight: 300;
}
