/* retail.css mejorado – incluye modal carrito */

body {
  margin: 0;
  padding: 0;
  font-family: 'Helvetica Neue', sans-serif;
  background: linear-gradient(to bottom right, #fff0f5, #ffe6ea);
  color: #333;
}

/* ---------------- HEADER ---------------- */
.retail-header {
  background: rgba(255, 105, 180, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.retail-header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
}

.retail-logo {
  height: 50px;
  width: 50px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid white;
  background-color: white;
}

.retail-header h1 {
  font-size: 2rem;
  margin: 0;
  color: white;
}

.cart-button {
  /* position: absolute; */
  /* right: 0; */
  /* top: 50%; */
  /* transform: translateY(-50%); */
  background-color: transparent;
  color: white;
  border: 1px solid white;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 2px;
}

.cart-button:hover {
  background-color: #e0579b;
}

#cartCount {
  background-color: white;
  color: #ff69b4;
  padding: 2px 6px;
  border-radius: 50%;
  font-size: 0.8rem;
}

/* ---------------- PRODUCT GRID ---------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 40px;
}

.product-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  text-align: center;
  padding: 20px;
  transition: transform 0.2s ease;
}

.product-card:hover {
  transform: scale(1.03);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 12px;
  background-color: #fdf0f5;
}

.price {
  font-size: 1.2rem;
  color: #d63384;
  margin: 10px 0;
}

.stock {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

.contact-btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #ff69b4;
  color: white;
  text-decoration: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
  margin: 6px 6px 0 0;
}

.contact-btn:hover {
  background-color: #e0579b;
}

.cart-btn {
  background-color: #fff;
  border: 2px solid #ff69b4;
  color: #ff69b4;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.cart-btn:hover {
  background-color: #ffe6f0;
}

.product-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

/* ---------------- MODAL ---------------- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 30px 24px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: fadeInUp 0.3s ease forwards;
}

@keyframes fadeInUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }

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

.close-btn {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 1.4rem;
  cursor: pointer;
  color: #888;
}

.cart-items {
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 20px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
}

.totals p,
.totals h3 {
  margin: 4px 0;
  text-align: right;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.checkout-form label {
  font-weight: bold;
  font-size: 0.95rem;
  color: #444;
}

.checkout-form input,
.checkout-form select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
}

.checkout-form input:focus,
.checkout-form select:focus {
  border-color: #ff69b4;
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.2);
}

.modal-actions {
  margin-top: 20px;
}

.checkout-btn {
  background-color: #ff69b4;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  transition: background 0.3s ease;
}

.checkout-btn:hover {
  background-color: #e0579b;
}

/* ---------------- FOOTER ---------------- */
.retail-footer {
  text-align: center;
  padding: 15px;
  font-size: 0.9rem;
  background-color: rgba(255, 105, 180, 0.3);
  color: white;
}


/* ---------------- MODAL DE IMAGEN ---------------- */
.modal-image {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#imgModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

#imgModal.hidden {
  display: none;
}

#imgClose {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

/* --------------- Size Tags --------------------- */

.size-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  margin-bottom: 4px;
}

.size-tags .tag {
  background-color: #f7f7f7;
  border: 1px solid #ff69b4;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.85rem;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.size-tags .tag.selected {
  background-color: #ff69b4;
  color: white;
}

.size-text {
  font-size: 0.85rem;
  color: #444;
  text-align: center;
  margin-top: 6px;
  margin-bottom: 0;
}

/* ------ type ------- */

.type {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

/* --------- Carrusel categorías --------- */
.filter-wrap {
  padding: 4px 0;
  margin: 8px 0 4px;
}

.filter-menu {
  display: flex;
  gap: .5rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  /* Firefox */
  padding: 8px 12px;
  /* un poco de aire a los lados */
  /* sin fades ni máscara */
  mask-image: none;
  -webkit-mask-image: none;
}

.filter-menu::-webkit-scrollbar {
  display: none;
}

.filter-menu button {
  padding: 8px 14px;
  border: 2px solid #ff69b4;
  background: #fff;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  scroll-snap-align: start;
  font-weight: 600;
}

.filter-menu button.active {
  background: #ff69b4;
  color: #fff;
}