/* Estilos generales
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
} */

/**/
.productos {
    display: grid;
    gap: 20px;
    margin-bottom: 80px;
}

.producto {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
}

.producto img {
    max-width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
}

.precio {
    font-size: 1.2em;
    color: #e74c3c;
    font-weight: bold;
}

.btn-agregar {
   /* background: #27ae60;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;*/
}

/*
.btn-agregar:hover {
    background: #219a52;
}*/

/* BOTÓN FLOTANTE DEL CARRITO */
.carrito-flotante {
    position: fixed;
    bottom: 80px;
    right: 10px;
    background: #e5f1c7;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    /*box-shadow: 0 4px 15px rgba(0,0,0,0.2);*/
    box-shadow: 0 5px 15px rgb(89 107 51);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.carrito-flotante:hover {
    transform: scale(1.1);
}

.contador {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3b00;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* PANEL DEL CARRITO */

/* =========== desktop =============*/
.panel-carrito {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
}

/* ===== SMARTPHONE (hasta 767px) ===== */
@media only screen and (max-width: 767px) {
    
    .panel-carrito {
        position: fixed;
        top: 0;
        right: -400px;
        width: 400px;
        height: 100vh;
        background: white;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
    }
    
}

.panel-carrito.abierto {
    right: 0;
}

.carrito-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #596b33;
    color: white;
}

.cerrar-carrito {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.carrito-items {
    padding: 10px;
}

.item-carrito {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    /*border-bottom: 1px solid #eee;*/
    border-bottom: 2px solid #e5f1c7
}

.item-info {
    flex-grow: 1;
}

.item-precio {
    color: #e74c3c;
    font-weight: bold;
    font-size: 16px;
}

.btn-eliminar {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 18px;
    cursor: pointer;
}

.total-carrito {
    padding: 20px;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    background: rgb(229 241 199);
    margin-top: 10px;
    color: #596b33;
    margin-bottom: 10px;
    border-radius: 20px;
}

.btn-comprar {
    display: block;
    width: 100%;
    padding: 15px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 20px;
}

.btn-comprar:hover {
    background: #219a52;
}

/* Overlay de fondo */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 1000;
}

body.cart-open {
   overflow: hidden; /* Elimina el scroll de la página cuando el carrito está abierto */
}

/*====== caja de texto -+ ==========*/
        
input[type="number"] {
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.number-input {
    border: 1px solid #ddd;
    display: inline-flex;
    border-radius: 6px;
}

.number-input,
.number-input * {
  box-sizing: border-box;
}

/*============= boton menos =================*/
.number-input-minus {
    outline: none;
    -webkit-appearance: none;
    background-color: #c1cfa7;
    border: none;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    cursor: pointer;
    margin: 0;
    position: relative;
    border-radius: 0px;
    color: #fff;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

/*
.number-input-minus:after {
  display: inline-block;
  position: absolute;
  font-family: "Font Awesome 5 Free"; 
  font-weight: 900;

  transform: translate(-50%, -50%) rotate(180deg);
}
.number-input button.plus:after {
  transform: translate(-50%, -50%) rotate(0deg);
}*/

/*============= boton mas =================*/
.number-input-plus {
    outline: none;
    -webkit-appearance: none;
    background-color: #c1cfa7;
    border: none;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    cursor: pointer;
    margin: 0;
    position: relative;
    border-radius: 0px;
    color: #fff;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.number-input input[type=number] {
    font-family: sans-serif;
    max-width: 3rem;
    padding: .5rem;
    border: solid #c1cfa7;
    border-width: 0 2px;
    font-size: 1.0rem;
    height: 1.6rem;
    font-weight: bold;
    text-align: center;
    color: #e74c3c;
}

        
        