/* LINVÉ Artisanal Heritage Luxury - Custom Styling & Responsiveness */

:root {
  --color-primary: #2C221E;
  --color-olive: #4A5844;
  --color-sage: #6B7B63;
  --color-ecru: #F5F0EB;
  --color-cream: #FDFBF7;
  --color-sand: #E4DACF;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body {
  overflow-x: clip;
  max-width: 100%;
  background-color: var(--color-cream);
  color: var(--color-primary);
}

/* ==========================================================================
   Universal Typography Design System Tokens
   ========================================================================== */
.font-headline-sm {
  font-family: "Bodoni Moda", serif !important;
}

.text-headline-sm {
  font-size: 20px !important;
  line-height: 28px !important;
  letter-spacing: 0.01em !important;
  font-weight: 400 !important;
}

.font-headline-md {
  font-family: "Bodoni Moda", serif !important;
}

.text-headline-md {
  font-size: 24px !important;
  line-height: 32px !important;
  letter-spacing: 0em !important;
  font-weight: 400 !important;
}

.font-headline-lg {
  font-family: "Bodoni Moda", serif !important;
}

.text-headline-lg {
  font-size: 32px !important;
  line-height: 40px !important;
  letter-spacing: -0.01em !important;
  font-weight: 400 !important;
}

.font-headline-xl {
  font-family: "Bodoni Moda", serif !important;
}

.text-headline-xl {
  font-size: 44px !important;
  line-height: 52px !important;
  letter-spacing: -0.015em !important;
  font-weight: 400 !important;
}

.font-body-sm {
  font-family: "Inter", sans-serif !important;
}

.text-body-sm {
  font-size: 13px !important;
  line-height: 20px !important;
  letter-spacing: 0.01em !important;
  font-weight: 400 !important;
}

.font-body-md {
  font-family: "Inter", sans-serif !important;
}

.text-body-md {
  font-size: 15px !important;
  line-height: 24px !important;
  letter-spacing: 0em !important;
  font-weight: 300 !important;
}

.font-body-lead {
  font-family: "Inter", sans-serif !important;
}

.text-body-lead {
  font-size: 18px !important;
  line-height: 28px !important;
  letter-spacing: -0.01em !important;
  font-weight: 300 !important;
}

.font-label-uppercase {
  font-family: "Inter", sans-serif !important;
}

.text-label-uppercase {
  font-size: 11px !important;
  line-height: 14px !important;
  letter-spacing: 0.15em !important;
  font-weight: 500 !important;
}

.font-label-nav {
  font-family: "Inter", sans-serif !important;
}

.text-label-nav {
  font-size: 13px !important;
  line-height: 16px !important;
  letter-spacing: 0.08em !important;
  font-weight: 400 !important;
}

.font-caption {
  font-family: "Bodoni Moda", serif !important;
}

.text-caption {
  font-size: 14px !important;
  line-height: 20px !important;
  letter-spacing: 0.04em !important;
  font-weight: 400 !important;
}

/* Spacing tokens fallback */
.p-space-sm {
  padding: 0.75rem !important;
}

.p-space-md {
  padding: 1rem !important;
}

.pt-space-sm {
  padding-top: 0.75rem !important;
}

.pt-space-md {
  padding-top: 1rem !important;
}

.space-y-space-md> :not([hidden])~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse))) !important;
  margin-bottom: calc(1rem * var(--tw-space-y-reverse)) !important;
}

/* Editorial Justified Text with Clean Hyphenation */
.editorial-justify {
  text-align: justify !important;
  text-justify: inter-word;
  text-align-last: left;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

.editorial-justify .grid {
  text-align: left;
}

/* Luxury micro-interactions */
.editorial-link {
  position: relative;
  display: inline-block;
}

.editorial-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: currentColor;
  transition: width 0.3s ease;
}

.editorial-link:hover::after {
  width: 100%;
}

/* Off-canvas mobile navigation drawer */
#mobile-drawer {
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
  pointer-events: none;
  visibility: hidden;
}

#mobile-drawer.open {
  transform: translateX(0);
  pointer-events: auto;
  visibility: visible;
}

#mobile-backdrop {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobile-backdrop.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* Hide webkit scrollbars gracefully */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Enhanced Mobile Responsiveness & Touch Targets */
html,
body {
  overflow-x: clip;
  max-width: 100%;
}

/* Ensure images never cause horizontal overflow */
img {
  max-width: 100%;
}

/* Prevent auto-zoom on iOS Safari when tapping inputs (requires >= 16px font-size) */
@media (max-width: 768px) {

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Touch-friendly buttons and controls without distorting inline anchor text */
  button,
  .btn,
  .touch-target,
  [role="button"],
  input[type="submit"],
  input[type="button"],
  #menu-toggle-btn,
  #menu-close-btn,
  #search-toggle-btn,
  #header-bag-link {
    min-height: 40px;
    min-width: 40px;
  }
}

/* Luxury Skeleton Shimmer */
@keyframes linveShimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

.linve-skeleton {
  background: linear-gradient(90deg, #f8f3ee 25%, #f0e9e1 50%, #f8f3ee 75%);
  background-size: 200% 100%;
  animation: linveShimmer 1.8s infinite ease-in-out;
}

/* Product Detail Gallery Sizing & Proportions (Fixed 2:3 Aspect Ratio & Top-Anchored Center-Crop) */
.product-gallery-single {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 2 / 3;
  margin-left: auto;
  margin-right: auto;
  background-color: #f8f3ee;
  overflow: hidden;
  border-radius: 2px;
}

@media (min-width: 1024px) {
  .product-gallery-single {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }
}

.product-gallery-single img,
#main-product-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block;
}

.product-gallery-grid-item {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background-color: #f8f3ee;
  overflow: hidden;
  border-radius: 2px;
}

.product-gallery-grid-item img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block;
}

/* Homepage Hero Responsive Picture Styles */
.hero-picture-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-picture-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

@media (max-width: 767px) {
  .hero-picture-wrapper img {
    object-position: center center;
  }
}

@media (min-width: 768px) {
  .hero-picture-wrapper img {
    object-position: center center;
  }
}



/* ==== Mobile UI Overhaul (max-width: 768px) ==== */
@media (max-width: 768px) {

  /* Hide hamburger/menu toggle on mobile */
  /* Show the hamburger menu toggle on mobile */
  #menu-toggle-btn {
    display: inline-flex !important;
  }

  /* Component tokens */
  :root {
    --mobile-btn-height: 48px;
    --mobile-btn-radius: 8px;
    --mobile-card-ratio: 1 / 2;
    --mobile-section-px: 16px;
    --mobile-section-py: 24px;
    --mobile-tab-bar-height: 60px;
    --mobile-header-height: 56px;
  }

  /* Utility classes */
  .mobile-btn {
    min-height: var(--mobile-btn-height);
    height: var(--mobile-btn-height);
    border-radius: var(--mobile-btn-radius);
    padding-left: 16px;
    padding-right: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-card {
    aspect-ratio: var(--mobile-card-ratio);
    width: 100%;
    overflow: hidden;
  }

  .mobile-section {
    padding-left: var(--mobile-section-px);
    padding-right: var(--mobile-section-px);
    padding-top: var(--mobile-section-py);
    padding-bottom: var(--mobile-section-py);
  }

  /* Sticky top header */
  .mobile-header {
    position: sticky;
    top: 0;
    height: var(--mobile-header-height);
    background-color: var(--color-cream);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    transition: box-shadow 0.2s ease;
  }

  .mobile-header.scrolled {
    box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
  }

  /* Bottom tab bar */
  .mobile-tab-bar {
    height: var(--mobile-tab-bar-height);
    background-color: var(--color-cream);
    border-top: 1px solid var(--color-sand);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
  }

  .mobile-tab-bar a {
    color: var(--color-secondary);
    font-size: 24px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .mobile-tab-bar a.active {
    color: var(--color-primary);
  }

  .mobile-tab-bar .badge {
    position: absolute;
    top: 2px;
    right: -4px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 9999px;
    padding: 2px 4px;
    font-size: 10px;
    line-height: 1;
  }

  /* Full‑bleed media */
  .hero-picture-wrapper,
  .grid {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }

  /* Touch polish */
  * {
    -webkit-tap-highlight-color: transparent;
  }
}

/* Product Card Universal Image Frame (Fixed Aspect Ratio & Center Crop) */
.product-card-image-wrap,
.product-card-img-container {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background-color: #f8f3ee;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  background-color: #f8f3ee;
  display: block;
}

/* Phone Country Code Select - Eliminate Duplicate Browser & Tailwind Forms Arrows */
select.phone-country-select,
.phone-country-select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: none !important;
  background-color: transparent !important;
  outline: none;
}

select.phone-country-select::-ms-expand,
.phone-country-select::-ms-expand {
  display: none !important;
}

/* ==========================================================================
   Policy Modal Editorial Prose Styling
   ========================================================================== */
.policy-prose {
  color: #504440;
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 1.7;
}

@media (min-width: 640px) {
  .policy-prose {
    font-size: 14px;
    line-height: 1.75;
  }
}

.policy-prose h1,
.policy-prose h2,
.policy-prose h3 {
  font-family: "Bodoni Moda", serif !important;
  color: #2C221E;
  font-weight: 400;
  margin-top: 1.25rem;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.policy-prose h1 {
  font-size: 20px;
}

.policy-prose h2 {
  font-size: 18px;
}

.policy-prose h3 {
  font-size: 16px;
}

.policy-prose h4,
.policy-prose h5,
.policy-prose h6 {
  font-family: "Inter", sans-serif !important;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: #2C221E;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.policy-prose p {
  margin-bottom: 0.85rem;
}

.policy-prose ul {
  list-style-type: disc;
  padding-left: 1.25rem;
  margin-bottom: 0.85rem;
}

.policy-prose ol {
  list-style-type: decimal;
  padding-left: 1.25rem;
  margin-bottom: 0.85rem;
}

.policy-prose li {
  margin-bottom: 0.35rem;
}

.policy-prose strong,
.policy-prose b {
  color: #2C221E;
  font-weight: 600;
}

.policy-prose a {
  color: #4A5844;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.policy-prose a:hover {
  color: #2C221E;
}