/*
Theme Name: Tokyo Motel
Author: Tokyo Motel Hotel
Version: 1.0
Description: Tema propio para tienda tipo AliExpress.
*/

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: #ffffff;
    color: #111;
    line-height: 1.5;
}

/* HEADER */
.tm-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}
.tm-logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #111;
    text-decoration: none;
}
.tm-logo span { color: #e60023; }
.tm-cart {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    padding: 8px 14px;
    border: 1px solid #111;
    border-radius: 6px;
}
.tm-cart:hover { background: #111; color: #fff; }

/* CONTENEDOR */
.tm-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* TÍTULO DE SECCIÓN */
.tm-title-sec {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

/* GRID */
.tm-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.tm-card {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}
.tm-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

.tm-img {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
    overflow: hidden;
}
.tm-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s;
}
.tm-card:hover .tm-img img { transform: scale(1.05); }

.tm-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e60023;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 4px;
    z-index: 2;
}

.tm-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 8px;
}

.tm-title {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tm-title a { color: #111; text-decoration: none; }
.tm-title a:hover { color: #e60023; }

.tm-precios {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}
.tm-tachado {
    color: #111;
    text-decoration: line-through;
    font-size: 13px;
}
.tm-oferta {
    color: #e60023;
    font-size: 20px;
    font-weight: 700;
}
.tm-normal {
    color: #111;
    font-size: 20px;
    font-weight: 700;
}

.tm-botones {
    display: flex;
    gap: 8px;
    margin-top: auto;
}
.tm-btn-ver,
.tm-btn-carrito {
    flex: 1;
    text-align: center;
    padding: 9px 6px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.tm-btn-ver {
    background: #fff;
    color: #111;
    border: 1px solid #111;
}
.tm-btn-ver:hover { background: #111; color: #fff; }
.tm-btn-carrito {
    background: #e60023;
    color: #fff;
    border: 1px solid #e60023;
}
.tm-btn-carrito:hover { background: #b3001b; border-color: #b3001b; }

/* FOOTER */
.tm-footer {
    text-align: center;
    padding: 30px 24px;
    color: #777;
    font-size: 13px;
    border-top: 1px solid #eee;
    margin-top: 40px;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .tm-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 768px) {
    .tm-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
    .tm-wrap { padding: 16px; }
    .tm-title { font-size: 14px; min-height: 36px; }
    .tm-oferta, .tm-normal { font-size: 17px; }
    .tm-btn-ver, .tm-btn-carrito { font-size: 12px; padding: 8px 4px; }
}
@media (max-width: 380px) {
    .tm-grid { grid-template-columns: 1fr; }
}