/* House of Aesthetics - Universal Responsive Design System */

:root {
  --color-ivory: #FAF8F5;
  --color-ivory-light: #FFFFFF;
  --color-beige: #F4EFE6;
  --color-beige-dark: #E8E0D2;
  --color-border: #E8E2D5;
  --color-charcoal: #1C1B19;
  --color-charcoal-light: #33302B;
  --color-muted: #736D64;
  --color-terracotta: #C86D51;
  --color-terracotta-dark: #A9563C;
  --color-sage: #6B7D68;
  --color-sage-light: #EBF0EA;
  --color-copper: #C57D56;
  --color-copper-light: #F7EFE9;

  --font-editorial: 'DM Serif Display', 'Cormorant Garamond', Georgia, serif;
  --font-serif: 'Cormorant Garamond', 'DM Serif Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Base Resets & Global Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background-color: var(--color-ivory);
  color: var(--color-charcoal);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-ivory);
  color: var(--color-charcoal);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}

main {
  flex: 1 0 auto;
  width: 100%;
  overflow-x: hidden;
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Typography Classes */
.font-editorial {
  font-family: var(--font-editorial);
  letter-spacing: -0.015em;
}

.font-serif {
  font-family: var(--font-serif);
}

.font-sans {
  font-family: var(--font-sans);
}

/* Responsive Headings */
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Form Input Styling */
.form-input {
  width: 100%;
  padding: 0.8125rem 1rem;
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-charcoal);
  font-size: 0.875rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-input:focus {
  border-color: var(--color-terracotta);
  box-shadow: 0 0 0 3px rgba(200, 109, 81, 0.12);
}

/* Touch Friendly Targets */
button, a, input, select, textarea {
  touch-action: manipulation;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-ivory);
}

::-webkit-scrollbar-thumb {
  background: #D8D1C3;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-muted);
}

/* Badges */
.badge-noma {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  white-space: nowrap;
}

.badge-new {
  background-color: #1C1B19;
  color: #FAF8F5;
}

.badge-bestseller {
  background-color: var(--color-copper);
  color: #FFFFFF;
}

.badge-limited {
  background-color: var(--color-terracotta);
  color: #FFFFFF;
}

.badge-noma-pick {
  background-color: var(--color-sage);
  color: #FFFFFF;
}

/* High-End Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.875rem;
  background-color: var(--color-charcoal);
  color: #FAF8F5;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 9999px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(28, 27, 25, 0.08);
  cursor: pointer;
  text-align: center;
}

.btn-primary:hover {
  background-color: var(--color-terracotta);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(200, 109, 81, 0.25);
  color: #FFFFFF;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.875rem;
  background-color: transparent;
  color: var(--color-charcoal);
  border: 1px solid var(--color-charcoal);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 9999px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-align: center;
}

.btn-secondary:hover {
  background-color: var(--color-charcoal);
  color: #FAF8F5;
  transform: translateY(-1px);
}

.btn-terracotta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.875rem;
  background-color: var(--color-terracotta);
  color: #FFFFFF;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 9999px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-terracotta:hover {
  background-color: var(--color-terracotta-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(200, 109, 81, 0.28);
}

/* Product Cards */
.product-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  width: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(35, 30, 25, 0.08);
}

.product-image-container {
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  background-color: #F7F4EE;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.product-image-container img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.product-card:hover .product-primary-img {
  transform: scale(1.06);
}

.product-card .product-secondary-img {
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 85%;
  max-height: 85%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-secondary-img {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.06);
}

/* Progress bar */
.shipping-progress-track {
  height: 6px;
  background-color: #E8E0D2;
  border-radius: 9999px;
  overflow: hidden;
}

.shipping-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #C57D56, #C86D51);
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}

@media (max-width: 640px) {
  .toast-container {
    bottom: 16px;
    right: 16px;
    left: 16px;
  }
}

.toast-item {
  pointer-events: auto;
  width: 100%;
  max-width: 420px;
  background-color: #1C1B19;
  color: #FAF8F5;
  padding: 14px 18px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.875rem;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* iOS Safe Area Helpers */
.pb-safe {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.pt-safe {
  padding-top: max(1rem, env(safe-area-inset-top));
}
