/* Font imports - using Google Fonts as fallback */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=DM+Sans:wght@400;500&display=swap');

/* CSS Variables */
:root {
  --background: 40 30% 96%;
  --foreground: 25 25% 18%;

  --card: 35 35% 94%;
  --card-foreground: 25 25% 18%;

  --popover: 40 30% 96%;
  --popover-foreground: 25 25% 18%;

  --primary: 28 30% 50%;
  --primary-foreground: 40 30% 96%;

  --secondary: 35 25% 88%;
  --secondary-foreground: 25 25% 25%;

  --muted: 30 20% 90%;
  --muted-foreground: 25 15% 45%;

  --accent: 20 35% 42%;
  --accent-foreground: 40 30% 96%;

  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;

  --border: 30 20% 85%;
  --input: 30 20% 85%;
  --ring: 28 30% 50%;

  --radius: 0.25rem;

  /* Custom tokens */
  --nude-cream: 38 40% 94%;
  --nude-sand: 32 30% 78%;
  --nude-terracotta: 18 35% 48%;
  --nude-charcoal: 25 20% 22%;
  --nude-soft: 35 25% 92%;

  /* Typography */
  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;

  /* Shadows */
  --shadow-soft: 0 4px 20px -4px hsl(25 20% 22% / 0.08);
  --shadow-card: 0 2px 12px -2px hsl(25 20% 22% / 0.06);
}

/* Base styles */
* {
  border-color: hsl(var(--border));
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Utility classes */
.text-balance {
  text-wrap: balance;
}

.checkout-error {
  color: hsl(var(--destructive));
  font-size: 0.85rem;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.checkout-error--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-up {
  animation: slideUp 0.6s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.3s ease-out forwards;
}

/* Layout utilities */
.min-h-screen {
  min-height: 100vh;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

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

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

.gap-8 {
  gap: 2rem;
}

.gap-12 {
  gap: 3rem;
}

/* Container */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 1280px) {
  .container {
    max-width: 1200px;
  }
}

/* Grid */
.grid {
  display: grid;
}

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

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .sm\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .md\:flex {
    display: flex;
  }

  .md\:flex-row {
    flex-direction: row;
  }

  .md\:text-5xl {
    font-size: 3rem;
    line-height: 1;
  }

  .md\:text-left {
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lg\:gap-8 {
    gap: 2rem;
  }

  .lg\:gap-12 {
    gap: 3rem;
  }

  .lg\:gap-20 {
    gap: 5rem;
  }

  .lg\:text-9xl {
    font-size: 8rem;
    line-height: 1;
  }
}

/* Positioning */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.fixed {
  position: fixed;
}

.inset-0 {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.top-0 {
  top: 0;
}

.right-0 {
  right: 0;
}

.left-0 {
  left: 0;
}

.bottom-0 {
  bottom: 0;
}

.z-10 {
  z-index: 10;
}

.z-30 {
  z-index: 30;
}

.z-40 {
  z-index: 40;
}

.z-50 {
  z-index: 50;
}

/* Spacing */
.p-4 {
  padding: 1rem;
}

.p-5 {
  padding: 1.25rem;
}

.p-6 {
  padding: 1.5rem;
}

.p-8 {
  padding: 2rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.py-24 {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

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

.mb-3 {
  margin-bottom: 0.75rem;
}

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

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-12 {
  margin-bottom: 3rem;
}

.mb-16 {
  margin-bottom: 4rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* Sizing */
.w-5 {
  width: 1.25rem;
}

.w-7 {
  width: 1.75rem;
}

.w-8 {
  width: 2rem;
}

.w-10 {
  width: 2.5rem;
}

.w-12 {
  width: 3rem;
}

.w-16 {
  width: 4rem;
}

.w-20 {
  width: 5rem;
}

.w-full {
  width: 100%;
}

.h-5 {
  height: 1.25rem;
}

.h-7 {
  height: 1.75rem;
}

.h-10 {
  height: 2.5rem;
}

.h-12 {
  height: 3rem;
}

.h-16 {
  height: 4rem;
}

.h-32 {
  height: 8rem;
}

.h-full {
  height: 100%;
}

.min-w-0 {
  min-width: 0;
}

.min-w-\[200px\] {
  min-width: 200px;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-xl {
  max-width: 36rem;
}

/* Typography */
.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

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

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

.font-medium {
  font-weight: 500;
}

.tracking-tight {
  letter-spacing: -0.025em;
}

.tracking-widest {
  letter-spacing: 0.1em;
}

.uppercase {
  text-transform: uppercase;
}

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

.leading-relaxed {
  line-height: 1.625;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 640px) {
  .sm\:text-7xl {
    font-size: 4.5rem;
    line-height: 1;
  }

  .sm\:text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
  }

  .sm\:flex-row {
    flex-direction: row;
  }
}

@media (min-width: 768px) {
  .md\:text-8xl {
    font-size: 6rem;
    line-height: 1;
  }

  .md\:text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
  }
}

@media (min-width: 1024px) {
  .lg\:text-9xl {
    font-size: 8rem;
    line-height: 1;
  }
}

/* Colors */
.bg-background {
  background-color: hsl(var(--background));
}

.bg-card {
  background-color: hsl(var(--card));
}

.bg-nude-soft {
  background-color: hsl(var(--nude-soft));
}

.bg-nude-cream {
  background-color: hsl(var(--nude-cream));
}

.bg-nude-sand {
  background-color: hsl(var(--nude-sand));
}

.bg-muted {
  background-color: hsl(var(--muted));
}

.text-foreground {
  color: hsl(var(--foreground));
}

.text-muted-foreground {
  color: hsl(var(--muted-foreground));
}

.text-nude-terracotta {
  color: hsl(var(--nude-terracotta));
}

.text-destructive {
  color: hsl(var(--destructive));
}

/* Background utilities */
.bg-cover {
  background-size: cover;
}

.bg-center {
  background-position: center;
}

.bg-no-repeat {
  background-repeat: no-repeat;
}

.bg-gradient-to-t {
  background-image: linear-gradient(to top, var(--tw-gradient-stops));
}

.from-background {
  --tw-gradient-from: hsl(var(--background));
  --tw-gradient-to: hsl(var(--background) / 0);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.to-transparent {
  --tw-gradient-to: transparent;
}

/* Opacity */
.bg-background\/40 {
  background-color: hsl(var(--background) / 0.4);
}

.bg-background\/50 {
  background-color: hsl(var(--background) / 0.5);
}

.bg-background\/80 {
  background-color: hsl(var(--background) / 0.8);
}

.bg-foreground\/0 {
  background-color: hsl(var(--foreground) / 0);
}

.bg-foreground\/5 {
  background-color: hsl(var(--foreground) / 0.05);
}

.bg-foreground\/20 {
  background-color: hsl(var(--foreground) / 0.2);
}

.bg-nude-sand\/30 {
  background-color: hsl(var(--nude-sand) / 0.3);
}

.bg-nude-sand\/50 {
  background-color: hsl(var(--nude-sand) / 0.5);
}

.text-muted-foreground\/60 {
  color: hsl(var(--muted-foreground) / 0.6);
}

.text-foreground\/80 {
  color: hsl(var(--foreground) / 0.8);
}

/* Borders */
.border {
  border-width: 1px;
}

.border-b {
  border-bottom-width: 1px;
}

.border-t {
  border-top-width: 1px;
}

.border-border {
  border-color: hsl(var(--border));
}

.border-border\/50 {
  border-color: hsl(var(--border) / 0.5);
}

.border-2 {
  border-width: 2px;
}

.rounded-sm {
  border-radius: calc(var(--radius) - 4px);
}

.rounded-full {
  border-radius: 9999px;
}

.rounded-md {
  border-radius: var(--radius);
}

/* Overflow */
.overflow-hidden {
  overflow: hidden;
}

.overflow-y-auto {
  overflow-y: auto;
}

/* Shadows */
.shadow-card {
  box-shadow: var(--shadow-card);
}

.shadow-soft {
  box-shadow: var(--shadow-soft);
}

/* Backdrop */
.backdrop-blur-sm {
  backdrop-filter: blur(4px);
}

.backdrop-blur-md {
  backdrop-filter: blur(12px);
}

/* Transitions */
.transition-colors {
  transition-property: color, background-color, border-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.duration-300 {
  transition-duration: 300ms;
}

/* Hover states */
.hover\:bg-nude-cream:hover {
  background-color: hsl(var(--nude-cream));
}

.hover\:bg-muted\/80:hover {
  background-color: hsl(var(--muted) / 0.8);
}

.hover\:bg-foreground\/5:hover {
  background-color: hsl(var(--foreground) / 0.05);
}

.hover\:text-foreground:hover {
  color: hsl(var(--foreground));
}

.hover\:text-destructive:hover {
  color: hsl(var(--destructive));
}

.hover\:shadow-soft:hover {
  box-shadow: var(--shadow-soft);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-body);
  letter-spacing: 0.025em;
  transition: all 300ms;
  cursor: pointer;
  border: none;
  outline: none;
}

.btn:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.btn svg {
  pointer-events: none;
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.btn-nude {
  background-color: hsl(var(--nude-terracotta));
  color: hsl(var(--primary-foreground));
  box-shadow: var(--shadow-soft);
}

.btn-nude:hover {
  background-color: hsl(var(--nude-terracotta) / 0.9);
}

.btn-nude-outline {
  border: 2px solid hsl(var(--foreground) / 0.2);
  background-color: transparent;
  color: hsl(var(--foreground));
}

.btn-nude-outline:hover {
  background-color: hsl(var(--foreground) / 0.05);
}

.btn-nude-ghost {
  color: hsl(var(--foreground) / 0.8);
}

.btn-nude-ghost:hover {
  color: hsl(var(--foreground));
  background-color: hsl(var(--nude-soft));
}

.btn-sm {
  height: 2.25rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.btn-lg {
  height: 3rem;
  padding-left: 2rem;
  padding-right: 2rem;
  font-size: 1rem;
}

.btn-icon {
  height: 2.5rem;
  width: 2.5rem;
}

.btn-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Cart badge */
.cart-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  background-color: hsl(var(--nude-terracotta));
  color: hsl(var(--primary-foreground));
  font-size: 0.75rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-badge.hidden {
  display: none;
}

/* Aspect ratio */
.aspect-square {
  aspect-ratio: 1 / 1;
}

.aspect-\[4\/5\] {
  aspect-ratio: 4 / 5;
}

/* Space utilities */
.space-y-4 > * + * {
  margin-top: 1rem;
}

/* Cart Sidebar */
.cart-overlay {
  position: fixed;
  inset: 0;
  background-color: hsl(var(--foreground) / 0.2);
  backdrop-filter: blur(4px);
  z-index: 40;
  transition: opacity 300ms;
}

.cart-overlay.hidden {
  display: none;
}

.cart-sidebar {
  position: fixed;
  right: 0;
  top: 0;
  height: 100%;
  width: 100%;
  max-width: 28rem;
  background-color: hsl(var(--background));
  box-shadow: var(--shadow-soft);
  z-index: 50;
  animation: slideInRight 0.3s ease-out forwards;
}

.cart-sidebar.hidden {
  display: none;
}

/* Product card hover effect */
.group:hover .group-hover\:bg-foreground\/5 {
  background-color: hsl(var(--foreground) / 0.05);
}

/* Flex shrink */
.flex-shrink-0 {
  flex-shrink: 0;
}

/* Hidden utility */
.hidden {
  display: none;
}

/* Spinner animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

.border-t-transparent {
  border-top-color: transparent;
}

.border-nude-terracotta {
  border-color: hsl(var(--nude-terracotta));
}

.col-span-full {
  grid-column: 1 / -1;
}

/* Responsive text sizes */
@media (min-width: 640px) {
  .text-6xl {
    font-size: 3.75rem;
    line-height: 1;
  }
}

/* Product Carousel */
.product-carousel {
  position: relative;
}

.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease-in-out;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  background-color: hsl(var(--background) / 0.8);
  backdrop-filter: blur(4px);
  border: 1px solid hsl(var(--border) / 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
}

.product-carousel:hover .carousel-btn {
  opacity: 1;
  pointer-events: all;
}

.carousel-btn:hover {
  background-color: hsl(var(--background) / 0.95);
  transform: translateY(-50%) scale(1.1);
}

.carousel-btn-prev {
  left: 0.75rem;
}

.carousel-btn-next {
  right: 0.75rem;
}

.carousel-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  color: hsl(var(--foreground));
  stroke-width: 2;
}

.carousel-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.product-carousel:hover .carousel-dots {
  opacity: 1;
}

.carousel-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: hsl(var(--background) / 0.5);
  border: 1px solid hsl(var(--border) / 0.5);
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
}

.carousel-dot:hover {
  background-color: hsl(var(--background) / 0.8);
  transform: scale(1.2);
}

.carousel-dot.active {
  background-color: hsl(var(--nude-terracotta));
  border-color: hsl(var(--nude-terracotta));
}

/* Object fit utilities */
.object-cover {
  object-fit: cover;
}

/* Transition opacity */
.transition-opacity {
  transition-property: opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.duration-300 {
  transition-duration: 300ms;
}

