* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Playfair', serif;
}

body {
  background: linear-gradient(135deg, #ff3e6c, #00d1b2, #5f27cd);
  background-size: 600% 600%;
  animation: animatedBackground 20s ease infinite;
  min-height: 100vh;
  padding: 20px;
  color: #fff;
  overflow-x: hidden;
}

/* Fondo animado para reforzar el efecto vidrio */
@keyframes animatedBackground {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* CONTENEDOR GLASS */
.items {
  min-width: 100%;
  max-width: 1000px;
  margin: 40px 0 0 auto;
  padding: 40px;
  background: rgba(255, 255, 255, 0.164);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: fadeInSection 1.2s ease-out both;
}

/* Fade general */
@keyframes fadeInSection {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

.title {
  text-align: center;
  margin-bottom: 30px;
  animation: slideFromTop 0.8s ease-out;
}

@keyframes slideFromTop {
  0% { transform: translateY(-30px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

.title h2 {
  font-size: 2.8rem;
  font-weight: 900;
  color: #ffffff;
}

.underline {
  width: 80px;
  height: 5px;
  background-color: #060606;
  margin: 12px auto 0;
  border-radius: 10px;
  animation: scaleIn 0.6s ease-in-out;
}

@keyframes scaleIn {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

.btn-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin: 35px 0;
  animation: fadeInButtons 1s ease-in-out;
}

@keyframes fadeInButtons {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.filter-btn {
  padding: 12px 25px;
  font-size: 1rem;
  font-weight: 700;
  background-color: rgba(14, 14, 14, 0.300);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 30px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
  color: #1f1f1f;
}

.section-center {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.item-card {
  overflow: hidden;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.027), rgba(0, 0, 0, 0.637));
  border-radius: 16px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  animation: cardEnter 0.8s ease forwards;
  opacity: 0;
}

@keyframes cardEnter {
  0% { opacity: 0; transform: translateY(20px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.item-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
}

.item-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  transition: transform 0.4s ease;
}

.item-card:hover .item-img {
  transform: scale(1.05);
}

.item-info {
  padding: 20px;
  text-align: center;
  animation: textFadeIn 1.5s ease-in-out;
}

@keyframes textFadeIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.item-info header {
  /* display: flex; */
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.item-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.item-desc {
  font-size: 1rem;
  color: #eee;
  line-height: 1.6;
  text-align: center
}

.item-pes,.item-stock {
  font-size: 0.9rem;
  color: #ccc;
  margin-top: 6px;
  text-align: center;
}

.item-preu {
  font-size: 1.4rem;
  font-weight: bold;
  color: #00ffcc;
  animation: pricePop 0.8s ease-in;
}

@keyframes pricePop {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}







.item-sense-stock .item-overlay {
  filter: grayscale(100%) brightness(0.6);
}

/* Ya puedes dejar tu fondo rojo así, se verá bien */
.item-sense-stock::after {
  content: "Sense stock";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgb(243, 5, 5);
  color: #fff;
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: bold;
  pointer-events: none;
  z-index: 9999;
}




.sidebar-cart {
  height: auto;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding: 20px;
  color: white;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
}

.sidebar-cart h3 {
  margin-bottom: 15px;
  font-size: 1.8rem;
  text-align: center;
  color: #000000;
}

.cart-items {
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.cart-items li {
  margin-bottom: 10px;
  padding: 10px;
  background: rgba(14, 14, 14, 0.300);
  border-radius: 8px;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
}

.cart-total {
  font-size: 1.2rem;
  font-weight: bold;
  text-align: center;
  color: #353535;
}

.add-btn {
  margin-top: 12px;
  padding: 10px 20px;
  font-weight: bold;
  background-color: #00d1b2;
  color: #fff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.add-btn:hover {
  background-color: #0a0a0a;
}

.cart-controls {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.cart-controls button {
  background-color: #ff3e6c;
  color: #f8f8f8;
  border: none;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background-color 0.3s ease;
}

.cart-controls button:hover {
  background-color: #e82a58;
}
.main-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-cart {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 30px;
  }
}
