/* ============================================
   VIBHUSHA BASE STYLES + RESET
   ============================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading-normal);
  color: var(--color-text-body);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ─── TYPOGRAPHY BASE ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}

p {
  line-height: var(--leading-relaxed);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

img, video {
  display: block;
  max-width: 100%;
  height: auto;
}

button {
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

input, textarea, select {
  font-family: var(--font-sans);
  font-size: var(--text-base);
}

ul, ol {
  list-style: none;
}

/* ─── FOCUS STYLES ─── */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--ivory-dark); }
::-webkit-scrollbar-thumb { background: var(--gold-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ─── SELECTION ─── */
::selection {
  background: var(--gold-pale);
  color: var(--navy);
}

/* ─── CONTAINERS ─── */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter-desktop);
  padding-right: var(--gutter-desktop);
}

.container-wide {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter-desktop);
  padding-right: var(--gutter-desktop);
}

.container-narrow {
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter-desktop);
  padding-right: var(--gutter-desktop);
}

/* ─── SECTION SPACING ─── */
.section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
}

.section-sm {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.section-lg {
  padding-top: 120px;
  padding-bottom: 120px;
}

/* ─── GOLD DIVIDER ─── */
.gold-divider {
  height: 1px;
  background: var(--gold);
  opacity: 0.3;
  width: 100%;
}

.gold-divider-short {
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
  width: 60px;
  display: block;
  margin: var(--space-4) 0 var(--space-6);
}

/* ─── UTILITY CLASSES ─── */
.text-serif { font-family: var(--font-serif); }
.text-navy { color: var(--navy); }
.text-gold { color: var(--gold); }
.text-magenta { color: var(--magenta); }
.text-muted { color: var(--color-text-muted); }
.text-inverse { color: var(--color-text-inverse); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.bg-navy { background: var(--navy); }
.bg-ivory { background: var(--ivory); }
.bg-ivory-dark { background: var(--ivory-dark); }
.bg-white { background: var(--white); }

.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: var(--tracking-wider); }
.tracking-widest { letter-spacing: var(--tracking-widest); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
}

/* ─── OVERLAY ─── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 39, 68, 0.6);
  backdrop-filter: blur(4px);
  z-index: var(--z-overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-default);
}

.overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ─── STAR RATING ─── */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--gold);
  font-size: var(--text-sm);
}

/* ─── BADGE ─── */
.badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.badge-new { background: var(--navy); color: var(--ivory); }
.badge-sale { background: var(--magenta); color: var(--white); }
.badge-bestseller { background: var(--gold-pale); color: var(--gold-dark); border: 1px solid var(--gold); }

/* ─── PAGE LOADER ─── */
#page-loader {
  position: fixed;
  inset: 0;
  background: var(--ivory);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

.loader-logo {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  color: var(--navy);
  letter-spacing: var(--tracking-wider);
  animation: loaderPulse 1.5s ease-in-out infinite;
}

.loader-line {
  width: 0;
  height: 1px;
  background: var(--gold);
  margin: var(--space-4) auto 0;
  animation: loaderLine 1.5s ease-in-out infinite;
}

@keyframes loaderPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes loaderLine {
  0% { width: 0; }
  50% { width: 60px; }
  100% { width: 0; }
}
