@media(max-width:1024px){
.products-grid{grid-template-columns:repeat(3,1fr)}
.hero-grid,.feature-grid,.contact-grid,.checkout-layout{grid-template-columns:1fr}
.footer-grid{grid-template-columns:1fr 1fr}
.order-summary{position:static}
.hero-card{margin-top:24px}
.product-modal{grid-template-columns:1fr;max-width:560px}
.modal-image{min-height:240px;border-radius:20px 20px 0 0}
}

@media(max-width:768px){
.mobile-toggle{display:flex !important}
.nav-links{position:fixed;top:0;left:0;right:0;bottom:0;background:#fff;flex-direction:column;align-items:center;justify-content:center;gap:4px;transform:translateY(-110%);opacity:0;transition:transform .35s cubic-bezier(.4,0,.2,1),opacity .3s ease;z-index:150;padding:80px 24px 40px}
.nav-links.show{transform:translateY(0);opacity:1}
.nav-links li{width:100%;max-width:280px;text-align:center}
.nav-links a{font-size:1.2rem;font-weight:700;color:#17181c;padding:16px 20px;border-radius:14px;display:block}
.nav-links a:hover,.nav-links a.active{background:rgba(108,92,231,.08);color:#6c5ce7}
.nav-links a.active::after{display:none}

/* Force 2 columns on mobile, even if CMS runtime injects desktop columns */
html body[data-page="home"] .products-grid,.products-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:12px !important;width:100%;max-width:100%}
html body[data-page="home"] .category-grid,.category-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:12px !important;width:100%;max-width:100%}
html body[data-page="home"] .trust-grid,.trust-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:10px !important}
.value-stack.two{grid-template-columns:1fr}
.form-row{grid-template-columns:1fr}

html body[data-page="home"] .product-card,.product-card{min-width:0;width:100%}
html body[data-page="home"] .product-image,.product-image{height:160px !important}
html body[data-page="home"] .product-info,.product-info{padding:12px !important;min-width:0}
html body[data-page="home"] .product-name,.product-name{font-size:.9rem;line-height:1.25;margin:4px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}
html body[data-page="home"] .product-short-desc,.product-short-desc{font-size:.78rem;-webkit-line-clamp:2}
html body[data-page="home"] .product-category,.product-category{font-size:.62rem;letter-spacing:.08em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html body[data-page="home"] .product-price,.product-price{gap:6px;margin:6px 0 10px}
html body[data-page="home"] .price-current,.price-current{font-size:1rem}
html body[data-page="home"] .price-original,.price-original{font-size:.78rem}
html body[data-page="home"] .price-save,.price-save{font-size:.72rem;flex-basis:100%}
html body[data-page="home"] .product-badge,.product-badge{font-size:.6rem;padding:3px 7px;top:8px;left:8px;max-width:calc(100% - 16px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body[data-page="home"] .add-to-cart,.add-to-cart{padding:10px 8px;font-size:.82rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body[data-page="home"] .quick-view-btn,.quick-view-btn{padding:8px;font-size:.76rem}

html body[data-page="home"] .trust-grid>div,.trust-grid>div{padding:10px !important;gap:2px}
html body[data-page="home"] .trust-grid strong,.trust-grid strong{font-size:.82rem;line-height:1.25}
html body[data-page="home"] .trust-grid span,.trust-grid span{font-size:.72rem;line-height:1.3}

html body[data-page="home"] .category-card,.category-card{padding:18px 16px !important}
html body[data-page="home"] .category-card h3,.category-card h3{font-size:.95rem}
html body[data-page="home"] .category-card p,.category-card p{font-size:.82rem}

.hero-actions,.newsletter-form{flex-direction:column}
.hero-actions .btn,.newsletter-form input,.newsletter-form .btn{width:100%}
.footer-grid{grid-template-columns:1fr 1fr}
.footer-bottom{flex-direction:column;gap:8px;align-items:flex-start}
.shop-layout{grid-template-columns:1fr;width:100%;max-width:100%}
.shop-sidebar{order:2}
.shop-toolbar{flex-direction:column;gap:8px;align-items:flex-start}
.deals-hero h1{font-size:2rem}
.countdown-number{font-size:1.5rem;min-width:56px}
.product-modal{grid-template-columns:1fr;max-width:92vw}
.modal-image{min-height:200px;border-radius:20px 20px 0 0}
.modal-body{padding:20px}
.cart-sidebar{width:100%;max-width:100%}
.hero{padding:50px 0}
.section{padding:48px 0}
.section-header{margin-bottom:24px}
.section-header h2{font-size:1.6rem}
.section-header p{font-size:.9rem}
.page-header{padding:48px 0}
.page-header h1{font-size:1.8rem}
}

@media(max-width:480px){
html body[data-page="home"] .products-grid,.products-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:10px !important}
html body[data-page="home"] .category-grid,.category-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:10px !important}
html body[data-page="home"] .trust-grid,.trust-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:8px !important}
.hero h1{font-size:2rem}
.hero-stats{flex-wrap:wrap;gap:16px}
html body[data-page="home"] .product-image,.product-image{height:140px !important}
html body[data-page="home"] .product-info,.product-info{padding:10px !important}
html body[data-page="home"] .product-name,.product-name{font-size:.85rem}
html body[data-page="home"] .product-short-desc,.product-short-desc{font-size:.74rem}
html body[data-page="home"] .product-category,.product-category{font-size:.6rem}
html body[data-page="home"] .price-current,.price-current{font-size:.95rem}
html body[data-page="home"] .price-original,.price-original{font-size:.74rem}
html body[data-page="home"] .price-save,.price-save{font-size:.7rem}
html body[data-page="home"] .add-to-cart,.add-to-cart{padding:9px 6px;font-size:.78rem}
html body[data-page="home"] .product-badge,.product-badge{font-size:.58rem;padding:2px 6px}
html body[data-page="home"] .category-card,.category-card{padding:14px 12px !important}
html body[data-page="home"] .category-card h3,.category-card h3{font-size:.9rem}
html body[data-page="home"] .category-card p,.category-card p{font-size:.78rem}
html body[data-page="home"] .trust-grid>div,.trust-grid>div{padding:9px !important}
html body[data-page="home"] .trust-grid strong,.trust-grid strong{font-size:.78rem}
html body[data-page="home"] .trust-grid span,.trust-grid span{font-size:.68rem}
.container{padding:0 12px}
.announcement-bar{font-size:.76rem;padding:8px 12px}
.nav-container{height:54px;padding:0 12px}
.countdown{flex-wrap:wrap;gap:10px}
}

@media(max-width:360px){
html body[data-page="home"] .products-grid,.products-grid{gap:8px !important}
html body[data-page="home"] .category-grid,.category-grid{gap:8px !important}
html body[data-page="home"] .product-image,.product-image{height:120px !important}
html body[data-page="home"] .product-info,.product-info{padding:8px !important}
html body[data-page="home"] .product-name,.product-name{font-size:.8rem}
html body[data-page="home"] .price-current,.price-current{font-size:.88rem}
html body[data-page="home"] .add-to-cart,.add-to-cart{padding:8px 4px;font-size:.74rem}
.container{padding:0 10px}
}

@media(max-width:768px){.account-link{padding:9px 10px}.account-link span{display:none}.checkout-layout{gap:16px;padding:22px 0 34px}.checkout-account-banner{flex-direction:column;align-items:flex-start;padding:14px}.checkout-section,.order-summary,.auth-card,.card-lite{padding:18px}.payment-gateway-grid{grid-template-columns:1fr}.payment-gateway-btn{min-height:76px}.checkout-payment-copy{margin-bottom:12px}.auth-shell{grid-template-columns:1fr}.auth-tabs{gap:8px}.auth-tab{padding:11px 12px}.account-actions{grid-template-columns:1fr}.footer-grid{grid-template-columns:1fr}}
@media(max-width:480px){.checkout-section-head{flex-direction:column;align-items:flex-start}.checkout-account-banner .btn{width:100%}.form-group{margin-bottom:12px}.payment-buttons .btn,.payment-gateway-btn{padding:13px 14px}.order-item{grid-template-columns:40px 1fr auto}.auth-card,.card-lite,.order-summary{border-radius:18px}.page-header h1{font-size:1.7rem}}

@media(max-width:768px){.price-range{grid-template-columns:1fr}.price-range .btn{grid-column:auto;width:100%}.hero-media{min-height:260px;width:100%;padding:12px}.hero-visual-image{min-height:260px}.social-auth-grid{grid-template-columns:1fr}}
@media(max-width:480px){.hero-media{min-height:220px;border-radius:24px}.hero-visual-image{min-height:220px}}

@media(max-width:768px){.checkout-account-banner>*{max-width:100%}.account-link{max-width:44px;padding:0}.account-link span{display:none}}


/* === NOVATV MOBILE HARDENING START === */
@media (max-width: 768px){
  html,body{overflow-x:hidden !important}
  .container,.section,.hero,.page-header,.shop-layout,.checkout-layout,.contact-grid,.auth-shell,.footer-grid,.hero-grid,.products-grid,.category-grid,.trust-grid{width:100%;max-width:100%;min-width:0}
  .shop-layout > *, .checkout-layout > *, .contact-grid > *, .auth-shell > *, .hero-grid > *, .products-grid > *, .category-grid > *, .trust-grid > *{min-width:0}
  img,video,canvas,svg,iframe,table{max-width:100%}
  .btn,.btn-block,.add-to-cart,.quick-view-btn,.payment-gateway-btn,.social-auth-btn{max-width:100%}
  .product-card,.category-card,.card-lite,.auth-card,.checkout-section,.order-summary,.shop-sidebar{min-width:0;overflow:hidden}
  .product-name,.product-short-desc,.product-category,.page-header h1,.page-header p,.section-header h2,.section-header p{overflow-wrap:anywhere;word-break:break-word}
  .hero-actions,.account-actions,.newsletter-form,.payment-buttons,.social-auth-grid{width:100%;max-width:100%}
  .shop-toolbar,.checkout-section-head,.account-favorites-header{min-width:0}
}
@media (max-width: 480px){
  .footer-bottom{overflow-wrap:anywhere}
  .countdown-number{min-width:50px}
  .hero-actions .btn,.newsletter-form .btn,.newsletter-form input,.account-actions .btn{width:100%}
}
/* === NOVATV MOBILE HARDENING END === */


/* Mobile quick-view centering */
@media(max-width:768px){
  .product-modal-overlay{padding:12px !important;align-items:center !important;justify-content:center !important}
  .product-modal{max-width:94vw !important;width:94vw !important;max-height:88vh !important;margin:0 auto !important;border-radius:22px !important}
  .modal-image{min-height:180px !important;display:flex !important;align-items:center !important;justify-content:center !important}
  .modal-image img{width:100% !important;height:100% !important;object-fit:cover !important;display:block !important;margin:0 auto !important}
  .modal-body{padding:18px !important;align-items:center !important;text-align:center !important}
  .modal-body h2{font-size:1.22rem !important}
  .modal-body .modal-desc{max-width:32ch !important;margin-left:auto !important;margin-right:auto !important}
  .modal-features{max-width:100% !important;margin:0 auto 18px !important}
  .modal-body .product-price{justify-content:center !important}
  .upsell-section{margin-top:16px !important}
}


/* Final mobile quick-view polish */
@media(max-width:768px){
  .product-modal-overlay{padding:10px !important}
  .product-modal{width:min(94vw,520px) !important;max-width:min(94vw,520px) !important;max-height:90vh !important;border-radius:24px !important}
  .modal-image{min-height:190px !important;background:linear-gradient(180deg,#f8f7ff 0%,#eef7ff 100%) !important}
  .modal-body{padding:18px 16px 20px !important;gap:10px !important}
  .modal-body .product-category{font-size:.74rem !important}
  .modal-body h2{font-size:1.18rem !important;line-height:1.28 !important;margin:0 !important}
  .modal-body .product-rating{font-size:.95rem !important}
  .modal-body .modal-desc{font-size:.88rem !important;line-height:1.65 !important;max-width:34ch !important}
  .modal-body .price-current{font-size:1.55rem !important}
  .modal-features{padding:12px 14px !important;border-radius:16px !important}
  .modal-features li{font-size:.9rem !important}
  .modal-body .add-to-cart,.modal-body .favorite-toggle--modal{padding:13px 14px !important}
  .upsell-section h4{text-align:center !important}
  .upsell-grid{gap:12px !important;scroll-snap-type:x proximity}
  .upsell-card{scroll-snap-align:start}
}

/* 2026-06-20 hotfix: stronger mobile quick-view centering */
@media (max-width: 767px){
  .product-modal-overlay{padding:10px !important;align-items:center !important;justify-content:center !important;}
  .product-modal{margin:0 auto !important;left:auto !important;right:auto !important;transform:none !important;}
  .product-modal-overlay.active .product-modal{transform:none !important;}
  .modal-body{display:flex !important;flex-direction:column !important;align-items:center !important;justify-content:center !important;text-align:center !important;}
  .modal-body > *{margin-left:auto !important;margin-right:auto !important;}
  .modal-features{display:grid !important;justify-items:center !important;align-items:center !important;text-align:center !important;width:100% !important;max-width:34ch !important;margin:0 auto 18px !important;padding:12px 14px !important;}
  .modal-features li{justify-content:center !important;text-align:center !important;width:100% !important;}
  .modal-body .product-price,.modal-body .product-actions{justify-content:center !important;align-items:center !important;width:100% !important;}
  .modal-body .add-to-cart,.modal-body .quick-view-btn,.modal-body .favorite-toggle--modal{margin-left:auto !important;margin-right:auto !important;}
}

/* 2026-06-20 hotfix 2: hard-center quick view mobile */
@media (max-width: 767px){
  .product-modal{display:flex !important;flex-direction:column !important;grid-template-columns:none !important;}
  .modal-body{display:flex !important;flex-direction:column !important;align-items:center !important;justify-content:center !important;text-align:center !important;padding:18px 16px 20px !important;}
  .modal-body .product-category,.modal-body h2,.modal-body .product-rating,.modal-body .modal-desc,.modal-body .product-price,.modal-body .price-save,.modal-body .product-actions{width:100% !important;text-align:center !important;justify-content:center !important;margin-left:auto !important;margin-right:auto !important;}
  .modal-features{width:100% !important;max-width:34ch !important;margin:0 auto 18px !important;padding:12px 14px !important;text-align:center !important;}
  .modal-features li{display:block !important;width:100% !important;text-align:center !important;justify-content:center !important;padding:8px 0 !important;}
  .modal-features li::before{display:none !important;}
  .modal-body .product-actions{display:flex !important;flex-direction:column !important;align-items:center !important;gap:8px !important;}
  .modal-body .add-to-cart,.modal-body .quick-view-btn,.modal-body .favorite-toggle--modal{width:100% !important;max-width:100% !important;margin-left:auto !important;margin-right:auto !important;}
}
