/* ============================================================
   TIENDA ONLINE SUA-B — diseño premium
   ============================================================ */
[x-cloak] { display: none !important; }

.tienda-body {
    background: #fff;
    color: #111;
    font-family: M-Regular, sans-serif;
}

.tienda, .tienda-producto, .tienda-carrito {
    max-width: 1240px;
    margin: 0 auto;
    padding: 120px 24px 80px;
}

/* ===== HERO ===== */
.tienda-hero {
    text-align: center;
    padding: 20px 0 50px;
}
.tienda-hero__eyebrow {
    font-family: M-Medium, sans-serif;
    letter-spacing: 6px;
    font-size: 12px;
    color: #999;
    margin: 0 0 14px;
}
.tienda-hero__title {
    font-family: M-Bold, sans-serif;
    font-size: 52px;
    letter-spacing: 2px;
    margin: 0 0 14px;
    color: #111;
}
.tienda-hero__sub {
    color: #666;
    font-size: 16px;
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===== FILTROS ===== */
.tienda-filtros {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 50px;
}
.tienda-filtro {
    font-family: M-Medium, sans-serif;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 10px 22px;
    border: 1px solid #e2e2e2;
    border-radius: 40px;
    color: #555;
    text-decoration: none;
    transition: all .2s ease;
}
.tienda-filtro:hover { border-color: #111; color: #111; }
.tienda-filtro.is-active { background: #111; color: #fff; border-color: #111; }

/* ===== GRID DE PRODUCTOS ===== */
.tienda-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
@media (min-width: 700px) { .tienda-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
@media (min-width: 1000px) { .tienda-grid { grid-template-columns: repeat(4, 1fr); } }

.tienda-card {
    display: flex;
    flex-direction: column;
}
.tienda-card__media {
    position: relative;
    display: block;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f4f4f4;
    border-radius: 4px;
}
.tienda-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}
.tienda-card__media:hover img { transform: scale(1.05); }
.tienda-card__media--empty { width: 100%; height: 100%; background: #efefef; }
.tienda-card__badge {
    position: absolute; top: 12px; left: 12px;
    background: rgba(0,0,0,.8); color: #fff;
    font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
    padding: 5px 10px; border-radius: 3px;
}
.tienda-card__body { padding: 14px 2px 0; }
.tienda-card__cat {
    font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
    color: #aaa; font-family: M-Medium, sans-serif;
}
.tienda-card__name {
    font-family: M-Medium, sans-serif;
    font-size: 15px; line-height: 1.35; margin: 6px 0 0;
}
.tienda-card__name a { color: #111; text-decoration: none; }
.tienda-card__name a:hover { opacity: .65; }
.tienda-card__foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 12px;
}
.tienda-card__price { font-family: M-Bold, sans-serif; font-size: 16px; color: #111; }
.tienda-card__add {
    width: 38px; height: 38px;
    border: 1px solid #111; background: #fff; color: #111;
    border-radius: 50%; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all .2s ease;
}
.tienda-card__add:hover { background: #111; color: #fff; }
.tienda-card__add .material-symbols-outlined { font-size: 20px; }

.tienda-empty, .tienda-paginacion { grid-column: 1 / -1; text-align: center; color: #888; }
.tienda-paginacion { margin-top: 50px; }

/* ===== BOTONES ===== */
.tienda-btn {
    display: inline-flex; align-items: center; justify-content: center;
    font-family: M-Medium, sans-serif; font-size: 14px; letter-spacing: .5px;
    padding: 14px 30px; background: #111; color: #fff !important;
    border: 1px solid #111; border-radius: 4px; cursor: pointer;
    text-decoration: none; transition: all .2s ease;
}
.tienda-btn:hover { background: #fff; color: #111 !important; }
.tienda-btn--block { width: 100%; }
.tienda-btn--lg { padding: 16px 34px; font-size: 15px; }
.tienda-btn:disabled { opacity: .45; cursor: not-allowed; }
.tienda-btn:disabled:hover { background: #111; color: #fff !important; }

/* ===== QTY ===== */
.tienda-qty {
    display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 4px;
}
.tienda-qty button {
    width: 42px; height: 46px; background: #fff; border: 0; font-size: 18px; cursor: pointer; color: #111;
}
.tienda-qty button:disabled { opacity: .3; cursor: not-allowed; }
.tienda-qty input, .tienda-qty span {
    width: 48px; text-align: center; border: 0; font-family: M-Medium, sans-serif; font-size: 15px;
    line-height: 46px; display: inline-block;
}
.tienda-qty--sm button { width: 34px; height: 36px; font-size: 15px; }
.tienda-qty--sm span { width: 38px; line-height: 36px; }

/* ===== FICHA DE PRODUCTO ===== */
.tienda-breadcrumb {
    font-size: 13px; color: #999; margin-bottom: 30px; display: flex; gap: 8px; flex-wrap: wrap;
}
.tienda-breadcrumb a { color: #999; text-decoration: none; }
.tienda-breadcrumb a:hover { color: #111; }
.tienda-breadcrumb .is-current { color: #111; }

.tienda-producto__grid {
    display: grid; grid-template-columns: 1fr; gap: 40px;
}
@media (min-width: 900px) { .tienda-producto__grid { grid-template-columns: 1.1fr 1fr; gap: 60px; } }

.tienda-producto__principal {
    aspect-ratio: 3/4; background: #f4f4f4; border-radius: 6px; overflow: hidden;
}
.tienda-producto__principal img { width: 100%; height: 100%; object-fit: cover; }
.tienda-producto__principal--empty { width: 100%; height: 100%; background: #efefef; }
.tienda-producto__miniaturas { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.tienda-producto__mini {
    width: 64px; height: 64px; border: 1px solid #e2e2e2; border-radius: 4px; overflow: hidden;
    background: #fff; cursor: pointer; padding: 0;
}
.tienda-producto__mini.is-active { border-color: #111; }
.tienda-producto__mini img { width: 100%; height: 100%; object-fit: cover; }

.tienda-producto__cat {
    font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: #aaa;
    font-family: M-Medium, sans-serif;
}
.tienda-producto__nombre {
    font-family: M-Bold, sans-serif; font-size: 34px; line-height: 1.2; margin: 10px 0 18px; color: #111;
}
.tienda-producto__precio { font-family: M-Bold, sans-serif; font-size: 26px; margin: 0; color: #111; }
.tienda-producto__iva { font-size: 13px; color: #999; margin: 4px 0 26px; }
.tienda-producto__desc {
    color: #555; line-height: 1.8; font-size: 15px; margin-bottom: 30px;
    border-top: 1px solid #eee; padding-top: 26px;
}
.tienda-producto__compra { display: flex; gap: 14px; flex-wrap: wrap; align-items: stretch; }
.tienda-producto__stock { font-size: 13px; color: #2e7d32; margin-top: 16px; }
.tienda-producto__agotado { font-family: M-Medium, sans-serif; color: #b00; margin-top: 10px; }

.tienda-relacionados { margin-top: 90px; }
.tienda-relacionados__titulo {
    font-family: M-Bold, sans-serif; font-size: 22px; text-align: center; margin-bottom: 36px; color: #111;
}

/* ===== CARRITO (página) ===== */
.tienda-carrito__head h1 { font-family: M-Bold, sans-serif; font-size: 38px; margin-bottom: 36px; color: #111; }
.tienda-carrito__vacio { text-align: center; padding: 60px 0; color: #777; }
.tienda-carrito__vacio .tienda-btn { margin-top: 20px; }
.tienda-carrito__grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 900px) { .tienda-carrito__grid { grid-template-columns: 1.6fr 1fr; gap: 60px; } }

.tienda-carrito__item {
    display: grid; grid-template-columns: 90px 1fr auto; gap: 18px; align-items: center;
    padding: 20px 0; border-bottom: 1px solid #eee;
}
.tienda-carrito__thumb { aspect-ratio: 3/4; width: 90px; background: #f4f4f4; border-radius: 4px; overflow: hidden; }
.tienda-carrito__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tienda-carrito__name { font-family: M-Medium, sans-serif; color: #111; text-decoration: none; display: block; }
.tienda-carrito__unit { font-size: 13px; color: #999; display: block; margin: 4px 0 10px; }
.tienda-carrito__line { text-align: right; font-family: M-Medium, sans-serif; }
.tienda-carrito__remove {
    display: block; margin-top: 8px; background: none; border: 0; color: #b00; font-size: 12px; cursor: pointer; text-align: right; width: 100%;
}
.tienda-carrito__remove:hover { text-decoration: underline; }

.tienda-carrito__resumen { background: #fafafa; border: 1px solid #eee; border-radius: 8px; padding: 28px; height: fit-content; }
.tienda-carrito__resumen h2 { font-family: M-Bold, sans-serif; font-size: 18px; margin-bottom: 20px; }
.tienda-carrito__row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; color: #555; }
.tienda-carrito__row--total { border-top: 1px solid #ddd; margin-top: 10px; padding-top: 16px; font-family: M-Bold, sans-serif; font-size: 18px; color: #111; }
.tienda-carrito__resumen .tienda-btn { margin-top: 20px; }
.tienda-carrito__note { font-size: 12px; color: #999; text-align: center; margin-top: 12px; }
.tienda-carrito__seguir { display: block; text-align: center; margin-top: 16px; color: #111; font-size: 13px; text-decoration: none; }
.tienda-carrito__seguir:hover { text-decoration: underline; }

/* ===== FAB CARRITO ===== */
.tienda-cart-fab {
    position: fixed; right: 22px; bottom: 100px; z-index: 1100;
    width: 56px; height: 56px; border-radius: 50%; border: 0;
    background: #111; color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: transform .2s ease;
}
.tienda-cart-fab:hover { transform: scale(1.06); }
.tienda-cart-fab__badge {
    position: absolute; top: -4px; right: -4px;
    background: #fff; color: #111; border: 2px solid #111;
    min-width: 22px; height: 22px; border-radius: 11px;
    font-size: 11px; font-family: M-Bold, sans-serif;
    display: flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* ===== DRAWER ===== */
.tienda-drawer-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1190;
}
.tienda-drawer {
    position: fixed; top: 0; right: 0; height: 100%; width: 420px; max-width: 92vw;
    background: #fff; z-index: 1200; transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,.12);
}
.tienda-drawer.is-open { transform: translateX(0); }
.tienda-drawer__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 24px; border-bottom: 1px solid #eee;
}
.tienda-drawer__head h3 { font-family: M-Bold, sans-serif; font-size: 18px; margin: 0; }
.tienda-drawer__close { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: #111; }
.tienda-drawer__body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.tienda-drawer__empty { color: #999; text-align: center; padding: 40px 0; }
.tienda-drawer__item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid #f0f0f0; }
.tienda-drawer__thumb { width: 64px; aspect-ratio: 3/4; background: #f4f4f4; border-radius: 4px; overflow: hidden; }
.tienda-drawer__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tienda-drawer__thumb--empty { width: 100%; height: 100%; background: #efefef; }
.tienda-drawer__name { font-family: M-Medium, sans-serif; font-size: 14px; color: #111; text-decoration: none; display: block; margin-bottom: 8px; }
.tienda-drawer__qty { display: inline-flex; align-items: center; border: 1px solid #ddd; border-radius: 4px; }
.tienda-drawer__qty button { width: 28px; height: 30px; background: #fff; border: 0; cursor: pointer; }
.tienda-drawer__qty button:disabled { opacity: .3; }
.tienda-drawer__qty span { width: 30px; text-align: center; font-size: 14px; }
.tienda-drawer__line { text-align: right; font-family: M-Medium, sans-serif; font-size: 14px; }
.tienda-drawer__remove { display: block; background: none; border: 0; color: #b00; font-size: 11px; cursor: pointer; margin-top: 6px; }
.tienda-drawer__foot { border-top: 1px solid #eee; padding: 20px 24px; }
.tienda-drawer__row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; color: #555; }
.tienda-drawer__row--total { font-family: M-Bold, sans-serif; color: #111; font-size: 17px; border-top: 1px solid #eee; margin-top: 8px; padding-top: 14px; margin-bottom: 16px; }
.tienda-drawer__note { font-size: 11px; color: #999; text-align: center; margin-top: 12px; }

@media (max-width: 600px) {
    .tienda-hero__title { font-size: 38px; }
    .tienda, .tienda-producto, .tienda-carrito { padding-top: 100px; }
}

/* ============================================================
   CHECKOUT / PAGO / GRACIAS / CUENTA
   ============================================================ */
.tienda-checkout, .tienda-pago, .tienda-gracias, .tienda-auth, .tienda-cuenta {
    max-width: 1100px; margin: 0 auto; padding: 120px 24px 80px;
}
.tienda-checkout__title, .tienda-pago__title { font-family: M-Bold, sans-serif; font-size: 32px; margin-bottom: 30px; color: #111; }

.tienda-alert { border-radius: 6px; padding: 14px 18px; margin-bottom: 24px; font-size: 14px; }
.tienda-alert--error { background: #fdecea; color: #b3261e; border: 1px solid #f5c6c2; }
.tienda-alert ul { margin: 0; padding-left: 18px; }

.tienda-checkout__grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media (min-width: 900px) { .tienda-checkout__grid { grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: start; } }

.tienda-checkout__login { font-size: 14px; color: #555; margin-bottom: 20px; }
.tienda-checkout__login a { color: #111; font-weight: 600; }

.tienda-checkout__bloque { margin-bottom: 34px; }
.tienda-checkout__bloque h2 { font-family: M-Bold, sans-serif; font-size: 16px; letter-spacing: .5px; margin-bottom: 16px; color: #111; }

.tienda-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tienda-field-grid__full { grid-column: 1 / -1; }
.tienda-field-grid label, .tienda-auth label { display: block; font-size: 13px; color: #777; margin-bottom: 5px; }
.tienda-field-grid input, .tienda-checkout textarea, .tienda-auth input {
    width: 100%; border: 1px solid #ddd; border-radius: 6px; padding: 11px 13px; font-size: 14px; font-family: inherit;
}
.tienda-checkout textarea { width: 100%; border: 1px solid #ddd; border-radius: 6px; padding: 12px; font-family: inherit; }
.tienda-field-grid input:focus, .tienda-auth input:focus, .tienda-checkout textarea:focus { outline: none; border-color: #111; }
@media (max-width: 560px) { .tienda-field-grid { grid-template-columns: 1fr; } }

.tienda-envios { display: flex; flex-direction: column; gap: 12px; }
.tienda-envio {
    display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
    border: 1px solid #e2e2e2; border-radius: 8px; padding: 14px 16px; cursor: pointer; transition: border-color .2s;
}
.tienda-envio.is-active { border-color: #111; }
.tienda-envio__nombre { font-family: M-Medium, sans-serif; font-size: 14px; }
.tienda-envio__precio { font-size: 13px; color: #777; }

.tienda-checkout__resumen { background: #fafafa; border: 1px solid #eee; border-radius: 10px; padding: 26px; position: sticky; top: 100px; }
.tienda-checkout__resumen h2 { font-family: M-Bold, sans-serif; font-size: 17px; margin-bottom: 18px; }
.tienda-checkout__items { margin-bottom: 18px; }
.tienda-checkout__item { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; }
.tienda-checkout__thumb { position: relative; width: 48px; aspect-ratio: 3/4; background: #eee; border-radius: 4px; overflow: hidden; }
.tienda-checkout__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tienda-checkout__qty { position: absolute; top: -6px; right: -6px; background: #111; color: #fff; font-size: 11px; width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.tienda-checkout__nombre { font-size: 13px; color: #333; }
.tienda-checkout__linea { font-size: 13px; font-family: M-Medium, sans-serif; }
.tienda-checkout__row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: #555; }
.tienda-checkout__row--total { border-top: 1px solid #ddd; margin-top: 8px; padding-top: 14px; font-family: M-Bold, sans-serif; font-size: 18px; color: #111; }
.tienda-checkout__resumen .tienda-btn { margin-top: 18px; }
.tienda-checkout__seguro { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: #888; margin-top: 12px; }
.tienda-checkout__seguro .material-symbols-outlined { font-size: 16px; }
.tienda-checkout__volver { display: block; text-align: center; margin-top: 14px; font-size: 13px; color: #111; text-decoration: none; }

.tienda-pago { max-width: 560px; }
.tienda-pago__pedido { color: #555; margin-bottom: 26px; }
.tienda-pago__form { margin-top: 10px; }
.tienda-pago__form .tienda-btn { margin-top: 24px; }
.tienda-pago__message { margin-top: 16px; color: #b3261e; font-size: 14px; }
.tienda-pago__volver { display: inline-block; margin-top: 24px; font-size: 13px; color: #111; }
.tienda-spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; display: inline-block; animation: tspin .7s linear infinite; }
@keyframes tspin { to { transform: rotate(360deg); } }

.tienda-gracias { max-width: 620px; text-align: center; }
.tienda-gracias__icon { width: 70px; height: 70px; border-radius: 50%; background: #111; color: #fff; font-size: 34px; display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
.tienda-gracias__icon--wait { background: #f0ad4e; }
.tienda-gracias h1 { font-family: M-Bold, sans-serif; font-size: 30px; margin-bottom: 12px; color: #111; }
.tienda-gracias__lead { color: #555; line-height: 1.7; margin-bottom: 36px; }
.tienda-gracias__resumen { text-align: left; background: #fafafa; border: 1px solid #eee; border-radius: 10px; padding: 24px; margin-bottom: 30px; }
.tienda-gracias__resumen h2 { font-family: M-Bold, sans-serif; font-size: 16px; margin-bottom: 16px; }
.tienda-gracias__item { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: #444; }
.tienda-gracias__row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; color: #555; border-top: 1px solid #eee; margin-top: 4px; }
.tienda-gracias__row--total { font-family: M-Bold, sans-serif; color: #111; font-size: 17px; }

.tienda-auth { max-width: 460px; }
.tienda-auth__card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 36px; }
.tienda-auth__card h1 { font-family: M-Bold, sans-serif; font-size: 26px; margin-bottom: 22px; color: #111; }
.tienda-auth__card label { margin-top: 14px; }
.tienda-auth__card .tienda-btn { margin-top: 22px; }
.tienda-auth__remember { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 13px; color: #555; }
.tienda-auth__alt { text-align: center; margin-top: 20px; font-size: 14px; color: #555; }
.tienda-auth__alt a { color: #111; font-weight: 600; }

.tienda-cuenta__head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.tienda-cuenta__head h1 { font-family: M-Bold, sans-serif; font-size: 30px; color: #111; }
.tienda-cuenta__head p { color: #777; font-size: 14px; }
.tienda-cuenta__logout { background: none; border: 1px solid #ddd; border-radius: 6px; padding: 9px 18px; font-size: 13px; cursor: pointer; }
.tienda-cuenta__subtitle { font-family: M-Bold, sans-serif; font-size: 18px; margin-bottom: 20px; }
.tienda-cuenta__pedido { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 20px; padding: 18px 0; border-bottom: 1px solid #eee; }
.tienda-cuenta__factura { font-size: 13px; color: #111; text-decoration: underline; white-space: nowrap; }
.tienda-cuenta__num { font-family: M-Medium, sans-serif; }
.tienda-cuenta__fecha { color: #999; font-size: 13px; margin-left: 12px; }
.tienda-cuenta__estado { font-size: 12px; padding: 4px 12px; border-radius: 20px; background: #eee; }
.tienda-cuenta__estado--pagado { background: #e6f4ea; color: #1e7e34; }
.tienda-cuenta__estado--enviado { background: #e7f0fb; color: #1664c0; }
.tienda-cuenta__estado--pendiente_pago { background: #fff3cd; color: #8a6d3b; }
.tienda-cuenta__total { font-family: M-Bold, sans-serif; }

.tienda-drawer__vercarrito { display: block; text-align: center; margin-top: 12px; font-size: 13px; color: #111; text-decoration: none; }
