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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.tm7-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%
        );
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.tm7-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;
}

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

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

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

.tm7-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%
        );
}

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

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

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

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

.tm7-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;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.tm7-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) {
    .tm7-main-menu ul {
        gap: 18px;
    }

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

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

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

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

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

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

    .tm7-topbar nav {
        display: none;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.tm7-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%);
}

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

.tm7-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;
}

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

.tm7-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;
}

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

.tm7-hero-placeholder,
.tm7-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;
}

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

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

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

/* Banner compuesto */

.tm7-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;
}

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

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

.tm7-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;
}

.tm7-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 */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* HERO PRINCIPAL */

body.mtg-template-tm7 .tm7-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-tm7 .tm7-hero-grid {
    min-height: 530px;
    grid-template-columns:
        minmax(0, .92fr)
        minmax(520px, 1.08fr);
    gap: 55px;
    align-items: center;
}

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

body.mtg-template-tm7 .tm7-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-tm7 .tm7-hero h1 {
    max-width: 680px;
    margin: 0;
    font-size: clamp(62px, 5.15vw, 94px);
    line-height: .98;
    letter-spacing: -.052em;
}

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

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

body.mtg-template-tm7 .tm7-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-tm7 .tm7-hero-visual img {
    width: 100%;
    height: 100%;
    min-height: 530px;
    object-fit: cover;
    object-position: center;
}

/* CATEGORÍAS GRANDES */

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

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

body.mtg-template-tm7 .tm7-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-tm7 .tm7-categories-heading p {
    max-width: 720px;
    margin: 0;
    color: #777;
    font-size: 17px;
    line-height: 1.6;
}

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

body.mtg-template-tm7 .tm7-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-tm7 .tm7-category-card:hover {
    border: 0;
    transform: translateY(-7px);
    box-shadow:
        0 24px 55px rgba(0,0,0,.15);
}

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

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

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

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

body.mtg-template-tm7 .tm7-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-tm7 .tm7-category-card > small {
    display: none;
}

/* TABLET */

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

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

/* CELULAR */

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

body.mtg-template-tm7 .tm7-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-tm7 .tm7-hero-grid,
body.mtg-template-tm7 .tm7-category-grid,
body.mtg-template-tm7 .tm7-product-grid,
body.mtg-template-tm7 .tm7-benefits-grid,
body.mtg-template-tm7 .tm7-testimonials-layout,
body.mtg-template-tm7 .tm7-newsletter-inner,
body.mtg-template-tm7 .tm7-footer-grid {
    max-width: none !important;
}

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

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

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

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

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

body.mtg-template-tm7 .tm7-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-tm7 .tm7-product-image {
    min-height: 320px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    background: #f4f4f4;
}

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

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

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

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

body.mtg-template-tm7 .tm7-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-tm7 .tm7-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-tm7 .tm7-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

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

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

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

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

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

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

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

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

.tm7-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;
}

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

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

.tm7-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);
}

.tm7-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(--tm7-primary);
    color:#fff;
    font-weight:900;
}

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

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

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

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

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

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

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

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

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

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

.tm7-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;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* ==========================================================
   TM7 BENEFIT ICONS SVG FIX
   ========================================================== */

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

.tm7-benefit > .tm7-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(--tm7-primary);

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

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

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

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

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

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

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

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

/* =========================================================
   TM7 ELECTRO7 — ELECTRODOMÉSTICOS
   Identidad visual basada en Builder Core
   ========================================================= */

:root{
    --tm7-primary:#0747b8;
    --tm7-primary-dark:#052b70;
    --tm7-primary-soft:#eaf2ff;
    --tm7-accent:#18a0fb;

    --tm7-bg:#ffffff;
    --tm7-surface:#f6f8fb;
    --tm7-card:#ffffff;

    --tm7-text:#101828;
    --tm7-muted:#667085;
    --tm7-border:#e4e7ec;

    --tm7-success:#16a34a;
    --tm7-danger:#dc2626;

    --tm7-radius:14px;
    --tm7-shadow:0 12px 34px rgba(16,24,40,.08);
}

body.mtg-template-tm7{
    background:var(--tm7-bg);
    color:var(--tm7-text);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

body.mtg-template-tm7 *,
body.mtg-template-tm7 *::before,
body.mtg-template-tm7 *::after{
    box-sizing:border-box;
}

body.mtg-template-tm7 .tm7-home{
    width:100%;
    overflow:hidden;
    background:#fff;
}

body.mtg-template-tm7 .tm7-container{
    width:90%;
    max-width:1500px;
    margin:0 auto;
}


/* =========================================================
   HERO
   ========================================================= */

body.mtg-template-tm7 .mtg-core-section--hero{
    background:
        linear-gradient(
            90deg,
            rgba(247,248,250,1) 0%,
            rgba(247,248,250,.95) 42%,
            rgba(247,248,250,.25) 72%,
            rgba(247,248,250,0) 100%
        );
}

body.mtg-template-tm7 .tm7-hero{
    min-height:520px;
}

body.mtg-template-tm7 .tm7-hero-grid{
    min-height:520px;
    display:grid;
    grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
    align-items:center;
    gap:50px;
}

body.mtg-template-tm7 .tm7-hero-content{
    max-width:650px;
}

body.mtg-template-tm7 .tm7-hero-content h1{
    margin:0 0 22px;
    color:#111;
    font-size:clamp(44px,5vw,76px);
    line-height:.98;
    letter-spacing:-.05em;
}

body.mtg-template-tm7 .tm7-hero-content p{
    max-width:580px;
    color:var(--tm7-muted);
    font-size:18px;
    line-height:1.7;
}

body.mtg-template-tm7 .tm7-hero-actions a{
    min-height:50px;
    padding:0 26px;
    border-radius:6px;
    background:var(--tm7-primary);
    color:#fff;
    font-weight:800;
}

body.mtg-template-tm7 .tm7-hero-visual img{
    width:100%;
    max-height:500px;
    object-fit:contain;
    object-position:center;
}


/* =========================================================
   SECCIONES GENERALES
   ========================================================= */

body.mtg-template-tm7 .mtg-core-section{
    position:relative;
}

body.mtg-template-tm7 .tm7-section{
    padding:64px 0;
}

body.mtg-template-tm7 .tm7-section-head{
    margin-bottom:28px;
}

body.mtg-template-tm7 .tm7-section-head h2{
    margin:0 0 8px;
    color:#111;
    font-size:clamp(28px,3vw,42px);
    letter-spacing:-.035em;
}

body.mtg-template-tm7 .tm7-section-head p{
    margin:0;
    color:var(--tm7-muted);
}


/* =========================================================
   CATEGORÍAS
   ========================================================= */

body.mtg-template-tm7 .tm7-category-grid{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:14px;
}

body.mtg-template-tm7 .tm7-category-card{
    min-width:0;
    padding:22px 14px;
    border:1px solid var(--tm7-border);
    border-radius:var(--tm7-radius);
    background:#fff;
    color:var(--tm7-text);
    text-align:center;
    text-decoration:none;
    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

body.mtg-template-tm7 .tm7-category-card:hover{
    transform:translateY(-3px);
    border-color:#b9cdf5;
    box-shadow:var(--tm7-shadow);
}

body.mtg-template-tm7 .tm7-category-image{
    height:115px;
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:12px;
}

body.mtg-template-tm7 .tm7-category-image img{
    width:100%;
    height:100%;
    object-fit:contain;
}


/* =========================================================
   PRODUCTOS
   ========================================================= */

body.mtg-template-tm7 .tm7-product-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:18px;
}

body.mtg-template-tm7 .tm7-product-card{
    min-width:0;
    overflow:hidden;
    border:1px solid var(--tm7-border);
    border-radius:var(--tm7-radius);
    background:#fff;
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

body.mtg-template-tm7 .tm7-product-card:hover{
    transform:translateY(-4px);
    box-shadow:var(--tm7-shadow);
}

body.mtg-template-tm7 .tm7-product-media{
    aspect-ratio:1 / 1;
    padding:18px;
    background:#fff;
}

body.mtg-template-tm7 .tm7-product-media img{
    width:100%;
    height:100%;
    object-fit:contain;
}

body.mtg-template-tm7 .tm7-product-body{
    padding:18px;
}

body.mtg-template-tm7 .tm7-product-body h3{
    min-height:48px;
    margin:0 0 10px;
    color:#111;
    font-size:17px;
    line-height:1.4;
}

body.mtg-template-tm7 .tm7-product-bottom{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

body.mtg-template-tm7 .tm7-product-bottom strong{
    color:var(--tm7-primary);
    font-size:21px;
}

body.mtg-template-tm7 .tm7-product-bottom a{
    min-height:38px;
    padding:0 14px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid var(--tm7-primary);
    border-radius:6px;
    color:var(--tm7-primary);
    text-decoration:none;
    font-size:12px;
    font-weight:800;
}


/* =========================================================
   BANNER
   ========================================================= */

body.mtg-template-tm7 .tm7-banner-section{
    padding:34px 0;
}

body.mtg-template-tm7 .tm7-banner{
    min-height:260px;
    display:grid;
    grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
    align-items:center;
    gap:34px;
    padding:38px 44px;
    overflow:hidden;
    border-radius:16px;
    background:
        linear-gradient(
            115deg,
            #071a3d 0%,
            #082f72 55%,
            #0758ca 100%
        );
    color:#fff;
}

body.mtg-template-tm7 .tm7-banner h2,
body.mtg-template-tm7 .tm7-banner p{
    color:#fff;
}

body.mtg-template-tm7 .tm7-banner-content h2{
    margin:0 0 12px;
    font-size:clamp(34px,4vw,58px);
    line-height:1;
}

body.mtg-template-tm7 .tm7-banner-content a{
    display:inline-flex;
    min-height:46px;
    align-items:center;
    padding:0 22px;
    border-radius:6px;
    background:#fff;
    color:var(--tm7-primary-dark);
    font-weight:900;
    text-decoration:none;
}

body.mtg-template-tm7 .tm7-banner-visual img{
    width:100%;
    max-height:260px;
    object-fit:contain;
}


/* =========================================================
   BENEFICIOS
   ========================================================= */

body.mtg-template-tm7 .tm7-benefits-section{
    padding:30px 0;
}

body.mtg-template-tm7 .tm7-benefits-grid{
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:0;
    overflow:hidden;
    border:1px solid var(--tm7-border);
    border-radius:var(--tm7-radius);
    background:#fff;
}

body.mtg-template-tm7 .tm7-benefit{
    display:flex;
    align-items:center;
    gap:13px;
    padding:20px;
    border-right:1px solid var(--tm7-border);
}

body.mtg-template-tm7 .tm7-benefit:last-child{
    border-right:0;
}

body.mtg-template-tm7 .tm7-benefit-icon{
    color:var(--tm7-primary);
    font-size:25px;
}

body.mtg-template-tm7 .tm7-benefit h3{
    margin:0 0 3px;
    font-size:14px;
}

body.mtg-template-tm7 .tm7-benefit p{
    margin:0;
    color:var(--tm7-muted);
    font-size:12px;
}


/* =========================================================
   MARCAS
   ========================================================= */

body.mtg-template-tm7 .tm7-brands-grid{
    display:grid;
    grid-template-columns:repeat(8,minmax(0,1fr));
    gap:12px;
}

body.mtg-template-tm7 .tm7-brand-card{
    min-height:82px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:15px;
    border:1px solid var(--tm7-border);
    border-radius:10px;
    background:#fff;
}

body.mtg-template-tm7 .tm7-brand-card img{
    width:100%;
    height:44px;
    object-fit:contain;
}


/* =========================================================
   TESTIMONIOS
   ========================================================= */

body.mtg-template-tm7 .tm7-testimonials-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:18px;
}

body.mtg-template-tm7 .tm7-testimonial-card{
    padding:26px;
    border:1px solid var(--tm7-border);
    border-radius:var(--tm7-radius);
    background:#fff;
}

body.mtg-template-tm7 .tm7-testimonial-card p{
    color:#344054;
    line-height:1.7;
}


/* =========================================================
   GALLERY
   Usa el contrato universal:
   gallery
   gallery__grid
   gallery__item
   gallery__image
   ========================================================= */

body.mtg-template-tm7 .mtg-core-section--gallery{
    padding:64px 0;
    background:var(--tm7-surface);
}


/* =========================================================
   NEWSLETTER
   ========================================================= */

body.mtg-template-tm7 .tm7-newsletter{
    padding:34px 0;
}

body.mtg-template-tm7 .tm7-newsletter-inner{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,.8fr);
    align-items:center;
    gap:36px;
    padding:32px;
    border:1px solid var(--tm7-border);
    border-radius:var(--tm7-radius);
    background:#fff;
}

body.mtg-template-tm7 .tm7-newsletter form{
    display:flex;
}

body.mtg-template-tm7 .tm7-newsletter input{
    flex:1;
    min-width:0;
    min-height:50px;
    padding:0 16px;
    border:1px solid var(--tm7-border);
}

body.mtg-template-tm7 .tm7-newsletter button{
    min-width:145px;
    border:0;
    background:var(--tm7-primary);
    color:#fff;
    font-weight:900;
}


/* =========================================================
   CTA
   ========================================================= */

body.mtg-template-tm7 .tm7-cta-section{
    padding:32px 0;
}

body.mtg-template-tm7 .tm7-cta{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:30px;
    padding:36px 42px;
    border-radius:14px;
    background:
        linear-gradient(
            110deg,
            #06162f,
            #082d68
        );
    color:#fff;
}

body.mtg-template-tm7 .tm7-cta h2,
body.mtg-template-tm7 .tm7-cta p{
    color:#fff;
}

body.mtg-template-tm7 .tm7-cta-actions a{
    background:#fff;
    color:var(--tm7-primary-dark);
}


/* =========================================================
   FOOTER
   ========================================================= */

body.mtg-template-tm7 .tm7-footer{
    padding:56px 0 0;
    background:#161616;
    color:#fff;
}

body.mtg-template-tm7 .tm7-footer h2,
body.mtg-template-tm7 .tm7-footer h3,
body.mtg-template-tm7 .tm7-footer strong{
    color:#fff;
}

body.mtg-template-tm7 .tm7-footer a,
body.mtg-template-tm7 .tm7-footer p{
    color:rgba(255,255,255,.68);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

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

    body.mtg-template-tm7 .tm7-product-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }

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

    body.mtg-template-tm7 .tm7-brands-grid{
        grid-template-columns:repeat(4,minmax(0,1fr));
    }
}

@media(max-width:760px){
    body.mtg-template-tm7 .tm7-container{
        width:94%;
    }

    body.mtg-template-tm7 .tm7-hero-grid,
    body.mtg-template-tm7 .tm7-banner,
    body.mtg-template-tm7 .tm7-newsletter-inner{
        grid-template-columns:1fr;
    }

    body.mtg-template-tm7 .tm7-hero-grid{
        min-height:0;
        padding:30px 0;
    }

    body.mtg-template-tm7 .tm7-hero-content{
        order:2;
    }

    body.mtg-template-tm7 .tm7-hero-visual{
        order:1;
    }

    body.mtg-template-tm7 .tm7-category-grid,
    body.mtg-template-tm7 .tm7-product-grid,
    body.mtg-template-tm7 .tm7-brands-grid,
    body.mtg-template-tm7 .tm7-testimonials-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:10px;
    }

    body.mtg-template-tm7 .tm7-benefits-grid{
        grid-template-columns:1fr;
    }

    body.mtg-template-tm7 .tm7-benefit{
        border-right:0;
        border-bottom:1px solid var(--tm7-border);
    }

    body.mtg-template-tm7 .tm7-newsletter form{
        flex-direction:column;
        gap:10px;
    }

    body.mtg-template-tm7 .tm7-newsletter button{
        min-height:50px;
    }

    body.mtg-template-tm7 .tm7-cta{
        align-items:flex-start;
        flex-direction:column;
    }
}

/* MTG TM7 CATEGORY FULL CARD FIX START */

/*
 * Objetivo:
 * - la imagen debe ocupar todo el espacio disponible del card
 * - el título debe quedar abajo en una franja degradada roja
 * - evitar zonas vacías en la tarjeta
 */
.mtg-template-tm7 .mtg-core-section--categories :is(
    .tm7-category-card,
    .tm7-categories-card,
    .tm7-category-item,
    .tm7-categories-item,
    .tm7-core-category-card,
    .tm7-core-categories__item,
    .tm7-category-box,
    .tm7-categories-box
),
.mtg-template-tm7 section[data-core-section="categories"] :is(
    .tm7-category-card,
    .tm7-categories-card,
    .tm7-category-item,
    .tm7-categories-item,
    .tm7-core-category-card,
    .tm7-core-categories__item,
    .tm7-category-box,
    .tm7-categories-box
) {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 430px !important;
    overflow: hidden !important;
    border-radius: 22px !important;
}

/* Si la tarjeta viene con un enlace envolviendo todo */
.mtg-template-tm7 .mtg-core-section--categories :is(
    .tm7-category-card,
    .tm7-categories-card,
    .tm7-category-item,
    .tm7-categories-item,
    .tm7-core-category-card,
    .tm7-core-categories__item,
    .tm7-category-box,
    .tm7-categories-box
) > a,
.mtg-template-tm7 section[data-core-section="categories"] :is(
    .tm7-category-card,
    .tm7-categories-card,
    .tm7-category-item,
    .tm7-categories-item,
    .tm7-core-category-card,
    .tm7-core-categories__item,
    .tm7-category-box,
    .tm7-categories-box
) > a {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: inherit !important;
    text-decoration: none !important;
}

/* Zona de imagen */
.mtg-template-tm7 .mtg-core-section--categories :is(
    .tm7-category-card__media,
    .tm7-categories-card__media,
    .tm7-category-item__media,
    .tm7-core-category-card__media,
    .tm7-core-categories__media,
    .tm7-category-image,
    .tm7-categories-image,
    .tm7-category-thumb,
    .tm7-categories-thumb,
    .tm7-category-photo,
    .tm7-categories-photo
),
.mtg-template-tm7 section[data-core-section="categories"] :is(
    .tm7-category-card__media,
    .tm7-categories-card__media,
    .tm7-category-item__media,
    .tm7-core-category-card__media,
    .tm7-core-categories__media,
    .tm7-category-image,
    .tm7-categories-image,
    .tm7-category-thumb,
    .tm7-categories-thumb,
    .tm7-category-photo,
    .tm7-categories-photo
) {
    flex: 1 1 auto !important;
    min-height: 250px !important;
    height: auto !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #f2f2f2 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: stretch !important;
}

/* Fallback:
 * si no existe contenedor "media", aplicar al primer bloque visual/imágenes
 */
.mtg-template-tm7 .mtg-core-section--categories :is(
    .tm7-category-card,
    .tm7-categories-card,
    .tm7-category-item,
    .tm7-categories-item,
    .tm7-core-category-card,
    .tm7-core-categories__item,
    .tm7-category-box,
    .tm7-categories-box
) :is(img, picture),
.mtg-template-tm7 section[data-core-section="categories"] :is(
    .tm7-category-card,
    .tm7-categories-card,
    .tm7-category-item,
    .tm7-categories-item,
    .tm7-core-category-card,
    .tm7-core-categories__item,
    .tm7-category-box,
    .tm7-categories-box
) :is(img, picture) {
    width: 100% !important;
    height: 100% !important;
    min-height: 250px !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: #f2f2f2 !important;
}

/* Título abajo con degradado rojo */
.mtg-template-tm7 .mtg-core-section--categories :is(
    .tm7-category-card__title,
    .tm7-categories-card__title,
    .tm7-category-item__title,
    .tm7-core-category-card__title,
    .tm7-core-categories__title,
    .tm7-category-title,
    .tm7-categories-title
),
.mtg-template-tm7 section[data-core-section="categories"] :is(
    .tm7-category-card__title,
    .tm7-categories-card__title,
    .tm7-category-item__title,
    .tm7-core-category-card__title,
    .tm7-core-categories__title,
    .tm7-category-title,
    .tm7-categories-title
) {
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding: 22px 20px !important;
    background: linear-gradient(135deg, #071b46 0%, #064fc4 48%, #00a8ff 100%) !important;
    color: #ffffff !important;
    text-align: center !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

/* Si el título está en h3/h4/p dentro del card */
.mtg-template-tm7 .mtg-core-section--categories :is(
    .tm7-category-card,
    .tm7-categories-card,
    .tm7-category-item,
    .tm7-categories-item,
    .tm7-core-category-card,
    .tm7-core-categories__item,
    .tm7-category-box,
    .tm7-categories-box
) :is(h3, h4, .title, .name):last-child,
.mtg-template-tm7 section[data-core-section="categories"] :is(
    .tm7-category-card,
    .tm7-categories-card,
    .tm7-category-item,
    .tm7-categories-item,
    .tm7-core-category-card,
    .tm7-core-categories__item,
    .tm7-category-box,
    .tm7-categories-box
) :is(h3, h4, .title, .name):last-child {
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding: 22px 20px !important;
    background: linear-gradient(135deg, #071b46 0%, #064fc4 48%, #00a8ff 100%) !important;
    color: #ffffff !important;
    text-align: center !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    border-radius: 0 !important;
}

/* Por si el card trae padding interno general, lo neutralizamos arriba
   y dejamos limpio el flujo imagen + franja inferior */
.mtg-template-tm7 .mtg-core-section--categories :is(
    .tm7-category-card,
    .tm7-categories-card,
    .tm7-category-item,
    .tm7-categories-item,
    .tm7-core-category-card,
    .tm7-core-categories__item,
    .tm7-category-box,
    .tm7-categories-box
) > *:first-child,
.mtg-template-tm7 section[data-core-section="categories"] :is(
    .tm7-category-card,
    .tm7-categories-card,
    .tm7-category-item,
    .tm7-categories-item,
    .tm7-core-category-card,
    .tm7-core-categories__item,
    .tm7-category-box,
    .tm7-categories-box
) > *:first-child {
    margin-top: 0 !important;
}

/* Responsive */
@media (max-width: 991px) {
    .mtg-template-tm7 .mtg-core-section--categories :is(
        .tm7-category-card,
        .tm7-categories-card,
        .tm7-category-item,
        .tm7-categories-item,
        .tm7-core-category-card,
        .tm7-core-categories__item,
        .tm7-category-box,
        .tm7-categories-box
    ),
    .mtg-template-tm7 section[data-core-section="categories"] :is(
        .tm7-category-card,
        .tm7-categories-card,
        .tm7-category-item,
        .tm7-categories-item,
        .tm7-core-category-card,
        .tm7-core-categories__item,
        .tm7-category-box,
        .tm7-categories-box
    ) {
        min-height: 360px !important;
    }

    .mtg-template-tm7 .mtg-core-section--categories :is(
        .tm7-category-card,
        .tm7-categories-card,
        .tm7-category-item,
        .tm7-categories-item,
        .tm7-core-category-card,
        .tm7-core-categories__item,
        .tm7-category-box,
        .tm7-categories-box
    ) :is(img, picture),
    .mtg-template-tm7 section[data-core-section="categories"] :is(
        .tm7-category-card,
        .tm7-categories-card,
        .tm7-category-item,
        .tm7-categories-item,
        .tm7-core-category-card,
        .tm7-core-categories__item,
        .tm7-category-box,
        .tm7-categories-box
    ) :is(img, picture) {
        min-height: 210px !important;
    }
}

/* MTG TM7 CATEGORY FULL CARD FIX END */

/* MTG TM7 CATEGORY TITLE BLUE TECH FINAL */
body.mtg-template-tm7 .tm7-category-card__title,
body.mtg-template-tm7 .tm7-categories-card__title,
body.mtg-template-tm7 .tm7-category-item__title,
body.mtg-template-tm7 .tm7-core-category-card__title,
body.mtg-template-tm7 .tm7-core-categories__title,
body.mtg-template-tm7 .tm7-category-title,
body.mtg-template-tm7 .tm7-categories-title,

body.mtg-template-tm7 .mtg-core-section--categories h3,
body.mtg-template-tm7 .mtg-core-section--categories h4,
body.mtg-template-tm7 section[data-core-section="categories"] h3,
body.mtg-template-tm7 section[data-core-section="categories"] h4,

body.mtg-template-tm7 .mtg-core-section--categories .title,
body.mtg-template-tm7 .mtg-core-section--categories .name,
body.mtg-template-tm7 section[data-core-section="categories"] .title,
body.mtg-template-tm7 section[data-core-section="categories"] .name {
    background: linear-gradient(
        135deg,
        #061a40 0%,
        #064fc4 50%,
        #00a8ff 100%
    ) !important;
    color: #ffffff !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* MTG TM7 CATEGORY REAL BLUE TECH */
body.mtg-template-tm7
.tm7-category-card > strong {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 76px !important;
    margin: 0 !important;
    padding: 18px 20px !important;
    box-sizing: border-box !important;

    background:
        linear-gradient(
            135deg,
            #061a40 0%,
            #0756d8 52%,
            #00a8ff 100%
        ) !important;

    color: #ffffff !important;
    font-weight: 850 !important;
    text-align: center !important;
    line-height: 1.15 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.12),
        0 8px 20px rgba(6,79,196,.16) !important;
}

/* Ocultar el texto secundario para conservar
   la estructura limpia de imagen + franja inferior */
body.mtg-template-tm7
.tm7-category-card > small {
    display: none !important;
}

/* La imagen ocupa toda la zona superior */
body.mtg-template-tm7
.tm7-category-card > .tm7-category-image {
    flex: 1 1 auto !important;
    width: 100% !important;
    min-height: 300px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

body.mtg-template-tm7
.tm7-category-card > .tm7-category-image > img {
    width: 100% !important;
    height: 100% !important;
    min-height: 300px !important;
    display: block !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* Card sin espacio vacío */
body.mtg-template-tm7
.tm7-category-card {
    display: flex !important;
    flex-direction: column !important;
    min-height: 410px !important;
    padding: 0 !important;
    overflow: hidden !important;
}
