/* TECHOME: portrait AND landscape layouts. Loaded last so it can fine-tune everything before it. */

/* ---- tablets and small laptops: keep the 3D cubes off the headline ---- */
@media (max-width:999px){.s3-obj.c1,.s3-obj.c4{display:none}}

/* ---- phones turned sideways (short screens): compact header, side-by-side hero, 2-column product window ---- */
@media (orientation:landscape) and (max-height:520px){
  /* header and promo bar take far less room */
  .topbar{font-size:.72rem;padding:4px 30px 4px 8px}
  .nav{padding-top:0;padding-bottom:0}
  header .wrap.nav,.nav{min-height:0}
  .nav .logo img{height:26px}
  .nav nav{gap:14px;font-size:.85rem}
  .nav nav a{white-space:nowrap}
  .nav .actions{gap:6px}
  .nav .actions button,.nav .actions .btn,.user-btn,.cart-btn,#wishBtn{padding-top:5px;padding-bottom:5px;min-height:0}
  .user-btn{white-space:nowrap;font-size:.8rem}.user-btn span{display:none}
  .nav nav{top:44px}

  /* hero: text left, photo right, deal card underneath */
  .hero{padding:14px 0 22px}
  .hero .wrap,.hero.has-deal .wrap{grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:16px;align-items:center}
  .hero .art,.hero .art.person,.hero.has-deal .art.person{order:0;max-width:min(250px,62vh);justify-self:center}
  .hero h1,.hero.has-deal h1{font-size:clamp(1.5rem,4.2vw,2.2rem);margin-bottom:8px}
  .hero p{font-size:.92rem;margin-bottom:12px}
  .hero .cta .btn{padding:9px 16px;font-size:.9rem}
  .hdeal{grid-column:1/-1;max-width:560px;width:100%;margin:6px auto 0}
  /* 3D scene: keep only the quiet parts so nothing covers the words */
  .s3-obj.lap,.s3-obj.c1,.s3-obj.c3,.s3-obj.c4,.s3-obj.ph{display:none}
  .s3-obj.c2{right:2%;bottom:6%;--s:38px}.s3-obj.r1{right:-8%;top:-10%;--s:130px}

  /* floating buttons smaller so they do not cover content */
  .wa-float{width:44px;height:44px;right:10px;bottom:10px}.wa-float svg{width:26px;height:26px}
  #callFloat{width:40px;height:40px;right:12px;bottom:62px}
  #toTop{width:38px;height:38px;bottom:10px}
  .toast{bottom:20px}

  /* product window: photos left, details right, scrolls inside */
  #prodModal.modal.wide{padding:14px 16px}
  #prodModal .pgrid{grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr)!important;gap:16px}
  #prodModal .pmain{height:min(240px,58vh)}
  .pbar{margin:-14px -16px 10px;top:-14px;padding:8px 12px}
  .pbottom{display:none!important}

  /* cart: always leave room for the item list and a scrolling form */
  .drawer header{padding:10px 16px}
  .drawer .items{min-height:56px;padding:8px 16px}
  .drawer .foot{max-height:62vh;max-height:62dvh;padding:10px 16px}
  .modal{max-height:94vh;padding:18px}
  /* shop controls and sections need less air */
  .xsec,section{scroll-margin-top:50px}
  .xsec{padding:28px 0}
}

/* ---- any phone in landscape, even taller ones: sideways cart is a bit wider ---- */
@media (orientation:landscape) and (max-height:520px) and (min-width:700px){
  .drawer{width:min(460px,60%)}
}

/* ---- notches and rounded corners (iPhone landscape): keep content out of the notch ---- */
@supports (padding:max(0px)){
  .wrap{padding-left:max(18px,env(safe-area-inset-left));padding-right:max(18px,env(safe-area-inset-right))}
  .wa-float{right:max(12px,env(safe-area-inset-right))}
  .drawer{padding-right:env(safe-area-inset-right)}
}

/* ---- big screens turned sideways or in portrait (tablets): product window uses the room ---- */
@media (min-width:701px) and (max-width:1100px) and (orientation:portrait){
  #prodModal.modal.wide{width:min(720px,94%)}
}
