/* --------------------------
   RESET GENERAL
-------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    width: 100%;
    overflow-x: hidden;
    background-color: #fff;
    margin: 0;
    padding: 0;
}

/* --------------------------
   ENCABEZADO PRINCIPAL
-------------------------- */
.main-header {
    background-color: #e5004f;
    color: white;
    width: 100%;
    padding: clamp(0rem, 0vw, 0rem) 2px 0 10px;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header h1 {
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    font-weight: bold;
}

.header-lines {
    width: 13%;
    display: flex;
    padding: 0;
    gap: 9px;
}

.line-item {
    width: 9px;
    height: 65px;
    background-color: rgb(255, 255, 255); /* Corregido valor RGB inválido */
    flex-grow: 0;
}

/* --------------------------
   BARRA DE NAVEGACIÓN
   ✅ Unificada las dos versiones anteriores
-------------------------- */
.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: clamp(0rem, 2vw, 0.8rem) 0.4rem;
    border: 1px solid #dddddd;
    border-bottom: 2px solid #e5004f;
    border-radius: 16px;
    position: sticky;
    top: 65px;
    z-index: 1000;
    margin-top: 2px;
}

.nav-item {
    position: relative;
    text-align: center;
}

.nav-btn {
    width: clamp(4.5rem, 13vw, 6.5rem);
    height: clamp(4rem, 13vw, 5.5rem);
    object-fit: contain;
    cursor: pointer;
    position: static;
}

.nav-item p {
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    margin-top: clamp(0.3rem, 1vw, 0.5rem);
    position: static;
}

/* --------------------------
   CONTADOR DEL CARRITO
   ✅ Unificadas las 3 versiones
-------------------------- */
.contador-carrito {
    position: absolute;
    top: 10px;
    right: 14px;
    background-color: #e5004f;
    color: white;
    font-weight: bold;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
    border: 2.5px solid white;
}

/* --------------------------
   TÍTULOS DE SECCIÓN
-------------------------- */
.titulo-seccion {
    padding: 10px 0 20px;
    text-align: center;
}

.titulo-seccion h2 {
    font-size: 17px;
    color: #1A1A1A;
    margin-bottom: 1px;
    font-weight: 600;
    line-height: 1.2;
}

.subtitulo-seccion {
    font-size: 13px;
    color: #757575;
    margin: 0;
}

/* --------------------------
   ENCABEZADOS DE SERVICIOS
   ✅ Unificadas las dos versiones
-------------------------- */
.services-header {
    background-color: #e5004f;
    padding: clamp(0.8rem, 3vw, 1.2rem);
    text-align: center;
    margin-top: clamp(0.3rem, 1vw, 0.5rem);
    border-bottom: 1px solid #ddd;
}

.services-header h2 {
    color: white;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: bold;
    margin-bottom: clamp(0.2rem, 1vw, 0.3rem);
}

.delivery-time {
    color: lime;
    font-size: clamp(0.8rem, 4vw, 1rem);
    font-weight: bold;
    margin-top: 5px;
}

/* --------------------------
   SEPARADORES Y TIEMPO DE ENTREGA
-------------------------- */
.section-divider {
    text-align: center;
    margin: 8px 0;
    padding: 6px 12px;
}

.section-divider h3 {
    color: #f10159;
    font-size: 15px;
    font-weight: bold;
    letter-spacing: 0.5px;
    margin: 0 0 6px 0;
}

.tiempo-entrega {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #3b3b3b;
    background-color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    margin: 0;
}

.tiempo-entrega i {
    color: #d1004b;
    font-size: 12px;
}

/* --------------------------
   FOOTER
   ✅ Unificadas las reglas
-------------------------- */
.footer-bar {
    background-color: #e6004d;
    width: 100%;
    padding: 15px 0;
    text-align: center;
    margin-top: 30px;
}

.footer-bar p,
.footer-p {
    color: #ffffff;
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
}

.footer-p {
    font-size: 14px;
}

/* --------------------------
   SECCIÓN DE BENEFICIOS
-------------------------- */
.benefits-section {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: white;
    padding: clamp(1rem, 4vw, 1.5rem) 0;
    border-bottom: 1px solid #e5004f;
}

.benefit-item {
    text-align: center;
}

.benefit-item p {
    color: #e5004f;
    font-weight: bold;
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    margin-bottom: clamp(0.5rem, 2vw, 0.8rem);
}

.benefit-img {
    width: clamp(10rem, 34vw, 16rem);
    height: clamp(10rem, 33vw, 16rem);
    object-fit: contain;
    cursor: pointer;
}

/* --------------------------
   TEXTOS DESCRIPTIVOS
-------------------------- */
.text-description {
    font-size: 0.9em;
    color: #666;
    line-height: 1.4;
    padding: 0 10px;
    text-align: center;
    margin-top: 4%;
    padding-top: 0;
}

/* --------------------------
   ESPACIOS EN BLANCO
   ✅ Unificadas clases con mismo fin
-------------------------- */
.espacio_fondoBlancos,
.espacio-blanco {
    color: #fff;
}

.espacio h6 {
    color: white;
}

/* --------------------------
   ESTILOS DE TIENDA Y PRODUCTOS
-------------------------- */
.store-header {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #fff;
    margin-bottom: 10px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.store-logo {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    margin-right: 15px;
    object-fit: cover;
    border: 1px solid #eee;
}

.store-info {
    flex-grow: 1;
}

.store-name {
    font-size: 22px;
    margin: 0 0 5px 0;
    font-weight: bold;
}

.store-rating {
    font-size: 14px;
    color: #ff0052;
}

.store-rating i {
    margin-right: 3px;
}

.search-bar-products {
    display: flex;
    margin: 0 10px 15px 10px;
    border: 1px solid #ddd;
    border-radius: 25px;
    overflow: hidden;
    height: 44px;
    background-color: #fff;
}

.search-bar-products input {
    border: none;
    padding: 0 15px;
    flex-grow: 1;
    font-size: 16px;
    outline: none;
}

.search-bar-products .search-button-products {
    background-color: #ff0052;
    border: none;
    color: white;
    padding: 0 15px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.products-container {
    padding: 0 15px;
}

.category-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-left: 5px;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.product-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: auto;
}

.product-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    border-bottom: 1px solid #eee;
    object-position: center;
}

.product-details {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center;
}

.product-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.product-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
    flex-grow: 1;
}

.quantity-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 10px auto;
    background-color: #f0f0f0;
    border-radius: 20px;
    width: fit-content;
}

.quantity-button {
    background-color: #ff0052;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    transition: background-color 0.2s ease;
    margin: 2px;
}

.quantity-button:hover {
    background-color: #e0004a;
}

.quantity-display {
    width: 30px;
    text-align: center;
    font-size: 15px;
    font-weight: bold;
    color: #333;
}

.product-price-info {
    text-align: center;
    margin-bottom: 10px;
}

.product-price {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.shipping-cost {
    font-size: 13px;
    color: #666;
}

.buy-button {
    background-color: #ff0052;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.buy-button:hover {
    background-color: #e0004a;
}

/* --------------------------
   ESTILOS DEL CARRITO
-------------------------- */
.cart-items-container {
    padding: clamp(0.8rem, 3vw, 1.2rem);
    border-bottom: 1px solid #ccc;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: clamp(0.8rem, 3vw, 1.2rem) 0;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-right: 15px;
    border-radius: 4px;
}

.cart-item .product-details {
    flex: 1;
    text-align: left;
    padding: 0;
}

.cart-item .product-name {
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    color: #333;
    margin-bottom: clamp(0.3rem, 1vw, 0.5rem);
}

.quantity-controls-cart {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 0.8rem);
    margin-bottom: clamp(0.3rem, 1vw, 0.5rem);
}

.quantity-btn-cart {
    width: clamp(1.5rem, 6vw, 2rem);
    height: clamp(1.5rem, 6vw, 2rem);
    border: 1px solid #ccc;
    background-color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1rem, 3vw, 1.2rem);
    border-radius: 4px;
}

.quantity-input-cart {
    width: clamp(2rem, 8vw, 3rem);
    height: clamp(1.5rem, 6vw, 2rem);
    border: 1px solid #ccc;
    text-align: center;
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    appearance: textfield;
    -moz-appearance: textfield;
}

.quantity-input-cart::-webkit-outer-spin-button,
.quantity-input-cart::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item .product-price {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: #333;
    font-weight: bold;
    text-align: left;
}

.delete-btn {
    width: clamp(1.5rem, 6vw, 2rem);
    height: clamp(1.5rem, 6vw, 2rem);
    border: none;
    background: transparent;
    cursor: pointer;
    margin-left: auto;
}

.delete-img {
    width: clamp(1.2rem, 5vw, 1.8rem);
    height: clamp(1.2rem, 5vw, 1.8rem);
    object-fit: contain;
}

.cart-totals {
    padding: clamp(1rem, 4vw, 1.5rem);
    border-bottom: 1px solid #ccc;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: clamp(0.5rem, 2vw, 0.8rem);
}

.total-label {
    color: #333;
}

.total-value {
    color: #333;
    font-weight: bold;
}

.checkout-container {
    padding: clamp(1rem, 4vw, 1.5rem);
    text-align: center;
}

.checkout-btn {
    background-color: #89e73d;
    color: white;
    border: none;
    padding: clamp(0.8rem, 4vw, 1.5rem) clamp(2rem, 8vw, 3rem);
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.checkout-btn:hover {
    background-color: #76c834;
}

.empty-cart {
    padding: clamp(3rem, 15vw, 5rem);
    text-align: center;
    font-size: clamp(1rem, 4vw, 1.5rem);
    color: #666;
}

/* --------------------------
   MENSAJE DE CONFIRMACIÓN
-------------------------- */
.mensaje-agregado {
    position: fixed;
    top: 140px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #58c004;
    color: #ffffff;
    padding: 10px 18px;
    font-weight: 500;
    font-size: 19px;
    border-radius: 50px;
    border: 1px solid #58c004;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    z-index: 99999;
    display: none;
    width: 290px;
    text-align: center;
    animation: aparecerSuave 0.3s ease;
}

@keyframes aparecerSuave {
    from { opacity: 0; top: 100px; }
    to { opacity: 1; top: 140px; }
}