/* TakShat mobile layout 1.0.0. No desktop overrides or document scroll locks. */
@media screen and (max-width:760px){
  /* Let content shrink inside flex and grid tracks instead of widening the page. */
  .pro-store :is(.shop-layout,.product-detail,.checkout-layout,.form-grid,.pro-contact-grid,.two-columns)>*,
  .pro-store :is(.product-purchase,.product-gallery,.purchase-box,.product-info,.filters label,.summary-line>span,.choice>span),
  .admin :is(.admin-workspace,.admin-main,.form-grid>*,.toolbar>*,.admin-top>*,.thb-edit-main){min-width:0}
  .pro-store :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]),select,textarea),
  .admin :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]),select,textarea){font-size:16px;max-width:100%;box-sizing:border-box}
  .pro-store :is(label,.prose,.product-title,.breadcrumbs,.summary-line,.mini-cart-item,.contact-info,.pro-footer-grid),
  .admin :is(.admin-heading,.toolbar,.form-footer){overflow-wrap:anywhere}

  /* Compact cards: full product photo, two lines of title, a single purchase row. */
  .pro-store .pro-product-card{min-width:0;border-radius:10px;box-shadow:none;display:flex;flex-direction:column}
  .pro-store .pro-product-card .product-image{padding:10px;aspect-ratio:1.16;flex:none}
  .pro-store .pro-product-card .product-image>img{object-fit:contain}
  .pro-store .pro-product-card .product-image>.product-hover-image{inset:10px;width:calc(100% - 20px);height:calc(100% - 20px)}
  .pro-store .pro-product-card .product-info{padding:9px;display:flex;flex-direction:column;flex:1;gap:0}
  .pro-store .pro-product-card .eyebrow{font-size:10px;line-height:1.6;margin:0 0 4px;letter-spacing:0;overflow-wrap:anywhere}
  .pro-store .pro-product-card .product-title{font-size:12.5px;line-height:1.65;min-height:3.3em;margin:0 0 5px;-webkit-line-clamp:2}
  .pro-store .pro-product-card .product-bottom{display:flex;flex-wrap:wrap;align-items:center;gap:3px 5px;min-height:28px;margin:6px 0 8px}
  .pro-store .pro-product-card .product-bottom>div{min-width:0;max-width:100%;line-height:1.5}
  .pro-store .pro-product-card .product-bottom strong{font-size:13px;overflow-wrap:anywhere}
  .pro-store .pro-product-card .product-bottom small{display:inline;font-size:10px;line-height:1.5;margin:0 2px 0 0}
  .pro-store .pro-product-card del{font-size:10px;line-height:1.4}
  .pro-store .pro-product-card .stock-dot{display:inline-block;font-size:10px;line-height:1.5;white-space:normal}
  .pro-store .pro-product-card .stock-dot:before{display:none}
  .pro-store .pro-product-card .sale-label{font-size:10px;line-height:1.5;padding:3px 6px;inset-block-start:7px;inset-inline-start:7px}
  .pro-store .pro-product-card .card-add-form{display:grid;grid-template-columns:40px minmax(0,1fr);gap:5px;margin-top:auto}
  .pro-store .pro-product-card .card-add-form input[type=number]{width:100%;min-width:0;min-height:44px;height:44px;font-size:16px;padding:2px;text-align:center;border-radius:7px}
  .pro-store .pro-product-card .card-add-form .btn{min-width:0;min-height:44px;height:auto;font-size:11px;padding:6px 3px;gap:3px;border-radius:7px;white-space:normal;line-height:1.5}
  .pro-store .pro-product-card .card-add-form .icon{width:14px;height:14px}
  .pro-store .pro-product-card .card-select{min-height:44px;min-width:0;margin-top:auto;font-size:11px;line-height:1.6;padding:6px 4px;border-radius:7px;white-space:normal}
  .pro-store .pro-product-card .tsrvc{padding:3px 0;margin:0;border:0;background:transparent;border-radius:0;gap:3px 5px;min-height:28px;box-shadow:none;flex-wrap:wrap}
  .pro-store .pro-product-card .tsrvc-stars{flex-basis:65px;width:65px;height:13px}
  .pro-store .pro-product-card :is(.tsrvc-stars>svg,.tsrvc-fill>svg){width:65px;height:13px}
  .pro-store .pro-product-card .tsrvc-number{font-size:11px}
  .pro-store .pro-product-card .tsrvc-count{font-size:10px;line-height:1.5}

  /* Galleries can hold any number of photos; buying controls stay inside the panel. */
  .pro-store .gallery-thumbs{max-width:100%;overflow-x:auto;padding:10px 12px;gap:8px;overscroll-behavior-x:contain}
  .pro-store .gallery-thumbs>button{flex:0 0 60px;width:60px;min-height:60px}
  .pro-store .gallery-thumbs img{width:60px;height:60px;object-fit:contain}
  .pro-store .product-purchase h1{font-size:clamp(20px,5.5vw,25px);line-height:1.65;overflow-wrap:anywhere}
  .pro-store .purchase-box{padding:16px}
  .pro-store .purchase-box form>.inline{display:grid;grid-template-columns:56px minmax(0,1fr);gap:8px}
  .pro-store .purchase-box .quantity{width:56px!important;min-width:0!important;min-height:44px;padding-inline:4px}
  .pro-store .purchase-box .btn{min-width:0;white-space:normal;line-height:1.6;font-size:13px;padding:10px 8px;min-height:44px}
  .pro-store .price-large strong{font-size:clamp(22px,6vw,30px);overflow-wrap:anywhere}
  .pro-store .product-detail+.inline.section{flex-wrap:wrap;gap:10px;padding-block:22px}
  .pro-store .product-detail+.inline.section>form{flex:1 1 180px;min-width:0}
  .pro-store .product-detail+.inline.section .btn{width:100%;white-space:normal;font-size:12px;padding:10px}
  .pro-store .tabs-static{gap:12px 20px;flex-wrap:wrap;padding-block:16px}
  .pro-store :is(.prose img,.prose video,.prose iframe){max-width:100%}
  .pro-store .prose :is(pre,table){display:block;max-width:100%;overflow-x:auto}

  /* Cart: the name spans the available width, controls use a separate row. */
  .pro-store .checkout-layout{grid-template-columns:minmax(0,1fr);gap:18px}
  .pro-store .checkout-layout>.panel,.pro-store .checkout-layout>form>.panel{padding:16px}
  /* The first site-fix ships an important two-column rule; replace that rule locally. */
  .pro-store .cart-row{display:grid;grid-template-columns:64px minmax(0,1fr) auto!important;gap:10px;align-items:center;padding-block:16px}
  .pro-store .cart-row>img{grid-column:1;width:64px;height:64px}
  .pro-store .cart-row>div{grid-column:2/-1;min-width:0}
  .pro-store .cart-row h3{margin:0 0 5px;font-size:13px;line-height:1.8;overflow-wrap:anywhere}
  .pro-store .cart-row p{font-size:11px}
  .pro-store .cart-row>label{grid-column:1;display:flex;flex-direction:column;align-items:stretch;gap:3px;font-size:11px}
  .pro-store .cart-row .quantity{width:64px!important;min-width:0!important;min-height:44px;padding:6px 3px}
  .pro-store .cart-row>b{grid-column:2;margin:0;min-width:0;font-size:13px;line-height:1.7;overflow-wrap:anywhere;white-space:normal}
  .pro-store .cart-row>.tfx-remove{grid-column:3;min-width:44px;min-height:44px;padding:8px;font-size:12px}
  .pro-store .order-summary{position:static}
  .pro-store .summary-line{gap:8px 12px;flex-wrap:wrap}
  .pro-store .summary-line>span{flex:1 1 120px}
  .pro-store .summary-line>b{max-width:100%;overflow-wrap:anywhere;white-space:normal}
  .pro-store .choice{align-items:flex-start}
  .pro-store .choice input{flex-shrink:0}
  .pro-store .form-grid label{min-width:0}
  .pro-store .pro-newsletter .inline{gap:8px}
  .pro-store .pro-newsletter .inline>input{flex:1;width:0;min-height:44px}
  .pro-store .pro-newsletter .btn{flex-shrink:0;padding-inline:12px}
  .pro-store .pro-header :is(.pro-icon-btn,.pro-account,.pro-cart-button){width:44px;height:44px;min-width:44px;display:grid;place-items:center;padding:0}
  .pro-store .pro-header-tools{gap:2px}

  /* Dialogs scroll internally without freezing the page or losing bottom actions. */
  .pro-store .pro-dialog{max-width:calc(100vw - 24px);padding-inline:18px;max-height:calc(100dvh - 24px);overscroll-behavior-y:contain}
  .pro-store .dialog-close{width:44px;height:44px;top:4px;left:4px}
  .pro-store .pro-cart-drawer{max-width:100%;max-height:100dvh;padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))}
  .pro-store .mini-cart-item{grid-template-columns:52px minmax(0,1fr) 44px;gap:8px}
  .pro-store .mini-cart-item img{width:52px;height:64px}
  .pro-store .mini-cart-item button{min-width:44px;min-height:44px}
  .pro-store .mini-cart-total{gap:12px;flex-wrap:wrap}
  .pro-store .pro-toast{bottom:calc(16px + env(safe-area-inset-bottom,0px))}
  .pro-store :is(.account-tabs,.table-wrap){min-width:0;max-width:100%;overflow-x:auto}

  /* Admin tables keep their own horizontal scroll; the document remains scrollable. */
  .admin .admin-workspace{max-width:100%}
  .admin .admin-top{flex-wrap:wrap;gap:10px}
  .admin .admin-top>.inline{flex-wrap:wrap}
  .admin .admin-user{margin-inline-start:auto}
  .admin .table-wrap{min-width:0;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
  .admin .toolbar{flex-wrap:wrap}
  .admin .toolbar>input,.admin .toolbar>select{min-width:0;flex:1 1 160px}
  .admin .form-grid label{min-width:0}
  .admin :is(.thb-actions,.thb-toolbar,.form-footer)>*{max-width:100%}
}
@media screen and (max-width:380px){
  .pro-store .filters form,.pro-store .checkout-layout .form-grid{grid-template-columns:minmax(0,1fr)}
  .pro-store .checkout-layout .span2{grid-column:1/-1}
}
@media screen and (max-width:760px) and (hover:none){
  .pro-store .pro-product-card:hover,.pro-store .pro-product-card:hover .product-image>img{transform:none}
  .pro-store .pro-product-card .product-hover-image{display:none}
}
