/* =====================================================
   PC Store Home
   ===================================================== */

/* ── HERO ── */
/* Colores propios del Home: NO dependen del header (--pch-bg/--pch-text). */
.trxh-hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    background: var(--trxh-hero-bg, #0a0a0a);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.trxh-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--trxh-hero-bg) 55%, transparent) 0%, var(--trxh-hero-bg) 100%);
}

.trxh-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 24px;
    text-align: center;
}

.trxh-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--trxh-accent, #1428A0);
    border: 1px solid color-mix(in srgb, var(--trxh-accent) 40%, transparent);
    border-radius: 20px;
    padding: 5px 14px;
    margin-bottom: 20px;
}

.trxh-hero-title {
    font-family: var(--pch-font, system-ui, sans-serif);
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 700;
    line-height: 1.15;
    color: var(--trxh-hero-text, #ffffff);
    margin: 0 0 16px;
}

.trxh-hero-text {
    font-size: 15px;
    line-height: 1.6;
    color: color-mix(in srgb, var(--trxh-hero-text) 70%, transparent);
    margin: 0 0 28px;
}

.trxh-hero-cta {
    display: inline-block;
    background: var(--trxh-accent, #1428A0);
    color: #0a0a0a;
    font-weight: 700;
    font-size: 14px;
    padding: 13px 28px;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}

.trxh-hero-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--trxh-accent) 35%, transparent);
}

/* ── MAIN / SECCIONES ── */
.trxh-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 24px 56px;
    width: 100%;
    box-sizing: border-box;
}

.trxh-section {
    margin-top: 48px;
}

.trxh-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}

.trxh-section-head h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.trxh-section-sub {
    font-size: 12.5px;
    color: #8c8f94;
}

.trxh-section-link {
    font-size: 13px;
    font-weight: 500;
    color: #2271b1;
    text-decoration: none;
}

.trxh-section-link:hover {
    text-decoration: underline;
}

/* ── GRID DE CATEGORÍAS ── */
.trxh-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    width: 100%;
}

.trxh-cat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    color: #1d2327;
    transition: border-color 0.15s, transform 0.15s;
}

.trxh-cat-card:hover {
    border-color: var(--trxh-accent, #1428A0);
    transform: translateY(-2px);
}

/* Contenedor y estilos para iconos e imágenes personalizadas */
.trxh-cat-media {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trxh-cat-img-custom {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.trxh-cat-icon {
    font-size: 28px !important;
    width: 28px;
    height: 28px;
    color: #2271b1;
}

.trxh-cat-name {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

.trxh-cat-rank {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--trxh-accent, #1428A0);
    color: #0a0a0a;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
}

/* ── GRID DE PRODUCTOS (reutiliza .techrex-card de search.css) ── */
.trxh-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    width: 100%;
}

/* ── SLIDER DE OFERTAS ───────────────────────────── */
.trxh-offers-slider {
    position: relative;
    max-width: 1280px;
    margin: 20px auto 0;
    padding: 0 24px;
    box-sizing: border-box;
}
.trxh-offers-track {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #f2f4f7;
    aspect-ratio: 3 / 1;
}
.trxh-offers-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
}
.trxh-offers-slide.is-active { opacity: 1; pointer-events: auto; }
.trxh-offers-slide a, .trxh-offers-slide img { display: block; width: 100%; height: 100%; }
.trxh-offers-slide img { object-fit: cover; }
.trxh-offers-nav {
    position: absolute;
    top: 50%;
    z-index: 1;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}
.trxh-offers-nav:hover { background: rgba(0,0,0,.78); }
.trxh-offers-prev { left: 36px; }
.trxh-offers-next { right: 36px; }
.trxh-offers-dots {
    position: absolute;
    z-index: 1;
    bottom: 12px;
    left: 50%;
    display: flex;
    gap: 7px;
    transform: translateX(-50%);
}
.trxh-offers-dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.65);
    cursor: pointer;
}
.trxh-offers-dots button.is-active { background: #fff; transform: scale(1.25); }

@media (max-width: 640px) {
    .trxh-hero-inner { padding: 32px 20px; }
    .trxh-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .trxh-product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .trxh-offers-slider { margin-top: 12px; padding: 0 12px; }
    .trxh-offers-track { border-radius: 10px; aspect-ratio: 16 / 7; }
    .trxh-offers-nav { width: 34px; height: 34px; font-size: 25px; }
    .trxh-offers-prev { left: 20px; }
    .trxh-offers-next { right: 20px; }
}
/* ═══════════════════════════════════════════════════════════════
   RESPONSIVO MÓVIL — Home (hero, categorías, grillas)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .trxh-hero-title { font-size: clamp(22px, 6vw, 32px); line-height: 1.2; }
    .trxh-hero-text  { font-size: 15px; }
    .trxh-hero-cta   { display: inline-block; text-align: center; min-height: 48px; line-height: 46px; padding: 0 26px; }

    /* Tarjetas: nombre largo sin romper el layout */
    .techrex-card-name { word-break: break-word; }
    .techrex-card-img { aspect-ratio: 1 / 1; object-fit: cover; }
    .techrex-btn-cart { min-height: 44px; }
}

@media (max-width: 380px) {
    .trxh-cat-grid     { grid-template-columns: repeat(2, 1fr); }
    .trxh-product-grid { grid-template-columns: 1fr; }
}

/* Scroll horizontal suave en toda la página desde móviles */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; }

/* Bloque de marcas del constructor visual. */
.trxhb-brand-grid { display:grid; grid-template-columns:repeat(var(--trxhb-brand-columns, 5), minmax(0, 1fr)); gap:16px; }
.trxhb-brand-card { min-height:118px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px; padding:16px; border:1px solid #e2e8f0; border-radius:12px; background:#fff; color:#172033; text-decoration:none; box-shadow:0 1px 3px rgba(15,23,42,.05); transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.trxhb-brand-card:hover { color:#172033; transform:translateY(-2px); border-color:#2563eb; box-shadow:0 8px 18px rgba(15,23,42,.1); }
.trxhb-brand-card img { display:block; width:100%; max-width:150px; height:58px; object-fit:contain; }
.trxhb-brand-name { font-weight:700; text-align:center; overflow-wrap:anywhere; }
.trxhb-brand-card small { color:#64748b; font-size:12px; }
.trxhb-brands-all { margin:22px 0 0; text-align:right; font-weight:700; }
.trxhb-brands-all a { text-decoration:none; }.trxhb-brands-all a:hover { text-decoration:underline; }
@media (max-width:900px) { .trxhb-brand-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:560px) { .trxhb-brand-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }.trxhb-brand-card { min-height:96px; padding:12px; } }

/* Constructor visual: lectura y toque cómodos para portadas en móvil. */
@media (max-width:640px) {
    .trxhb-block { overflow:hidden; }
    .trxhb-slide { min-height:320px; padding:28px 20px; }
    .trxhb-slide > h1 { font-size:clamp(25px,7vw,34px); line-height:1.12; }
    .trxhb-slide > h2 { font-size:clamp(22px,6vw,30px); line-height:1.16; }
    .trxhb-slide > p { font-size:15px; line-height:1.45; }
    .trxhb-slide > a { min-height:46px; padding:13px 18px; }
    .trxhb-promo-copy { padding:13px; }
    .trxhb-promo-copy h3 { font-size:17px; }
    .trxhb-benefits { align-items:stretch; flex-direction:column; gap:10px; padding:16px; }
    .trxhb-benefits span { padding:10px 12px; border:1px solid rgba(0,0,0,.08); border-radius:8px; }
}
