  *{
            box-sizing: border-box;
            padding: 0px;
            margin: 0px;
           
        }
:root{
    --font-primary: "Avenir Black", sans-serif;
    --font-secondary-1: "Maison Neue Bold", sans-serif;
    --font-secondary-2: "Maison Neue Book", sans-serif;
}
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
h1, h2, h3, h4{
    font-family: var(--font-primary);
    font-weight: 700;
    letter-spacing: 1px;
}
button,a{
    font-family: var(--font-secondary-1);
}
p, span, li{
    font-family: var(--font-secondary-2);
}

.btn-home,
strong{
    font-family: var(--font-secondary-2);
    font-weight: 650;
    font-size: 16px;
}
/*HEADER*/
.header{
    position: fixed;
    top: 0px;
    left: 0;
    width: 100%;
    z-index: 1000;
    width: 100%;
    height: 140px;
    display: grid;
}
.social{
    background: #ffffff;
    width: 100%;
    height: 40px;
}
.social-icons{
    width: 100px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-left: 80px;
}
.social-icons a{
    color: #4328a5;
    font-size: 20px;
}
.social-icons a:hover{
    color: #FCC804;
}
.menu{
display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  background-color: #4328a5;
  height: 100px;
  padding: 0 28px;
  position: relative;
}
.menu-logo{
    display: block;
    align-items: center;
}
.menu-logo img{
    height: 82px;
    width: auto;
    margin-left: 0px;
}
.menu-nav{
    list-style: none;
    padding: 20px;
    text-align: right;
    margin-right: 50px;
}
.menu-nav__item{
  position: relative;
  display: inline-block;
  padding: 12px 10px;
}
.menu-nav__item > a {
  color: #ffffff;
  text-decoration: none;
  font-family: var(--font-secondary-1);
  font-size: 16px;
}
.menu-nav__item.mega-dropdown > a::after {
  content: " ▼";
  font-size: 12px;
  margin-left: 6px;
  transition: transform 0.3s ease;
}

/* animación al pasar el mouse */
.menu-nav__item.mega-dropdown:hover > a::after {
  transform: rotate(180deg);
}
.menu-nav__item a{
    color: #ffffff;
    text-decoration: none;
}
/* ===== MEGA MENU ===== */
.mega-dropdown{
    position: relative;
}

.mega-menu{
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: min(94vw, 1040px);
    max-height: min(72vh, 560px);
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: 24px 28px;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 28px;
    text-align: left;
    z-index: 9999;
}

/* Se despliega al pasar por Productos */
.mega-dropdown:hover .mega-menu{
    display: grid;
}

/* pequeña zona colchón para que no se cierre al bajar el mouse */
.mega-dropdown::after{
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 18px;
}


/* columnas */
.mega-menu__column{
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0px;
}

.mega-menu__title{
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 800;
    color: #222222;
}

.mega-menu__group{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mega-menu__subtitle{
    margin: 10px 0 4px;
    font-size: 14px;
    font-weight: 700;
    color: #4b2dbd;
}

/* links internos del mega menu */
.mega-menu a{
    color: #333333;
    text-decoration: none;
    font-size: 15px;
    line-height: 1.45;
    font-weight: 400;
    white-space: normal;
    transition: color 0.25s ease, padding-left 0.25s ease;
}
.mega-menu::-webkit-scrollbar {
  width: 8px;
}

.mega-menu::-webkit-scrollbar-thumb {
  background: rgba(67, 40, 165, 0.35);
  border-radius: 999px;
}

.mega-menu a:hover{
    color: #4b2dbd;
    padding-left: 4px;
}
/* oculto en desktop */
.mobile-products-panel {
  display: none;
}

/*Main del home*/
.home-main{
    margin-top: 140px;
    display: grid;
    grid-template-columns: 1fr;
    min-height: 520px;
    background-image: url('../img/CONECTADOS-PORTADA.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    align-items: center;
}
.main-container{
    display: grid;
    justify-items: center;
    align-items: center;
    min-height: 520px;
    padding: 40px 20px;
    margin-top: 140px;
    object-fit: cover;
}
.home-content{
    width: calc(100% - 160px);
    max-width: 1280px;
    margin: 0 auto;
    padding-bottom: 40px;
}
.home-section{
    margin-top: 40px;
    margin-bottom: 40px;
}
.home-section h1{
    text-align: center;
}

.section-desc{
    text-align: center;
    color: #666;
    margin-bottom: 40px;
}

/* GRID */
.category-grid,
.product-grid-home,
.benefits-grid-home{
    display: grid;
    gap: 20px;
    margin-top: 40px;
}

.category-grid{
    grid-template-columns: repeat(4,1fr);
}
.category-grid a{
    background:#FCC804;
    text-decoration: none;
    color: #222222;
}

.product-grid-home{
    grid-template-columns: repeat(4,1fr);
}

.benefits-grid-home{
    grid-template-columns: repeat(3,1fr);
}

/* CARDS */
.category-card,
.product-card-home,
.benefit-card-home{
    background: white;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: 0.3s;
}
.benefit-card-home{
    border-top: 4px solid #FCC804;
}

.benefit-card-home h3{
    color: #FCC804;
}

.benefit-card-home:hover{
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(252, 200, 4, 0.25);
}
.category-card:hover,
.product-card-home:hover{
    transform: translateY(-5px);
}

/* IMAGENES */
.product-card-home img{
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 10px;
}

/* TEXTOS */
.category-card h3,
.product-card-home h3{
    font-size: 20px;
    margin-bottom: 5px;
}
/* BOTON */
.btn-home{
    background: #4b2dbd;
    color: white;
    padding: 10px 18px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
}
.products{
    width: calc(100% - 160px);
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}
.products h1{
    padding: 40px 0px;
    text-align: center;
}
.products-grid{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 140px;
}
.categoria-titulo{
    grid-column: 1 / -1;
    text-align: center;
    font-size: 2rem;
}
.cartas{
    background: #ffffff;
    border-radius: 6px;
    padding: 5px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
}
.cartas:hover{
    transform: translate(-5px);
}
.cartas img{
    width: 100%;
    max-height: 220px;
    object-fit: contain;
}
.cartas-img{
    position: relative;
    width: 100%;
    overflow: hidden;
}
.cartas-img img{
    width: 100%;
    display: block;
    transition: opacity 0.3s ease;
}
.img-hover{
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}
.cartas-img:hover .img-hover{
    opacity: 1;
}
.cartas h3{
    font-size: 20px;
    margin: 10px 0 5px;
}
.juegos-img {
  position: relative;
  width: 100%;
  height: 280px; /* ajusta según tu diseño */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.juegos-img img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain; /* usa cover si quieres que llene todo */
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.juegos-img .img-principal-services {
  opacity: 1;
  z-index: 1;
}

.juegos-img .img-hover-services {
  opacity: 0;
  z-index: 2;
}

.juegos:hover .juegos-img .img-principal-services {
  opacity: 0;
  transform: scale(1.03);
}

.juegos:hover .juegos-img .img-hover-services {
  opacity: 1;
  transform: scale(1.03);
}
.precio{
    font-family: var(--font-secondary-1);
    font-size: 23px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #4328a5;
}
.ver-mas-container{
    display: flex;
    justify-content: center;
    margin: 40px 0;
}
#verMasBtn{
    background: #4328a5;
    padding: 14px 30px;
    border-radius: 25px;
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}
#verMasBtn:hover{
    background: #FCC804;
}
.product-view{
    margin-top: 50px;
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}
a.back{
    color: #4328a5;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 20px;
    font-weight: bold;
}
.container{
    max-width: 1250px;
    margin: 140px auto 40px;
    margin-top: 160px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
    padding: 40px;
    border-radius: 6px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}
.gallery{
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.main-image-box{
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    overflow: hidden;
    cursor: zoom-in;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 500px;
    position: relative;
}
.main-image{
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.15s ease;
    transform-origin: center center;
    will-change: transform;
}
.thumbnails{
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.thumbnail {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    background: #f3f3f3;
    transition: 0.2s ease;
}
.thumbnail img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.thumbnail.active{
    border-color: #4328a5;
}
.thumbnail:hover{
    transform: translateY(-2px);
}
.product-info h1{
    font-size: 42px;
    margin: 0 0 12px;
}
.desc{
    font-size: 20px;
    line-height: 1.7;
    margin-bottom: 28px;
}
.cart-box{
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.quantity-selector{
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
}
.quantity-selector button{
    width: 48px;
    height: 48px;
    border: none;
    background: #FCC804;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.quantity-selector input{
    width: 70px;
    height: 48px;
    border: none;
    text-align: center;
    font-size: 18px;
    outline: none;
}
.add-cart-btn{
    background: #4328a5;
    color: #ffffff;
    border: none;
    height: 50px;
    padding: 0 28px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}
.add-cart-btn:hover{
    background: #FCC804;
}
.related-section{
    max-width: 1250px;
    margin: 0 auto 70px;
    padding: 0 20px;
}
.related-section h2{
    font-size: 30px;
    margin-bottom: 40px;
    text-align: center;
}
.related-grid{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.related-card{
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    padding: 16px;
    text-align: center;
}
.related-card img{
    width: 100%;
    height: 220px;
    object-fit: contain;
    margin-bottom: 12px;
}
.related-card h3{
  font-size: 18px;
  margin: 10px 0 8px;
}

.related-card p{
    font-family: var(--font-secondary-1);
    color: #4328a5;
    font-size: 23px;
  font-weight: 800;
  margin-bottom: 14px;
}

.related-card a{
  display: inline-block;
  background: #4b2bbd;
  color: #fff;
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
}
.services{
    width: calc(100% - 160px);
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.services h1{
    padding: 40px 0px;
    text-align: center;
}
.services-grid-juegos{
    margin-top: 140px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    text-align: center;
    min-width: 0;
}
.juegos{
    background: #ffffff;
    border-radius: 6px;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    align-items: center;
    min-width: 0;
}
.juegos:hover{
    transform: translate(-5px);
}
.juegos img{
    width: 100%;
    max-height: 220px;
    object-fit: contain;
}
.juegos h3{
    font-size: 20px;
    margin: 10px 0 5px;
}
.juegos h3,
.juegos p,
.service-actions{
    width: 100%;
    min-width: 0;
}
.btn-consultar{
    width: auto;
    min-height: 30px;
    padding: 10px 18px;
    font-size: 15px;
    background: #4328a5;
    border: none;
    border-radius: 999px;
    text-decoration: none;
    display: inline-block;
    color: white;
    font-weight: bold;
    cursor: pointer;
    margin-top: auto;
    margin-bottom: 10px;
}
.btn-consultar:hover{
    background: #FCC804;
}
.services-grid-casas{
display: flex;
align-items: center;
gap: 80px;
padding: 40px;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
transition: transform 0.2s ease;
}
.casas{
    margin: auto;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s ease;
    padding: 20px;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 40% 60%;
    gap: 40px;
    align-items: start;
}
.casas-img{
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.carousel{
    position: relative;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    border-radius: 20px;
}
.carousel-track{
    display: flex;
    transition: transform 0.4s ease-in-out;
}
.carousel-slide{
    min-width: 100%;
    height: 600px;
    width: 100%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}
.carousel-btn{
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.45);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
}
.carousel-btn.prev{
    left: 12px;
}
.carousel-btn.next{
    right: 12px;
}
.carousel-btn:hover{
    background: rgba(0,0,0,0.7);
}
.carousel-dots{
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.carousel-dots .dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: 0.3s;
}
.carousel-dots .dot.active{
  background: white;
}
.casas-img img{
    width: 85%;
    max-width: 320px;
    height: auto;
    border-radius: 10px;
    display: block;
}
.casas-info{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.casas-info h2{
    margin-bottom: 60px;
}
.casas h1{
    margin: 0 0 10px 0;
}

.price{
    font-family: var(--font-secondary-1);
    color: #4328a5;
    font-size: 30px;
    margin-bottom: 15px;
    font-weight: 900;
}
.casas p{
    line-height: 1.6;
}
.btncasas{
    height: 40px;
    padding: 10px 20px;
    font-size: 15px;
    background: #4328a5;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    display: inline-block;
    color: white;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
    margin-top: 80px;
}
.footer-tl {
  background: linear-gradient(135deg, #3d24aa, #5636d8);
  color: #ffffff;
  margin-top: 70px;
}

.footer-tl__container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 45px 24px 30px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
}

.footer-tl__brand,
.footer-tl__links,
.footer-tl__info,
.footer-tl__social {
  flex: 1 1 180px;
  min-width: 180px;
}

.footer-tl__brand {
  flex: 1.5 1 260px;
  max-width: 320px;
}

.footer-tl__logo {
  width: 180px;
  margin-bottom: 14px;
}

.footer-tl__text {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 16px;
}

.footer-tl h4 {
  font-size: 18px;
  margin-bottom: 16px;
  font-weight: 700;
}

.footer-tl__links a,
.footer-tl__social a {
  display: block;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  margin-bottom: 10px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.footer-tl__links a:hover {
  transform: translateX(4px);
  opacity: 1;
}

.footer-tl__info p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.6;
}

.footer-tl__warning {
  font-size: 13px;
  color: #ffe082;
  margin-top: 8px;
}

.footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px; /* separación entre botones */
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.footer-btn:hover {
  transform: scale(1.04);
}

.footer-btn i {
  font-size: 18px;
}

.footer-btn-whatsapp {
  background: rgba(255, 255, 255, 0.16);
}

.footer-btn-instagram {
  background: rgba(255, 255, 255, 0.16);
}

.footer-tl__social-icons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-tl__social-icons a {
  width: 42px;
  height: 42px;
  margin-bottom: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.footer-tl__social-icons a:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-3px);
}

.footer-tl__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
  padding: 16px 20px;
}

.footer-tl__bottom p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.86);
}
.card-cart-box{
    display: flex;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 8px;
}

.cartas .add-cart-btn{
    width: auto;
    min-height: 42px;
    height: auto;
    padding: 10px 18px;
    font-size: 15px;
    line-height: 1.2;
}

.cartas a{
    text-decoration: none;
    color: inherit;
}
.cart-trigger{
    background: transparent;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.cart-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 9998;
}

.cart-overlay.active{
    opacity: 1;
    visibility: visible;
}

.cart-drawer{
    position: fixed;
    top: 0;
    right: -420px;
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #fff;
    box-shadow: -8px 0 30px rgba(0,0,0,0.18);
    transition: right 0.35s ease;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.cart-drawer.active{
    right: 0;
}

.cart-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e7e7e7;
}

.cart-header h2{
    margin: 0;
    font-size: 28px;
}

.cart-close{
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    font-weight: 700;
}

.cart-items{
    flex: 1;
    overflow-y: auto;
    padding: 18px;
}

.cart-item{
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #ececec;
}

.cart-item-img{
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 12px;
    background: #f7f7f7;
    padding: 6px;
}

.cart-item-info h4{
    margin: 0 0 6px;
    font-size: 17px;
}

.cart-item-price{
    font-family: var(--font-secondary-2);
    color: #4328a5;
    font-weight: 700;
    margin-bottom: 10px;
}

.cart-item-controls{
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.qty-box{
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
}

.qty-btn{
    width: 34px;
    height: 34px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
}

.qty-value{
    min-width: 38px;
    text-align: center;
    font-weight: 700;
}

.remove-cart-item{
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #4328a5;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 700;
}

.cart-footer{
    border-top: 1px solid #e7e7e7;
    padding: 18px;
    background: #fff;
}

.cart-total{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 18px;
}

.cart-actions-bottom{
    display: flex;
    gap: 10px;
}

.cart-clear-btn,
.cart-whatsapp-btn{
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
}

.cart-clear-btn{
    background: #f2f2f2;
    color: #222;
}

.cart-whatsapp-btn{
    background: #4328a5;
    color: #fff;
}

.cart-empty{
    font-family: var(--font-secondary-2);
    text-align: center;
    padding: 50px 20px;
    color: #666;
}
.service-actions{
    margin-top: auto;
    display: flex;
    justify-content: center;
    gap: 12px;
    width: 100%;
}

.service-cart-btn{
    width: auto;
    min-height: 42px;
    padding: 10px 18px;
    font-size: 15px;
    line-height: 1.2;
}

.juegos .service-actions,
.casas-info .service-actions{
    justify-content: flex-start;
}
.service-actions button,
.service-actions a{
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    text-align: center;
    height: 44px;

}
.service-cart-btn,
.btn-consultar{
    display: flex;
    align-items: center;
    justify-content: center;
}
/* =========================
   RESPONSIVE GENERAL
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.menu {
  align-items: center;
}

.menu-nav {
  list-style: none;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin: 0;
}

.menu-toggle {
    display: none;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  justify-self: end;
}

.menu-toggle span {
    display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.cart-trigger {
  white-space: nowrap;
}

.home-section,
.related-section,
.products,
.services,
.container,
.services-grid-casas {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.container,
.related-section,
.services-grid-casas {
  max-width: calc(100% - 40px);
}

.products-grid,
.services-grid-juegos,
.related-grid,
.category-grid,
.product-grid-home,
.benefits-grid-home {
  align-items: stretch;
}

.cartas,
.product-card-home,
.category-card,
.benefit-card-home,
.related-card,
.juegos {
  height: 100%;
}

/* Hace que los botones de servicios tengan mismo ancho y altura */
.service-actions {
  display: flex;
  gap: 12px;
  align-items: stretch;
  justify-content: center;
  margin-top: auto;
}


.service-actions button,
.service-actions a {
  flex: 1;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
}
/* =========================================
   CARDS DE PRODUCTOS Y PROMOCIONES
   sin afectar otras secciones
========================================= */

#productsGrid > .cartas,
#promotionsGrid > .cartas {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  min-width: 0;
  padding: 12px;
}

#productsGrid > .cartas .cartas-img,
#promotionsGrid > .cartas .cartas-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  flex-shrink: 0;
}

#productsGrid > .cartas .cartas-img > a,
#promotionsGrid > .cartas .cartas-img > a {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

#productsGrid > .cartas .cartas-img img,
#promotionsGrid > .cartas .cartas-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  display: block;
}

/* evita que la regla global .cartas img rompa estas cards */
#productsGrid > .cartas img,
#promotionsGrid > .cartas img {
  max-height: none;
}

#productsGrid > .cartas h3,
#promotionsGrid > .cartas h3 {
  margin: 14px 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#productsGrid > .cartas .precio,
#promotionsGrid > .cartas .precio {
  margin-bottom: 14px;
}

#productsGrid > .cartas .card-cart-box,
#promotionsGrid > .cartas .card-cart-box {
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

#productsGrid > .cartas .add-cart-btn,
#promotionsGrid > .cartas .add-cart-btn {
  min-height: 46px;
  height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}
/* =========================
   TABLET GRANDE / LAPTOP
========================= */
@media (max-width: 1400px) {
  .category-grid,
  .product-grid-home,
  .products-grid,
  .services-grid-juegos,
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .benefits-grid-home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mega-menu {
    left: auto;
    right: 0;
    transform: none;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    max-width: min(92vw, 920px);
  }
}

/* =========================
   TABLET
========================= */
@media (min-width: 769px) and (max-width: 1024px) {
  .menu {
    grid-template-columns: auto 1fr;
    align-items: center;
    padding: 0 24px;
    column-gap: 20px;
    height: 100px;
  }

  .menu-logo img {
    height: 74px;
  }

  .menu-nav {
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2px;
}

  .menu-nav__item {
    padding: 10px 8px;
  }
.menu-nav__item > a{
    font-size: 15px;
}
  .cart-trigger {
    margin-top: 0;
  }

  .category-grid,
  .product-grid-home,
  .products-grid,
  .related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .services-grid-juegos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .benefits-grid-home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .container {
    max-width: calc(100% - 48px);
  }


  .product-info h1 {
    font-size: 36px;
  }

  .desc {
    font-size: 18px;
  }

  .services-grid-casas {
    display: grid;
    gap: 32px;
    padding: 28px;
    grid-template-columns: 1fr;
  }
}

/* =========================
   CELULAR
========================= */
@media (max-width: 768px) {
  .header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    height: auto;
  }

  .social {
    height: 40px;
  }

  .social-icons {
    width: 100%;
    margin-left: 0;
    justify-content: center;
    gap: 18px;
  }

  .menu {
    min-height: 88px;
    height: auto;
    padding: 0 14px;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
  }

  .menu-logo img {
    height: 58px;
  }

  .menu-toggle {
    display: inline-flex;
    margin-right: 8px;
  }

  .menu-nav {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #4328a5;
    border-top: 1px solid rgba(255,255,255,0.14);
    padding: 14px 0 16px;
    margin: 0;
  }

  .menu-nav.is-open {
    display: flex;
  }

  .menu-nav__item {
    display: block;
    padding: 0;
    text-align: left;
  }

  .menu-nav__item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    font-size: 18px;
    color: #fff;
    text-decoration: none;
  }

  .menu-nav__item.mega-dropdown > a::after {
    content: "▲";
    font-size: 14px;
    margin-left: auto;
    transition: transform 0.25s ease;
  }

  .menu-nav__item.mega-dropdown.is-open > a::after {
    transform: rotate(180deg);
  }

  .mega-dropdown::after,
  .mega-menu,
  .mega-dropdown:hover .mega-menu {
    display: none !important;
  }

  .mobile-products-panel {
    display: none;
    background: rgba(255,255,255,0.08);
    border-radius: 14px;
    margin: 4px 12px 12px;
    padding: 10px 12px;
  }

  .mega-dropdown.is-open .mobile-products-panel {
    display: block;
  }

  .mobile-products-group {
    border-bottom: 1px solid rgba(255,255,255,0.18);
    padding: 12px 0;
  }

  .mobile-products-group:last-child {
    border-bottom: none;
  }

  .mobile-products-title {
    display: block;
    color: #fff;
    font-size: 17px;
    text-decoration: none;
    margin-bottom: 8px;
    font-family: var(--font-secondary-1);
  }

  .mobile-products-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .mobile-products-links a {
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    font-size: 15px;
    line-height: 1.35;
  }

  .mobile-products-links a.ver-todo {
    color: #FCC804;
    font-family: var(--font-secondary-1);
  }

  .menu-nav__item--cart {
    padding: 8px 16px 0;
  }

  .cart-trigger {
    width: auto;
    min-width: 138px;
    justify-content: center;
    margin: 0;
  }

  .home-main {
    margin-top: 128px;
    min-height: calc(100vh - 128px);
  }

  .main-container {
    min-height: calc(100vh - 128px);
    padding: 0 14px;
  }


  .home-content,
  .products,
  .services,
  .promotions,
  .related-section {
    width: calc(100% - 24px);
    margin-left: auto;
    margin-right: auto;
  }

  .category-grid,
  .product-grid-home,
  .products-grid,
  .related-grid,
  .services-grid-juegos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .benefits-grid-home {
    grid-template-columns: 1fr;
  }

  .products-grid,
  .services-grid-juegos {
    margin-top: 28px;
  }

  .product-card-home,
  .cartas,
  .related-card,
  .juegos {
    padding: 12px;
  }

  .product-card-home img,
  .cartas img,
  .related-card img {
    height: 140px;
    max-height: 140px;
    object-fit: contain;
  }

  .juegos-img {
    height: 170px;
  }

  .product-card-home h3,
  .cartas h3,
  .related-card h3,
  .juegos h3 {
    font-size: 16px;
    line-height: 1.2;
  }

  .btn-home,
  .cartas .add-cart-btn,
  .related-card a,
  .service-cart-btn,
  .btn-consultar {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
  }

  .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: calc(100% - 24px);
    margin: 116px auto 24px;
    padding: 18px 16px 22px;
    align-items: start;
  }

  .gallery {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .main-image-box {
    width: 100%;
    max-width: 270px;
    height: 340px;
    margin: 0 auto;
  }

  .thumbnails {
    width: 100%;
    justify-content: center;
    gap: 10px;
  }

  .thumbnail {
    width: 62px;
    height: 62px;
  }

  .product-info {
    width: 100%;
    text-align: left;
  }

  .product-info h1 {
    font-size: 28px;
    line-height: 1.15;
    margin-bottom: 10px;
  }

  .desc {
    font-size: 18px;
    line-height: 1.6;
    margin-top: 14px;
    margin-bottom: 22px;
  }

  .cart-box {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .quantity-selector {
    width: 100%;
    justify-content: center;
  }

  .add-cart-btn {
    width: 100%;
  }

  .service-actions,
  .juegos .service-actions,
  .casas-info .service-actions,
  .cart-actions-bottom {
    flex-direction: column;
  }

  .service-actions button,
  .service-actions a,
  .cart-actions-bottom button {
    width: 100%;
    min-width: 0;
  }

  .footer-tl__container {
    flex-direction: column;
  }
}

/* =========================
   CELULAR PEQUEÑO
========================= */
@media (max-width: 480px) {
  .menu-logo img {
    height: 56px;
  }

  .menu-toggle {
    margin-right: 10px;
  }


  .category-card,
  .product-card-home,
  .benefit-card-home,
  .related-card,
  .juegos,
  .cartas {
    padding: 10px;
  }

  .product-card-home img,
  .related-card img,
  .cartas img {
    height: 120px;
    max-height: 120px;
    object-fit: contain;
  }

  .juegos-img {
    height: 150px;
  }

  .main-image-box {
    height: 260px;
  }

  .thumbnail {
    width: 58px;
    height: 58px;
  }

  .product-info h1 {
    font-size: 26px;
  }

  .desc {
    font-size: 16px;
    line-height: 1.6;
  }

  .price,
  .precio {
    font-size: 20px;
  }

  .cart-drawer {
    max-width: 100%;
  }
}
/* =========================
   TOUCH DEVICES
========================= */
@media (hover: none) and (pointer: coarse) {
  .cartas-img:hover .img-hover,
  .juegos:hover .juegos-img .img-hover-services,
  .juegos:hover .juegos-img .img-principal-services,
  .category-card:hover,
  .product-card-home:hover,
  .cartas:hover,
  .juegos:hover {
    transform: none;
  }

  .cartas-img .img-hover,
  .juegos-img .img-hover-services {
    display: none;
  }

  .main-image-box {
    cursor: default;
  }
}
