:root {
    --tm6-primary: #ed1c24;
    --tm6-black: #050505;
    --tm6-dark: #0d0d0d;
    --tm6-white: #ffffff;
    --tm6-page-bg: #ffffff;
    --tm6-text: #151515;
    --tm6-muted: #6b6b6b;
    --tm6-border: #e5e5e5;
    --tm6-soft: #f7f7f7;
    --tm6-radius: 6px;
    --tm6-container: 1420px;
}

body.mtg-template-tm6 {
    margin: 0;
    background: var(--tm6-page-bg);
    color: var(--tm6-text);
}

body.mtg-template-tm6 .site-header,
body.mtg-template-tm6 header.site-header,
body.mtg-template-tm6 .mtg-public-header,
body.mtg-template-tm6 .mdg-header {
    display: none !important;
}

.tm6-home,
.tm6-home * {
    box-sizing: border-box;
}

.tm6-home {
    width: 100%;
    overflow: hidden;
    font-family: Inter, Arial, Helvetica, sans-serif;
    background: var(--tm6-page-bg);
    color: var(--tm6-text);
}

.tm6-home img {
    display: block;
    max-width: 100%;
}

.tm6-home a {
    text-decoration: none;
}

.tm6-container {
    width: min(92%, var(--tm6-container));
    margin: 0 auto;
}

.tm6-topbar {
    min-height: 38px;
    background: #000;
    border-bottom: 1px solid #202020;
    color: #fff;
    font-size: 12px;
}

.tm6-topbar-inner {
    min-height: 38px;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
    gap: 20px;
}

.tm6-topbar-inner > span:nth-child(2) {
    text-align: center;
}

.tm6-topbar nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.tm6-topbar a,
.tm6-topbar nav span {
    color: #fff;
    opacity: .85;
}

.tm6-header {
    position: relative;
    z-index: 20;
    min-height: 78px;
    background: #050505;
    border-bottom: 1px solid #202020;
}

.tm6-header-inner {
    min-height: 78px;
    display: grid;
    grid-template-columns: 250px 1fr auto;
    align-items: center;
    gap: 30px;
}

.tm6-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.tm6-logo img {
    width: auto;
    max-width: 210px;
    max-height: 58px;
    object-fit: contain;
}

.tm6-logo-icon {
    font-size: 34px;
}

.tm6-logo strong {
    display: block;
    font-size: 21px;
    letter-spacing: .02em;
}

.tm6-logo small {
    display: block;
    margin-top: 2px;
    color: var(--tm6-primary);
    font-weight: 800;
}

.tm6-main-menu ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 38px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tm6-main-menu li {
    position: relative;
}

.tm6-main-menu a {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.tm6-main-menu .current-menu-item > a,
.tm6-main-menu a:hover {
    color: var(--tm6-primary);
}

.tm6-header-actions {
    display: flex;
    align-items: center;
    gap: 22px;
}

.tm6-header-actions a {
    color: #fff;
    font-size: 25px;
    line-height: 1;
}

.tm6-hero {
    position: relative;
    min-height: 470px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #050505;
}

.tm6-hero-background,
.tm6-banner-background {
    position: absolute;
    inset: 0;
}

.tm6-hero-background img,
.tm6-banner-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tm6-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(0,0,0,.98) 0%,
            rgba(0,0,0,.90) 33%,
            rgba(0,0,0,.30) 66%,
            rgba(0,0,0,.08) 100%
        );
}

.tm6-hero-inner {
    position: relative;
    z-index: 2;
}

.tm6-hero-content {
    width: min(620px, 100%);
    padding: 72px 0;
    color: #fff;
}

.tm6-kicker {
    display: block;
    margin-bottom: 16px;
    color: var(--tm6-primary);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .10em;
}

.tm6-hero h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(52px, 5.2vw, 86px);
    line-height: .98;
    letter-spacing: -.045em;
}

.tm6-hero h1 em,
.tm6-banner h2 em {
    color: var(--tm6-primary);
    font-style: normal;
}

.tm6-hero p {
    max-width: 500px;
    margin: 22px 0 28px;
    color: rgba(255,255,255,.82);
    font-size: 17px;
    line-height: 1.6;
}

.tm6-primary-button {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    min-height: 50px;
    padding: 0 24px;
    border-radius: 4px;
    background: var(--tm6-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.tm6-primary-button:hover {
    filter: brightness(.92);
    color: #fff;
}

.tm6-categories {
    padding: 18px 0 8px;
    background: #fff;
}

.tm6-category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.tm6-category-card {
    min-width: 0;
    padding: 14px 14px 16px;
    border: 1px solid var(--tm6-border);
    border-radius: var(--tm6-radius);
    background: #fff;
    color: var(--tm6-text);
    text-align: center;
    transition: .2s ease;
}

.tm6-category-card:hover {
    transform: translateY(-3px);
    border-color: var(--tm6-primary);
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

.tm6-category-image {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.tm6-category-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tm6-category-image > span {
    font-size: 56px;
}

.tm6-category-card strong {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
}

.tm6-category-card small {
    display: block;
    margin-top: 8px;
    color: #444;
    font-size: 12px;
}

.tm6-section {
    padding: 28px 0 16px;
    background: #fff;
}

.tm6-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.tm6-section-head h2 {
    margin: 0;
    color: #141414;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 31px;
    line-height: 1.1;
}

.tm6-section-head > a {
    color: #222;
    font-size: 13px;
    font-weight: 700;
}

.tm6-product-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.tm6-product-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--tm6-border);
    border-radius: var(--tm6-radius);
    background: #fff;
}

.tm6-product-badge {
    position: absolute;
    top: 9px;
    left: 9px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 2px;
    background: var(--tm6-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
}

.tm6-product-image {
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: #fafafa;
}

.tm6-product-image img {
    width: 100%;
    height: 190px;
    object-fit: contain;
    transition: transform .25s ease;
}

.tm6-product-card:hover .tm6-product-image img {
    transform: scale(1.05);
}

.tm6-product-placeholder {
    font-size: 70px;
}

.tm6-product-content {
    padding: 14px;
}

.tm6-product-content h3 {
    min-height: 40px;
    margin: 0 0 7px;
    font-size: 14px;
    line-height: 1.4;
}

.tm6-product-content h3 a {
    color: #1a1a1a;
}

.tm6-product-price {
    display: block;
    font-size: 15px;
    color: #111;
}

.tm6-product-stars {
    margin: 7px 0 10px;
    color: #e79c00;
    font-size: 12px;
    letter-spacing: 2px;
}

.tm6-product-button {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 13px;
    border-radius: 3px;
    background: #070707;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.tm6-product-button:hover {
    background: var(--tm6-primary);
    color: #fff;
}

.tm6-banner-section {
    padding: 18px 0 2px;
    background: #fff;
}

.tm6-banner {
    position: relative;
    min-height: 255px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 5px;
    background: #060606;
}

.tm6-banner-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(0,0,0,.98) 0%,
            rgba(0,0,0,.90) 36%,
            rgba(0,0,0,.28) 72%,
            rgba(0,0,0,.05) 100%
        );
}

.tm6-banner-content {
    position: relative;
    z-index: 2;
    width: min(520px, 100%);
    padding: 42px 52px;
    color: #fff;
}

.tm6-banner-content > span {
    color: var(--tm6-primary);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
}

.tm6-banner h2 {
    margin: 10px 0;
    font-size: clamp(38px, 4vw, 60px);
    line-height: .98;
    letter-spacing: -.035em;
}

.tm6-banner p {
    color: rgba(255,255,255,.78);
}

.tm6-banner-content > a {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
    padding: 12px 18px;
    border-radius: 3px;
    background: #fff;
    color: #111;
    font-size: 13px;
    font-weight: 800;
}

.tm6-benefits-section {
    padding: 22px 0;
    background: #fff;
}

.tm6-benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--tm6-border);
    border-radius: var(--tm6-radius);
}

.tm6-benefit {
    display: grid;
    grid-template-columns: 62px 1fr;
    align-items: center;
    gap: 12px;
    min-height: 105px;
    padding: 20px;
    border-right: 1px solid var(--tm6-border);
}

.tm6-benefit:last-child {
    border-right: 0;
}

.tm6-benefit > span {
    font-size: 35px;
    text-align: center;
}

.tm6-benefit strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

.tm6-benefit p {
    margin: 0;
    color: var(--tm6-muted);
    font-size: 12px;
    line-height: 1.45;
}

.tm6-testimonials-section {
    padding: 0 0 28px;
    background: #fff;
}

.tm6-testimonials-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    padding: 22px;
    border: 1px solid var(--tm6-border);
    border-radius: var(--tm6-radius);
}

.tm6-testimonials-summary h2 {
    margin: 0 0 18px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 27px;
}

.tm6-testimonials-summary > div {
    margin-bottom: 8px;
    color: #e79c00;
    letter-spacing: 3px;
}

.tm6-testimonials-summary strong {
    font-size: 12px;
}

.tm6-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.tm6-testimonial-card {
    position: relative;
    min-height: 180px;
    padding: 20px;
    border: 1px solid var(--tm6-border);
    border-radius: var(--tm6-radius);
}

.tm6-quote {
    color: #c68a14;
    font-family: Georgia, serif;
    font-size: 34px;
    line-height: .7;
}

.tm6-testimonial-card p {
    color: #4e4e4e;
    font-size: 12px;
    line-height: 1.55;
}

.tm6-testimonial-card footer {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 14px;
}

.tm6-testimonial-card footer img,
.tm6-avatar-placeholder {
    width: 30px;
    height: 30px;
    overflow: hidden;
    border-radius: 50%;
    object-fit: cover;
}

.tm6-avatar-placeholder {
    display: grid;
    place-items: center;
    background: #ddd;
    color: #555;
}

.tm6-testimonial-card footer strong {
    font-size: 11px;
}

.tm6-newsletter {
    padding: 18px 0;
    background: #050505;
    color: #fff;
    border-bottom: 1px solid #252525;
}

.tm6-newsletter-inner {
    display: grid;
    grid-template-columns: 1fr minmax(400px, 610px);
    align-items: center;
    gap: 30px;
}

.tm6-newsletter-copy {
    display: flex;
    align-items: center;
    gap: 18px;
}

.tm6-newsletter-copy > span {
    color: var(--tm6-primary);
    font-size: 36px;
}

.tm6-newsletter h2 {
    margin: 0;
    color: #fff;
    font-size: 19px;
}

.tm6-newsletter p {
    margin: 5px 0 0;
    color: rgba(255,255,255,.68);
    font-size: 12px;
}

.tm6-newsletter form {
    display: grid;
    grid-template-columns: 1fr 150px;
}

.tm6-newsletter input {
    min-height: 45px;
    padding: 0 16px;
    border: 1px solid #3a3a3a;
    border-right: 0;
    background: #111;
    color: #fff;
}

.tm6-newsletter button {
    border: 0;
    background: var(--tm6-primary);
    color: #fff;
    font-weight: 800;
}

.tm6-footer {
    background: #050505;
    color: #fff;
}

.tm6-footer-grid {
    display: grid;
    grid-template-columns: 1.45fr repeat(4, 1fr);
    gap: 45px;
    padding: 52px 0 44px;
}

.tm6-footer h2 {
    margin: 0;
    font-size: 22px;
}

.tm6-footer h2 small {
    display: block;
    color: var(--tm6-primary);
}

.tm6-footer-brand > img {
    max-width: 220px;
    max-height: 70px;
    object-fit: contain;
}

.tm6-footer-brand > p {
    max-width: 260px;
    color: rgba(255,255,255,.65);
    font-size: 13px;
    line-height: 1.6;
}

.tm6-socials {
    display: flex;
    gap: 18px;
    margin-top: 24px;
}

.tm6-socials a {
    color: #fff;
    font-size: 18px;
}

.tm6-footer section > h3 {
    margin: 0 0 18px;
    color: #fff;
    font-size: 12px;
}

.tm6-footer section > a {
    display: block;
    margin-bottom: 11px;
    color: rgba(255,255,255,.68);
    font-size: 12px;
}

.tm6-payment-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 22px;
}

.tm6-payment-icons span {
    padding: 6px 8px;
    border-radius: 3px;
    background: #fff;
    color: #111;
    font-size: 10px;
    font-weight: 900;
}

.tm6-payment-column p {
    color: rgba(255,255,255,.68);
    font-size: 11px;
}

.tm6-footer-bottom {
    padding: 18px 0;
    border-top: 1px solid #202020;
    color: rgba(255,255,255,.52);
    font-size: 11px;
    text-align: center;
}

@media (max-width: 1180px) {
    .tm6-main-menu ul {
        gap: 18px;
    }

    .tm6-category-grid,
    .tm6-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tm6-testimonials-layout {
        grid-template-columns: 1fr;
    }

    .tm6-footer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .tm6-container {
        width: min(92%, 680px);
    }

    .tm6-topbar-inner {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 8px 0;
        text-align: center;
    }

    .tm6-topbar-inner > span:nth-child(2) {
        text-align: center;
    }

    .tm6-topbar nav {
        display: none;
    }

    .tm6-header-inner {
        grid-template-columns: 1fr auto;
        min-height: 70px;
    }

    .tm6-main-menu {
        display: none;
    }

    .tm6-header-actions {
        gap: 13px;
    }

    .tm6-hero {
        min-height: 560px;
        align-items: flex-end;
    }

    .tm6-hero-overlay {
        background:
            linear-gradient(
                0deg,
                rgba(0,0,0,.99) 0%,
                rgba(0,0,0,.88) 55%,
                rgba(0,0,0,.20) 100%
            );
    }

    .tm6-hero-content {
        padding: 260px 0 48px;
    }

    .tm6-hero h1 {
        font-size: 48px;
    }

    .tm6-category-grid,
    .tm6-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .tm6-category-image {
        height: 90px;
    }

    .tm6-product-image {
        min-height: 165px;
    }

    .tm6-product-image img {
        height: 140px;
    }

    .tm6-benefits-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tm6-benefit:nth-child(2) {
        border-right: 0;
    }

    .tm6-benefit:nth-child(-n+2) {
        border-bottom: 1px solid var(--tm6-border);
    }

    .tm6-testimonials-grid {
        grid-template-columns: 1fr;
    }

    .tm6-newsletter-inner {
        grid-template-columns: 1fr;
    }

    .tm6-newsletter form {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tm6-newsletter input {
        border-right: 1px solid #3a3a3a;
    }

    .tm6-newsletter button {
        min-height: 44px;
    }

    .tm6-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px 20px;
    }

    .tm6-footer-brand,
    .tm6-payment-column {
        grid-column: 1 / -1;
    }
}

/* =========================================================
   TM6 — SECCIONES COMPUESTAS
   PC principal: texto izquierda + imagen derecha
   Móvil: contenido apilado y adaptado automáticamente
   ========================================================= */

.tm6-hero {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    background:
        radial-gradient(circle at 72% 40%, rgba(237,28,36,.14), transparent 32%),
        linear-gradient(135deg, #050505 0%, #090909 58%, #121212 100%);
}

.tm6-hero-grid {
    min-height: 480px;
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(480px, 1.08fr);
    align-items: stretch;
}

.tm6-hero-content {
    position: relative;
    z-index: 2;
    width: auto;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 68px 58px 68px 0;
    color: #fff;
}

.tm6-hero-visual {
    position: relative;
    min-width: 0;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tm6-hero-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, #090909 0%, rgba(9,9,9,.30) 23%, transparent 58%),
        radial-gradient(circle at 70% 40%, rgba(237,28,36,.18), transparent 38%);
    pointer-events: none;
}

.tm6-hero-visual img {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 100%;
    min-height: 480px;
    object-fit: cover;
    object-position: center;
}

.tm6-hero-placeholder,
.tm6-banner-placeholder {
    width: 100%;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px dashed rgba(255,255,255,.25);
    background: rgba(255,255,255,.035);
    color: rgba(255,255,255,.72);
    text-align: center;
}

.tm6-hero-placeholder span,
.tm6-banner-placeholder span {
    font-size: 76px;
}

.tm6-hero-placeholder strong,
.tm6-banner-placeholder strong {
    color: #fff;
    font-size: 17px;
}

.tm6-hero-placeholder small,
.tm6-banner-placeholder small {
    color: rgba(255,255,255,.52);
}

/* Banner compuesto */

.tm6-banner {
    position: relative;
    min-height: 270px;
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr);
    align-items: stretch;
    overflow: hidden;
    border-radius: 6px;
    background:
        radial-gradient(circle at 72% 50%, rgba(237,28,36,.13), transparent 34%),
        #070707;
}

.tm6-banner-content {
    position: relative;
    z-index: 2;
    width: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px 26px 42px 52px;
    color: #fff;
}

.tm6-banner-visual {
    position: relative;
    min-height: 270px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tm6-banner-visual::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg, #070707 0%, rgba(7,7,7,.28) 25%, transparent 60%);
    pointer-events: none;
}

.tm6-banner-visual img {
    width: 100%;
    height: 100%;
    min-height: 270px;
    object-fit: cover;
    object-position: center;
}

/* Las antiguas imágenes de fondo dejan de intervenir */

.tm6-hero-background,
.tm6-hero-overlay,
.tm6-banner-background,
.tm6-banner-overlay {
    display: none !important;
}

@media (max-width: 1100px) {
    .tm6-hero-grid {
        grid-template-columns: minmax(0, .95fr) minmax(410px, 1.05fr);
    }

    .tm6-hero-content {
        padding-right: 35px;
    }

    .tm6-banner {
        grid-template-columns: minmax(0, .95fr) minmax(380px, 1.05fr);
    }
}

@media (max-width: 780px) {
    .tm6-hero {
        min-height: 0;
        align-items: initial;
    }

    .tm6-hero-grid {
        min-height: 0;
        grid-template-columns: 1fr;
    }

    .tm6-hero-content {
        order: 1;
        max-width: none;
        padding: 46px 0 32px;
    }

    .tm6-hero-visual {
        order: 2;
        min-height: 310px;
        margin: 0 -4.35vw;
    }

    .tm6-hero-visual::before {
        background:
            linear-gradient(180deg, #090909 0%, transparent 24%),
            radial-gradient(circle at 50% 40%, rgba(237,28,36,.17), transparent 46%);
    }

    .tm6-hero-visual img {
        min-height: 310px;
        max-height: 410px;
        object-position: center;
    }

    .tm6-hero h1 {
        font-size: clamp(43px, 12vw, 58px);
    }

    .tm6-banner {
        grid-template-columns: 1fr;
    }

    .tm6-banner-content {
        order: 1;
        padding: 36px 28px 28px;
    }

    .tm6-banner-visual {
        order: 2;
        min-height: 230px;
    }

    .tm6-banner-visual::before {
        background:
            linear-gradient(180deg, #070707 0%, transparent 24%);
    }

    .tm6-banner-visual img {
        min-height: 230px;
        max-height: 320px;
    }
}

/* =========================================================
   TM6 — CONSERVAR CABECERA HEREDADA DE MITIENDAGRATIS.COM
   Ocultar exclusivamente la cabecera duplicada creada en TM6
   ========================================================= */

body.mtg-template-tm6 .tm6-topbar,
body.mtg-template-tm6 .tm6-header {
    display: none !important;
}

/* El hero comienza inmediatamente debajo del header global. */
body.mtg-template-tm6 .tm6-home,
body.mtg-template-tm6 .tm6-hero {
    margin-top: 0 !important;
}

/* =========================================================
   TM6 — HERO Y CATEGORÍAS CON ARQUITECTURA TIPO TM3
   ========================================================= */

/*
 * Se mantiene intacta la cabecera heredada de
 * mitiendagratis.com. TM6 comienza debajo de ella.
 */

body.mtg-template-tm6 .tm6-home {
    background:
        radial-gradient(
            circle at 15% 8%,
            rgba(237, 28, 36, .07),
            transparent 32%
        ),
        #ffffff;
}

/* HERO PRINCIPAL */

body.mtg-template-tm6 .tm6-hero {
    padding: 56px 0 52px;
    background:
        radial-gradient(
            circle at 76% 45%,
            rgba(237, 28, 36, .18),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            #030303 0%,
            #090909 58%,
            #151010 100%
        );
}

body.mtg-template-tm6 .tm6-hero-grid {
    min-height: 530px;
    grid-template-columns:
        minmax(0, .92fr)
        minmax(520px, 1.08fr);
    gap: 55px;
    align-items: center;
}

body.mtg-template-tm6 .tm6-hero-content {
    max-width: 690px;
    padding: 40px 0;
}

body.mtg-template-tm6 .tm6-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 38px;
    margin-bottom: 26px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(237, 28, 36, .13);
    color: #ff3c43;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .08em;
}

body.mtg-template-tm6 .tm6-hero h1 {
    max-width: 680px;
    margin: 0;
    font-size: clamp(62px, 5.15vw, 94px);
    line-height: .98;
    letter-spacing: -.052em;
}

body.mtg-template-tm6 .tm6-hero p {
    max-width: 610px;
    margin: 30px 0;
    font-size: 18px;
    line-height: 1.7;
}

body.mtg-template-tm6 .tm6-primary-button {
    min-height: 58px;
    padding: 0 30px;
    border-radius: 13px;
    font-size: 15px;
}

body.mtg-template-tm6 .tm6-hero-visual {
    min-height: 530px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 25px;
    background: #111;
    box-shadow:
        0 28px 80px rgba(0,0,0,.40),
        0 0 80px rgba(237,28,36,.12);
}

body.mtg-template-tm6 .tm6-hero-visual img {
    width: 100%;
    height: 100%;
    min-height: 530px;
    object-fit: cover;
    object-position: center;
}

/* CATEGORÍAS GRANDES */

body.mtg-template-tm6 .tm6-categories {
    padding: 72px 0 80px;
    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(237,28,36,.055),
            transparent 34%
        ),
        #ffffff;
}

body.mtg-template-tm6 .tm6-categories-heading {
    margin-bottom: 34px;
}

body.mtg-template-tm6 .tm6-categories-heading h2 {
    margin: 0 0 9px;
    color: #171717;
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: clamp(42px, 4vw, 64px);
    line-height: 1;
    letter-spacing: -.025em;
}

body.mtg-template-tm6 .tm6-categories-heading p {
    max-width: 720px;
    margin: 0;
    color: #777;
    font-size: 17px;
    line-height: 1.6;
}

body.mtg-template-tm6 .tm6-category-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 28px;
}

body.mtg-template-tm6 .tm6-category-card {
    position: relative;
    min-height: 430px;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    background: #f4f4f4;
    box-shadow:
        0 15px 38px rgba(0,0,0,.08);
    text-align: left;
    transform: translateZ(0);
}

body.mtg-template-tm6 .tm6-category-card:hover {
    border: 0;
    transform: translateY(-7px);
    box-shadow:
        0 24px 55px rgba(0,0,0,.15);
}

body.mtg-template-tm6 .tm6-category-image {
    width: 100%;
    height: 355px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            #f8f8f8,
            #e8e8e8
        );
}

body.mtg-template-tm6 .tm6-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        transform .45s ease,
        filter .45s ease;
}

body.mtg-template-tm6 .tm6-category-card:hover
.tm6-category-image img {
    transform: scale(1.055);
}

body.mtg-template-tm6 .tm6-category-image > span {
    font-size: 100px;
}

body.mtg-template-tm6 .tm6-category-card > strong {
    position: relative;
    z-index: 2;
    min-height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 15px 22px;
    background:
        linear-gradient(
            135deg,
            #d9141c,
            #f02b32
        );
    color: #fff;
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 25px;
    font-weight: 800;
    text-align: center;
    text-transform: none;
}

body.mtg-template-tm6 .tm6-category-card > small {
    display: none;
}

/* TABLET */

@media (max-width: 1150px) {
    body.mtg-template-tm6 .tm6-hero-grid {
        grid-template-columns:
            minmax(0, .9fr)
            minmax(430px, 1.1fr);
        gap: 34px;
    }

    body.mtg-template-tm6 .tm6-category-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

/* CELULAR */

@media (max-width: 780px) {
    body.mtg-template-tm6 .tm6-hero {
        padding: 32px 0 38px;
    }

    body.mtg-template-tm6 .tm6-hero-grid {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 24px;
    }

    body.mtg-template-tm6 .tm6-hero-content {
        order: 1;
        padding: 15px 0 8px;
    }

    body.mtg-template-tm6 .tm6-hero-visual {
        order: 2;
        min-height: 320px;
        margin: 0;
        border-radius: 18px;
    }

    body.mtg-template-tm6 .tm6-hero-visual img {
        min-height: 320px;
        max-height: 390px;
    }

    body.mtg-template-tm6 .tm6-hero h1 {
        font-size: clamp(46px, 13vw, 64px);
    }

    body.mtg-template-tm6 .tm6-hero p {
        margin: 22px 0;
        font-size: 16px;
    }

    body.mtg-template-tm6 .tm6-categories {
        padding: 48px 0 58px;
    }

    body.mtg-template-tm6 .tm6-categories-heading h2 {
        font-size: 40px;
    }

    body.mtg-template-tm6 .tm6-categories-heading p {
        font-size: 15px;
    }

    body.mtg-template-tm6 .tm6-category-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 13px;
    }

    body.mtg-template-tm6 .tm6-category-card {
        min-height: 255px;
        border-radius: 14px;
    }

    body.mtg-template-tm6 .tm6-category-image {
        height: 200px;
    }

    body.mtg-template-tm6 .tm6-category-card > strong {
        min-height: 56px;
        padding: 10px 8px;
        font-size: 17px;
    }
}

/* =========================================================
   TM6 — CATEGORÍAS DEFINITIVAS
   4 columnas en PC / 2 columnas en móvil
   ========================================================= */

body.mtg-template-tm6 .tm6-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

@media (max-width: 1100px) {
    body.mtg-template-tm6 .tm6-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 780px) {
    body.mtg-template-tm6 .tm6-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* =========================================================
   TM6 — ANCHO GENERAL 90% EN ESCRITORIO
   ========================================================= */

body.mtg-template-tm6 .tm6-container {
    width: 90% !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/*
 * Evita que reglas antiguas vuelvan a limitar
 * el ancho de las secciones principales.
 */
body.mtg-template-tm6 .tm6-hero-grid,
body.mtg-template-tm6 .tm6-category-grid,
body.mtg-template-tm6 .tm6-product-grid,
body.mtg-template-tm6 .tm6-benefits-grid,
body.mtg-template-tm6 .tm6-testimonials-layout,
body.mtg-template-tm6 .tm6-newsletter-inner,
body.mtg-template-tm6 .tm6-footer-grid {
    max-width: none !important;
}

/* Mantener márgenes cómodos en pantallas muy grandes. */
@media (min-width: 1900px) {
    body.mtg-template-tm6 .tm6-container {
        width: 90% !important;
        max-width: 1800px !important;
    }
}

/* Tablet. */
@media (max-width: 1100px) {
    body.mtg-template-tm6 .tm6-container {
        width: 92% !important;
    }
}

/* Celular. */
@media (max-width: 780px) {
    body.mtg-template-tm6 .tm6-container {
        width: 92% !important;
    }
}

/* =========================================================
   TM6 — TARJETAS DE PRODUCTOS MTG COMMERCE
   ========================================================= */

body.mtg-template-tm6 .tm6-product-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 24px !important;
}

body.mtg-template-tm6 .tm6-product-card {
    overflow: visible;
    border: 1px solid #e6e6e6;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 13px 35px rgba(0,0,0,.065);
}

body.mtg-template-tm6 .tm6-product-image {
    min-height: 320px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background: #f4f4f4;
}

body.mtg-template-tm6 .tm6-product-image img {
    height: 290px;
    object-fit: contain;
}

body.mtg-template-tm6 .tm6-product-content {
    padding: 18px 18px 20px;
}

body.mtg-template-tm6 .tm6-product-content h3 {
    min-height: auto;
    margin-bottom: 10px;
    font-size: 16px;
}

body.mtg-template-tm6 .tm6-product-price {
    font-size: 19px;
    font-weight: 900;
}

body.mtg-template-tm6 .tm6-product-button {
    min-height: 43px;
    margin-top: 12px;
    border-radius: 7px;
}

/*
 * El plugin MTG Product Share Core inyecta su bloque
 * dentro de tarjetas identificadas como .mtg-product-card.
 */
body.mtg-template-tm6 .tm6-product-card .mtg-share-clean {
    margin: 0 !important;
    border-top: 1px solid #ececec !important;
    border-radius: 0 0 17px 17px !important;
    box-shadow: none !important;
}

@media (max-width: 1150px) {
    body.mtg-template-tm6 .tm6-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 780px) {
    body.mtg-template-tm6 .tm6-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    body.mtg-template-tm6 .tm6-product-image {
        min-height: 190px;
    }

    body.mtg-template-tm6 .tm6-product-image img {
        height: 170px;
    }

    body.mtg-template-tm6 .tm6-product-content {
        padding: 12px;
    }

    body.mtg-template-tm6 .tm6-product-content h3 {
        font-size: 14px;
    }

    body.mtg-template-tm6 .tm6-product-price {
        font-size: 16px;
    }
}

/* ==========================================================
   TM6 BUILDER CORE V1 — AMARRE COMPLETO
   ========================================================== */

.tm6-hero-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:28px;
}

.tm6-secondary-button{
    display:inline-flex;
    min-height:56px;
    align-items:center;
    justify-content:center;
    padding:0 28px;
    border:1px solid rgba(255,255,255,.28);
    border-radius:10px;
    background:transparent;
    color:#fff!important;
    font-weight:800;
    text-decoration:none;
    transition:.2s ease;
}

.tm6-secondary-button:hover{
    border-color:#fff;
    background:#fff;
    color:#111!important;
}

.tm6-hero-features{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    margin-top:25px;
}

.tm6-hero-features article{
    display:flex;
    min-width:0;
    align-items:center;
    gap:9px;
    padding:11px;
    border:1px solid rgba(255,255,255,.12);
    border-radius:10px;
    background:rgba(255,255,255,.045);
}

.tm6-hero-features article>span{
    display:flex;
    width:27px;
    height:27px;
    flex:0 0 27px;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:var(--tm6-primary);
    color:#fff;
    font-weight:900;
}

.tm6-hero-features strong,
.tm6-hero-features small{
    display:block;
}

.tm6-hero-features strong{
    color:#fff;
    font-size:12px;
}

.tm6-hero-features small{
    margin-top:2px;
    color:#bfc0c4;
    font-size:10px;
}

.tm6-section-head>div p{
    max-width:680px;
    margin:7px 0 0;
    color:#73757d;
}

.tm6-product-prices{
    display:flex;
    align-items:center;
    gap:9px;
}

.tm6-product-prices del{
    color:#96979c;
    font-size:13px;
}

.tm6-brands-section,
.tm6-gallery-section,
.tm6-cta-section{
    padding:72px 0;
}

.tm6-brands-section{
    background:#fff;
    text-align:center;
}

.tm6-brands-section h2{
    margin:0 0 30px;
    font-size:clamp(28px,4vw,44px);
}

.tm6-brands-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
}

.tm6-brand-card{
    display:flex;
    min-height:120px;
    align-items:center;
    justify-content:center;
    padding:20px;
    border:1px solid #e4e4e6;
    border-radius:14px;
    background:#fafafa;
    color:#111;
    text-decoration:none;
}

.tm6-brand-card img{
    display:block;
    max-width:150px;
    max-height:64px;
    object-fit:contain;
}

.tm6-brand-card strong{
    font-size:20px;
}

.tm6-gallery-section{
    background:#f6f6f7;
}

.tm6-gallery-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:14px;
}

.tm6-gallery-item{
    display:block;
    overflow:hidden;
    border-radius:14px;
    aspect-ratio:1/1;
    background:#e7e7e8;
}

.tm6-gallery-item img{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:transform .3s ease;
}

.tm6-gallery-item:hover img{
    transform:scale(1.045);
}

.tm6-cta-section{
    background:#101010;
    color:#fff;
}

.tm6-cta{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:40px;
}

.tm6-cta h2{
    margin:0 0 10px;
    color:#fff;
    font-size:clamp(30px,4vw,52px);
}

.tm6-cta p{
    margin:0;
    color:#bfc0c5;
}

.tm6-cta-actions{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
}

.tm6-footer-core-grid{
    display:grid;
    grid-template-columns:1.5fr 1fr 1fr;
    gap:44px;
}

.tm6-footer-core-grid>section{
    display:flex;
    flex-direction:column;
    gap:9px;
}

.tm6-footer-core-grid h3{
    margin:0 0 9px;
}

.tm6-footer-core-grid a{
    color:inherit;
    text-decoration:none;
}

.tm6-footer-core-grid a:hover{
    color:var(--tm6-primary);
}

@media(max-width:900px){
    .tm6-hero-features{
        grid-template-columns:1fr;
    }

    .tm6-brands-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .tm6-gallery-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

    .tm6-cta{
        align-items:flex-start;
        flex-direction:column;
    }

    .tm6-footer-core-grid{
        grid-template-columns:1fr 1fr;
    }
}

@media(max-width:600px){
    .tm6-hero-actions{
        flex-direction:column;
    }

    .tm6-primary-button,
    .tm6-secondary-button{
        width:100%;
    }

    .tm6-brands-grid,
    .tm6-gallery-grid,
    .tm6-footer-core-grid{
        grid-template-columns:1fr;
    }
}

/* ==========================================================
   TM6 BENEFIT ICONS SVG FIX
   ========================================================== */

.tm6-benefit{
    display:flex;
    align-items:center;
    gap:16px;
    min-width:0;
}

.tm6-benefit > .tm6-benefit-icon{
    display:flex!important;
    width:52px!important;
    height:52px!important;
    min-width:52px!important;
    flex:0 0 52px!important;
    align-items:center!important;
    justify-content:center!important;

    margin:0!important;
    padding:0!important;

    border-radius:14px;
    background:rgba(237,28,36,.10);
    color:var(--tm6-primary);

    font-size:0!important;
    line-height:1!important;
    overflow:hidden;
}

.tm6-benefit-icon svg{
    display:block;
    width:27px;
    height:27px;

    fill:none;
    stroke:currentColor;
    stroke-width:1.8;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.tm6-benefit > div{
    min-width:0;
}

.tm6-benefit strong{
    display:block;
    margin:0 0 4px;
    line-height:1.25;
}

.tm6-benefit p{
    margin:0;
    line-height:1.45;
}

@media(max-width:700px){
    .tm6-benefit > .tm6-benefit-icon{
        width:46px!important;
        height:46px!important;
        min-width:46px!important;
        flex-basis:46px!important;
    }

    .tm6-benefit-icon svg{
        width:24px;
        height:24px;
    }
}
