/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== BODY ===== */
body {
  font-family: 'Inter', sans-serif;
  background: #f1f5f9;
  color: #1e293b;
}

/* ===== HEADER NUEVO ===== */

.header {
  background: #0f172a;
  color: white;
  padding: 20px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-img {
  width: 55px;
  height: 55px;
  object-fit: cover;
  border-radius: 12px;
  background: white;
  padding: 5px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
}

.brand-sub {
  font-size: 13px;
  opacity: 0.8;
}

.header-right {
  display: flex;
  gap: 15px;
  align-items: center;
}

.search {
  padding: 10px 15px;
  border-radius: 8px;
  border: none;
  outline: none;
  width: 220px;
}

.cart-btn {
  background: white;
  color: #0f172a;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.cart-btn:hover {
  background: #e2e8f0;
}

/* ===== CONTENEDOR ===== */
.container {
  padding: 40px 60px;
}

/* ===== GRID ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
}

/* ===== CARD ===== */
.card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.07);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #f8fafc;
  padding: 20px;
}

.card-content {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card h3 {
  font-size: 18px;
  font-weight: 600;
}

.price {
  font-size: 20px;
  font-weight: 700;
}

button {
  margin-top: auto;
  background: #0f172a;
  color: white;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

button:hover {
  background: #1e293b;
}

/* ===== PANEL CARRITO ===== */
.cart-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  height: 100%;
  background: white;
  box-shadow: -5px 0 25px rgba(0,0,0,0.15);
  transition: 0.3s ease;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

.cart-panel.active {
  right: 0;
}

.cart-header {
  padding: 20px;
  background: #0f172a;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid #eee;
  font-weight: 700;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  z-index: 999;
}

.cart-overlay.active {
  display: block;
}

.remove-btn {
  background: none;
  border: none;
  color: red;
  cursor: pointer;
  font-size: 14px;
}

/* ========================= */
/* 📱 RESPONSIVE MOBILE */
/* ========================= */

@media (max-width: 768px) {

  .header {
    flex-direction: column;
    gap: 15px;
    padding: 20px;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .search {
    width: 100%;
  }

  .container {
    padding: 20px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .card img {
    height: 180px;
  }

  /* carrito más ancho en celular */
  .cart-panel {
    width: 100%;
  }

}

button {
  min-height: 44px; /* tamaño cómodo para dedo */
}

.cart-btn {
  white-space: nowrap;
}

.checkout-btn {
  width: 100%;
  margin-top: 15px;
  background: #16a34a;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.checkout-btn:hover {
  background: #15803d;
}

.cart-footer input {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
}

.checkout-btn {
  width: 100%;
  margin-top: 15px;
  background: #16a34a;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

.descripcion {
  font-size: 14px;
  color: #555;
  margin: 8px 0;
  line-height: 1.4;
}

.ver-mas-link {
  color: #007bff;
  cursor: pointer;
  font-weight: 500;
}

.ver-mas-link:hover {
  text-decoration: underline;
}

.ver-mas-link,
.ver-menos-link {
  color: #007bff;
  cursor: pointer;
  font-weight: 500;
}

.ver-mas-link:hover,
.ver-menos-link:hover {
  text-decoration: underline;
}

