/* =============================================================================
   SEESTOCKS MOBILE — v8 · 14 abril 2026
   Fichero en 46.x: /etc/nginx/seestocks-static/css/mobile.css
   
   NOTA: Las reglas que causan layout shift (breadcrumb hide, padding reset,
   sheet/overlay initial state, desktop hide) están inline en base.html <head>
   para que se apliquen antes del primer paint y CLS = 0.
   ============================================================================= */

@media (max-width: 768px) {

/* ====================== BACK-LINK (Amazon style) ====================== */

.m-back {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 10px 16px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #0f1111;
    text-decoration: none;
    background: #f0f0f0;
    border-bottom: 1px solid #d5d9d9;
    line-height: 1;
}
.m-back svg { flex-shrink: 0; width: 18px; height: 18px; color: #565959; }
.m-back:hover { text-decoration: none; color: #0f1111; }

/* ====================== TOOLBAR ====================== */

.m-toolbar {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.m-toolbar__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 9px;
    background: none;
    border: none;
    color: #565959;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
}
.m-toolbar__btn + .m-toolbar__btn { border-left: 1px solid #e5e5e5; }
.m-toolbar__btn svg { width: 14px; height: 14px; }

/* ====================== BOTTOM SHEET (visual only) ====================== */
/* Initial state (transform/position) is inline in <head> to prevent CLS */

.m-sheet-overlay { background: rgba(0,0,0,.4); transition: opacity .25s; }
.m-sheet-overlay.active { opacity: 1; pointer-events: auto; }
.m-sheet { max-height: 60vh; background: #fff; border-radius: 14px 14px 0 0; transition: transform .3s cubic-bezier(.32,.72,0,1); display: flex; flex-direction: column; }
.m-sheet.active { transform: translateY(0); }
.m-sheet__handle { width: 36px; height: 4px; background: #d1d5db; border-radius: 2px; margin: 10px auto; flex-shrink: 0; }
.m-sheet__header { display: flex; align-items: center; justify-content: space-between; padding: 4px 16px 12px; border-bottom: 1px solid #e5e5e5; }
.m-sheet__header h3 { font-size: 16px; font-weight: 700; margin: 0; }
.m-sheet__close { background: none; border: none; font-size: 22px; color: #8c8c8c; cursor: pointer; padding: 4px; }
.m-sheet__body { padding: 8px 16px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.m-sheet__option { display: block; width: 100%; padding: 14px 0; border: none; background: none; font-size: 15px; font-family: inherit; color: #1a1a1a; text-align: left; cursor: pointer; border-bottom: 1px solid #f0f0f0; }
.m-sheet__option:last-child { border-bottom: none; }
.m-sheet__option--active { color: #2563eb; font-weight: 600; }
.m-sheet__option--active::after { content: " \2713"; }

/* ====================== CATEGORÍA ====================== */
/* .cat-page padding:0 and .cat-order-select hide are inline in <head> */

.cat-header,
.cat-subs,
.cat-grid,
.cat-pag,
.cat-seo,
.cat-vacio { padding-left: 10px !important; padding-right: 10px !important; }

.cat-header { margin-bottom: 2px; }
.cat-header h1, .cat-page h1 { font-size: 22px; font-weight: 700; padding: 2px 0 4px; line-height: 1.2; }
.cat-h1__count { font-size: 14px; font-weight: 400; }

.cat-subs { margin-bottom: 8px !important; }
.cat-subs__grid { flex-wrap: nowrap !important; overflow-x: auto !important; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px; }
.cat-subs__grid::-webkit-scrollbar { display: none; }
.cat-sub-chip { font-size: 12px; padding: 5px 10px; white-space: nowrap; flex-shrink: 0; }

.cat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }

.producto-card { border-radius: 8px !important; }
.producto-card__body { padding: 8px 10px 0 !important; }
.producto-card__nombre { font-size: 12px !important; min-height: 2.4em !important; }
.producto-card__precio { font-size: 16px !important; }
.producto-card__merchant { font-size: 10px !important; }
.producto-card__envio { font-size: 10px !important; }
.producto-card__cta { padding: 6px 10px !important; font-size: 11px !important; }

/* ====================== PRODUCTO ====================== */

.product-layout { padding: 0 10px !important; padding-bottom: 80px; }
.product-image { margin: 0 -10px !important; border-radius: 0 !important; padding: 8px !important; max-height: 50vh; }
.product-image img { max-height: 50vh !important; width: auto !important; margin: 0 auto; display: block; }
.comparador-section { padding: 0 10px !important; }
.product-details { padding: 0 10px !important; margin: 0 !important; }
.sticky-oferta-bar { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important; }
.sticky-oferta-bar__cta { min-height: 48px; }
.headline-offer-box__precio { font-size: 28px; }
.headline-offer-box__body { padding: 12px 14px; }
/* ====================== TIENDA / MARCA ====================== */
/* .mp padding:0 is inline in <head> */

.mp-sec,
.mp-stats,
.mp-deals,
.mp-cols,
.tp-header { padding-left: 10px !important; padding-right: 10px !important; }

.m-profile-hero { position: relative; margin-bottom: 12px; }
.m-profile-hero__banner { height: 80px; background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
.m-profile-hero__content { position: relative; padding: 0 16px; margin-top: -28px; }
.m-profile-hero__logo { width: 56px; height: 56px; object-fit: contain; background: #fff; border: 3px solid #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.m-profile-hero__logo-ph { width: 56px; height: 56px; background: linear-gradient(135deg, #e0e7ff, #c7d2fe); border: 3px solid #fff; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 700; color: #4f46e5; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.m-profile-hero__name { font-size: 22px; font-weight: 700; color: #1a1a1a; margin: 8px 0 0; line-height: 1.2; }
.m-profile-hero__domain { font-size: 13px; color: #2563eb; text-decoration: none; margin-top: 2px; display: inline-block; }
.m-profile-cta { display: flex; align-items: center; justify-content: center; width: calc(100% - 32px); margin: 12px 16px; padding: 12px; border: 1.5px solid #e5e5e5; border-radius: 10px; font-size: 14px; font-weight: 600; color: #1a1a1a; text-decoration: none; gap: 6px; min-height: 48px; }
.m-profile-cta:active { border-color: #2563eb; color: #2563eb; }

.mp-stats { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 8px !important; padding-bottom: 16px !important; border-bottom: 1px solid #e5e5e5; margin-bottom: 16px !important; }
.mp-stats::-webkit-scrollbar { display: none; }
.mp-stats > span { flex-shrink: 0; padding: 6px 12px; background: #f8f7f4; border-radius: 20px; font-size: 13px; white-space: nowrap; }
.mp-cols { grid-template-columns: 1fr !important; gap: 16px !important; }

/* ====================== BUSCADOR ====================== */

.search-chips-bar { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid #f0f0f0; padding: 6px 12px !important; }
.m-filter-fab { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 10px 24px; background: #1e293b; color: #fff; border: none; border-radius: 100px; font-size: 14px; font-weight: 600; font-family: inherit; box-shadow: 0 4px 20px rgba(0,0,0,.25); z-index: 90; cursor: pointer; }
.m-filter-fab svg { width: 16px; height: 16px; }

/* ====================== UTILIDADES ====================== */

.m-hide-mobile { display: none !important; }
.m-show-mobile { display: block !important; }

} /* fin @media (max-width: 768px) */
