/* Reset y variables base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colores del tema claro */
  --background: oklch(1 0 0);
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary: oklch(0.205 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.97 0 0);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.205 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.577 0.245 27.325);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);
  --radius: 0.625rem;
  
  /* Fuentes */
  font-family: "Geist Sans", system-ui, -apple-system, sans-serif;
}

.dark {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.145 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.145 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.985 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.269 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.396 0.141 25.723);
  --destructive-foreground: oklch(0.637 0.237 25.331);
  --border: oklch(0.269 0 0);
  --input: oklch(0.269 0 0);
  --ring: oklch(0.439 0 0);
}

html {
  font-family: var(--font-sans, "Geist Sans", system-ui, sans-serif);
}

body {
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout básico */
.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-1 {
  gap: 0.25rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.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: 1rem;
  padding-right: 1rem;
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

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

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

/* 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));
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 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\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  
  .md\:grid-cols-\[1fr_420px\] {
    grid-template-columns: 1fr 420px;
  }
}

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

/* Spacing */
.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

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

.py-1\.5 {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

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

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.py-10 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

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

@media (min-width: 768px) {
  .md\:px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .md\:py-10 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  
  .md\:py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }
}

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

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

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

.mt-6 {
  margin-top: 1.5rem;
}

.mt-12 {
  margin-top: 3rem;
}

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

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

.ml-auto {
  margin-left: auto;
}

/* Tipografía */
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

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

.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

.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;
}

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

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

.font-semibold {
  font-weight: 600;
}

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

.leading-tight {
  line-height: 1.25;
}

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

.line-through {
  text-decoration-line: line-through;
}

.underline {
  text-decoration-line: underline;
}

/* Colores de texto */
.text-foreground {
  color: var(--foreground);
}

.text-background {
  color: var(--background);
}

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

.text-emerald-600 {
  color: rgb(5 150 105);
}

.text-red-600 {
  color: rgb(220 38 38);
}

.text-white {
  color: rgb(255 255 255);
}

.text-black {
  color: rgb(0 0 0);
}

/* Hover states */
.hover\:text-foreground:hover {
  color: var(--foreground);
}

.hover\:underline:hover {
  text-decoration-line: underline;
}

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

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

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

.bg-muted\/30 {
  background-color: color-mix(in srgb, var(--muted) 30%, transparent);
}

.bg-transparent {
  background-color: transparent;
}

.bg-white {
  background-color: rgb(255 255 255);
}

.bg-white\/10 {
  background-color: rgb(255 255 255 / 0.1);
}

.bg-emerald-500 {
  background-color: rgb(34 197 94);
}

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

.from-zinc-900 {
  --tw-gradient-from: rgb(24 24 27);
  --tw-gradient-to: rgb(24 24 27 / 0);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

.to-zinc-800 {
  --tw-gradient-to: rgb(39 39 42);
}

/* Demo banner específico */
.demo-banner {
  background: linear-gradient(to right, rgb(24 24 27), rgb(39 39 42));
  color: white;
  border-bottom: 1px solid rgb(63 63 70 / 0.5);
}

/* Borders */
.border {
  border-width: 1px;
  border-color: var(--border);
}

.border-b {
  border-bottom-width: 1px;
  border-color: var(--border);
}

.border-t {
  border-top-width: 1px;
  border-color: var(--border);
}

.border-zinc-700\/50 {
  border-color: rgb(63 63 70 / 0.5);
}

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

/* Border radius */
.rounded {
  border-radius: 0.25rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.rounded-2xl {
  border-radius: 1rem;
}

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

.rounded-md {
  border-radius: 0.375rem;
}

/* Display */
.block {
  display: block;
}

.inline-flex {
  display: inline-flex;
}

.hidden {
  display: none;
}

@media (min-width: 768px) {
  .md\:flex {
    display: flex;
  }
  
  .md\:hidden {
    display: none;
  }
}

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

.absolute {
  position: absolute;
}

.bottom-2 {
  bottom: 0.5rem;
}

.left-2 {
  left: 0.5rem;
}

.right-2 {
  right: 0.5rem;
}

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

.-right-1 {
  right: -0.25rem;
}

/* Sizing */
.w-full {
  width: 100%;
}

.w-96 {
  width: 24rem;
}

.w-80 {
  width: 20rem;
}

.w-9 {
  width: 2.25rem;
}

.w-7 {
  width: 1.75rem;
}

.w-6 {
  width: 1.5rem;
}

.w-5 {
  width: 1.25rem;
}

.w-4 {
  width: 1rem;
}

.w-2 {
  width: 0.5rem;
}

.h-16 {
  height: 4rem;
}

.h-9 {
  height: 2.25rem;
}

.h-7 {
  height: 1.75rem;
}

.h-6 {
  height: 1.5rem;
}

.h-5 {
  height: 1.25rem;
}

.h-4 {
  height: 1rem;
}

.h-2 {
  height: 0.5rem;
}

.h-\[18px\] {
  height: 18px;
}

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

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

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

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

.aspect-ratio-1-1 {
  aspect-ratio: 1 / 1;
}

.flex-1 {
  flex: 1 1 0%;
}

.shrink-0 {
  flex-shrink: 0;
}

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

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

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

/* Shadow */
.shadow-none {
  box-shadow: 0 0 #0000;
}

.hover\:shadow-sm:hover {
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

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

/* Focus */
.focus-visible\:ring-0:focus-visible {
  box-shadow: none;
}

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

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

/* Z-index */
.z-50 {
  z-index: 50;
}

/* Componentes específicos */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
}

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

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

.btn-primary {
  background-color: var(--foreground);
  color: var(--background);
  padding: 0.5rem 1rem;
}

.btn-primary:hover {
  background-color: color-mix(in srgb, var(--foreground) 90%, black);
}

.btn-outline {
  border-color: var(--border);
  background-color: transparent;
  color: var(--foreground);
  padding: 0.5rem 1rem;
}

.btn-outline:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
  padding: 0.5rem 1rem;
}

.btn-ghost:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  padding: 0.5rem 1rem;
}

.btn-secondary:hover {
  background-color: color-mix(in srgb, var(--secondary) 80%, transparent);
}

.btn-sm {
  height: 2.25rem;
  border-radius: 0.375rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
}

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

/* Input */
.input {
  display: flex;
  height: 2.5rem;
  width: 100%;
  border-radius: 0.375rem;
  border: 1px solid var(--input);
  background-color: var(--background);
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.input::placeholder {
  color: var(--muted-foreground);
}

.input:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--ring);
}

.input:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Card */
.card {
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background-color: var(--card);
  color: var(--card-foreground);
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

/* Product Card específico - Tamaños exactos como el original */
.product-card {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: var(--background);
  transition: box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  height: auto;
}

.product-card:hover {
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

/* Contenedor de imagen con tamaño fijo - más pequeño en mobile */
.product-card .relative {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 85%; /* Aspect ratio más compacto en mobile */
  overflow: hidden;
}

@media (min-width: 768px) {
  .product-card .relative {
    padding-bottom: 100%; /* Aspect ratio 1:1 en desktop */
  }
}

/* Imágenes de productos - tamaños exactos */
.product-card img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Botones superpuestos en la imagen */
.product-card .absolute.bottom-2 {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  right: 0.5rem;
  z-index: 10;
}

/* Padding del contenido - más compacto en mobile */
.product-card .p-4 {
  padding: 0.75rem;
}

@media (min-width: 768px) {
  .product-card .p-4 {
    padding: 1rem;
  }
}

/* Hero image específico */
.hero-image {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  border-radius: 1rem;
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .hero-image {
    max-height: 500px;
  }
}

/* Imagen de producto individual */
.product-detail-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .product-detail-image {
    max-width: 600px;
  }
}

/* Cart animations - mejoradas para ser más visibles */
@keyframes cart-bounce {
  0% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.15);
  }
  50% {
    transform: scale(0.95);
  }
  75% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes cart-pop {
  0% {
    transform: scale(0.5);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes cart-wiggle {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-3deg) scale(1.05);
  }
  75% {
    transform: rotate(3deg) scale(1.05);
  }
}

.cart-bounce {
  animation: cart-bounce 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cart-pop {
  animation: cart-pop 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cart-wiggle {
  animation: cart-wiggle 300ms ease-in-out;
}

/* Efecto de añadir al carrito */
.adding-to-cart {
  animation: cart-wiggle 300ms ease-in-out;
  background-color: rgb(34 197 94) !important;
  color: white !important;
}

/* Sheet/Modal overlay */
.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background-color: rgb(0 0 0 / 0.8);
  display: none;
}

.sheet-overlay.open {
  display: block;
}

.sheet-content {
  position: fixed;
  z-index: 50;
  gap: 1rem;
  background-color: var(--background);
  padding: 1.5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border);
}

.sheet-content.right {
  top: 0;
  right: 0;
  height: 100vh;
  border-left: 1px solid var(--border);
  border-right: none;
  border-top: none;
  border-bottom: none;
  transform: translateX(100%);
}

.sheet-content.right.open {
  transform: translateX(0);
}

/* Mobile menu */
@media (max-width: 767px) {
  .mobile-search {
    display: block;
  }
  
  .desktop-nav {
    display: none;
  }
}

@media (min-width: 768px) {
  .mobile-search {
    display: none;
  }
  
  .desktop-nav {
    display: flex;
  }
}

/* Links */
a {
  color: inherit;
  text-decoration: inherit;
}

/* Fieldsets sin bordes */
fieldset {
  border: none;
  margin: 0;
  padding: 0;
  outline: none;
}

fieldset legend {
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 1rem;
}

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

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

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

.mt-auto {
  margin-top: auto;
}

.space-y-1 > * + * {
  margin-top: 0.25rem;
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.space-y-3 > * + * {
  margin-top: 0.75rem;
}

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

/* Animate pulse for loading skeletons */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive utilities adicionales */
@media (min-width: 768px) {
  .md\:gap-2 {
    gap: 0.5rem;
  }
  
  .md\:gap-6 {
    gap: 1.5rem;
  }
  
  .md\:gap-12 {
    gap: 3rem;
  }
}

/* Product grid específico para asegurar tamaños exactos como el original */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem; /* 8px en mobile */
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Tablet y Desktop - 4 columnas con más gap */
@media (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem; /* 24px en desktop */
  }
}

/* Catálogo específico - en desktop grande puede tener 4 columnas */
@media (min-width: 1024px) {
  .products-grid.catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
  }
}