* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f8f9fa;
  color: #333;
}

/* NAVBAR */
.navbar {
  background-color: #0d3b66; /* Azul corporativo */
  color: white;
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.logo span { color: #f4d35e; }

.search-bar {
  flex-grow: 1;
  max-width: 600px;
  display: flex;
}

.search-bar input {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 4px 0 0 4px;
  outline: none;
}

.search-bar button {
  background-color: #f4d35e;
  border: none;
  padding: 0 15px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.nav-actions {
  display: flex;
  gap: 15px;
}

.nav-btn {
  background: none;
  border: none;
  color: white;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  position: relative;
}

.badge {
  background-color: #ee964b;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 11px;
  position: absolute;
  top: -8px;
  right: -8px;
}

/* PRODUCT VIEW */
.main-content {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

.product-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* REGLAS ZOOM (De nuestra conversación previa) */
.ecommerce-gallery { width: 100%; }
.main-image-container { width: 100%; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; margin-bottom: 15px; cursor: zoom-in; }
.main-image-container img { width: 100%; display: block; }
.zoom-container.zoomed img { transform: scale(1.8); transition: transform 0.1s ease-out; }
.thumbnails-container { display: flex; gap: 10px; }
.thumb { width: 80px; height: 80px; object-fit: cover; border: 2px solid transparent; border-radius: 4px; cursor: pointer; }
.thumb.active { border-color: #0d3b66; }

/* DETALLES */
.category { color: #666; font-size: 14px; text-transform: uppercase; }
.product-details h1 { margin: 10px 0; font-size: 28px; }
.sku { color: #999; margin-bottom: 20px; }
.price-box { background: #f4f7f6; padding: 15px; border-radius: 6px; margin-bottom: 20px; }
.price { font-size: 26px; font-weight: bold; color: #0d3b66; display: block;}
.stock { color: #2ec4b6; font-size: 14px; font-weight: bold;}
.description { line-height: 1.6; color: #555; margin-bottom: 25px; }

.purchase-actions { display: flex; gap: 15px; }
.purchase-actions input { width: 70px; padding: 10px; text-align: center; border: 1px solid #ccc; border-radius: 4px; }
#add-to-cart-btn { background-color: #ee964b; color: white; border: none; padding: 10px 25px; font-weight: bold; border-radius: 4px; cursor: pointer; flex-grow: 1; }
#add-to-cart-btn:hover { background-color: #e38534; }

/* MODAL INICIO SESION */
.modal { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; }
.modal-content { background: white; padding: 30px; border-radius: 8px; width: 100%; max-width: 400px; position: relative; }
.close-modal { position: absolute; top: 10px; right: 15px; font-size: 24px; cursor: pointer; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; font-size: 14px; }
.form-group input { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; }
.auth-btn { width: 100%; background: #0d3b66; color: white; border: none; padding: 12px; border-radius: 4px; font-weight: bold; cursor: pointer; }

/* CARRITO LATERAL */
.cart-sidebar { position: fixed; top: 0; right: -350px; width: 350px; height: 100%; background: white; box-shadow: -4px 0 10px rgba(0,0,0,0.1); z-index: 150; display: flex; flex-direction: column; transition: right 0.3s ease; }
.cart-sidebar.open { right: 0; }
.cart-header { padding: 20px; background: #0d3b66; color: white; display: flex; justify-content: space-between; align-items: center; }
.close-cart { cursor: pointer; font-size: 24px; }
.cart-items { flex-grow: 1; padding: 20px; overflow-y: auto; }
.cart-item-row { display: flex; justify-content: space-between; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; font-size: 14px; }
.cart-footer { padding: 20px; background: #f8f9fa; border-top: 1px solid #ddd; }
.total-row { display: flex; justify-content: space-between; font-weight: bold; margin-bottom: 15px; font-size: 18px; }
.checkout-btn { width: 100%; background: #2ec4b6; color: white; border: none; padding: 12px; border-radius: 4px; font-weight: bold; cursor: pointer; }

/* RESPONSIVO */
@media (max-width: 768px) {
  .product-container { grid-template-columns: 1fr; }
  .btn-text { display: none; }
}
