/* TopMatic B2B Shop (Shortcode)
   Target: 1/1 layout like screenshot (sidebar + topbar + 4-col grid; mobile 2-col)
   Scope: only classes prefixed with .tmshop-
*/

.tmshop-wrap{width:100%;padding:34px 0;background:#fff;position:relative}

/* Break out of boxed theme/Elementor containers */
.tmshop-wrap.tmshop-fullbleed{width:100vw;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw)}

.tmshop-container{max-width:1180px;margin:0 auto;padding:0 20px;box-sizing:border-box}
.tmshop-container{display:flex;gap:34px;align-items:flex-start}

.tmshop-sidebar{width:300px;flex:0 0 300px}
.tmshop-main{flex:1;min-width:0}

/* Sidebar box */
.tmshop-box{border:1px solid rgba(0,0,0,.10);border-radius:6px;background:#fff;overflow:hidden}
.tmshop-box__title{padding:14px 16px;font-weight:700;font-size:11px;letter-spacing:.08em;border-bottom:1px solid rgba(0,0,0,.08);text-transform:uppercase}
.tmshop-filter-block{padding:14px 16px;border-bottom:1px solid rgba(0,0,0,.06)}
.tmshop-filter-block:last-child{border-bottom:none}
.tmshop-filter-title{font-weight:700;font-size:12px;margin:0 0 10px 0;opacity:.85}

.tmshop-sidebar ul{list-style:none;margin:0;padding:0}
.tmshop-sidebar li{margin:7px 0;font-size:13px;line-height:1.25}
.tmshop-sidebar a{text-decoration:none;color:#111}
.tmshop-sidebar a:hover{text-decoration:underline}
.tmshop-sidebar .children{margin:6px 0 0 12px;opacity:.95}
.tmshop-sidebar .count{opacity:.55;font-size:12px;margin-left:4px}

/* Price filter */
.tmshop-price__row{display:flex;gap:10px;margin:10px 0 12px}
.tmshop-price input{width:100%;padding:9px 10px;border:1px solid rgba(0,0,0,.16);border-radius:6px;font-size:13px;outline:none}
.tmshop-price input:focus{border-color:rgba(0,0,0,.28)}

/* Buttons */
.tmshop-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 14px;border-radius:8px;text-decoration:none;border:1px solid transparent;cursor:pointer;font-size:13px;font-weight:700;line-height:1;color:#fff;background:#111;transition:transform .08s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease}
.tmshop-btn:active{transform:translateY(1px)}
.tmshop-btn--small{padding:9px 12px;font-size:12px;border-radius:8px}
.tmshop-btn--primary{background:#111}
.tmshop-btn--primary:hover{box-shadow:0 10px 24px rgba(0,0,0,.10)}
.tmshop-btn--ghost{background:#fff;color:#111;border-color:rgba(0,0,0,.16)}
.tmshop-btn--ghost:hover{border-color:rgba(0,0,0,.28);box-shadow:0 10px 24px rgba(0,0,0,.08)}

/* Recent products */
.tmshop-mini__item{display:flex;gap:10px;align-items:center;margin:12px 0}
.tmshop-mini__thumb img{width:48px;height:48px;object-fit:cover;display:block;border:1px solid rgba(0,0,0,.10);border-radius:6px;background:#fff}
.tmshop-mini__meta{min-width:0}
.tmshop-mini__name{display:block;font-size:12px;line-height:1.25;text-decoration:none;color:#111;margin:0 0 4px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:200px}
.tmshop-mini__price{font-size:12px;opacity:.85}

/* Topbar */
.tmshop-topbar{display:flex;justify-content:space-between;align-items:center;padding:10px 0 14px;border-bottom:1px solid rgba(0,0,0,.08);margin-bottom:18px}
.tmshop-results{font-size:12px;opacity:.75}
.tmshop-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.tmshop-label{font-size:12px;opacity:.85;display:flex;gap:8px;align-items:center;white-space:nowrap}
.tmshop-label select{padding:8px 10px;border:1px solid rgba(0,0,0,.16);border-radius:8px;font-size:12px;background:#fff;outline:none}
.tmshop-label select:focus{border-color:rgba(0,0,0,.28)}

/* Search input in topbar */
.tmshop-label--search{opacity:1}
.tmshop-label--search input[type="search"]{
  width:240px;
  max-width:46vw;
  padding:8px 10px;
  border:1px solid rgba(0,0,0,.16);
  border-radius:8px;
  font-size:12px;
  background:#fff;
  outline:none;
}
.tmshop-label--search input[type="search"]:focus{border-color:rgba(0,0,0,.28)}

/* Grid area (premium spacing) */
.tmshop-grid{background:#f5f6f7;border-radius:10px;padding:22px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}

.tmshop-card{position:relative;border:1px solid rgba(0,0,0,.06);border-radius:10px;background:#fff;padding:14px;box-shadow:0 8px 22px rgba(0,0,0,.05);transition:transform .12s ease, box-shadow .18s ease}
.tmshop-card:hover{transform:translateY(-2px);box-shadow:0 14px 34px rgba(0,0,0,.08)}

.tmshop-card__badges{position:absolute;top:12px;left:12px;display:flex;flex-direction:column;gap:8px;z-index:2}
.tmshop-badge{display:inline-flex;align-items:center;justify-content:center;font-size:10px;font-weight:800;letter-spacing:.08em;padding:6px 10px;border-radius:999px;color:#fff}
.tmshop-badge--hot{background:#e53935}
.tmshop-badge--sale{background:#2e7d32}
.tmshop-badge--out{background:#6b6b6b}

.tmshop-card__thumb{display:block;aspect-ratio:1/1;background:#fafafa;border:1px solid rgba(0,0,0,.06);border-radius:10px;overflow:hidden}
.tmshop-card__thumb img{width:100%;height:100%;object-fit:contain;display:block}

.tmshop-card__meta{padding-top:12px}
.tmshop-card__brand{font-size:10px;letter-spacing:.10em;opacity:.55;margin-bottom:6px;text-transform:uppercase}
.tmshop-card__title{display:block;font-size:13px;line-height:1.3;text-decoration:none;color:#111;min-height:34px;margin-bottom:8px}
.tmshop-card__title:hover{text-decoration:underline}

.tmshop-card__price{font-size:13px;font-weight:800;margin-bottom:10px}
.tmshop-card__price del{opacity:.55;font-weight:500;margin-right:6px}
.tmshop-card__price ins{text-decoration:none}

/* B2B discount price (shop + cart) */
.tm-b2b-price-wrap{display:inline-flex;flex-direction:column;gap:4px}
.tm-b2b-price-wrap del{opacity:.55;font-weight:500}
.tm-b2b-price-wrap ins{text-decoration:none;font-weight:900}
.tm-b2b-price-hint{display:block;font-size:11px;opacity:.7;font-weight:700}
.tm-b2b-price-from{opacity:.75;font-weight:800}

.tm-b2b-cart-price small{display:block;font-size:11px;opacity:.7;font-weight:700;margin-top:4px}
.tm-b2b-cart-subtotal del{opacity:.55;margin-right:6px}
.tm-b2b-cart-discount-note th{opacity:.85}

.tmshop-card__actions{display:flex;gap:10px}
.tmshop-card__actions .tmshop-btn{width:100%}

/* Pagination */
.tmshop-pagination{margin-top:18px}
.tmshop-pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;padding:9px 12px;border:1px solid rgba(0,0,0,.12);margin-right:8px;border-radius:10px;text-decoration:none;font-size:12px;color:#111;background:#fff}
.tmshop-pagination .page-numbers:hover{border-color:rgba(0,0,0,.22)}
.tmshop-pagination .current{background:#111;color:#fff;border-color:#111}

/* Gate */
.tmshop-gate{border:1px solid rgba(0,0,0,.12);padding:34px;border-radius:12px;background:#fff;max-width:720px;margin:20px auto;box-shadow:0 14px 34px rgba(0,0,0,.06)}
.tmshop-gate__inner{text-align:center}
.tmshop-gate h3{margin:0 0 10px 0}
.tmshop-gate p{opacity:.85;margin:0 0 16px 0}

.tmshop-empty{padding:30px;border:1px dashed rgba(0,0,0,.2);border-radius:12px;opacity:.85;background:#fff}

/* Woo Cart + Checkout styling (wrapped in .tmshop-woo) */
.tmshop-woo{max-width:1180px;margin:0 auto;padding:0 20px;box-sizing:border-box}
.tmshop-woo .woocommerce{background:#fff}
.tmshop-woo .woocommerce-notices-wrapper{margin:0 0 16px}

.tmshop-woo .woocommerce-cart-form,
.tmshop-woo .woocommerce-checkout{
  border:1px solid rgba(0,0,0,.10);
  border-radius:12px;
  padding:20px;
  box-shadow:0 14px 34px rgba(0,0,0,.05);
}

.tmshop-woo table.shop_table{border-collapse:separate;border-spacing:0;width:100%;border:1px solid rgba(0,0,0,.08);border-radius:12px;overflow:hidden}
.tmshop-woo table.shop_table th{background:#f5f6f7;font-size:12px;text-transform:uppercase;letter-spacing:.08em}
.tmshop-woo table.shop_table th,
.tmshop-woo table.shop_table td{padding:12px 14px;border-bottom:1px solid rgba(0,0,0,.06)}
.tmshop-woo table.shop_table tr:last-child td{border-bottom:none}

.tmshop-woo input[type="text"],
.tmshop-woo input[type="email"],
.tmshop-woo input[type="tel"],
.tmshop-woo input[type="number"],
.tmshop-woo input[type="password"],
.tmshop-woo select,
.tmshop-woo textarea{
  border:1px solid rgba(0,0,0,.16);
  border-radius:10px;
  padding:10px 12px;
  outline:none;
}
.tmshop-woo input:focus,
.tmshop-woo select:focus,
.tmshop-woo textarea:focus{border-color:rgba(0,0,0,.28)}

.tmshop-woo .button,
.tmshop-woo button.button,
.tmshop-woo input.button{
  background:#111;
  color:#fff;
  border-radius:10px;
  padding:12px 16px;
  border:none;
  font-weight:800;
}
.tmshop-woo .button:hover,
.tmshop-woo button.button:hover,
.tmshop-woo input.button:hover{opacity:.92}

.tmshop-woo .cart-collaterals,
.tmshop-woo #order_review{margin-top:18px}

@media (max-width: 980px){
  .tmshop-wrap{padding:20px 0}
  .tmshop-container{flex-direction:column;gap:18px;padding:0 14px}
  .tmshop-sidebar{width:100%;flex:0 0 auto}

  /* Mobile-first topbar: stack for clarity */
  .tmshop-topbar{flex-direction:column;align-items:stretch;gap:10px;padding:0 0 14px}
  .tmshop-controls{width:100%;gap:10px}
  .tmshop-label{flex:1}
  .tmshop-label select{width:100%}
  .tmshop-label--search{width:100%}
  .tmshop-label--search input[type="search"]{width:100%;max-width:100%}

  /* Cleaner mobile grid */
  .tmshop-grid{grid-template-columns:repeat(2,minmax(0,1fr));background:transparent;padding:0;gap:14px}
  .tmshop-card{padding:12px;border-radius:12px}
  .tmshop-card__title{min-height:unset}
  .tmshop-card__actions{gap:8px}
  .tmshop-card__actions .tmshop-btn{padding:12px 12px;border-radius:10px}
}

@media (max-width: 520px){
  .tmshop-container{padding:0 12px}
  .tmshop-grid{gap:12px}
  .tmshop-card__brand{font-size:9px}
  .tmshop-card__title{font-size:12px;line-height:1.25}
  .tmshop-card__price{font-size:12px}
}


/* ===== Version 8.0.0 Shop UX upgrade ===== */
.tmshop-container{max-width:1440px;display:grid;grid-template-columns:300px minmax(0,1fr) 280px;gap:28px}
.tmshop-container.tmshop-container--no-right{grid-template-columns:300px minmax(0,1fr)}
.tmshop-sidebar,.tmshop-rail{min-width:0}
.tmshop-sidebar__sticky,.tmshop-rail__sticky{position:sticky;top:24px;display:flex;flex-direction:column;gap:18px}
.tmshop-rail__sticky .tmshop-box,.tmshop-sidebar__sticky .tmshop-box{border-radius:18px;box-shadow:0 18px 42px rgba(17,24,39,.08);border-color:#eceef3}
.tmshop-box{border-radius:18px;border-color:#eceef3;box-shadow:0 18px 42px rgba(17,24,39,.04)}
.tmshop-box__title{font-size:12px;color:#111827;padding:18px 18px;background:linear-gradient(180deg,#fafbff 0%,#fff 100%)}
.tmshop-filter-block{padding:16px 18px}
.tmshop-filter-search{margin-bottom:10px}
.tmshop-filter-search input{width:100%;padding:11px 12px;border:1px solid #e4e7ee;border-radius:12px;font-size:13px;background:#fbfcff;outline:none}
.tmshop-filter-search input:focus{border-color:rgba(209,11,31,.35);box-shadow:0 0 0 4px rgba(209,11,31,.08)}
.tmshop-cats a.active{color:#d10b1f;font-weight:800}
.tmshop-topbar{padding:18px 20px;border:1px solid #eceef3;border-radius:20px;background:#fff;box-shadow:0 18px 42px rgba(17,24,39,.05);margin-bottom:20px}
.tmshop-grid{background:transparent;padding:0;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.tmshop-card{border-radius:18px;border-color:#eceef3;box-shadow:0 20px 40px rgba(17,24,39,.06);padding:16px}
.tmshop-card__thumb{border-radius:16px;background:linear-gradient(180deg,#fff 0%,#f8fafc 100%)}
.tmshop-card__price{font-size:15px}
.tmshop-promo-list{display:flex;flex-direction:column;gap:14px}
.tmshop-promo{display:grid;grid-template-columns:76px minmax(0,1fr);gap:12px;padding:12px;border:1px solid #eceef3;border-radius:16px;background:#fff;text-decoration:none;color:#111827;transition:transform .12s ease,box-shadow .18s ease,border-color .18s ease}
.tmshop-promo:hover{transform:translateY(-2px);box-shadow:0 16px 30px rgba(17,24,39,.08);border-color:rgba(209,11,31,.22)}
.tmshop-promo__thumb{width:76px;height:76px;border-radius:14px;border:1px solid #eceef3;background:#fbfcff;display:flex;align-items:center;justify-content:center;overflow:hidden}
.tmshop-promo__thumb img{width:100%;height:100%;object-fit:contain}
.tmshop-promo__meta{min-width:0}
.tmshop-promo__eyebrow{font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:#6b7280;margin-bottom:4px;font-weight:800}
.tmshop-promo__title{font-size:13px;line-height:1.35;font-weight:800;color:#111827;margin-bottom:6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tmshop-promo__price{font-size:13px;font-weight:800;color:#d10b1f}
.tmshop-promo__cta{font-size:11px;font-weight:800;color:#111827;margin-top:6px}
@media (max-width: 1260px){.tmshop-container{grid-template-columns:300px minmax(0,1fr)}.tmshop-rail{display:none}.tmshop-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width: 980px){.tmshop-container,.tmshop-container.tmshop-container--no-right{display:flex}.tmshop-sidebar__sticky,.tmshop-rail__sticky{position:static}.tmshop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width: 560px){.tmshop-grid{grid-template-columns:1fr 1fr}.tmshop-promo{grid-template-columns:64px minmax(0,1fr)}.tmshop-promo__thumb{width:64px;height:64px}}
