body { 
    font-family: system-ui, Arial, sans-serif; 
    background-color: #f4f4f4; 
    margin: 0; 
    padding: 0; 
    color: #333;
}

.hero-section.hero-compact {
    background-image: url('https://e-tdfi.com.ar/catalogo/background-tdfi.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 18px 0 14px 0;
    margin-bottom: 14px;
    position: relative;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

.hero-section.hero-compact::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.24);
    z-index: 0;
}

.hero-content.hero-row {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    width: 100%;
    padding: 0 18px;
}

.hero-title {
    margin: 0;
    font-size: 1.38em;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 1px 4px #0006;
    flex-shrink: 0;
}

#orden-container {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.13);
    border-radius: 10px;
    padding: 7px 14px 7px 10px;
    box-shadow: 0 1px 3px #0001;
}
#orden-container label {
    margin-right: 7px;
    color: #fff;
    font-weight: 500;
}
#orden-select {
    font-size: 1em;
    padding: 5px 12px;
    border-radius: 6px;
    border: 1px solid #e4e4e4;
    outline: none;
}

@media (max-width: 700px) {
    .hero-content.hero-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 0 4vw;
    }
    .hero-title {
        font-size: 1.05em;
        text-align: center;
        margin-bottom: 2px;
    }
    #orden-container {
        justify-content: center;
        padding: 8px 6px;
    }
}

#catalogo-container { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
    gap: 22px; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px;
}
.producto-card { 
    background-color: white; 
    border-radius: 10px; 
    box-shadow: 0 3px 8px rgba(0,0,0,0.1); 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    transition: all 0.3s ease;
    position: relative;
    min-width: 0;
}
.img-badges {
    position: relative;
    width: 100%;
    height: 250px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.img-badges img {
    width: 100%;
    height: 320px;
    object-fit: contain;
    object-position: center;
    z-index: 1;
    border-bottom: 1px solid #eee;
    padding: 8px;
}

/* BADGE NUEVO: celeste fluo degradado, letras negras, borde blanco */
.badge-nuevo {
    position: absolute;
    top: 13px;
    left: 16px;
    background: linear-gradient(135deg, #04e6ffcc 0%, #00cfff 100%);
    color: #111;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.93em;
    font-weight: bold;
    z-index: 3;
    box-shadow: 0 2px 6px rgba(0,0,0,0.09);
    letter-spacing: 1.2px;
    text-shadow: none;
    pointer-events: none;
    user-select: none;
    text-align: center;
    border: 3px solid #fff;
}

/* BADGE DESCUENTO: degradado rojo/amarillo, letras blancas, borde negro, posición custom */
.badge-descuento {
    position: absolute;
    top: 60%;
    right: 16px;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #FF0F02 0%, #FFB204 100%);
    color: #fff !important;
    font-weight: 900;
    font-size: 1em;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    border: 3px solid #000;
    line-height: 1.1;
    text-shadow: none;
    pointer-events: none;
    user-select: none;
    text-align: center;
    letter-spacing: 0.3px;
}
.badge-descuento span {
    font-size: 0.76em;
    font-weight: 700;
    margin-top: -2px;
    letter-spacing: 0.09em;
    line-height: 0.92;
    color: #fff;
}

.producto-info { 
    padding: 12px 12px 5px 22px; 
    flex-grow: 1; 
}
.producto-info h2 { 
    margin: 0 0 6px 0; 
    font-size: 1.14em; 
    color: #222;
    line-height: 1.1;
    min-height: 2em;
    font-weight: bold;
}
.especificaciones {
    list-style: none;
    padding: 0;
    margin: 7px 0 0 0;
    color: #444;
    font-size: 0.97em;
}
.especificaciones li {
    margin-bottom: 2px;
    line-height: 1.1;
}
.producto-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 10px 16px 14px 20px;
    background-color: #fafafa;
    border-top: 1px solid #eee;
    min-height: 52px;
    position: relative;
}

.precio-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    position: relative;
}

.precio-original {
    text-decoration: line-through;
    color: #a9a9a9;
    font-size: 0.92em;
    opacity: 0.85;
    font-weight: 500;
    letter-spacing: 0.2px;
    margin-bottom: 2px;
    margin-left: 2px;
    position: static;    /* <--- Esto hace que no se superponga ni quede tan arriba */
    line-height: 1.1;
}

.precio-final.oferta {
    color: #13ad5b;
    font-size: 1.17em;
    font-weight: 700;
    line-height: 1.15;
}

.precio-final {
    font-size: 1.17em;
    font-weight: 700;
    color: #222;
    line-height: 1.13;
    margin-bottom: 0px;
}

.buy-button {
    background-color: #25D366;
    color: white;
    padding: 7px 22px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    cursor: pointer;
    min-height: 36px;
    line-height: 1.1;
    transition: all 0.2s ease;
    margin-left: 10px;
    margin-right: 2px;
    margin-bottom: 2px;
}

.buy-button:hover {
    background-color: #1DA851;
    transform: translateY(-1px);
}
#loading { 
    text-align: center; 
    font-size: 1.5em; 
    padding: 50px; 
    color: #888; 
}
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 47px;
    height: 47px;
    background-color: #27ae60;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: none;
    font-size: 22px;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background-color: #2ecc71;
    transform: translateY(-3px) scale(1.05);
}
@media (max-width: 1200px) {
    #catalogo-container { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 900px) {
    #catalogo-container { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    #catalogo-container { grid-template-columns: 1fr; }
    .img-badges, .img-badges img { height: 108px; }
    .badge-nuevo, .badge-descuento { width: 32px; height: 32px; font-size: 0.83em; }
    .producto-footer { min-height: 39px; }
}
