header {
  position: relative;
  width: 100%;
  aspect-ratio: 402 / 500;
  overflow: hidden;
}

#slider {
  display: flex;
  width: 300%; 
  height: 100%;
  transform: translateX(0);
  transition: transform 0.5s;
}

img {
  width: 100%;
}

.slide-btn form button {
  background: #005fcc;
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.25);
}

@media (min-width: 600px) {
  header {
    aspect-ratio: 402 / 450;
  }

  .slide img {
    width: 100%;
    height: 700px;
    object-fit: cover;
  }
}

@media (min-width: 800px) {
   header {
    aspect-ratio: 402 / 480;
  }

  .slide img {
    width: 100%;
    height: 800px;
    object-fit: cover;
  }
}

@media (min-width: 1024px) {
  header {
    display: none;
  }
}

.price {
  font-size: 1rem;
  font-weight: bold;
  color: black;
  margin: 0;
}

.filters{
  display:flex;
  gap:10px;
  padding:20px;
}

.filters button{
  padding:10px 15px;
  border:none;
  background:black;
  color:white;
  cursor:pointer;
}

.qty-btn{
  padding:4px 10px;
  border:none;
  background:#222;
  color:white;
  cursor:pointer;
  margin:0 5px;
}

.qty-number{
 font-weight: bold;
}

.content-quantity {
  display: flex;
  align-items: center;
}

.success-container{
display:flex;
align-items:center;
justify-content:center;
min-height:80vh;
background:#f5f7fb;
padding:20px;
}

.success-card{
background:white;
padding:50px;
border-radius:14px;
text-align:center;
max-width:500px;
box-shadow:0 15px 40px rgba(0,0,0,0.1);
animation:fadeIn .6s ease;
}

.checkmark{
width:80px;
height:80px;
background:#2ecc71;
color:white;
font-size:40px;
display:flex;
align-items:center;
justify-content:center;
border-radius:50%;
margin:0 auto 25px auto;
animation:pop .4s ease;
}

.success-card h1{
font-size:28px;
margin-bottom:15px;
color:#333;
}

.success-card p{
font-size:16px;
color:#666;
margin-bottom:30px;
line-height:1.5;
}

.btn-store{
  text-align: center;
  background:#111;
  color:white;
  padding:12px 28px;
  border-radius:6px;
  text-decoration:none;
  font-weight:600;
  transition:0.2s;
}

.content-button {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:15px;
  margin-top:20px;
}

.btn-store:hover{
background:#9a0c0c;
}

@keyframes pop{
0%{transform:scale(0)}
80%{transform:scale(1.2)}
100%{transform:scale(1)}
}

@keyframes fadeIn{
from{opacity:0; transform:translateY(20px)}
to{opacity:1; transform:translateY(0)}
}

/* ======== ADMIN MENU ======== */
.admin-menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border-bottom: 1px solid #e5e5e5;
}

/* Contenedores de botones */
.admin-menu > div {
  display: flex;
  gap: 12px;
}

/* Estilo unificado para TODOS los botones y enlaces */
.admin-menu a,
.admin-menu button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 150px; 
  height: 48px;       
  background: linear-gradient(to bottom, #0400ff, #005fcc);
  border-radius: 10px;
  text-decoration: none;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

/* Activo (azul más claro) */
.active-filter {
  background: #007bff !important;
}

/* ======== HAMBURGER BUTTON ======== */
.category-hamburger {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 2000;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.category-hamburger i {
  font-size: 2rem;
}

/* ======== SIDEBAR ======== */
.category-sidebar {
  position: fixed;
  top: 0;
  left: -300px; /* Oculto inicialmente */
  width: 260px;
  height: 100vh;
  background: #ffffff;
  box-shadow: 2px 0 8px rgba(0,0,0,0.1);
  padding: 20px;
  transition: left 0.3s ease;
  z-index: 1998;
}

.category-sidebar.open {
  left: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.close-btn {
  font-size: 24px;
  cursor: pointer;
}

/* ======== CATEGORY LIST ======== */
.admin-categories-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-categories-list li {
  margin-bottom: 8px;
}

.admin-categories-list a {
  display: block;
  padding: 10px;
  background: #f0f3f8;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  transition: 0.2s;
}

.admin-categories-list a:hover {
  background: #e0e7f1;
}

/* Activo */
.admin-categories-list .active-filter a {
  background: #007bff !important;
  color: white !important;
}

/* ======== PRODUCT GRID ======== */
.products-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px;
  justify-content: center;
}

.product-card {
  background: white;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: calc(190px - 30px);
  margin: 0; 
  }

@media (min-width: 300px) and (max-width: 400px) {
  .product-card {
    width: calc(150px - 8px);
  }
}

.product-card img {
  width: 100%;
  height: 120px; 
  object-fit: fill;
  border-radius: 8px;
}

.product-card h3 {
  font-size: 1rem;
  font-weight: 600;
}


/* ======== BUTTONS ======== */
.product-card a {
  display: inline-block;
  padding: 8px 22px;
  background: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  margin-top: 8px;
  cursor: pointer;
}

.product-card a:hover {
  background: #204169;
}

.product-card form button {
  width: 100%;
  padding: 10px 0;
  background: linear-gradient(to bottom, #0400ff, #005fcc);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.80rem;
  margin-top: auto;
  font-weight: 600;
}

/* ======== FORM CONTAINER ======== */
form {
  background: #ffffff;
  padding: 20px;
  margin: 15px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

form.button_to {
  background: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  display: inline-block;
}

/* ======== LABELS ======== */
form label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
  display: block;
}

/* ======== INPUTS ======== */
form input[type="text"],
form input[type="number"],
form textarea,
form select {
  width: 100%;
  padding: 12px;
  border: 1px solid #dcdfe6;
  border-radius: 8px;
  font-size: 14px;
  background: #f8f9fc;
  transition: border-color 0.2s, background 0.2s;
}

form input:focus,
form textarea:focus,
form select:focus {
  border-color: #007bff;
  background: #ffffff;
  outline: none;
}

/* ======== TEXTAREA ======== */
form textarea {
  min-height: 90px;
  resize: vertical;
}

/* ======== FILE INPUT ======== */
form input[type="file"] {
  padding: 8px 0;
  font-size: 14px;
}

/* ======== SUBMIT BUTTON ======== */
form input[type="submit"] {
  background: #007bff;
  color: white;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

form input[type="submit"]:hover {
  background: #005fcc;
}

/* ======== CANCEL LINK ======== */
form a {
  display: inline-block;
  margin-top: 10px;
  text-decoration: none;
  color: #ff4d4d;
  font-weight: 600;
  font-size: 14px;
}

form a:hover {
  text-decoration: underline;
}

/* ======== PAGE TITLE ======== */
h2 {
  text-align: center;
  font-size: 20px;
  margin-top: 20px;
  margin-bottom: 10px;
  font-weight: 700;
  color: white;
}

/* ======== BACK LINK ======== */
.back-link {
  display: block;
  text-align: center;
  margin: 15px 0;
  font-size: 14px;
  color: #007bff;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* Contenedor del formulario */
.category-form {
  max-width: 400px;
  margin: 20px auto;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
}

/* Etiquetas */
.category-form label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: bold;
}

/* Inputs */
.category-form input[type="text"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 15px;
}

/* Botón */
.category-form input[type="submit"] {
  width: 100%;
  padding: 10px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  cursor: pointer;
}

.category-form input[type="submit"]:hover {
  background: #005fcc;
}

/* Link volver */
.back-link {
  display: block;
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
  color: #007bff;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* ===== FLOATING CART BUTTON ===== */
#floating-cart {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #007bff;
  color: white;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 26px;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

#floating-cart {
  transition: opacity 0.3s ease;
}

#floating-cart.hidden {
  opacity: 0;
  pointer-events: none;
}

#floating-cart span {
  position: absolute;
  top: -5px;
  right: -5px;
  background: red;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
}

/* ===== SIDEBAR CARRITO ===== */
#cart-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: white;
  border-left: 1px solid #ddd;
  transition: right 0.3s ease;
  z-index: 9998;
  display: flex;
  flex-direction: column;
}

#cart-sidebar.open {
  right: 0;
}

.text-center {
  text-align: center;
  margin-top: 50px;
}

/* ===== HEADER DEL SIDEBAR ===== */
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #ddd;
  background-color: #111;
}

.close-btn {
  background: none;
  border: none;
  font-size: 40px;
  cursor: pointer;
  color: white;
}

/* ===== CONTENIDO DEL CARRITO ===== */
#cart-sidebar-content {
  padding: 15px;
  overflow-y: auto;
  flex-grow: 1;
}

/* ===== CART ITEMS ===== */
.cart-item {
  border-bottom: 1px solid #eee;
  padding: 10px 0;
  margin: 0 5%;
}

.qty-btn {
  padding: 4px 8px;
  background: #007bff;
  border-radius: 4px;
  border: none;
}

.delete-icon-btn {
  background: none;
  border: none;
  padding: 5px;
  cursor: pointer;
}

.delete-icon-btn i {
  font-size: 20px;
  color: red;
}

.rate-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

/* ======== MOBILE OPTIMIZATION ======== */
@media (min-width: 600px) {
  form {
    max-width: 500px;
    margin: 20px auto;
  }
}

@media (min-width: 1024px) {

.product-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 250px;
    margin: 0; 
  }

  .product-card img {
    height: 200px; 
  }

  #cart-sidebar {
    right: -100%;
    width: 500px;
  }

  /* ======== HEADER ======== */

  header {
    position: relative;
    width: 100%;
    aspect-ratio: 1440 / 700;
    overflow-x: hidden;
    overflow: hidden;
  }
}