/*
 * TM5 PetHouse clean style v2
 * Creado y distribuido por antoniocarpio.com (web developer with IA)
 */

body.mtg-template-tm5,
body.mtg-commerce-theme-tm5{
    background:#ffffff;
    color:#2f221d;
}

.tm5-home{
    --tm5-teal:#0b7c79;
    --tm5-teal-dark:#075e5c;
    --tm5-orange:#f58a1f;
    --tm5-orange-dark:#e57809;
    --tm5-text:#2f221d;
    --tm5-muted:#655953;
    --tm5-line:#e5ece9;
    --tm5-soft:#f7fbfa;
    --tm5-soft-orange:#fff7f0;
    --tm5-shadow:0 16px 42px rgba(8,64,62,.08);
    background:#fff;
    color:var(--tm5-text);
}

.tm5-shell{
    width:90%;
    max-width:1440px;
    margin:0 auto;
}

.tm5-home *{
    box-sizing:border-box;
}

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

.tm5-hero{
    padding:42px 0 52px;
    background:#fff;
}

.tm5-hero-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(420px,.95fr);
    gap:46px;
    align-items:center;
}

.tm5-eyebrow,
.tm5-section-kicker,
.tm5-final-kicker{
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:10px 16px;
    border-radius:999px;
    background:#e4f4f1;
    color:var(--tm5-teal-dark);
    font-size:13px;
    font-weight:950;
    letter-spacing:.07em;
    text-transform:uppercase;
}

.tm5-eyebrow:after{
    content:"♡";
    color:var(--tm5-orange);
    font-size:18px;
}

.tm5-hero h1{
    max-width:700px;
    margin:22px 0 18px;
    font-size:clamp(44px,5vw,78px);
    line-height:.96;
    letter-spacing:-.06em;
    color:var(--tm5-text);
    font-weight:950;
}

.tm5-hero h1::first-line{
    color:var(--tm5-text);
}

.tm5-hero p{
    max-width:610px;
    color:var(--tm5-muted);
    font-size:20px;
    line-height:1.45;
    font-weight:650;
}

.tm5-actions{
    display:flex;
    flex-wrap:wrap;
    gap:14px;
    margin-top:28px;
}

.tm5-btn{
    min-height:54px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 28px;
    border-radius:18px;
    font-weight:950;
    transition:.18s ease;
}

.tm5-btn-primary{
    background:var(--tm5-orange);
    color:#fff!important;
    box-shadow:0 13px 24px rgba(245,138,31,.20);
}

.tm5-btn-primary:hover{
    background:var(--tm5-orange-dark);
}

.tm5-btn-light{
    background:#fff;
    color:var(--tm5-orange)!important;
    border:1px solid #dfe7e4;
}

.tm5-btn-light:hover{
    background:#fff8f1;
}

.tm5-mini-benefits{
    margin-top:28px;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:18px;
}

.tm5-mini-benefits article{
    display:flex;
    gap:10px;
    align-items:flex-start;
}

.tm5-mini-benefits b{
    color:var(--tm5-teal);
    font-size:21px;
    line-height:1;
}

.tm5-mini-benefits span{
    display:block;
    color:var(--tm5-text);
    font-size:13px;
    font-weight:950;
}

.tm5-mini-benefits small{
    display:block;
    color:var(--tm5-muted);
    font-size:12px;
    font-weight:700;
}

.tm5-hero-visual{
    overflow:hidden;
    min-height:420px;
    border-radius:28px;
    background:#fff;
    border:1px solid var(--tm5-line);
    box-shadow:var(--tm5-shadow);
}

.tm5-hero-img{
    width:100%;
    min-height:420px;
    height:100%;
    display:block;
    object-fit:cover;
}

.tm5-hero-placeholder{
    min-height:420px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    background:linear-gradient(135deg,#ffffff,#f7fbfa);
    color:var(--tm5-teal-dark);
    padding:34px;
}

.tm5-hero-placeholder strong{
    display:block;
    font-size:64px;
    margin-bottom:14px;
}

.tm5-hero-placeholder span{
    display:block;
    color:var(--tm5-muted);
    font-weight:800;
}

.tm5-section{
    padding:38px 0;
    background:#fff;
}

.tm5-head{
    margin-bottom:22px;
}

.tm5-head--split{
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:22px;
}

.tm5-head h2{
    margin:12px 0 8px;
    color:var(--tm5-text);
    font-size:clamp(28px,3vw,38px);
    letter-spacing:-.045em;
    font-weight:950;
}

.tm5-head h2:after{
    content:" 🐾";
    color:var(--tm5-orange);
    font-size:.72em;
}

.tm5-head p{
    margin:0;
    color:var(--tm5-muted);
    font-size:16px;
    font-weight:650;
}

.tm5-section-link{
    color:var(--tm5-teal);
    font-weight:950;
    white-space:nowrap;
}

.tm5-category-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:22px;
}

.tm5-category-card{
    position:relative;
    min-height:220px;
    overflow:hidden;
    border-radius:22px;
    background:#fff;
    border:1px solid var(--tm5-line);
    box-shadow:0 12px 28px rgba(8,64,62,.06);
    color:var(--tm5-text);
}

.tm5-category-card img{
    width:100%;
    height:100%;
    min-height:220px;
    display:block;
    object-fit:cover;
    transition:.22s ease;
}

.tm5-category-card:hover img{
    transform:scale(1.04);
}

.tm5-category-placeholder{
    min-height:220px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:70px;
    background:#f7fbfa;
    color:var(--tm5-teal);
}

.tm5-category-card strong{
    position:absolute;
    left:16px;
    right:16px;
    bottom:14px;
    min-height:54px;
    display:flex;
    align-items:center;
    padding:0 18px;
    border-radius:18px;
    background:rgba(255,255,255,.95);
    color:var(--tm5-text);
    font-weight:950;
    box-shadow:0 10px 24px rgba(8,64,62,.07);
}

.tm5-category-card strong:before{
    content:"";
    width:34px;
    height:34px;
    margin-right:10px;
    border-radius:999px;
    background:var(--tm5-orange);
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.tm5-category-card strong:after{
    content:"🐾";
    position:absolute;
    left:26px;
    color:#fff;
    font-size:17px;
}

.tm5-product-grid{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:22px;
}

.tm5-product-card{
    position:relative;
    overflow:hidden;
    border-radius:22px;
    background:#fff;
    border:1px solid var(--tm5-line);
    box-shadow:0 12px 28px rgba(8,64,62,.06);
}

.tm5-product-link{
    position:absolute;
    inset:0;
    z-index:1;
}

.tm5-product-media{
    aspect-ratio:1/1;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    border-bottom:1px solid var(--tm5-line);
}

.tm5-product-media img{
    width:100%;
    height:100%;
    object-fit:contain;
    padding:12px;
}

.tm5-product-placeholder{
    font-size:64px;
    color:var(--tm5-teal);
}

.tm5-product-body{
    padding:18px;
}

.tm5-product-body span{
    color:var(--tm5-teal);
    font-size:12px;
    letter-spacing:.07em;
    text-transform:uppercase;
    font-weight:950;
}

.tm5-product-body h3{
    min-height:42px;
    margin:8px 0 14px;
    color:var(--tm5-text);
    font-size:16px;
    line-height:1.25;
    font-weight:950;
}

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

.tm5-product-bottom strong{
    color:var(--tm5-text);
    font-size:20px;
    font-weight:950;
}

.tm5-cart{
    position:relative;
    z-index:3;
    width:42px;
    height:42px;
    border-radius:999px;
    background:var(--tm5-teal);
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-style:normal;
}

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

.tm5-benefits-grid{
    overflow:hidden;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    border-radius:22px;
    border:1px solid var(--tm5-line);
    background:#fff;
    box-shadow:0 10px 26px rgba(8,64,62,.04);
}

.tm5-benefits-grid article{
    display:grid;
    grid-template-columns:auto 1fr;
    gap:12px;
    padding:22px;
    border-right:1px solid var(--tm5-line);
}

.tm5-benefits-grid article:last-child{
    border-right:0;
}

.tm5-benefits-grid b{
    color:var(--tm5-teal);
    font-size:32px;
    line-height:1;
}

.tm5-benefits-grid h3{
    margin:0 0 4px;
    color:var(--tm5-text);
    font-size:16px;
    font-weight:950;
}

.tm5-benefits-grid p{
    margin:0;
    color:var(--tm5-muted);
    font-size:14px;
    font-weight:650;
}

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

.tm5-brand-card{
    min-height:82px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:6px;
    padding:14px;
    border-radius:18px;
    background:#fff;
    border:1px solid var(--tm5-line);
    color:var(--tm5-text);
    text-align:center;
    font-weight:950;
    box-shadow:0 8px 20px rgba(8,64,62,.04);
}

.tm5-brand-card span{
    font-size:26px;
}

.tm5-newsletter{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:28px;
    align-items:center;
    padding:34px;
    border-radius:26px;
    background:#fff;
    border:1px solid var(--tm5-line);
    box-shadow:var(--tm5-shadow);
}

.tm5-newsletter h2,
.tm5-final h2{
    margin:12px 0 10px;
    color:var(--tm5-text);
    font-size:clamp(28px,3vw,38px);
    letter-spacing:-.04em;
    font-weight:950;
}

.tm5-newsletter p,
.tm5-final p{
    margin:0;
    color:var(--tm5-muted);
    font-weight:650;
}

.tm5-newsletter-form{
    display:flex;
    gap:12px;
}

.tm5-newsletter-form input{
    flex:1;
    min-height:54px;
    border:1px solid var(--tm5-line);
    border-radius:16px;
    padding:0 18px;
    font-weight:700;
}

.tm5-newsletter-form button{
    min-height:54px;
    border:0;
    border-radius:16px;
    background:var(--tm5-orange);
    color:#fff;
    padding:0 22px;
    font-weight:950;
    cursor:pointer;
}

.tm5-final{
    display:grid;
    grid-template-columns:1.25fr auto;
    gap:24px;
    align-items:center;
    padding:38px;
    border-radius:28px;
    background:linear-gradient(135deg,var(--tm5-teal-dark),#0b7c79);
    box-shadow:0 18px 46px rgba(8,64,62,.14);
}

.tm5-final .tm5-final-kicker{
    background:rgba(255,255,255,.12);
    color:#fff;
}

.tm5-final h2,
.tm5-final p{
    color:#fff;
}

.tm5-final .tm5-btn-light{
    border:0;
    color:var(--tm5-teal)!important;
}

.tm5-footer-visual{
    padding:28px 0 22px;
    background:#fff;
    text-align:center;
    color:var(--tm5-muted);
}

.tm5-footer-visual strong{
    display:block;
    color:var(--tm5-text);
    font-size:22px;
    font-weight:950;
    margin-bottom:8px;
}

.tm5-footer-visual p{
    margin:0;
    font-weight:650;
}

@media(max-width:980px){
    .tm5-hero-grid,
    .tm5-newsletter,
    .tm5-final{
        grid-template-columns:1fr;
    }

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

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

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

@media(max-width:640px){
    .tm5-shell{
        width:90%;
    }

    .tm5-hero{
        padding:26px 0 34px;
    }

    .tm5-hero h1{
        font-size:40px;
    }

    .tm5-hero p{
        font-size:16px;
    }

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

    .tm5-head--split{
        align-items:flex-start;
        flex-direction:column;
    }

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

    .tm5-category-card,
    .tm5-category-card img,
    .tm5-category-placeholder{
        min-height:170px;
    }

    .tm5-category-card strong{
        left:10px;
        right:10px;
        bottom:10px;
        font-size:13px;
        padding:0 12px;
    }

    .tm5-product-body{
        padding:14px;
    }

    .tm5-product-body h3{
        font-size:14px;
    }

    .tm5-benefits-grid article{
        grid-template-columns:1fr;
        text-align:center;
        padding:16px 12px;
    }

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

    .tm5-newsletter-form{
        flex-direction:column;
    }

    .tm5-final{
        padding:28px 22px;
    }
}

/* =========================================================
   TM5 HERO TYPOGRAPHY MATCH - Mockup PetHouse
   Ajusta peso, compactación y presencia del título hero.
   Creado y distribuido por antoniocarpio.com (web developer with IA)
   ========================================================= */

body.mtg-template-tm5 .tm5-hero h1,
body.mtg-commerce-theme-tm5 .tm5-hero h1,
.tm5-home .tm5-hero h1 {
    font-family: "Montserrat", "Arial", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-weight: 950 !important;
    line-height: .88 !important;
    letter-spacing: -0.065em !important;
    color: #2f221d !important;
    max-width: 680px !important;
    margin-top: 22px !important;
    margin-bottom: 20px !important;
    text-wrap: balance;
}

body.mtg-template-tm5 .tm5-hero h1 strong,
body.mtg-template-tm5 .tm5-hero h1 em,
body.mtg-commerce-theme-tm5 .tm5-hero h1 strong,
body.mtg-commerce-theme-tm5 .tm5-hero h1 em,
.tm5-home .tm5-hero h1 strong,
.tm5-home .tm5-hero h1 em {
    color: #0b7c79 !important;
    font-style: normal !important;
    font-weight: 950 !important;
}

/* Texto debajo del hero: más parecido al mockup, firme pero no gigante */
body.mtg-template-tm5 .tm5-hero p,
body.mtg-commerce-theme-tm5 .tm5-hero p,
.tm5-home .tm5-hero p {
    font-family: "Montserrat", "Arial", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-weight: 650 !important;
    line-height: 1.42 !important;
    letter-spacing: -0.015em !important;
    color: #5f514b !important;
    max-width: 590px !important;
}

/* Eyebrow/pastilla superior más fina */
body.mtg-template-tm5 .tm5-eyebrow,
body.mtg-commerce-theme-tm5 .tm5-eyebrow,
.tm5-home .tm5-eyebrow {
    font-family: "Montserrat", "Arial", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-weight: 900 !important;
    letter-spacing: .055em !important;
    background: #e5f4f1 !important;
    color: #075e5c !important;
}

/* Botones más cercanos al mockup */
body.mtg-template-tm5 .tm5-hero .tm5-btn,
body.mtg-commerce-theme-tm5 .tm5-hero .tm5-btn,
.tm5-home .tm5-hero .tm5-btn {
    font-family: "Montserrat", "Arial", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-weight: 950 !important;
    border-radius: 18px !important;
}

/* Desktop grande */
@media (min-width: 1200px) {
    body.mtg-template-tm5 .tm5-hero h1,
    body.mtg-commerce-theme-tm5 .tm5-hero h1,
    .tm5-home .tm5-hero h1 {
        font-size: clamp(58px, 5.1vw, 78px) !important;
    }
}

/* Laptop / pantallas medianas */
@media (max-width: 1199px) {
    body.mtg-template-tm5 .tm5-hero h1,
    body.mtg-commerce-theme-tm5 .tm5-hero h1,
    .tm5-home .tm5-hero h1 {
        font-size: clamp(48px, 5.4vw, 68px) !important;
        line-height: .9 !important;
    }
}

/* Mobile */
@media (max-width: 640px) {
    body.mtg-template-tm5 .tm5-hero h1,
    body.mtg-commerce-theme-tm5 .tm5-hero h1,
    .tm5-home .tm5-hero h1 {
        font-size: 42px !important;
        line-height: .93 !important;
        letter-spacing: -0.055em !important;
        max-width: 100% !important;
    }

    body.mtg-template-tm5 .tm5-hero p,
    body.mtg-commerce-theme-tm5 .tm5-hero p,
    .tm5-home .tm5-hero p {
        font-size: 16px !important;
        line-height: 1.42 !important;
    }
}

/* =========================================================
   TM5 HERO GREEN WORD + HEART DOODLE
   ========================================================= */

body.mtg-template-tm5 .tm5-hero h1 .tm5-hero-accent,
body.mtg-commerce-theme-tm5 .tm5-hero h1 .tm5-hero-accent,
.tm5-home .tm5-hero h1 .tm5-hero-accent {
    color: #0b7c79 !important;
    font-weight: 950 !important;
}

body.mtg-template-tm5 .tm5-hero h1,
body.mtg-commerce-theme-tm5 .tm5-hero h1,
.tm5-home .tm5-hero h1 {
    position: relative !important;
    overflow: visible !important;
}

body.mtg-template-tm5 .tm5-hero h1 .tm5-hero-heart,
body.mtg-commerce-theme-tm5 .tm5-hero h1 .tm5-hero-heart,
.tm5-home .tm5-hero h1 .tm5-hero-heart {
    display: inline-block !important;
    margin-left: 12px !important;
    color: #f58a1f !important;
    font-size: .58em !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    transform: rotate(-10deg) translateY(-.06em) !important;
    vertical-align: middle !important;
}

/* rayitas decorativas pequeñas al lado de la imagen/hero */
body.mtg-template-tm5 .tm5-hero-visual::after,
body.mtg-commerce-theme-tm5 .tm5-hero-visual::after,
.tm5-home .tm5-hero-visual::after {
    content: "⌒  ˎ";
    position: absolute;
    right: -16px;
    bottom: 24px;
    color: #f58a1f;
    font-size: 34px;
    font-weight: 950;
    letter-spacing: -8px;
    transform: rotate(22deg);
    pointer-events: none;
}

/* Mobile: corazón más controlado */
@media (max-width: 640px) {
    body.mtg-template-tm5 .tm5-hero h1 .tm5-hero-heart,
    body.mtg-commerce-theme-tm5 .tm5-hero h1 .tm5-hero-heart,
    .tm5-home .tm5-hero h1 .tm5-hero-heart {
        font-size: .5em !important;
        margin-left: 8px !important;
    }
}

/* =========================================================
   TM5 HERO BUILDER-CONTROLLED ACCENT
   ========================================================= */

body.mtg-template-tm5 .tm5-hero h1 .tm5-hero-accent,
body.mtg-commerce-theme-tm5 .tm5-hero h1 .tm5-hero-accent,
.tm5-home .tm5-hero h1 .tm5-hero-accent {
    color: var(--tm5-hero-accent-color, #0b7c79) !important;
    font-weight: 950 !important;
}

body.mtg-template-tm5 .tm5-hero h1 .tm5-hero-heart,
body.mtg-commerce-theme-tm5 .tm5-hero h1 .tm5-hero-heart,
.tm5-home .tm5-hero h1 .tm5-hero-heart {
    display: inline-block !important;
    margin-left: 12px !important;
    color: var(--tm5-hero-heart-color, #f58a1f) !important;
    font-size: .58em !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    transform: rotate(-10deg) translateY(-.06em) !important;
    vertical-align: middle !important;
}

/* =========================================================
   TM5 BRAND LOGOS - texto o imagen desde builder
   ========================================================= */

.tm5-brand-card img {
    max-width: 150px !important;
    max-height: 42px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 auto 6px !important;
}

.tm5-brand-card {
    text-decoration: none !important;
}

.tm5-brand-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(8,64,62,.08);
}

.tm5-image-preview {
    margin-top: 10px;
    width: 100%;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fbfa;
    border: 1px solid #e5ece9;
    border-radius: 14px;
    padding: 10px;
}

.tm5-image-preview img {
    max-width: 180px;
    max-height: 70px;
    object-fit: contain;
}
