* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Arial", sans-serif;
  background-color: #fff7f0;
}

/* Cabecera principal */
.main-header {
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px; /* Altura mayor */
}

/* Logo como imagen */
.logo-img {
  height: 80px;
  object-fit: contain;
}

/* Botón menú hamburguesa (móvil) */
.menu-toggle {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  display: block;
  color: #333;
}

/* Menú de escritorio */
.desktop-nav {
  display: none;
  gap: 40px;
  margin-left: 40px;
}

.desktop-nav a {
  text-decoration: none;
  color: #444;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.3s;
}

.desktop-nav a:hover {
  color: #73CFE5;
}

/* Iconos */
.header-icons {
  display: flex;
  gap: 20px;
}

.header-icons .material-symbols-outlined {
  font-size: 28px;
  color: #333;
  cursor: pointer;
}

.cart-icon {
  position: relative;
  color: #000;
  text-decoration: none;
}

.cart-icon i {
  font-size: 28px;
}

#cart-count {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #d61616;
  color: white;
  font-size: 13px;
  font-weight: bold;
  border-radius: 50%;
  padding: 2px 6px;
}

/* Responsive */
@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  .desktop-nav {
    display: flex;
    flex-grow: 1;
    justify-content: center;
  }

  .logo-img {
    margin-right: 40px;
  }

  .header-icons {
    margin-left: auto;
  }
}



/* ===== MENÚ LATERAL MÓVIL ===== */

.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 350px; /* menú más ancho */
  height: 100vh;
  background-color: #fff;
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.25);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 25px 20px;
  transition: left 0.3s ease-in-out;
}

.menu-logo {
  width: 160px;
  margin-bottom: 40px;
}

.close-btn {
  background: none;
  border: none;
  align-self: flex-end;
  font-size: 30px;
  cursor: pointer;
  color: #333;
  margin-bottom: 15px;
}

.mobile-nav {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.mobile-nav a {
  color: #222;
  text-decoration: none;
  font-size: 20px;
  font-weight: 600;
  margin: 15px 0;
  transition: color 0.3s;
}

.mobile-nav a:hover {
  color: #73CFE5;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding-bottom: 20px;
}

.social-icons i {
  font-size: 40px;
  color: #444; /* gris oscuro */
  transition: color 0.3s ease;
  
}

.social-icons i:hover {
  color: #73CFE5; /* naranja */
}

/* Overlay para fondo oscuro cuando menú está activo */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 998;
}

.mobile-menu.active {
  left: 0;
}

.overlay.active {
  display: block;
}


/* ===== FRANJA DESTACADA ===== */
.cookie-banner {
  background-color: #73CFE5; /* turquesa */
  color: #fff;
  padding: 15px 20px;
  text-align: center;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
}

/* Más grande en escritorio */
@media (min-width: 768px) {
  .cookie-banner {
    font-size: 18px;
    padding: 20px 30px;
  }
}



/* ===== SECCIÓN DE PRODUCTOS ===== */
.product-section {
  padding: 40px 20px;
  background-color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Móvil por defecto: 2 columnas */
  gap: 20px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

/* En escritorio: 4 columnas */
@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr); /* 4 columnas iguales */
    gap: 20px;
    padding: 0 40px;
  }
}

/* Tarjeta individual */
.product-card {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid #73CFE5;
}

/* Imagen cuadrada full ancho */
.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 16px;
}

/* Título */
.product-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  text-align: left;
}

/* Nombre tienda */
.product-card .store-name {
  font-size: 15px;
  color: #666;
  margin-bottom: 6px;
  text-align: left;
}

/* Precio */
.product-card .price {
  font-size: 22px;
  font-weight: bold;
  color: #000;
  margin-bottom: 14px;
  text-align: left;
}

/* Botón con solo borde */
.add-to-cart {
  align-self: flex-start;
  padding: 10px 18px;
  font-size: 15px;
  border: 1px solid #73CFE5;
  color: #3b3b3b;
  background: #b3ecfa;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.add-to-cart:hover {
  background-color: #55b0c7;
  color: #fff;
}


@media (max-width: 767px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr); /* ya estaba así, mantenemos */
    gap: 16px;
    padding: 0 12px;
  }

  .product-card {
    padding: 12px; /* menos padding interno */
    border-radius: 10px;
  }

  .product-card img {
    margin-bottom: 12px;
  }

  .product-card h3 {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .product-card .store-name {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .product-card .price {
    font-size: 18px;
    margin-bottom: 10px;
  }

  .add-to-cart {
    padding: 8px 14px;
    font-size: 14px;
  }
}




/* MODAL OVERLAY */
.modal-overlay {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
}

/* MODAL CONTENIDO */
.modal-content {
  background: #fff;
  padding: 30px;
  width: 90%;
  max-width: 450px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  text-align: center;
  position: relative;
  animation: fadeIn 0.3s ease;
}

/* ANIMACIÓN */
@keyframes fadeIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-content img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

.modal-content h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.modal-content p {
  font-size: 15px;
  color: #444;
}

.modal-price {
  font-size: 18px;
  font-weight: bold;
  margin-top: 10px;
}

/* BOTÓN CERRAR */
.modal-close {
  position: absolute;
  top: 12px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  color: #555;
  cursor: pointer;
}



/* Selector de tamaño */
.size-selector {
  margin-top: 20px;
  text-align: left;
}

.size-selector label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: #333;
}

.size-selector select {
  width: 100%;
  padding: 10px;
  font-size: 15px;
  border-radius: 8px;
  border: 2px solid #ccc;
  background-color: #f9f9f9;
  appearance: none;
  cursor: pointer;
}

/* Precio actualizado */
#selectedSizePrice {
  text-align: left;
  margin-top: 12px;
  font-size: 17px;
  color: #222;
  font-weight: bold;
}

/* Botón Agregar al carrito */
.modal-add-cart {
  margin-top: 20px;
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  background-color: #73CFE5;
  color: #222222;
  cursor: pointer;
  transition: 0.3s;
}

.modal-add-cart:hover {
  background-color: #a95110;
}




/*Carrito desde aqui */



.cart-container {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
}

/* Sección título y enlace */
.cart-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.cart-header-bar h2 {
  font-size: 26px;
}

.back-to-store {
  text-decoration: underline;
  color: #444;
  font-size: 15px;
}

/* Franja informativa */
.cart-info-bar {
  background-color: #73CFE5;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 25px;
}

.cart-info-bar p {
  margin: 0;
  font-weight: 500;
  color: #222;
}

/* Encabezado columnas */
.cart-table-header {
  display: none;
  grid-template-columns: 2fr 1fr 1fr;
  padding: 10px 0;
  font-weight: bold;
  color: #333;
  border-bottom: 1px solid #ececec;
  margin-bottom: 15px;
}

@media(min-width: 768px) {
  .cart-table-header {
    display: grid;
  }
}

/* Tarjeta de producto */
.cart-item {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #ffffff;
  padding: 20px 0;
}

@media(min-width: 768px) {
  .cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    align-items: center;
    gap: 20px;
  }
}






@media (max-width: 767px) {
  .cart-item {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr; /* ✅ No se modifica */
    gap: 10px;
    padding: 16px 0;
    align-items: flex-start;
    border-bottom: 1px solid #eee;
  }

  .cart-item-product {
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }

  .cart-item-product img {
    width: 100%;
    max-width: 80px;
    height: auto;
    border-radius: 8px;
  }

  .cart-item-details {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    line-height: 1.2;
  }

  .cart-item-details strong {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    word-break: break-word; /* ✅ Evita una letra por línea */
  }

  .cart-item-details span {
    font-size: 13px;
    color: #666;
    word-break: break-word;
  }

  .item-cantidad {
    display: flex;
    align-items: center;
    margin-top: 8px;
    gap: 8px;
  }

  .item-cantidad button {
    padding: 4px 10px;
    font-size: 14px;
    border: 1px solid #aaa;
    background-color: transparent;
    cursor: pointer;
    border-radius: 4px;
  }

  .delete-icon {
    font-size: 22px;
    color: #c00;
    cursor: pointer;
  }

  .cart-item-total {
    font-size: 20px;
    font-weight: bold;
    color: #000;
    text-align: right;
    margin-top: 4px;
  }
}
/* Columna producto */
.cart-item-product {
  display: flex;
  gap: 15px;
  align-items: center;
}

.cart-item-product img {
  width: 80px;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-details {
  display: flex;
  flex-direction: column;
}

.cart-item-details strong {
  font-size: 16px;
  color: #000;
}

.cart-item-details small {
  display: none;
}

.cart-item-details span {
    font-size: 14px;
    color: #555;
    margin-top: 5px;
}

/* Columna cantidad */
.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  background: none;
  border: 1px solid #aaa;
  padding: 8px 16px;
  font-size: 16px;
  cursor: pointer;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #aaa;
    border-radius: 6px;
    padding: 2px 10px;
}

.qty-value {
  min-width: 20px;
  text-align: center;
}

.delete-icon {
  color: #a00;
  font-size: 22px;
  margin-left: 12px;
  cursor: pointer;
}

/* Columna total */
.cart-item-total {
  font-weight: bold;
  font-size: 16px;
  color: #222;
  text-align: right;
}




/* Mostrar/Ocultar versiones por dispositivo */
#cartItemsMobile {
  display: none;
}

#cartItemsDesktop {
  display: block;
}

@media (max-width: 767px) {
  #cartItemsMobile {
    display: block;
  }

  #cartItemsDesktop {
    display: none;
  }
}



.cart-summary {
  max-width: 500px;
  margin: 40px auto;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  text-align: center;
  background-color: #fafafa;
}

.cart-summary h3,
.cart-summary h4 {
  margin-bottom: 10px;
  font-size: 20px;
}

.estimated-total {
  font-size: 18px;
  margin-bottom: 10px;
}

.cart-note {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.shipping-toggle {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
}

.shipping-toggle label {
  font-size: 16px;
  cursor: pointer;
}

#shippingMessage {
  font-size: 14px;
  color: #444;
  margin-bottom: 20px;
}

.hidden {
  display: none;
}

.continue-btn {
  padding: 10px 20px;
  background-color: #73CFE5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.continue-btn:hover {
  background-color: #4bb9d4;
}