/* ============================================================
   TAVAZO — Base Styles, Reset & Typography
   ============================================================ */

/* ── Modern Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: url('../assets/images/pistachio-cursor.webp') 2 2, auto;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-base);
  color: var(--tavazo-charcoal);
  background-color: #fff;
  overflow-x: hidden;
}

/* Pistachio pointer cursor for interactive elements */
a,
button,
[role="button"],
input[type="submit"],
input[type="button"],
select,
.btn,
.product-card,
.category-card,
.header__nav-link,
.fab-whatsapp,
.fab-backtop {
  cursor: url('../assets/images/pistachio-cursor.webp') 2 2, pointer;
}


/* Prevent body scroll when mobile menu is open */
body.menu-open {
  overflow: hidden;
}

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

img {
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Style all select dropdowns globally */
select {
  -webkit-appearance: none;
  appearance: none;
  background-color: #fff;
  color: var(--tavazo-charcoal);
  border: 1px solid #ddd;
  border-radius: 0;
  padding: 10px 36px 10px 14px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23C29E53' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.2s ease;
}

select:focus {
  border-color: var(--tavazo-gold);
  box-shadow: 0 0 0 2px rgba(194, 158, 83, 0.1);
}

select option {
  background: #fff;
  color: var(--tavazo-charcoal);
  padding: 8px 14px;
  font-size: 13px;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: var(--tavazo-teal);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--tavazo-gold);
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--tavazo-charcoal);
}

h1 {
  font-size: var(--fs-4xl);
  letter-spacing: var(--ls-tight);
}

h2 {
  font-size: var(--fs-3xl);
  letter-spacing: var(--ls-tight);
}

h3 {
  font-size: var(--fs-2xl);
}

h4 {
  font-size: var(--fs-xl);
}

h5 {
  font-size: var(--fs-lg);
}

h6 {
  font-size: var(--fs-md);
}

p {
  margin-bottom: var(--space-md);
  line-height: var(--lh-relaxed);
}

p:last-child {
  margin-bottom: 0;
}

strong, b {
  font-weight: var(--fw-semibold);
}

small {
  font-size: var(--fs-sm);
}

::selection {
  background-color: var(--tavazo-gold);
  color: var(--tavazo-white);
}

/* Focus outline for accessibility */
:focus-visible {
  outline: 2px solid var(--tavazo-gold);
  outline-offset: 2px;
}

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container--narrow {
  max-width: var(--container-md);
}

.container--wide {
  max-width: var(--container-2xl);
}

/* ── Section Spacing ── */
.section {
  padding: var(--section-pad) 0;
}

.section--sm {
  padding: 72px 0;
}

.section--lg {
  padding: 120px 0;
}

/* ── Section Backgrounds — Luxury Alternating ── */
.section--cream {
  background-color: var(--tavazo-cream);
}

.section--cream-dark {
  background-color: var(--tavazo-cream-dark);
}

.section--cream-warm {
  background-color: #F8F5EF;
}

.section--white {
  background-color: #fff;
}

.section--teal {
  background-color: var(--bg-rich);
  color: rgba(255, 255, 255, 0.8);
}

.section--teal h2,
.section--teal h3,
.section--teal h4 {
  color: #fff;
}

/* Dark luxury section */
.section--dark {
  background-color: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: #fff;
}

.section--dark .section-heading__subtitle {
  color: var(--tavazo-gold);
}

.section--dark .section-heading__title {
  color: #fff;
}

.section--dark .section-heading__description {
  color: rgba(255, 255, 255, 0.55);
}

.section--dark .ornamental-line {
  filter: brightness(1.5);
}

/* Teal section text overrides */
.section--teal .section-heading__subtitle {
  color: var(--tavazo-gold);
}

.section--teal .section-heading__title {
  color: #fff;
}

.section--teal .section-heading__description {
  color: rgba(255, 255, 255, 0.55);
}

.section--teal .ornamental-line {
  filter: brightness(1.5);
}

/* ── Flex & Grid Helpers ── */
.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;
}

.grid {
  display: grid;
}

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

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

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

/* ── Text Utilities ── */
.text-center {
  text-align: center;
}

.text-gold {
  color: var(--tavazo-gold);
}

.text-teal {
  color: var(--tavazo-teal);
}

.text-white {
  color: var(--tavazo-white);
}

.text-muted {
  color: var(--tavazo-gray);
}

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

.text-italic {
  font-style: italic;
}

/* ── Section Heading Pattern — Editorial ── */
.section-heading {
  text-align: center;
  margin-bottom: 48px;
}

.section-heading__subtitle {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--tavazo-gold);
  margin-bottom: var(--space-md);
}

.section-heading__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  margin-bottom: var(--space-md);
  position: relative;
  display: inline-block;
  color: var(--tavazo-charcoal);
  line-height: 1.15;
}

.section-heading__description {
  max-width: 600px;
  margin: 0 auto;
  color: var(--tavazo-gray);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
}

/* ── Ornamental Divider (inline with heading) ── */
.ornamental-line {
  display: block;
  width: 200px;
  height: 24px;
  margin: 12px auto 20px;
  background: url('../assets/svg/divider-ornament.svg') center/contain no-repeat;
  opacity: 0.75;
}

.ornamental-line::before,
.ornamental-line::after {
  display: none;
}

.ornamental-line__diamond {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  :root {
    --container-padding: 1.25rem;
  }

  h1 { font-size: var(--fs-3xl); }
  h2 { font-size: var(--fs-2xl); }
  h3 { font-size: var(--fs-xl); }

  .section {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  h1 { font-size: var(--fs-2xl); }
  h2 { font-size: var(--fs-xl); }

  .section {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }

  .section-heading {
    margin-bottom: var(--space-2xl);
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  :root {
    --container-padding: 1rem;
  }

  html { font-size: 14px; }
  h1 { font-size: var(--fs-xl); }
  h2 { font-size: var(--fs-lg); }
  h3 { font-size: var(--fs-md); }

  .section { padding: 48px 0; }
  .section-heading { margin-bottom: 28px; }
  .section-heading__title { font-size: 1.5rem; }
  .section-heading__subtitle { font-size: 9px; letter-spacing: 0.2em; }
  .ornamental-line { width: 120px; height: 16px; }
}

/* ── Scrollbar Styling ── */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--tavazo-cream-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--tavazo-teal);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--tavazo-teal-dark);
}

/* ── Screen Reader Only ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Image placeholder for development ── */
.placeholder-img {
  background: linear-gradient(135deg, var(--tavazo-cream-dark) 0%, var(--tavazo-cream-darker) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tavazo-gray-light);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}
