/* Paper Card Product Catalog - Inspired by Physical Paper with Clips */

.store-section {
  background: #000000;
  min-height: 100vh;
  padding: 8rem 2rem 4rem;
}

.page-padding {
  max-width: 1400px;
  margin: 0 auto;
}

/* Grid de productos - 3 columnas */
.store-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem 2.5rem;
  padding: 2rem 0;
}

/* Tarjeta de producto con efecto de papel */
.product-card {
  position: relative;
  display: block;
  text-decoration: none;
  perspective: 1000px;
  transition: transform 0.3s ease;
}

/* Contenedor interno de la tarjeta */
.product-card-inner {
  position: relative;
  background: #f8f8f8;
  border-radius: 3px;
  padding: 2.5rem 1.5rem 2rem;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.08),
    0 8px 16px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

/* Clip de papel en la parte superior */
.product-card::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%) rotate(0deg);
  width: 60px;
  height: 30px;
  background: linear-gradient(135deg, #c0c0c0 0%, #e0e0e0 50%, #a8a8a8 100%);
  border-radius: 20px 20px 4px 4px;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 1px 2px rgba(255, 255, 255, 0.5),
    inset 0 -1px 2px rgba(0, 0, 0, 0.2);
  z-index: 10;
  transition: all 0.3s ease;
}

/* Detalle del clip - parte interna */
.product-card::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 16px;
  background: linear-gradient(180deg, #d8d8d8 0%, #b8b8b8 100%);
  border-radius: 8px;
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    inset 0 -1px 1px rgba(0, 0, 0, 0.3);
  z-index: 11;
  transition: all 0.3s ease;
}

/* Efecto hover en la tarjeta */
.product-card:hover {
  transform: translateY(-8px);
}

.product-card:hover .product-card-inner {
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: rotateX(2deg);
}

.product-card:hover::before {
  transform: translateX(-50%) rotate(-2deg);
  box-shadow: 
    0 3px 6px rgba(0, 0, 0, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.6),
    inset 0 -1px 2px rgba(0, 0, 0, 0.25);
}

/* Contenedor de imagen del producto */
.product-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 1.5rem;
  overflow: hidden;
  border-radius: 2px;
  background: #fff;
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.1),
    inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* Imágenes del producto */
.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: none;
}

.product-image-main {
  opacity: 1;
  z-index: 1;
}

.product-image-hover {
  opacity: 0;
  z-index: 2;
}

.product-card:hover .product-image-main {
  opacity: 0;
}

.product-card:hover .product-image-hover {
  opacity: 1;
}

/* Badge de producto */
.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0.4rem 0.8rem;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 3px;
  z-index: 3;
  backdrop-filter: blur(10px);
}

.product-badge.sold-out {
  background: rgba(220, 38, 38, 0.9);
}

/* Título del producto */
.product-title {
  color: #1a1a1a;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
  text-align: center;
  transition: color 0.3s ease;
}

.product-card:hover .product-title {
  color: #000;
}

/* Precio del producto */
.product-price {
  color: #4a4a4a;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  text-align: center;
  transition: color 0.3s ease;
}

.product-card:hover .product-price {
  color: #000;
}

/* Textura de papel sutil */
.product-card-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.01) 2px,
      rgba(0, 0, 0, 0.01) 4px
    );
  pointer-events: none;
  border-radius: 3px;
}

/* Animaciones de entrada */
.product-card {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.6s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }
.product-card:nth-child(7) { animation-delay: 0.7s; }
.product-card:nth-child(8) { animation-delay: 0.8s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .store-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem 2rem;
  }
}

@media (max-width: 640px) {
  .store-section {
    padding: 6rem 1rem 3rem;
  }

  .store-products-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .product-card::before {
    width: 50px;
    height: 25px;
    top: -12px;
  }

  .product-card::after {
    width: 42px;
    height: 14px;
    top: -6px;
  }

  .product-card-inner {
    padding: 2rem 1.2rem 1.5rem;
  }

  .product-title {
    font-size: 0.85rem;
  }

  .product-price {
    font-size: 1rem;
  }
}

/* Efecto de reduce motion para accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .product-card,
  .product-card-inner,
  .product-image,
  .product-card::before,
  .product-card::after {
    transition: none;
    animation: none;
  }

  .product-card {
    opacity: 1;
    transform: none;
  }
}
