/*
 * Tormami Responsive System
 * Final public-frontend hardening layer. This intentionally focuses on layout
 * safety, touch/accessibility, overflow prevention and shared component
 * behavior without changing marketplace business logic.
 */

html{
  max-width:100%;
  overflow-x:clip;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

body.tormami-responsive-system{
  width:100%;
  max-width:100%;
  overflow-x:clip;
  --tmr-focus:#ff5a0a;
  --tmr-focus-ring:rgba(255,90,10,.18);
  --tmr-mobile-gutter:14px;
}

body.tormami-responsive-system *,
body.tormami-responsive-system *::before,
body.tormami-responsive-system *::after{
  box-sizing:border-box;
}

body.tormami-responsive-system :where(main,section,article,aside,nav,header,footer,form,fieldset,div){
  min-width:0;
}

body.tormami-responsive-system :where(img,video,canvas,picture,svg){
  max-width:100%;
}

body.tormami-responsive-system :where(.entry-content,.tm-legal-body,.tud2-main,.tep-page,.tpv-page) img{
  height:auto;
}

body.tormami-responsive-system :where(h1,h2,h3,h4,h5,h6,p,li,dd,dt,blockquote){
  overflow-wrap:anywhere;
  word-break:normal;
}

body.tormami-responsive-system :where(input,select,textarea,button){
  max-width:100%;
  font-family:inherit;
}

body.tormami-responsive-system textarea{
  resize:vertical;
}

body.tormami-responsive-system :where(button,[role="button"],input[type="button"],input[type="submit"],input[type="reset"],select){
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}

body.tormami-responsive-system :where(a,button,input,select,textarea,[tabindex]):focus-visible{
  outline:3px solid var(--tmr-focus-ring)!important;
  outline-offset:2px!important;
}

body.tormami-responsive-system :where(button,input,select,textarea):disabled{
  cursor:not-allowed;
}

body.tormami-responsive-system :where(iframe,embed,object){
  max-width:100%;
}

/* Flex/grid children must be allowed to shrink instead of forcing horizontal overflow. */
body.tormami-responsive-system :where(
  .row,
  .container,
  .container-fluid,
  [class*="-grid"],
  [class*="-layout"],
  [class*="-row"],
  [class*="-actions"],
  [class*="-toolbar"],
  [class*="-head"]
)>*{
  min-width:0;
}

/* Shared media/card safety. */
body.tormami-responsive-system :where(
  .tsr-card-image,
  .tcv-card-image,
  .tlp-gallery-stage,
  .tlp-related-image,
  .tpv-listing-image,
  .tud2-ad-image
){
  overflow:hidden;
}

body.tormami-responsive-system :where(
  .tsr-card-image img,
  .tcv-card-image img,
  .tlp-gallery-stage img,
  .tlp-related-image img,
  .tpv-listing-image img,
  .tud2-ad-image img
){
  max-width:none;
}

/* Accessible horizontal scrolling for genuinely wide tables. */
body.tormami-responsive-system .tormami-table-scroll{
  width:100%;
  max-width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  margin:16px 0;
  border-radius:12px;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
}

body.tormami-responsive-system .tormami-table-scroll:focus-visible{
  outline:3px solid var(--tmr-focus-ring);
  outline-offset:2px;
}

body.tormami-responsive-system .tormami-table-scroll>table{
  margin:0!important;
  min-width:max(100%,640px);
}

/* Pagination should wrap rather than leave the viewport. */
body.tormami-responsive-system :where(
  .pagination,
  .page-numbers,
  .tsr-pagination ul,
  .tcv-pagination ul,
  .tud2-pagination,
  .woocommerce-pagination ul
){
  max-width:100%;
  flex-wrap:wrap!important;
}

/* Shared popup/modal safety. */
body.tormami-responsive-system :where(
  .modal-dialog,
  .modal-content,
  [role="dialog"],
  .tmh-location-panel,
  .tormami-login-modal,
  .tormami-auth-modal
){
  max-width:calc(100vw - 24px)!important;
}

body.tormami-responsive-system :where(.modal-content,[role="dialog"]){
  max-height:calc(100dvh - 24px);
}

/* Keep the public shell comfortably bounded on very large screens. */
@media(min-width:1920px){
  body.tormami-responsive-system :where(
    .tmf-container,
    .tsr-shell,
    .tcv-shell,
    .tlp-shell,
    .tm-legal-shell
  ){
    max-width:1560px;
    margin-left:auto;
    margin-right:auto;
  }
}

/* Laptop/tablet transition: prevent action rows from colliding. */
@media(max-width:1180px){
  body.tormami-responsive-system :where(
    .tsr-toolbar-actions,
    .tcv-toolbar-actions,
    .tpv-head-actions,
    .tud2-panel-head,
    .tmf-cta-actions
  ){
    flex-wrap:wrap;
  }
}

@media(max-width:1024px){
  body.tormami-responsive-system :where(
    .tsr-shell,
    .tcv-shell,
    .tlp-shell,
    .tm-legal-shell,
    .tmf-container
  ){
    max-width:calc(100% - 28px);
  }

  body.tormami-responsive-system :where(
    .tsr-card,
    .tcv-card,
    .tpv-listing,
    .tlp-related-card
  ){
    min-width:0;
  }
}

/* Tablet/mobile shell rules. */
@media(max-width:820px){
  body.tormami-responsive-system{
    --tmr-mobile-gutter:14px;
  }

  body.tormami-responsive-system :where(
    input[type="text"],
    input[type="search"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    input[type="password"],
    select,
    textarea
  ){
    font-size:16px!important;
  }

  body.tormami-responsive-system :where(
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    select,
    .button,
    .btn
  ){
    min-height:44px;
  }

  body.tormami-responsive-system :where(
    .tsr-toolbar,
    .tcv-toolbar,
    .tpv-page-head,
    .tud2-welcome,
    .tmf-cta
  ){
    max-width:100%;
  }

  body.tormami-responsive-system :where(
    .tsr-toolbar-actions,
    .tcv-toolbar-actions,
    .tpv-head-actions
  ){
    min-width:0;
  }

  body.tormami-responsive-system :where(
    .tsr-sort-control,
    .tcv-sort-control
  ){
    min-width:0;
  }

  body.tormami-responsive-system :where(
    .tsr-sort-control select,
    .tcv-sort-control select
  ){
    max-width:100%!important;
  }

  body.tormami-responsive-system .tmf-cta-actions{
    width:100%;
  }
}

/* Phones: stack only where it improves usability. Compact actions stay compact. */
@media(max-width:620px){
  body.tormami-responsive-system :where(
    .tsr-shell,
    .tcv-shell,
    .tlp-shell,
    .tm-legal-shell,
    .tmf-container
  ){
    width:calc(100% - 22px)!important;
    max-width:none!important;
  }

  body.tormami-responsive-system :where(
    .tsr-toolbar-actions,
    .tcv-toolbar-actions
  ){
    width:100%!important;
  }

  body.tormami-responsive-system :where(
    .tsr-sort,
    .tcv-sort
  ){
    min-width:0;
  }

  body.tormami-responsive-system :where(
    .tsr-sort-control,
    .tcv-sort-control
  ){
    flex:1 1 auto;
  }

  body.tormami-responsive-system :where(
    .tsr-view-switch,
    .tcv-view-switch
  ){
    flex:0 0 auto;
  }

  body.tormami-responsive-system :where(
    .tud2-table-wrap,
    .tud2-recent-wrap,
    .woocommerce table.shop_table
  ){
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  body.tormami-responsive-system :where(
    .tmf-btn,
    .ta-submit,
    .tsr-apply,
    .tcv-apply,
    .tlp-send
  ){
    min-height:46px;
  }

  body.tormami-responsive-system :where(
    .tsr-list-view-cta,
    .tpv-head-actions a,
    .tmh-action-link,
    .tmh-sell
  ){
    width:auto!important;
  }
}

@media(max-width:430px){
  body.tormami-responsive-system{
    --tmr-mobile-gutter:10px;
  }

  body.tormami-responsive-system :where(
    .tsr-shell,
    .tcv-shell,
    .tlp-shell,
    .tm-legal-shell,
    .tmf-container
  ){
    width:calc(100% - 18px)!important;
  }

  body.tormami-responsive-system :where(
    h1,
    .tm-legal-hero h1,
    .tlp-hero h1,
    .tpv-page-head h1
  ){
    max-width:100%;
  }

  body.tormami-responsive-system :where(
    .tsr-view-switch button,
    .tcv-view-switch button,
    .tmh-action-link
  ){
    min-width:44px!important;
    min-height:44px!important;
  }

  body.tormami-responsive-system .tmf-cta-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system .tmf-cta-actions .tmf-btn{
    width:100%!important;
  }
}

@media(max-width:390px){
  body.tormami-responsive-system :where(
    .tsr-shell,
    .tcv-shell,
    .tlp-shell,
    .tm-legal-shell,
    .tmf-container
  ){
    width:calc(100% - 16px)!important;
  }

  body.tormami-responsive-system :where(
    .tsr-toolbar,
    .tcv-toolbar,
    .tm-legal-section-card,
    .tpv-summary,
    .tpv-card,
    .tpv-listings-card
  ){
    border-radius:12px!important;
  }
}

@media(max-width:360px){
  body.tormami-responsive-system :where(
    .tsr-toolbar,
    .tcv-toolbar,
    .tmf-cta,
    .tm-legal-section-card
  ){
    padding-left:12px!important;
    padding-right:12px!important;
  }

  body.tormami-responsive-system :where(
    .tsr-view-switch,
    .tcv-view-switch
  ){
    gap:6px!important;
  }
}

@media(max-width:320px){
  body.tormami-responsive-system :where(
    .tsr-shell,
    .tcv-shell,
    .tlp-shell,
    .tm-legal-shell,
    .tmf-container
  ){
    width:calc(100% - 12px)!important;
  }

  body.tormami-responsive-system :where(
    .tsr-toolbar-actions,
    .tcv-toolbar-actions
  ){
    gap:7px!important;
  }

  body.tormami-responsive-system :where(
    .tsr-view-switch button,
    .tcv-view-switch button,
    .tmh-action-link
  ){
    min-width:42px!important;
    width:42px!important;
  }
}

/* Honor reduced-motion preferences without removing useful state changes. */
@media(prefers-reduced-motion:reduce){
  body.tormami-responsive-system *,
  body.tormami-responsive-system *::before,
  body.tormami-responsive-system *::after{
    scroll-behavior:auto!important;
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
  }
}


/* ============================================================
   Production-wide responsive consolidation V2
   Loaded last across all public WordPress pages. These rules intentionally
   harden layout geometry and accessibility without changing business logic.
   ============================================================ */

/* ---------- Shared layout tokens ---------- */
body.tormami-responsive-system{
  --tmr-page-max:1560px;
  --tmr-gutter-desktop:24px;
  --tmr-gutter-tablet:14px;
  --tmr-gutter-phone:9px;
  --tmr-control-min:44px;
  --tmr-radius-sm:10px;
  --tmr-radius-md:14px;
}

body.tormami-responsive-system :where(
  .container,.adt-container,.tmf-container,.tsr-shell,.tcv-shell,.tlp-shell,
  .tep-shell,.tppol-shell,.tldoc-shell,.tbso-shell,.tmseo-sitemap,
  .woocommerce .container,.woocommerce-page .container
){
  min-width:0;
}

/* Never let generic Bootstrap/theme rows create viewport overflow. */
body.tormami-responsive-system :where(.row){
  max-width:100%;
}

body.tormami-responsive-system :where(.row):not(.g-0):not(.gx-0){
  min-width:0;
}

/* Wide unbroken values such as URLs, IDs and imported listing text stay inside cards. */
body.tormami-responsive-system :where(
  .entry-content,.page-content,.card,.panel,.widget,.tsr-card,.tcv-card,
  .tpv-card,.tud2-panel,.tep-card,.tm-legal-body,.woocommerce
){
  overflow-wrap:anywhere;
}

/* Media is fluid by default; dedicated image frames may still crop via object-fit. */
body.tormami-responsive-system :where(img,video,canvas,picture){
  height:auto;
}

body.tormami-responsive-system :where(
  .tsr-card-image img,.tcv-card-image img,.tlp-gallery-stage img,.tlp-related-image img,
  .tpv-listing-image img,.tud2-ad-image img,.tmh-logo img,.tmf-logo img
){
  height:100%;
}

/* ---------- Header ---------- */
body.tormami-responsive-system .tormami-global-market-header .tormami-market-header{
  min-width:0!important;
}

body.tormami-responsive-system .tormami-global-market-header :where(
  .tmh-logo,.tmh-location-wrap,.tmh-search,.tmh-actions
){
  min-width:0!important;
}

body.tormami-responsive-system .tormami-global-market-header .tmh-search{
  width:100%!important;
  min-width:0!important;
}

body.tormami-responsive-system .tormami-global-market-header .tmh-search-input{
  min-width:0!important;
}

body.tormami-responsive-system .tormami-global-market-header :where(
  .tmh-action-link,.tmh-sell,.tmh-search-button,.tmh-location-button
){
  flex-shrink:0;
}

/* ---------- Footer ---------- */
body.tormami-responsive-system .tormami-global-footer :where(
  .tmf-cta,.tmf-grid,.tmf-bottom,.tmf-cta-actions
){
  min-width:0;
}

body.tormami-responsive-system .tormami-global-footer .tmf-grid>*{
  min-width:0;
}

/* ---------- Forms / controls ---------- */
body.tormami-responsive-system :where(
  .form-control,.select2-container,.select2-selection,.dropzone,.woocommerce-input-wrapper,
  .tml-control,.tep-control,.tsr-search-field,.tcv-search-field
){
  max-width:100%;
}

body.tormami-responsive-system :where(.select2-container){
  width:100%!important;
}

body.tormami-responsive-system :where(
  input[type="text"],input[type="search"],input[type="email"],input[type="tel"],
  input[type="url"],input[type="number"],input[type="password"],select,textarea
){
  min-width:0;
}

body.tormami-responsive-system :where(
  button,input[type="button"],input[type="submit"],input[type="reset"],.button,.btn,
  [role="button"]
){
  line-height:1.2;
}

/* Do not globally make actions full width. */
body.tormami-responsive-system :where(
  .tmh-action-link,.tmh-sell,.tsr-list-view-cta,.tcv-list-view-cta,
  .tormami-inner-btn,.tml-create-account
){
  width:auto;
}

/* ---------- Search/category/listing cards ---------- */
body.tormami-responsive-system :where(
  .tsr-grid,.tcv-listing-grid,.latest-grid,.featured-grid,.woocommerce ul.products
){
  min-width:0;
}

body.tormami-responsive-system :where(
  .tsr-card,.tcv-card,.listing-card,.product,.tlp-related-card
){
  max-width:100%;
  min-width:0;
}

body.tormami-responsive-system :where(
  .tsr-card-body,.tcv-card-body,.listing-body,.product .woocommerce-loop-product__title
){
  min-width:0;
}

/* ---------- Product / WooCommerce ---------- */
body.tormami-responsive-system.tormami-product-shell :where(
  .adt-ads-filter-content-wrapper,.adt-ads-filter-sidebar,.adt-ads-filter-results,
  .woocommerce,.woocommerce-page,.products,.product
){
  min-width:0!important;
}

body.tormami-responsive-system :where(
  .woocommerce table.shop_table,.woocommerce form.checkout,.woocommerce-cart-form,
  .woocommerce-checkout-review-order
){
  max-width:100%;
}

body.tormami-responsive-system .woocommerce :where(
  input,select,textarea,button,.button
){
  max-width:100%;
}

/* ---------- Listing detail ---------- */
body.tormami-responsive-system.tormami-listing-detail-v7 :where(
  .adt-ad-detail-content-wrapper,.adt-ad-detail-main,.adt-ad-sidebar,
  .ad-detail-top-box,.ad-about-box,.adt-ad-description-box
){
  min-width:0!important;
  max-width:100%;
}

/* ---------- Dashboard/profile ---------- */
body.tormami-responsive-system :where(
  .tud2-layout,.tud2-main,.tud2-panel,.tud2-stats,.tud2-analytics,.tud2-bottom,
  .tep-grid,.tep-form-card,.tep-profile-card,.tpp-public-layout
){
  min-width:0;
}

body.tormami-responsive-system :where(
  .tud2-table-wrap,.tud2-recent-wrap,.tep-table-wrap
){
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

/* ---------- Legal / buyer-seller / standard content ---------- */
body.tormami-responsive-system :where(
  .tppol-root,.tldoc-root,.tbso-root,.tmseo-sitemap,.tormami-standard-page,
  .tormami-about-page,.tormami-contact-page
){
  max-width:100%;
}

body.tormami-responsive-system :where(
  .tppol-columns,.tldoc-columns,.tbso-document-layout,.tbso-hero-grid
)>*{
  min-width:0;
}

/* ---------- Login/register modals ---------- */
body.tormami-responsive-system :where(.tml-dialog,.tml-panel,.tml-visual,.tml-form){
  min-width:0;
}

body.tormami-responsive-system .tml-dialog{
  max-width:min(1120px,calc(100vw - 24px))!important;
  max-height:calc(100dvh - 24px)!important;
}

body.tormami-responsive-system :where(.tml-control input,.tml-control select){
  min-width:0!important;
}

/* ---------- 404 / empty / error states ---------- */
body.tormami-responsive-system :where(
  .error-404,.not-found,.no-results,.tsr-empty,.tcv-empty,.tpv-empty,
  .woocommerce-info,.woocommerce-error,.woocommerce-message
){
  max-width:100%;
  min-width:0;
}

/* ---------- Very large desktops ---------- */
@media(min-width:1920px){
  body.tormami-responsive-system :where(
    .tormami-global-market-header .tormami-market-header,
    .tmf-container,.tsr-shell,.tcv-shell,.tlp-shell,.tep-shell,
    .tppol-shell,.tldoc-shell,.tbso-shell
  ){
    width:min(var(--tmr-page-max),calc(100% - 64px))!important;
    max-width:var(--tmr-page-max)!important;
  }
}

/* ---------- Laptop range ---------- */
@media(max-width:1366px){
  body.tormami-responsive-system .tormami-global-market-header .tormami-market-header{
    width:calc(100% - 28px)!important;
  }

  body.tormami-responsive-system .tormami-global-footer .tmf-container{
    width:calc(100% - 36px)!important;
  }
}

@media(max-width:1180px){
  body.tormami-responsive-system :where(
    .tsr-toolbar,.tcv-toolbar,.tud2-panel-head,.tep-page-head,
    .tmf-cta,.tormami-inner-hero__inner
  ){
    min-width:0;
  }

  body.tormami-responsive-system :where(
    .tsr-toolbar-actions,.tcv-toolbar-actions,.tmf-cta-actions,
    .tud2-panel-head,.tep-page-head
  ){
    flex-wrap:wrap;
  }
}

/* ---------- Tablet landscape / small laptop ---------- */
@media(max-width:1024px){
  body.tormami-responsive-system :where(
    .tsr-shell,.tcv-shell,.tlp-shell,.tep-shell,.tppol-shell,
    .tldoc-shell,.tbso-shell,.tmf-container
  ){
    width:calc(100% - 28px)!important;
    max-width:none!important;
  }

  body.tormami-responsive-system.tormami-product-shell .adt-ads-filter-content-wrapper{
    grid-template-columns:250px minmax(0,1fr)!important;
    gap:18px!important;
  }

  body.tormami-responsive-system .tbso-document-intro,
  body.tormami-responsive-system .tbso-help{
    margin-left:0!important;
  }
}

/* ---------- Tablets ---------- */
@media(max-width:820px){
  body.tormami-responsive-system :where(
    input[type="text"],input[type="search"],input[type="email"],input[type="tel"],
    input[type="url"],input[type="number"],input[type="password"],select,textarea
  ){
    font-size:16px!important;
  }

  body.tormami-responsive-system :where(
    button,input[type="button"],input[type="submit"],input[type="reset"],
    .button,.btn,[role="button"]
  ){
    min-height:var(--tmr-control-min);
  }

  body.tormami-responsive-system .tormami-global-footer .tmf-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:28px 22px!important;
  }

  body.tormami-responsive-system.tormami-product-shell .adt-ads-filter-content-wrapper{
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system.tormami-product-shell .adt-ads-filter-sidebar{
    width:100%!important;
  }

  body.tormami-responsive-system.tormami-listing-detail-v7 .adt-ad-detail-content-wrapper{
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system.tormami-listing-detail-v7 .adt-ad-sidebar{
    position:static!important;
    width:100%!important;
  }

  body.tormami-responsive-system :where(.tppol-columns,.tldoc-columns,.tbso-document-layout){
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system .tbso-toc-inner{
    position:relative!important;
    top:auto!important;
  }

  body.tormami-responsive-system .tml-dialog{
    width:min(560px,calc(100vw - 24px))!important;
    grid-template-columns:1fr!important;
    overflow:auto!important;
  }

  body.tormami-responsive-system .tml-visual{
    display:none!important;
  }
}

/* ---------- Header/tablet transition ---------- */
@media(max-width:768px){
  body.tormami-responsive-system .tormami-global-market-header{
    position:relative!important;
    top:auto!important;
  }

  body.admin-bar.tormami-responsive-system .tormami-global-market-header{
    top:auto!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tormami-market-header{
    width:calc(100% - 20px)!important;
    min-height:0!important;
    padding:9px 0 10px!important;
    grid-template-columns:minmax(96px,118px) minmax(0,1fr)!important;
    grid-template-areas:
      "logo actions"
      "search search"
      "location location"!important;
    gap:8px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-logo{grid-area:logo!important}
  body.tormami-responsive-system .tormami-global-market-header .tmh-search{grid-area:search!important}
  body.tormami-responsive-system .tormami-global-market-header .tmh-actions{grid-area:actions!important}
  body.tormami-responsive-system .tormami-global-market-header .tmh-location-wrap{
    grid-area:location!important;
    width:100%!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-logo img{
    max-width:112px!important;
    max-height:38px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-actions{
    width:100%!important;
    justify-content:flex-end!important;
    gap:3px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-action-link{
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    min-height:44px!important;
    padding:2px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-sell{
    width:auto!important;
    min-height:44px!important;
    height:44px!important;
    padding:0 11px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-search{
    height:46px!important;
    min-height:46px!important;
    padding:4px!important;
    grid-template-columns:minmax(0,1fr) 36px!important;
    column-gap:5px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-search-input{
    height:36px!important;
    min-height:36px!important;
    line-height:36px!important;
    padding:0 9px!important;
    font-size:16px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-search-button{
    width:36px!important;
    min-width:36px!important;
    max-width:36px!important;
    height:36px!important;
    min-height:36px!important;
    max-height:36px!important;
    margin:0!important;
    padding:0!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-location-button{
    width:100%!important;
    min-height:44px!important;
  }

  body.tormami-responsive-system :where(
    .tsr-grid,.tcv-listing-grid
  ){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  body.tormami-responsive-system :where(
    .tsr-grid.is-list .tsr-card,.tcv-listing-grid.is-list .tcv-card
  ){
    grid-template-columns:150px minmax(0,1fr)!important;
  }

  body.tormami-responsive-system :where(
    .tsr-toolbar-actions,.tcv-toolbar-actions
  ){
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    width:100%!important;
  }

  body.tormami-responsive-system :where(
    .tsr-sort,.tcv-sort,.tsr-sort-control,.tcv-sort-control
  ){
    min-width:0!important;
    width:100%!important;
  }

  body.tormami-responsive-system :where(
    .tsr-sort-control select,.tcv-sort-control select
  ){
    width:100%!important;
  }
}

/* ---------- Phones ---------- */
@media(max-width:620px){
  body.tormami-responsive-system :where(
    .tsr-shell,.tcv-shell,.tlp-shell,.tep-shell,.tppol-shell,
    .tldoc-shell,.tbso-shell,.tmf-container
  ){
    width:calc(100% - 20px)!important;
    max-width:none!important;
  }

  body.tormami-responsive-system .tormami-global-footer .tmf-grid{
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system .tormami-global-footer .tmf-cta-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:9px!important;
  }

  body.tormami-responsive-system .tormami-global-footer .tmf-cta-actions .tmf-btn{
    width:100%!important;
  }

  body.tormami-responsive-system .tormami-global-footer .tmf-bottom{
    grid-template-columns:1fr!important;
    text-align:left!important;
  }

  body.tormami-responsive-system :where(
    .tsr-grid,.tcv-listing-grid
  ){
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system :where(
    .tsr-grid.is-list .tsr-card,.tcv-listing-grid.is-list .tcv-card
  ){
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system :where(
    .tsr-grid.is-list .tsr-card-image,.tcv-listing-grid.is-list .tcv-card-image
  ){
    min-height:0!important;
    aspect-ratio:16/9!important;
  }

  body.tormami-responsive-system :where(
    .tsr-list-view-cta,.tcv-list-view-cta
  ){
    width:auto!important;
    margin-left:auto!important;
  }

  body.tormami-responsive-system :where(
    .tsr-pagination-row,.tcv-pagination-row
  ){
    align-items:stretch!important;
    flex-direction:column!important;
  }

  body.tormami-responsive-system :where(
    .tep-grid,.tpp-public-layout,.tud2-stats,.tud2-analytics,.tud2-bottom
  ){
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system .tbso-values{
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system .tbso-help{
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system .tbso-help>a{
    width:100%!important;
    min-width:0!important;
  }

  body.tormami-responsive-system .tml-modal{
    padding:8px!important;
  }

  body.tormami-responsive-system .tml-dialog{
    width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - 16px)!important;
    border-radius:18px!important;
  }

  body.tormami-responsive-system .tml-panel{
    padding:48px 18px 24px!important;
  }
}

/* ---------- Narrow phones ---------- */
@media(max-width:430px){
  body.tormami-responsive-system .tormami-global-market-header .tormami-market-header{
    width:calc(100% - 16px)!important;
    grid-template-columns:100px minmax(0,1fr)!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-logo img{
    max-width:98px!important;
  }

  body.tormami-responsive-system :where(
    .tsr-toolbar-actions,.tcv-toolbar-actions
  ){
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system :where(
    .tsr-view-switch,.tcv-view-switch
  ){
    justify-content:flex-start!important;
  }

  body.tormami-responsive-system :where(
    .tud2-main,.tep-page,.tmseo-sitemap
  ){
    min-width:0!important;
  }
}

@media(max-width:390px){
  body.tormami-responsive-system :where(
    .tsr-shell,.tcv-shell,.tlp-shell,.tep-shell,.tppol-shell,
    .tldoc-shell,.tbso-shell,.tmf-container
  ){
    width:calc(100% - 16px)!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tormami-market-header{
    width:calc(100% - 14px)!important;
    grid-template-columns:96px minmax(0,1fr)!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-actions{
    gap:1px!important;
  }
}

@media(max-width:360px){
  body.tormami-responsive-system .tormami-global-market-header .tmh-action-link{
    width:42px!important;
    min-width:42px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-sell{
    padding-inline:8px!important;
  }

  body.tormami-responsive-system :where(
    .tsr-toolbar,.tcv-toolbar,.tmf-cta,.tm-legal-section-card,.tud2-panel
  ){
    padding-left:12px!important;
    padding-right:12px!important;
  }
}

@media(max-width:320px){
  body.tormami-responsive-system .tormami-global-market-header .tormami-market-header{
    width:calc(100% - 10px)!important;
    grid-template-columns:88px minmax(0,1fr)!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-logo img{
    max-width:86px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-action-link{
    width:40px!important;
    min-width:40px!important;
  }

  body.tormami-responsive-system :where(
    .tsr-shell,.tcv-shell,.tlp-shell,.tep-shell,.tppol-shell,
    .tldoc-shell,.tbso-shell,.tmf-container
  ){
    width:calc(100% - 12px)!important;
  }
}


/* ============================================================
   React auth/listing + generic WordPress hardening V2
   ============================================================ */

/* React authentication shell */
body.tormami-responsive-system :where(
  .tormami-auth-shell,.ta-main,.ta-container,.ta-auth-layout,.ta-auth-card,
  .ta-story,.ta-story__visual,.ta-footer,.ta-footer__grid
){
  min-width:0;
  max-width:100%;
}

body.tormami-responsive-system .ta-auth-card :where(input,select,textarea){
  width:100%;
  min-width:0;
}

body.tormami-responsive-system :where(
  .ta-primary-button,.ta-register-button,.ta-ghost-button,.ta-link-button,
  .ta-mobile-toggle,.ta-password-toggle
){
  touch-action:manipulation;
}

/* React listing shell */
body.tormami-responsive-system :where(
  .tlp,.tlp-content,.tlp-grid,.tlp-main-column,.tlp-sidebar,.tlp-card,
  .tlp-gallery,.tlp-summary,.tlp-related,.tlp-related-grid,.tlp-form-grid
){
  min-width:0;
  max-width:100%;
}

body.tormami-responsive-system :where(
  .tlp-gallery-stage img,.tlp-related-image img
){
  width:100%;
  max-width:100%;
}

body.tormami-responsive-system :where(
  .tlp-primary,.tlp-send,.tlp-map-button,.tlp-secondary-actions button,
  .tlp-gallery-arrow
){
  touch-action:manipulation;
}

/* Generic WordPress content and 404/error pages */
body.tormami-responsive-system :where(
  .site-content,.content-area,.main-content,.main-content-area,.static-page,
  article.page,article.post,.entry-content,.page-content
){
  min-width:0;
  max-width:100%;
}

body.error404.tormami-responsive-system :where(
  .error-404,.not-found,.page-content,.entry-content
){
  width:min(760px,calc(100% - 28px));
  max-width:760px;
  margin-left:auto;
  margin-right:auto;
}

body.error404.tormami-responsive-system :where(
  .search-form,.search-field
){
  max-width:100%;
}

/* Embedded third-party content should never escape its content column. */
body.tormami-responsive-system :where(
  iframe[src*="youtube"],iframe[src*="vimeo"],iframe[src*="maps"],
  .wp-block-embed,.wp-block-video,.wp-video
){
  width:100%;
  max-width:100%;
}

/* WordPress block layouts */
body.tormami-responsive-system :where(
  .wp-block-columns,.wp-block-group,.wp-block-media-text,.wp-block-gallery
){
  max-width:100%;
  min-width:0;
}

body.tormami-responsive-system .wp-block-columns>*{
  min-width:0;
}

/* Woo messages/actions wrap instead of colliding. */
body.tormami-responsive-system :where(
  .woocommerce-message,.woocommerce-error,.woocommerce-info
){
  overflow-wrap:anywhere;
}

body.tormami-responsive-system :where(
  .woocommerce .cart-collaterals,.woocommerce-checkout,.woocommerce-account
){
  min-width:0;
  max-width:100%;
}

@media(max-width:900px){
  body.tormami-responsive-system .tlp-grid{
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system .tlp-sidebar{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  body.tormami-responsive-system .tlp-summary{
    grid-column:1/-1!important;
    position:static!important;
  }
}

@media(max-width:860px){
  body.tormami-responsive-system .ta-auth-layout{
    grid-template-columns:1fr!important;
    max-width:680px!important;
    margin-inline:auto!important;
  }

  body.tormami-responsive-system .ta-header__inner{
    min-width:0!important;
  }

  body.tormami-responsive-system .ta-footer__grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media(max-width:768px){
  body.tormami-responsive-system :where(
    .ta-auth-card input,.ta-auth-card select,.ta-auth-card textarea,
    .tlp input,.tlp select,.tlp textarea
  ){
    font-size:16px!important;
  }

  body.tormami-responsive-system :where(
    .ta-submit,.ta-primary-button,.ta-register-button,.ta-ghost-button,
    .tlp-primary,.tlp-send,.tlp-map-button
  ){
    min-height:44px!important;
  }

  body.tormami-responsive-system .wp-block-columns{
    flex-wrap:wrap!important;
  }

  body.tormami-responsive-system .wp-block-columns>.wp-block-column{
    flex-basis:100%!important;
  }

  body.tormami-responsive-system .wp-block-media-text{
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system .wp-block-media-text .wp-block-media-text__media,
  body.tormami-responsive-system .wp-block-media-text .wp-block-media-text__content{
    grid-column:1!important;
  }
}

@media(max-width:680px){
  body.tormami-responsive-system .tlp-shell{
    width:calc(100% - 20px)!important;
  }

  body.tormami-responsive-system .tlp-sidebar{
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system .tlp-overview-grid,
  body.tormami-responsive-system .tlp-feature-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  body.tormami-responsive-system .tlp-related-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  body.tormami-responsive-system .tlp-form-grid{
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system .tlp-send{
    width:100%!important;
  }
}

@media(max-width:620px){
  body.tormami-responsive-system .ta-container{
    width:calc(100% - 20px)!important;
  }

  body.tormami-responsive-system .ta-auth-card{
    padding:22px 18px!important;
    border-radius:16px!important;
  }

  body.tormami-responsive-system .ta-form-grid{
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system .ta-footer__grid{
    grid-template-columns:1fr 1fr!important;
  }

  body.tormami-responsive-system .woocommerce :where(
    .col2-set,.u-columns,.woocommerce-columns
  ){
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:18px!important;
  }

  body.tormami-responsive-system .woocommerce :where(
    table.shop_table,.cart_totals,.woocommerce-checkout-review-order
  ){
    max-width:100%!important;
  }
}

@media(max-width:430px){
  body.tormami-responsive-system .ta-container{
    width:calc(100% - 16px)!important;
  }

  body.tormami-responsive-system .ta-footer__grid{
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system .tlp-shell{
    width:calc(100% - 16px)!important;
  }

  body.tormami-responsive-system .tlp-related-grid{
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system .tlp-secondary-actions{
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system :where(
    .woocommerce .quantity,.woocommerce .quantity input
  ){
    max-width:100%!important;
  }
}

@media(max-width:375px){
  body.tormami-responsive-system :where(
    .tlp-overview-grid,.tlp-feature-grid
  ){
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system .ta-auth-card{
    padding-left:14px!important;
    padding-right:14px!important;
  }
}


/* Coarse-pointer touch target pass */
@media(pointer:coarse){
  body.tormami-responsive-system :where(
    .tmh-action-link,.tmh-sell,.tmh-search-button,.tmh-location-button,
    .tmf-btn,.tormami-inner-btn,.tsr-list-view-cta,.tcv-list-view-cta,
    .tsr-view-switch button,.tcv-view-switch button,.tsr-favorite,.tcv-favorite,
    .ta-mobile-toggle,.ta-primary-button,.ta-register-button,.ta-ghost-button,
    .tlp-primary,.tlp-send,.tlp-map-button,.tlp-gallery-arrow,
    .tml-close,.tml-password-toggle
  ){
    min-height:44px!important;
  }

  body.tormami-responsive-system :where(
    .tmh-action-link,.tsr-view-switch button,.tcv-view-switch button,
    .tsr-favorite,.tcv-favorite,.tlp-gallery-arrow,.tml-close,.tml-password-toggle
  ){
    min-width:44px!important;
  }
}


/* ============================================================
   Mobile-first friendly UX refinement V3
   Dedicated phone treatment for 320–620px.
   ============================================================ */

@media(max-width:620px){
  /* Compact two-row marketplace header: logo/actions + location/search. */
  body.tormami-responsive-system .tormami-global-market-header{
    border-bottom:1px solid #edf1f5!important;
    background:rgba(255,255,255,.98)!important;
    box-shadow:0 5px 18px rgba(16,35,65,.055)!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tormami-market-header{
    width:calc(100% - 16px)!important;
    min-height:0!important;
    padding:8px 0 9px!important;
    grid-template-columns:minmax(98px,118px) minmax(0,1fr)!important;
    grid-template-areas:
      "logo actions"
      "location search"!important;
    align-items:center!important;
    gap:8px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-logo{
    grid-area:logo!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-logo img{
    max-width:112px!important;
    max-height:40px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-actions{
    grid-area:actions!important;
    width:100%!important;
    min-width:0!important;
    justify-content:flex-end!important;
    gap:3px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-action-link{
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    min-height:44px!important;
    padding:2px!important;
    border-radius:11px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-action-link svg{
    width:20px!important;
    height:20px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-action-link>span:last-child{
    font-size:7px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-sell{
    width:auto!important;
    min-width:52px!important;
    height:44px!important;
    min-height:44px!important;
    padding:0 10px!important;
    border-radius:11px!important;
    gap:5px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-sell span{
    font-size:9px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-location-wrap{
    grid-area:location!important;
    width:100%!important;
    min-width:0!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-location-button{
    width:100%!important;
    height:46px!important;
    min-height:46px!important;
    padding:0 8px!important;
    grid-template-columns:21px minmax(0,1fr)!important;
    gap:6px!important;
    border-radius:13px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-location-copy small,
  body.tormami-responsive-system .tormami-global-market-header .tmh-location-chevron{
    display:none!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-location-copy strong{
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:10.5px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-search{
    grid-area:search!important;
    width:100%!important;
    height:46px!important;
    min-height:46px!important;
    max-height:46px!important;
    padding:4px!important;
    grid-template-columns:minmax(0,1fr) 38px!important;
    column-gap:4px!important;
    border-radius:13px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-search-input{
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    padding:0 8px!important;
    line-height:38px!important;
    font-size:16px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-search-button{
    width:38px!important;
    min-width:38px!important;
    max-width:38px!important;
    height:38px!important;
    min-height:38px!important;
    max-height:38px!important;
    border-radius:10px!important;
  }

  /* Location selector becomes a thumb-friendly bottom sheet. */
  body.tormami-responsive-system .tormami-global-market-header .tmh-location-panel{
    left:8px!important;
    right:8px!important;
    bottom:max(8px,env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-height:min(76dvh,620px)!important;
    padding:14px!important;
    border-radius:22px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-location-search{
    height:48px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-location-search input{
    font-size:16px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-location-option{
    min-height:54px!important;
  }

  /* Search/category filter drawers become mobile bottom sheets. */
  body.tormami-responsive-system.tsr-filters-open,
  body.tormami-responsive-system.tcv-filters-open{
    overflow:hidden!important;
  }

  body.tormami-responsive-system .tsr-filter-panel,
  body.tormami-responsive-system .tcv-sidebar{
    left:8px!important;
    right:8px!important;
    top:auto!important;
    bottom:max(8px,env(safe-area-inset-bottom))!important;
    width:auto!important;
    height:auto!important;
    max-height:min(82dvh,720px)!important;
    border-radius:22px 22px 14px 14px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    transform:translateY(calc(100% + 28px))!important;
    box-shadow:0 -20px 70px rgba(8,28,51,.22)!important;
    overscroll-behavior:contain!important;
  }

  body.tormami-responsive-system.tsr-filters-open .tsr-filter-panel,
  body.tormami-responsive-system.tcv-filters-open .tcv-sidebar{
    transform:translateY(0)!important;
  }

  body.tormami-responsive-system .tsr-filter-panel::before,
  body.tormami-responsive-system .tcv-sidebar::before{
    content:""!important;
    display:block!important;
    position:sticky!important;
    top:0!important;
    z-index:12!important;
    width:42px!important;
    height:4px!important;
    margin:8px auto 2px!important;
    border-radius:999px!important;
    background:#ced8e3!important;
  }

  body.tormami-responsive-system .tsr-filter-head,
  body.tormami-responsive-system .tcv-sidebar-head{
    position:sticky!important;
    top:0!important;
    z-index:10!important;
    background:#fff!important;
  }

  body.tormami-responsive-system .tsr-filter-actions,
  body.tormami-responsive-system .tcv-filter-actions{
    position:sticky!important;
    bottom:0!important;
    z-index:10!important;
    padding-bottom:max(16px,env(safe-area-inset-bottom))!important;
    border-top:1px solid #edf1f5!important;
    background:#fff!important;
    box-shadow:0 -10px 26px rgba(16,35,65,.06)!important;
  }

  body.tormami-responsive-system :where(.tsr-filter-backdrop,.tcv-backdrop){
    background:rgba(5,19,34,.48)!important;
    backdrop-filter:blur(2px)!important;
  }

  body.tormami-responsive-system :where(.tsr-mobile-filter,.tcv-mobile-filter){
    width:auto!important;
    min-width:116px!important;
    height:44px!important;
    min-height:44px!important;
    margin:0 0 10px!important;
    padding:0 15px!important;
    border-radius:12px!important;
    box-shadow:0 4px 12px rgba(16,35,65,.04)!important;
    font-size:12px!important;
  }

  /* Mobile result toolbars stay compact: sort + view controls on one row. */
  body.tormami-responsive-system :where(.tsr-toolbar,.tcv-toolbar){
    padding:13px!important;
    gap:12px!important;
    border-radius:15px!important;
    box-shadow:0 6px 18px rgba(16,35,65,.045)!important;
  }

  body.tormami-responsive-system :where(.tsr-toolbar-actions,.tcv-toolbar-actions){
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:8px!important;
    width:100%!important;
  }

  body.tormami-responsive-system :where(.tsr-sort,.tcv-sort){
    width:100%!important;
    min-width:0!important;
  }

  body.tormami-responsive-system :where(.tsr-sort-control,.tcv-sort){
    min-width:0!important;
  }

  body.tormami-responsive-system :where(.tsr-sort-control select,.tcv-sort select){
    width:100%!important;
    height:44px!important;
    min-height:44px!important;
    font-size:13px!important;
    border-radius:11px!important;
  }

  body.tormami-responsive-system :where(.tsr-view-switch,.tcv-view-switch){
    flex:0 0 auto!important;
    justify-content:flex-end!important;
    gap:6px!important;
  }

  body.tormami-responsive-system :where(.tsr-view-switch button,.tcv-view-switch button){
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    min-height:44px!important;
    border-radius:11px!important;
  }

  /* Readable mobile listing cards. */
  body.tormami-responsive-system :where(.tsr-grid,.tcv-listing-grid){
    grid-template-columns:1fr!important;
    gap:12px!important;
  }

  body.tormami-responsive-system :where(.tsr-card,.tcv-card){
    border-radius:14px!important;
    box-shadow:0 5px 16px rgba(16,35,65,.05)!important;
  }

  body.tormami-responsive-system :where(.tsr-card-image,.tcv-card-image){
    aspect-ratio:16/10!important;
    min-height:0!important;
  }

  body.tormami-responsive-system :where(.tsr-favorite,.tcv-favorite){
    right:10px!important;
    top:10px!important;
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    min-height:44px!important;
  }

  body.tormami-responsive-system .tsr-card-body,
  body.tormami-responsive-system .tcv-card-body{
    padding:13px 14px 14px!important;
  }

  body.tormami-responsive-system .tsr-card h2,
  body.tormami-responsive-system .tcv-card h3{
    min-height:0!important;
    margin:7px 0 8px!important;
    font-size:15px!important;
    line-height:1.35!important;
  }

  body.tormami-responsive-system .tsr-category-pill{
    min-height:24px!important;
    padding:4px 8px!important;
    font-size:10px!important;
  }

  body.tormami-responsive-system .tsr-meta span{
    font-size:11px!important;
  }

  body.tormami-responsive-system .tsr-meta svg{
    width:12px!important;
    height:12px!important;
    min-width:12px!important;
  }

  body.tormami-responsive-system .tsr-card-footer strong{
    font-size:15px!important;
  }

  body.tormami-responsive-system .tsr-card-footer>span{
    padding:5px 8px!important;
    font-size:9.5px!important;
  }

  body.tormami-responsive-system :where(
    .tsr-grid.is-list .tsr-card,
    .tcv-listing-grid.is-list .tcv-card
  ){
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system .tsr-grid.is-list .tsr-list-view-cta{
    width:auto!important;
    min-width:112px!important;
    margin-left:auto!important;
  }

  /* Listing detail becomes calmer and easier to scan. */
  body.tormami-responsive-system .tlp-main-column>.tlp-card,
  body.tormami-responsive-system :where(.tlp-summary,.tlp-location-card,.tlp-safety,.tlp-message,.tlp-related){
    padding:15px!important;
    border-radius:15px!important;
  }

  body.tormami-responsive-system .tlp-gallery-stage{
    border-radius:15px!important;
  }

  body.tormami-responsive-system :where(.tlp-primary,.tlp-send){
    width:100%!important;
    min-height:48px!important;
  }

  /* Forms: readable, thumb-friendly, no accidental iOS zoom. */
  body.tormami-responsive-system :where(
    input[type="text"],input[type="search"],input[type="email"],input[type="tel"],
    input[type="url"],input[type="number"],input[type="password"],select,textarea
  ){
    font-size:16px!important;
  }

  body.tormami-responsive-system :where(
    .form-control,.tml-control,.tep-control,.tcv-select-field,.tsr-search-field
  ){
    min-height:46px;
  }

  /* Footer: compact 2-column links with full-width brand/contact. */
  body.tormami-responsive-system .tormami-global-footer .tmf-container{
    width:calc(100% - 20px)!important;
  }

  body.tormami-responsive-system .tormami-global-footer .tmf-main{
    padding-top:38px!important;
  }

  body.tormami-responsive-system .tormami-global-footer .tmf-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:26px 18px!important;
    padding-bottom:32px!important;
  }

  body.tormami-responsive-system .tormami-global-footer .tmf-brand-col{
    grid-column:1/-1!important;
  }

  body.tormami-responsive-system .tormami-global-footer .tmf-contact{
    grid-column:1/-1!important;
  }

  body.tormami-responsive-system .tormami-global-footer .tmf-logo img{
    max-width:190px!important;
    height:auto!important;
  }

  body.tormami-responsive-system .tormami-global-footer .tmf-social{
    width:44px!important;
    height:44px!important;
  }

  body.tormami-responsive-system .tormami-global-footer .tmf-bottom{
    gap:10px!important;
    padding:18px 0 max(22px,env(safe-area-inset-bottom))!important;
  }
}

@media(max-width:430px){
  body.tormami-responsive-system .tormami-global-market-header .tormami-market-header{
    width:calc(100% - 12px)!important;
    grid-template-columns:96px minmax(0,1fr)!important;
    gap:6px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-logo img{
    max-width:94px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-action-link>span:last-child{
    display:none!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-sell{
    min-width:48px!important;
    padding-inline:8px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-sell span{
    font-size:0!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-sell span::after{
    content:"Sell";
    font-size:9px;
  }

  body.tormami-responsive-system :where(.tsr-shell,.tcv-shell,.tlp-shell,.tep-shell,.tbso-shell){
    width:calc(100% - 16px)!important;
  }

  body.tormami-responsive-system :where(.tsr-result-count strong,.tcv-result-count strong){
    font-size:16px!important;
  }
}

@media(max-width:360px){
  body.tormami-responsive-system .tormami-global-market-header .tormami-market-header{
    grid-template-columns:88px minmax(0,1fr)!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-logo img{
    max-width:86px!important;
  }

  body.tormami-responsive-system .tormami-global-market-header .tmh-action-link{
    width:42px!important;
    min-width:42px!important;
  }

  body.tormami-responsive-system .tormami-global-footer .tmf-grid{
    grid-template-columns:1fr!important;
  }

  body.tormami-responsive-system .tormami-global-footer .tmf-contact{
    grid-column:auto!important;
  }
}
