@media (max-width: 600px) {

  .modal-contenido {
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 15px;
  }

  .modal-producto-detalle img {
    width: 100%;
    height: auto;
    display: block;
    margin: 10px auto;
  }

}

body.modal-abierto {
  overflow: hidden;
}

/* MODAL */
#modal-producto {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-contenido {
  background: #fff;
  padding: 20px;
  max-width: 500px;
  width: 90%;
  border-radius: 8px;
  position: relative;
}

.cerrar-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  font-size: 20px;
}

#contador-carrito {
    position: absolute;
    top: 3px;
    right: -4px;
    background: rgba(255, 0, 0, 0.50);
    color: #000;
    font-size: 14px;
    border-radius: 50%;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

@keyframes contadorSoft {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* MEJORAS AL CARRITO */
.woocommerce-cart,
.woocommerce-checkout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* LAYOUT PRINCIPAL */
.wc-block-components-sidebar-layout {
    display: flex !important;
    gap: 40px;
    align-items: flex-start;
}
/* COLUMNAS */
.wc-block-cart__main {
    flex: 2;
}
.wc-block-cart__sidebar {
    flex: 1;
    width: auto !important;
}

/* 1 estilo tarjeta el resumen */
.wc-block-cart__sidebar {
    background: #ffffff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    position: sticky;
    top: 20px;
}
/* 2 jerarquia de totales */
.wc-block-cart__totals-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}
/* 3 totales mas limpios */
.wc-block-components-totals-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 15px;
}
.wc-block-components-totals-item__label {
    color: #555;
}
.wc-block-components-totals-item__value {
    font-weight: 600;
}
/* 4 boton checkout */
.wc-block-cart__submit-button {
    border-radius: 10px;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.2s ease;
}
.wc-block-cart__submit-button:hover {
    transform: translateY(-1px);
}
/* 5 filas de productos */
/*.wc-block-cart-items__row {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}*/
.wc-block-cart-item__wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
/* 6 imagen moderna */
.wc-block-cart-item__image img {
    border-radius: 10px;
    transition: transform 0.2s ease;
}
.wc-block-cart-item__image img:hover {
    transform: scale(1.05);
}
/* 7 nombre del producto */
.wc-block-components-product-name {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    text-decoration: none;
}
.wc-block-components-product-name:hover {
    text-decoration: underline;
}
/* 8 contral de cantidad */
.wc-block-components-quantity-selector {
    border: none !important;
    background: transparent !important;
}
.wc-block-components-quantity-selector__input {
    width: 45px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
}
.wc-block-components-quantity-selector__button {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
}
/* 9 boton eliminar limpio */
.wc-block-cart-item__remove-link {
    margin-top: 8px;
    display: inline-block;
    opacity: 0.6;
}
.wc-block-cart-item__remove-link:hover {
    opacity: 1;
}
/* 10 responsive */
@media (max-width: 768px) {
    .wc-block-components-sidebar-layout {
        flex-direction: column !important;
    }

    .wc-block-cart__sidebar {
        position: static;
        margin-top: 20px;
    }
}
/* A - CADA PRODUCTO COMO TARJETA */
.wc-block-cart-items__row {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}
/* B - MEJOR LAYOUT INTERNO */
.wc-block-cart-item__wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* C - IMAGEN MAS ELE */
.wc-block-cart-item__image img {
    border-radius: 10px;
}
/* D - NOMBRE MAS LIMPIO */
.wc-block-components-product-name {
    font-size: 15px;
    font-weight: 600;
    color: #222;
}
/* E - PRECIO MAS VISIBLE */
.wc-block-cart-item__prices {
    font-size: 16px;
    font-weight: 500;
}
/* F - ALINEAR CANT + ELIMINAR */
.wc-block-cart-item__quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}
/* BASURERO MEJOR UBICADO */
.wc-block-cart-item__remove-link {
    margin-left: auto;
}
/* HOVER SUTIL */
.wc-block-cart-items__row:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: 0.2s ease;
}
/*DESCRIPCION DE PRODUCTO CUANDO ES LARGO */
.wc-block-components-product-metadata__description p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.wc-block-components-product-metadata__description p {
    text-overflow: ellipsis;
}
.wc-block-cart-item__product {
    min-width: 0;
}
/* MEJORAS DEL CHECKOUT */
/*GRID PRINCIPAL*/
.woocommerce-checkout form.checkout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
/*COLUMNAS*/
#customer_details {
    grid-column: 1;
    padding-right: 10px;
}
#order_review {
    grid-column: 2;
}
/*TÃTULO RESUMEN*/
#order_review_heading {
    display: none;
}
#order_review::before {
    content: "Tu pedido";
    display: block;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}
/*FORMULARIO (BILLING REAL)*/
.woocommerce-billing-fields,
.woocommerce-additional-fields {
    background: #fff;
    padding: 22px;
    border-radius: 14px;
    border: 1px solid #eee;
    margin-bottom: 18px;
}
/*INPUTS (UNO SOLO BLOQUE)*/
.woocommerce-checkout input,
.woocommerce-checkout select,
.woocommerce-checkout textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #fafafa;
    transition: 0.2s ease;
}
.woocommerce-checkout input:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus {
    border-color: #000;
    background: #fff;
    outline: none;
}
/* FORM ROW*/
.woocommerce-checkout .form-row {
    margin-bottom: 12px;
}
/* RESUMEN (DERECHA)*/
#order_review {
    background: #fff;
    padding: 22px;
    border-radius: 14px;
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
    border-top: 3px solid #000;
    position: sticky;
    top: 20px;
}
/* TABLA*/
.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
/* TOTAL */
.woocommerce-checkout-review-order-table .order-total td {
    font-size: 16px;
    font-weight: 600;
}
/*MÃ‰TODOS DE PAGO*/
.wc_payment_method {
    background: #fafafa;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #eee;
    margin-bottom: 10px;
}
/*BOTÃ“N*/
#place_order {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    background: #000;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    transition: 0.2s ease;
}
#place_order:hover {
    background: #333;
    transform: translateY(-1px);
}
/*RESPONSIVE*/
@media (max-width: 768px) {
    .woocommerce-checkout form.checkout {
        grid-template-columns: 1fr;
    }

    #order_review {
        position: static;
    }
}
/* PEDIDO RECIBIDO MEJORAS */
.woocommerce-order {
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}
/* MENSAJE DE EXITO */
.woocommerce-thankyou-order-received {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}
/* RESUMEN EN TARJETA*/
.woocommerce-order-overview {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #eee;
    margin-bottom: 20px;
}
/* DETALLE DEL PEDIDO*/
.woocommerce-order-details {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #eee;
    margin-bottom: 20px;
}
/* DATOS DEL CLIENTE */
.woocommerce-customer-details {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #eee;
}
/*PARA CELULAR*/
/*Reducir padding general*/
@media (max-width: 768px) {
    .woocommerce-order {
        padding: 15px;
        margin: 20px auto;
    }
}
/*Mensaje de Ã©xito mÃ¡s legible*/
@media (max-width: 768px) {
    .woocommerce-thankyou-order-received {
        font-size: 18px;
        line-height: 1.3;
        text-align: center;
    }
}
/*Tarjetas mÃ¡s compactas*/
@media (max-width: 768px) {
    .woocommerce-order-overview,
    .woocommerce-order-details,
    .woocommerce-customer-details {
        padding: 15px;
        border-radius: 12px;
    }
}
/*TipografÃ­a mÃ¡s ligera en tablas*/
@media (max-width: 768px) {
    .woocommerce-order-details table {
        font-size: 13px;
    }
    .woocommerce-order-details th,
    .woocommerce-order-details td {
        padding: 6px 0;
    }
}
/*Evitar que â€œse sienta largoâ€*/
@media (max-width: 768px) {
    .woocommerce-order ul {
        margin: 0;
        padding-left: 18px;
    }
}
/* PAGINA DE MI CUENTA */
/* Contenedor general */
.woocommerce-account .woocommerce {
    display: flex;
    gap: 30px;
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}
/* Sidebar (menÃº izquierdo) */
.woocommerce-account .woocommerce-MyAccount-navigation {
    width: 260px;
    background: #f7f7f7;
    border-radius: 12px;
    padding: 20px;
}
/* Lista del menÃº */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.woocommerce-MyAccount-navigation ul li {
    margin-bottom: 10px;
}
/* Links del menÃº */
.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 12px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.2s ease;
}
/* Hover */
.woocommerce-MyAccount-navigation ul li a:hover {
    background: #eaeaea;
}
/* Activo */
.woocommerce-MyAccount-navigation ul li.is-active a {
    background: #000;
    color: #fff;
}
/* Contenido derecho */
.woocommerce-account .woocommerce-MyAccount-content {
    flex: 1;
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
/* TÃ­tulos */
.woocommerce-MyAccount-content h2 {
    margin-top: 0;
}
/* Tablas (pedidos, etc.) */
.woocommerce table.shop_table {
    border-radius: 10px;
    overflow: hidden;
    border: none;
}
.woocommerce table.shop_table th {
    background: #f4f4f4;
}
/* Botones */
.woocommerce a.button,
.woocommerce button.button {
    border-radius: 8px;
    padding: 10px 16px;
}
@media (max-width: 768px) {
    .woocommerce-account .woocommerce {
        flex-direction: column;
    }

    .woocommerce-account .woocommerce-MyAccount-navigation {
        width: 100%;
    }
}
