* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f7f7f7;
    color: #1f2937;
}

.contenedor-tienda,
.contenedor-detalle {
    width: min(1100px, 92%);
    margin: 30px auto;
}

.titulo-tienda {
    margin-bottom: 24px;
}

.rejilla-productos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.tarjeta-producto {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.imagen-link {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.imagen-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.boton-vista-rapida {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.imagen-link:hover .boton-vista-rapida {
    opacity: 1;
}

.info-producto {
    padding: 12px 14px 16px;
}

.info-producto h2 {
    font-size: 18px;
    margin: 0 0 8px;
    font-family: "Saira", sans-serif;
}

.info-producto p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.acciones-catalogo {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
}

.btn-catalogo-cesta,
.btn-catalogo-compra {
    border: 1px solid #111827;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 700;
}

.btn-catalogo-cesta {
    background: #fff;
    color: #111827;
}

.btn-catalogo-cesta:hover {
    background: #111827;
    color: #fff;
}

.btn-catalogo-compra {
    background: #075c31;
    color: #fff;
    border-color: #075c31;
}

.btn-catalogo-compra:hover {
    background: #054e29;
}

.btn-catalogo-cesta:disabled,
.btn-catalogo-compra:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.mensaje-vacio,
.producto-no-encontrado {
    background: #fff;
    padding: 24px;
    border-radius: 10px;
}

.detalle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    background: #fff;
    border-radius: 12px;
    padding: 24px;
}

@media (min-width: 1024px) {
    .rejilla-productos {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
    }
}

.imagen-principal-contenedor {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.imagen-principal-contenedor img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.btn-lupa {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 48px;
    height: 48px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #000;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.icono-lupa-plus {
    position: relative;
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 1px;
}

.icono-lupa-plus::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 2px;
    background: #fff;
    right: -7px;
    bottom: -4px;
    transform: rotate(45deg);
    border-radius: 2px;
}

.visor-imagen {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 70px 20px 24px;
}

.visor-imagen.abierto {
    display: flex;
}

.visor-imagen-activa {
    max-width: 95vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.visor-control {
    position: fixed;
    top: 18px;
    border: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

#visorPrev {
    left: calc(50% - 90px);
}

#visorClose {
    left: 50%;
    transform: translateX(-50%);
}

#visorNext {
    left: calc(50% + 44px);
}

.miniaturas {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.miniatura {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
}

.miniatura img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.miniatura.activa {
    border-color: #2563eb;
}

.nombre-producto {
   
    font-family: "Smooch Sans", sans-serif;
    color: #1d4ed8;
    margin: 0;
    font-size: 34px;
    
}

.sku-producto {
    font-family: "Smooch Sans", sans-serif;
    margin: 6px 0 0;
    font-size: 23px;
    font-weight: 700;
    color: #dc2626;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.marca-producto {
    margin: 0 0 6px;
    color: #14532d;
     font-family: "Saira", sans-serif;
    font-size: 15px;
    font-weight: 400;
}

.precio-producto {
    margin-top: 12px;
    font-size: 25px;
    font-weight: 600;
    color: #2ce51b;
     
}

.fila-color,
.fila-cantidad {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-bola {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    display: inline-block;
}

.control-cantidad {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.control-cantidad button {
    border: 0;
    background: #f3f4f6;
    width: 36px;
    height: 36px;
    font-size: 20px;
    cursor: pointer;
}

.control-cantidad button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.control-cantidad input {
    width: 50px;
    text-align: center;
    border: 0;
    height: 36px;
    font-size: 16px;
}

.mensaje-cantidad-stock {
    margin: 6px 0 0;
    font-size: 13px;
    color: #dc2626;
    min-height: 18px;
}

.mensaje-cantidad-stock:not(.visible) {
    visibility: hidden;
}

.estado-stock {
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 700;
}

.estado-stock.en-stock {
    color: #2563eb;
}

.estado-stock.agotado {
    color: #dc2626;
}

.tooltip-disponibilidad {
    position: relative;
}

p.tooltip-disponibilidad {
    display: inline-block;
}

.tooltip-disponibilidad[data-tooltip]:hover::after,
.tooltip-disponibilidad[data-tooltip].tooltip-visible::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    background: #111827;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

.tooltip-disponibilidad[data-tooltip]:hover::before,
.tooltip-disponibilidad[data-tooltip].tooltip-visible::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #111827;
    z-index: 10;
}

.ruta-detalle {
    margin: 0 0 6px;
    color: #6b7280;
    font-size: 14px;
    font-family: "Saira", sans-serif;
}

.ruta-detalle a,
.ruta-detalle span {
    color: #6b7280;
    text-decoration: none;
}

.ruta-detalle a:hover {
    color: #4b5563;
}

.separador-ruta {
    margin: 0 6px;
}

.acciones-producto {
    margin-top: 20px;
    display: flex;
    align-items: stretch;
    gap: 12px;
}

.acciones-producto .tooltip-disponibilidad {
    flex: 1;
}

.acciones-producto .btn-cesta,
.acciones-producto .btn-comprar-ahora {
    margin-top: 0;
    width: 100%;
}

.btn-cesta {
    margin-top: 20px;
    border: 2px solid #ffffff;
    background: #fff;
    color: #000;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 0 0 2px #c4cbd3, 0 3px 0 rgba(255, 255, 255, 0.98) inset, 0 -4px 0 rgba(0, 0, 0, 0.18) inset, 0 2px 4px rgba(0, 0, 0, 0.12);
}

.btn-cesta:hover {
    background: #000;
    color: #fff;
}

.btn-cesta:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-cesta:disabled:hover {
    background: #fff;
    color: #000;
}

.btn-comprar-ahora {
    margin-top: 12px;
    border: 2px solid #ffffff;
    background: #075c31;
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 0 0 2px #c4cbd3, 0 3px 0 rgba(255, 255, 255, 0.95) inset, 0 -4px 0 rgba(0, 0, 0, 0.24) inset, 0 2px 4px rgba(0, 0, 0, 0.16);
}

.btn-comprar-ahora:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.descripcion-producto {
    font-family: "Jura", sans-serif;
    margin-top: 24px;
}

.descripcion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    border-top: 1px solid #0c5ed8;
    border-bottom: 1px solid #0c5ed8;
    background: transparent;
    padding: 10px 0;
    font-family: "Jura", sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.descripcion-icono {
    width: 16px;
    height: 12px;
    position: relative;
    display: inline-block;
    transition: transform 0.25s ease;
}

.descripcion-icono::before,
.descripcion-icono::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
}

.descripcion-icono::before {
    top: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 12px solid #000;
}

.descripcion-icono::after {
    top: 1px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 10px solid #fff;
}

.descripcion-toggle[aria-expanded="true"] .descripcion-icono {
    transform: rotate(180deg);
}

.descripcion-contenido {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding-top: 0;
    transition: max-height 0.28s ease, opacity 0.22s ease, padding-top 0.22s ease;
}

.descripcion-toggle[aria-expanded="true"] + .descripcion-contenido {
    max-height: 500px;
    opacity: 1;
    padding-top: 10px;
}

.descripcion-producto p {
    margin: 0;
    line-height: 1.45;
    text-align: justify;
}

.medidas-producto {
    font-family: "Jura", sans-serif;
    margin-top: 18px;
}

.medidas-producto h2 {
    margin: 0 0 10px;
    font-size: 1.0rem;
}

.medidas-producto img {
    width: 100%;
    max-width: 420px;
    height: auto;
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

@media (max-width: 850px) {
    .detalle-grid {
        grid-template-columns: 1fr;
    }

    .nombre-producto {
        font-size: 28px;
    }
}

@media (max-width: 650px) {
    .rejilla-productos {
        grid-template-columns: 1fr;
    }
}

.cart-toggle1 {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 1999;
    border: none;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    padding: 12px 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.cart-container1 h2 {
    font-size: 1.2rem;
    margin: 0;
}