/* =============================================
   Tech Shop Plugin - CSS
   Matches design from dbdsitro_pl.html exactly
   ============================================= */

:root {
  --ts-green:       #2bd34f;
  --ts-green-2:     #18b43a;
  --ts-ink:         #0f172a;
  --ts-muted:       #475569;
  --ts-muted-2:     #64748b;
  --ts-bg:          #ffffff;
  --ts-bg-soft:     #f6f7fb;
  --ts-line:        #e6e8ef;
  --ts-shadow-sm:   0 6px 18px rgba(15,23,42,.06);
  --ts-shadow-md:   0 14px 40px rgba(15,23,42,.10);
  --ts-radius-sm:   10px;
  --ts-radius-md:   14px;
  --ts-radius-lg:   18px;
}

/* Reset scoped to plugin */
.ts-shop-wrap *,
.ts-shop-wrap *::before,
.ts-shop-wrap *::after { box-sizing: border-box; }
.ts-shop-wrap { font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: var(--ts-ink); line-height: 1.45; }
.ts-shop-wrap a { color: inherit; text-decoration: none; }
.ts-shop-wrap img { max-width: 100%; display: block; }

/* ===== Page Head ===== */
.ts-pagehead { padding: 18px 0 12px; text-align: center; }
.ts-pagehead h1 { margin: 0; font-size: clamp(1.6rem, 2.2vw, 2.2rem); letter-spacing: -.02em; }
.ts-crumbs { margin-top: 8px; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--ts-muted); font-size: .9rem; }
.ts-crumbs a { color: var(--ts-muted); font-weight: 700; }
.ts-crumbs a:hover { color: var(--ts-ink); }
.ts-sep { opacity: .5; }

/* ===== Shop Grid ===== */
.ts-shopgrid { margin-top: 1rem; display: grid; grid-template-columns: 320px 1fr; gap: 1.5rem; align-items: start; }

/* ===== Card ===== */
.ts-card { background: #fff; border: 1px solid var(--ts-line); border-radius: var(--ts-radius-lg); box-shadow: var(--ts-shadow-sm); overflow: hidden; }
.ts-card__head { padding: 14px 16px; border-bottom: 1px solid var(--ts-line); background: linear-gradient(180deg, #fff, #fbfbfd); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ts-card__head strong { font-size: 1rem; }

/* ===== Pill ===== */
.ts-pill { display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--ts-line); background: var(--ts-bg-soft); font-weight: 700; font-size: .75rem; color: var(--ts-ink); white-space: nowrap; }
.ts-pill--btn { cursor: pointer; transition: .15s; }
.ts-pill--btn:hover { box-shadow: var(--ts-shadow-sm); }

/* ===== Buttons ===== */
.btn { height: 40px; border-radius: 999px; padding: 0 14px; font-weight: 700; cursor: pointer; border: 1px solid var(--ts-line); background: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .15s; white-space: nowrap; font-size: .9rem; font-family: inherit; }
.btn:hover { box-shadow: var(--ts-shadow-sm); }
.btn-primary { border: 0; background: linear-gradient(180deg, var(--ts-green), var(--ts-green-2)); color: #052e12; box-shadow: 0 12px 26px rgba(43,211,79,.22); font-weight: 800; }
.btn-primary:hover { box-shadow: 0 16px 34px rgba(43,211,79,.28); }
.btn-ghost { background: var(--ts-bg-soft); }
.btn-block { width: 100%; }

/* ===== Select ===== */
.ts-select { height: 40px; border-radius: 999px; border: 1px solid var(--ts-line); background: #fff; padding: 0 14px; font-weight: 700; color: var(--ts-ink); outline: none; cursor: pointer; font-size: .9rem; font-family: inherit; transition: .15s; }
.ts-select:focus { border-color: rgba(43,211,79,.55); box-shadow: 0 0 0 6px rgba(43,211,79,.14); }

/* ===== Filters Sidebar ===== */
.ts-filters { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--ts-line) transparent; }
.ts-filters::-webkit-scrollbar { width: 4px; }
.ts-filters::-webkit-scrollbar-thumb { background: var(--ts-line); border-radius: 4px; }

.ts-filterblock { padding: 14px 16px; border-bottom: 1px solid var(--ts-line); }
.ts-filterblock:last-child { border-bottom: 0; }

.ts-ftitle { display: flex; align-items: center; justify-content: space-between; font-weight: 800; font-size: .92rem; color: var(--ts-ink); margin-bottom: 10px; }

/* ===== Category List (nested) ===== */
.ts-flist { display: grid; gap: 6px; }
.ts-cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ts-cat-list--sub { padding-left: 14px; margin-top: 4px; }

/* Sub-wrap hidden by default, shown when parent has is-open */
.ts-sub-wrap { display: none; overflow: hidden; }
.ts-cat-item.is-open > .ts-sub-wrap { display: block; }

.ts-cat-item { }

.ts-flink {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  border-radius: var(--ts-radius-md);
  border: 1px solid var(--ts-line);
  background: #fff;
  color: var(--ts-muted);
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
  transition: .15s;
  position: relative;
}
.ts-flink:hover { box-shadow: var(--ts-shadow-sm); color: var(--ts-ink); border-color: rgba(15,23,42,.18); }
.ts-flink.is-active {
  background: rgba(43,211,79,.10);
  border-color: rgba(43,211,79,.35);
  color: #0b3d1a;
  box-shadow: 0 0 0 6px rgba(43,211,79,.10);
}

.ts-flink__name { flex: 1; }
.ts-flink__count { font-size: .76rem; font-weight: 800; color: var(--ts-muted-2); border: 1px solid var(--ts-line); background: var(--ts-bg-soft); padding: 4px 8px; border-radius: 999px; white-space: nowrap; }

/* Toggle button (arrow) */
.ts-toggle-btn {
  border: 1px solid var(--ts-line);
  background: #fff;
  cursor: pointer;
  padding: 0;
  min-width: 28px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--ts-muted);
  flex-shrink: 0;
  transition: background .15s, border-color .15s, transform .2s;
  line-height: 1;
}
.ts-toggle-btn svg {
  display: block;
  width: 12px;
  height: 12px;
  margin: auto;
  transition: transform .25s ease;
}
.ts-toggle-btn:hover { background: var(--ts-bg-soft); color: var(--ts-ink); border-color: rgba(43,211,79,.4); }
.ts-flink.is-active .ts-toggle-btn { border-color: rgba(43,211,79,.4); color: #0b3d1a; }

/* Arrow rotates up when open */
.ts-cat-item.is-open > .ts-flink > .ts-toggle-btn svg { transform: rotate(180deg); }

/* Hide old +/- paths — not used anymore */
.ts-plus-h { display: none; }

.ts-sub-wrap { overflow: hidden; }

/* ===== Price Range ===== */
.ts-range-wrap { display: grid; gap: 10px; }

.ts-range-track {
  position: relative; height: 6px; background: var(--ts-line); border-radius: 3px; margin: 16px 0 8px;
}
.ts-range-fill { position: absolute; height: 100%; background: var(--ts-green); border-radius: 3px; pointer-events: none; }

.ts-range-track input[type="range"] {
  position: absolute; width: 100%; top: 50%; transform: translateY(-50%);
  -webkit-appearance: none; appearance: none; background: transparent; pointer-events: none; height: 20px; margin: 0;
}
.ts-range-track input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  border: 2px solid var(--ts-green); box-shadow: 0 2px 6px rgba(43,211,79,.3); cursor: pointer; pointer-events: all;
}
.ts-range-track input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  border: 2px solid var(--ts-green); cursor: pointer; pointer-events: all;
}
.ts-range-labels { display: flex; justify-content: space-between; color: var(--ts-muted); font-weight: 700; font-size: .88rem; }

/* ===== Checkboxes / Radios ===== */
.ts-checks { display: grid; gap: 8px; }
.ts-check { display: flex; align-items: center; gap: 10px; color: var(--ts-muted); font-weight: 700; font-size: .88rem; cursor: pointer; }
.ts-check input { accent-color: var(--ts-green); width: 16px; height: 16px; cursor: pointer; }
.ts-stars { color: #f59e0b; letter-spacing: 1px; font-size: .85rem; }

/* ===== Products Panel ===== */
.ts-products-panel { position: relative; }

.ts-panelhead { padding: 14px 16px; border-bottom: 1px solid var(--ts-line); background: linear-gradient(180deg, #fff, #fbfbfd); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ts-panelhead__left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--ts-muted); font-weight: 700; font-size: .9rem; }
.ts-panelhead__left strong { color: var(--ts-ink); font-size: 1rem; }
.ts-panelhead__right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ts-mobile-filter-btn { display: none; }

/* ===== Loader ===== */
.ts-loader {
  position: absolute; inset: 0; z-index: 10;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(4px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
  border-radius: var(--ts-radius-lg);
}
.ts-loader.is-visible { opacity: 1; pointer-events: all; }
.ts-loader__spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--ts-line);
  border-top-color: var(--ts-green);
  animation: ts-spin .7s linear infinite;
}
.ts-loader span { font-weight: 700; color: var(--ts-muted); font-size: .9rem; }
@keyframes ts-spin { to { transform: rotate(360deg); } }

/* ===== Products Grid ===== */
.ts-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  min-height: 200px;
}

/* ===== Product Card ===== */
.pcard {
  border: 1px solid var(--ts-line);
  border-radius: var(--ts-radius-lg);
  background: #fff;
  box-shadow: var(--ts-shadow-sm);
  overflow: hidden;
  transition: transform .12s ease, box-shadow .15s ease;
  display: flex; flex-direction: column;
}
.pcard:hover { transform: translateY(-2px); box-shadow: var(--ts-shadow-md); }

.pcard__imgwrap { display: block; }
.pimg { aspect-ratio: 1/1; background: var(--ts-bg-soft); display: grid; place-items: center; padding: 14px; position: relative; overflow: hidden; }
.ts-badge { position: absolute; left: 12px; top: 12px; padding: 5px 10px; border-radius: 999px; font-weight: 800; font-size: .73rem; }
.ts-badge--instock { border: 1px solid rgba(43,211,79,.25); background: rgba(43,211,79,.10); color: #0b3d1a; }
.ts-badge--outofstock { border: 1px solid rgba(239,68,68,.25); background: rgba(239,68,68,.10); color: #7f1d1d; }
.pimg img { width: 100%; max-width: 200px; border-radius: 12px; box-shadow: 0 10px 24px rgba(15,23,42,.12); object-fit: contain; transition: transform .2s; }
.pcard:hover .pimg img { transform: scale(1.03); }

.pbody { padding: 14px; display: grid; gap: 6px; flex: 1; }
.pname { font-weight: 800; font-size: .9rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ts-ink); }
.pname:hover { color: var(--ts-green-2); }
.pprice { font-weight: 800; font-size: 1rem; color: var(--ts-ink); }
.pprice small { color: var(--ts-muted); font-weight: 700; }
.pprice del { color: var(--ts-muted); font-size: .85rem; margin-left: 4px; }
.pmeta { color: var(--ts-muted); font-weight: 700; font-size: .8rem; }

.qtyadd { padding: 0 14px 14px; display: grid; gap: 8px; }
.qty { display: grid; grid-template-columns: 40px 1fr 40px; border: 1px solid var(--ts-line); border-radius: 999px; overflow: hidden; background: #fff; height: 38px; }
.qty-btn { border: 0; background: var(--ts-bg-soft); cursor: pointer; font-size: 16px; font-weight: 800; transition: .12s; display: flex; align-items: center; justify-content: center; }
.qty-btn:hover { background: var(--ts-line); }
.qty-input { border: 0; outline: none; text-align: center; font-weight: 800; font-size: .9rem; width: 100%; font-family: inherit; }

/* ===== No products ===== */
.ts-no-products { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--ts-muted); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.ts-no-products p { font-weight: 700; font-size: 1rem; margin: 0; }
.ts-no-products button { all: unset; cursor: pointer; font-weight: 700; color: var(--ts-green-2); text-decoration: underline; }

/* ===== Pagination ===== */
.ts-pager { padding: 0 16px 18px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ts-pagebtn {
  min-width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--ts-line);
  background: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px;
  font-weight: 800; font-size: .88rem; cursor: pointer; transition: .15s; font-family: inherit;
}
.ts-pagebtn:hover { box-shadow: var(--ts-shadow-sm); }
.ts-pagebtn.is-active { background: rgba(43,211,79,.10); border-color: rgba(43,211,79,.35); color: #0b3d1a; box-shadow: 0 0 0 6px rgba(43,211,79,.10); }
.ts-pagebtn--wide { padding: 0 16px; }
.ts-pagebtn--dots { cursor: default; border-color: transparent; background: transparent; box-shadow: none; }

/* ===== Add to cart feedback ===== */
.ts-add-to-cart.is-loading { opacity: .7; pointer-events: none; }
.ts-add-to-cart.is-added { background: linear-gradient(180deg, #0b3d1a, #0a3016) !important; }

/* ===== Fade-in animation for new cards ===== */
@keyframes ts-fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.pcard { animation: ts-fadein .25s ease both; }

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .ts-grid { grid-template-columns: repeat(3, 1fr); }
  .ts-shopgrid { grid-template-columns: 280px 1fr; }
}
@media (max-width: 980px) {
  .ts-shopgrid { grid-template-columns: 1fr; }
  .ts-filters { position: static; top: auto; max-height: none; display: none; }
  .ts-filters.ts-filters--mobile-open { display: block; }
  .ts-grid { grid-template-columns: repeat(2, 1fr); }
  .ts-mobile-filter-btn { display: inline-flex; }
}
@media (max-width: 600px) {
  .ts-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ts-panelhead__right { width: 100%; }
  .ts-panelhead__right .ts-select, .ts-panelhead__right .btn { width: 100%; }
}
@media (max-width: 400px) {
  .ts-grid { grid-template-columns: 1fr; }
}

/* ===== Stock count label above qty ===== */
.ts-stock-label {
  display: flex;
  justify-content: center;
  margin-bottom: 2px;
}
.ts-stock-count {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(43,211,79,.35);
  background: rgba(43,211,79,.08);
  color: #0b3d1a;
  font-weight: 800;
  font-size: .78rem;
}

/* ===== Login to see prices button ===== */
.ts-login-btn {
  background: #111827 !important;
  border-color: #111827 !important;
  color: #fff !important;
  font-weight: 700;
  border-radius: 999px;
  font-size: .88rem;
}
.ts-login-btn strong { font-weight: 900; }
.ts-login-btn:hover {
  background: #1f2937 !important;
  box-shadow: 0 8px 20px rgba(0,0,0,.18) !important;
}

/* ===== Hide mobile filters button (removed from panelhead) ===== */
.ts-mobile-filter-btn { display: none !important; }

/* ===== SweetAlert2 Toast Custom Style ===== */
.ts-swal-toast {
  font-family: Inter, system-ui, sans-serif !important;
  border-radius: 14px !important;
  border: 1px solid rgba(43,211,79,.25) !important;
  box-shadow: 0 14px 40px rgba(15,23,42,.12) !important;
  padding: 12px 16px !important;
}
.ts-swal-title {
  font-size: .95rem !important;
  font-weight: 800 !important;
  color: #0b3d1a !important;
}
.ts-swal-progress {
  background: var(--ts-green) !important;
}
.swal2-success-circular-line-left,
.swal2-success-circular-line-right,
.swal2-success-fix {
  background: transparent !important;
}

a.added_to_cart.wc-forward { display: none !important; }
/* ===== Category description (v1.0.2) ===== */
.ts-main-col { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
/* v1.0.3: wrapper itself is not a flex item, so an empty one leaves no gap */
#ts-cat-desc-wrap { display: contents; }
/* v1.0.3: same for the bottom content wrapper */
#ts-cat-bottom-wrap { display: contents; }
.ts-catbottom .ts-catdesc__body { max-height: none; }

.ts-catdesc { position: relative; }
.ts-catdesc .ts-card__head strong { letter-spacing: .01em; }
.ts-catdesc__body { padding: 16px; max-height: none; overflow: hidden; }
.ts-catdesc.is-clamped .ts-catdesc__body { max-height: 190px; }
.ts-catdesc.is-clamped.is-open .ts-catdesc__body { max-height: none; }
.ts-catdesc.is-clamped:not(.is-open)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 44px; height: 70px;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff); pointer-events: none;
}
.ts-catdesc__content { color: var(--ts-ink); font-size: .95rem; line-height: 1.7; }
.ts-catdesc__content > *:first-child { margin-top: 0; }
.ts-catdesc__content > *:last-child { margin-bottom: 0; }
.ts-catdesc__content p { margin: 0 0 .9em; }
.ts-catdesc__content h2, .ts-catdesc__content h3, .ts-catdesc__content h4 {
  margin: 1.1em 0 .5em; line-height: 1.3; font-weight: 700;
}
.ts-catdesc__content h2 { font-size: 1.15rem; }
.ts-catdesc__content h3 { font-size: 1.05rem; }
.ts-catdesc__content h4 { font-size: 1rem; }
.ts-catdesc__content ul, .ts-catdesc__content ol { margin: 0 0 .9em; padding-left: 1.3em; }
.ts-catdesc__content li { margin: 0 0 .35em; }
.ts-catdesc__content a { color: var(--ts-ink); text-decoration: underline; }
.ts-catdesc__content img { max-width: 100%; height: auto; border-radius: var(--ts-radius-lg); }
.ts-catdesc__content table { width: 100%; border-collapse: collapse; margin: 0 0 .9em; }
.ts-catdesc__content th, .ts-catdesc__content td { border: 1px solid var(--ts-line); padding: 8px 10px; text-align: left; }

.ts-catdesc__toggle {
  position: relative; z-index: 1; display: block; width: 100%;
  border: 0; border-top: 1px solid var(--ts-line);
  background: var(--ts-bg-soft); color: var(--ts-ink);
  font-family: inherit; font-weight: 700; font-size: .85rem;
  padding: 12px 16px; cursor: pointer; transition: .15s;
}
.ts-catdesc__toggle:hover { background: #f1f2f6; }

@media (max-width: 600px) {
  .ts-catdesc__body { padding: 14px; }
  .ts-catdesc.is-clamped .ts-catdesc__body { max-height: 160px; }
}
/* =====================================================================
   v2 (shop redesign): Figma layout, theme blue, home-style cards,
   subcategory slider. Older rules above are kept for revert.
   ===================================================================== */
.ts-shop-wrap { --ts2-blue: #0a84ff; --ts2-blue-d: #0670d6; --ts2-line: #e8e8ec; --ts2-grey: #6b6b75; }

/* Layout: left filter column + right content */
.ts-shopgrid { grid-template-columns: 260px minmax(0, 1fr); gap: 32px; margin-top: 24px; }
.ts-main-col { gap: 28px; }
#ts-subcat-wrap, #ts-cat-desc-wrap, #ts-cat-bottom-wrap { display: contents; }

/* Left filter: plain Figma list, no boxed cards */
.ts-shop-wrap .ts-filters.ts-card { border: 0; box-shadow: none; background: transparent; border-radius: 0; overflow: visible; position: sticky; top: 100px; }
.ts-filters .ts-card__head { padding: 0 0 14px; border: 0; background: none; }
.ts-filters .ts-card__head strong { font-size: 18px; font-weight: 600; color: #111; }
.ts-filters .ts-pill--btn { background: none; border: 0; padding: 0; color: var(--ts2-blue); font-size: 13px; font-weight: 600; }
.ts-filterblock { padding: 18px 0; border-bottom: 1px solid var(--ts2-line); }
.ts-filterblock:first-of-type { padding-top: 0; }
.ts-ftitle { font-size: 15px; font-weight: 600; color: #111; margin-bottom: 12px; }
.ts-ftitle .ts-pill { background: none; border: 0; padding: 0; color: var(--ts2-grey); font-weight: 400; font-size: 13px; }

.ts-flist { gap: 2px; }
.ts-cat-list--sub { padding-left: 24px; }
.ts-flink { border: 0; background: none; box-shadow: none; padding: 7px 0; gap: 10px; border-radius: 0; color: #222; font-size: 14px; font-weight: 400; }
.ts-flink:hover { box-shadow: none; border: 0; color: var(--ts2-blue); }
.ts-flink::before {
  content: ""; flex: 0 0 16px; width: 16px; height: 16px; border: 1px solid #9a9aa3; border-radius: 3px; background: #fff;
}
.ts-flink.is-active { background: none; border: 0; box-shadow: none; color: #111; font-weight: 600; }
.ts-flink.is-active::before { background: var(--ts2-blue); border-color: var(--ts2-blue); box-shadow: inset 0 0 0 3px #fff; }
.ts-flink__count { border: 0; background: none; padding: 0; color: var(--ts2-grey); font-weight: 400; font-size: 12px; }
.ts-toggle-btn { border: 0; background: none; width: 22px; min-width: 22px; height: 22px; color: #444; }
.ts-toggle-btn:hover { background: none; border: 0; color: var(--ts2-blue); }
.ts-flink.is-active .ts-toggle-btn { color: #444; border: 0; }

/* Price: min / max boxes under the slider */
.ts-range-track { margin: 14px 0 12px; }
.ts-range-track input[type="range"]::-webkit-slider-thumb { border-color: var(--ts2-blue); box-shadow: 0 2px 6px rgba(10,132,255,.3); }
.ts-range-track input[type="range"]::-moz-range-thumb { border-color: var(--ts2-blue); }
.ts-range-fill { background: var(--ts2-blue); }
.ts-range-labels { gap: 10px; }
.ts-range-labels span { flex: 1; border: 1px solid #d9d9e0; border-radius: 6px; padding: 9px 12px; color: #111; font-weight: 500; font-size: 14px; }
.ts-range-wrap .ts-apply-price { height: 40px; border-radius: 6px; border: 0; background: #111; color: #fff; font-weight: 600; font-size: 14px; }
.ts-range-wrap .ts-apply-price:hover { background: var(--ts2-blue); color: #fff; box-shadow: none; }

/* Rating + availability: radios in blue */
.ts-check { font-weight: 400; color: #222; font-size: 14px; }
.ts-check input { accent-color: var(--ts2-blue); }
.ts-stars { color: #f5a623; }
.ts-filterblock .btn { border-radius: 6px; height: 38px; font-size: 14px; font-weight: 600; }

/* Subcategory slider (Figma "Trending" slot) */
.ts-subslider { min-width: 0; }
.ts-subslider__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.ts-subslider__title { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.2; color: #111; }
.ts-subslider__nav { display: flex; gap: 8px; }
.ts-subslider__btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid #d0d5dd; background: #fff; color: #111;
  font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0 0 2px;
}
.ts-subslider__btn:hover { border-color: var(--ts2-blue); color: var(--ts2-blue); }
.ts-subslider__track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px;
}
.ts-subslider__track::-webkit-scrollbar { display: none; }
.ts-subcard {
  flex: 0 0 calc((100% - 48px) / 4); min-width: 160px; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 6px; padding: 10px; text-align: left; cursor: pointer;
  border: 1px solid var(--ts2-line); border-radius: 14px; background: #fff; color: #111; font: inherit;
  transition: border-color .2s ease, transform .2s ease;
}
.ts-subcard:hover { border-color: var(--ts2-blue); transform: translateY(-2px); }
.ts-subcard__img { display: block; aspect-ratio: 1; border-radius: 10px; background: #f4f4f6; overflow: hidden; }
.ts-subcard__img img { width: 100%; height: 100%; object-fit: contain; }
.ts-subcard__name { padding: 4px 4px 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
.ts-subcard__count { padding: 0 4px 4px; font-size: 12px; color: var(--ts2-grey); }

/* Products heading row: plain, no card box */
.ts-products-panel.ts-card { border: 0; box-shadow: none; background: transparent; border-radius: 0; overflow: visible; }
.ts-panelhead { padding: 0 0 16px; border: 0; background: none; }
.ts-panelhead__left strong { font-size: 26px; font-weight: 600; color: #111; line-height: 1.2; }
.ts-count-label { background: none; border: 0; padding: 0; color: var(--ts2-grey); font-weight: 400; font-size: 14px; }
.ts-select { border-radius: 6px; height: 40px; font-weight: 500; font-size: 14px; border-color: #d0d5dd; }
.ts-select:focus { border-color: var(--ts2-blue); box-shadow: 0 0 0 4px rgba(10,132,255,.15); }
.ts-grid { padding: 0; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ts-pager { padding: 24px 0 0; }

/* Home-style product card */
.pcard.tsc {
  padding: 10px; border: 1px solid var(--ts2-line); border-radius: 14px; background: #fff; box-shadow: none;
  transform: none; animation: none;
}
.pcard.tsc:hover { transform: none; box-shadow: 0 8px 22px rgba(15,23,42,.07); }
.tsc__media { position: relative; display: block; background: #f4f4f6; border-radius: 10px; overflow: hidden; }
.tsc__imglink { display: block; }
.tsc__media img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; transition: transform .5s ease; }
.pcard.tsc:hover .tsc__media img { transform: scale(1.05); }
.tsc__wish {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%;
  background: #fff; color: #111; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.tsc__body { display: flex; flex-direction: column; flex: 1; gap: 6px; padding: 12px 2px 0; }
.ts-shop-wrap .tsc__title { font-size: 13px; font-weight: 500; line-height: 1.35; color: #111; -webkit-line-clamp: 2; min-height: 35px; }
.ts-shop-wrap .tsc__price { margin-top: 2px; font-size: 14px; font-weight: 600; color: var(--ts2-blue); }
.ts-shop-wrap .tsc__price del { color: #9a9a9a; font-size: 12px; font-weight: 400; margin-left: 6px; }
.tsc__stock { font-size: 12px; color: var(--ts2-grey); }
.tsc__actions { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; }
.tsc__btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 8px;
  border: 1px solid transparent; border-radius: 5px; font-family: inherit; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.tsc__btn--dark { background: linear-gradient(110deg, rgb(0, 140, 255) 0%, rgb(0, 198, 255) 35%, rgb(8, 120, 237) 65%, rgb(0, 63, 189) 100%) !important; color: #fff !important; border-color: transparent; }
/*.tsc__btn--dark:hover { background: linear-gradient( 110deg, #008cff 0%, #00c6ff 35%, #0878ed 65%, #003fbd 100% ) !important;  color: #fff; }*/
.tsc__btn--ghost { background: #fff; color: #111; border-color: transparent; }
.tsc__btn--ghost:hover { background: #111; color: #fff; }
.tsc__btn.is-loading { opacity: .6; pointer-events: none; }
.tsc__btn.ts-login-btn { font-size: 12px; }

/* Pagination: theme blue */
.ts-pagebtn { border-radius: 6px; border-color: #d9d9e0; }
.ts-pagebtn.is-active { background: var(--ts2-blue); border-color: var(--ts2-blue); color: #fff; box-shadow: none; }
.ts-pagebtn:hover { box-shadow: none; border-color: var(--ts2-blue); }
.ts-pagebtn--dots { border: 0; background: none; }

/* Responsive */
@media (max-width: 1200px) { .ts-subcard { flex-basis: calc((100% - 32px) / 3); } }
@media (max-width: 980px) {
  .ts-shopgrid { grid-template-columns: 1fr; gap: 20px; }
  .ts-shop-wrap .ts-filters.ts-card { position: static; }
  .ts-subcard { flex-basis: calc((100% - 16px) / 2); }
  .ts-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
}
@media (max-width: 600px) {
  .ts-subslider__title { font-size: 22px; }
  .ts-subcard { flex-basis: 62%; min-width: 0; }
  .ts-panelhead__left strong { font-size: 22px; }
  .ts-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pcard.tsc { padding: 8px; }
  .tsc__btn { font-size: 11px; padding: 0 6px; }
  .ts-shop-wrap .tsc__title { font-size: 12px; }
}

/* ===== v3: sidebar fixes (Figma) =====
   - Category list gets its own fixed-height inner scroll (no page overflow).
   - Sidebar no longer clips/overflows into the footer.
   - Sort order lives in the sidebar on desktop; header select only on mobile. */
.ts-shop-wrap .ts-filters.ts-card { max-height: none; overflow: visible; }
.ts-shop-wrap .ts-filters { top: 100px; align-self: start; }
.ts-flist.ts-cat-scroll {
  max-height: 300px; overflow-y: auto; padding-right: 8px; margin-right: -8px;
  scrollbar-width: thin; scrollbar-color: #d0d5dd transparent;
}
.ts-flist.ts-cat-scroll::-webkit-scrollbar { width: 5px; }
.ts-flist.ts-cat-scroll::-webkit-scrollbar-thumb { background: #d0d5dd; border-radius: 4px; }
.ts-flist .ts-cat-list--root > .ts-cat-item > .ts-flink { padding: 8px 0; }
.ts-sortblock .ts-sort-radios { gap: 10px; }
.ts-sortblock .ts-check { font-size: 14px; }
.ts-sortblock .ts-check input { accent-color: var(--ts2-blue); }
/* old: sort dropdown was hidden on desktop (sort lived in the sidebar)
@media (min-width: 981px) {
  .ts-panelhead__right { display: none; }
}
*/
/* Sort dropdown sits at the top right of the products row */
.ts-panelhead__right .ts-select { min-width: 220px; }

/* ===== v4: Figma spacing + grey rounded sidebar card ===== */
/* Sidebar: one light-grey rounded panel, like Figma */
.ts-shop-wrap .ts-filters.ts-card {
  background: #f5f6f8; border: 0; border-radius: 18px; box-shadow: none; padding: 24px 22px 8px;
}
.ts-shop-wrap .ts-filters .ts-card__head { justify-content: flex-end; padding: 0 0 4px; min-height: 0; }
.ts-shop-wrap .ts-filters .ts-card__head strong { display: none; }
.ts-shop-wrap .ts-filters .ts-pill--btn { font-size: 13px; }
.ts-shop-wrap .ts-filterblock { padding: 22px 0; border-bottom: 1px solid #e1e3e8; }
.ts-shop-wrap .ts-filterblock:first-of-type { padding-top: 6px; }
.ts-shop-wrap .ts-filterblock:last-child { padding-bottom: 18px; }
.ts-shop-wrap .ts-ftitle { font-size: 20px; font-weight: 600; color: #111; margin-bottom: 18px; line-height: 1.2; }
.ts-shop-wrap .ts-ftitle .ts-pill { display: none; }

/* Categories: big square checkboxes, chevron on the right, scroll box */
.ts-shop-wrap .ts-flist.ts-cat-scroll { max-height: 320px; padding-right: 10px; margin-right: -10px; gap: 4px; }
.ts-shop-wrap .ts-flink { padding: 8px 0; gap: 12px; font-size: 16px; font-weight: 400; color: #111; }
.ts-shop-wrap .ts-flink::before { flex: 0 0 20px; width: 20px; height: 20px; border: 1.5px solid #9097a3; border-radius: 4px; }
.ts-shop-wrap .ts-flink.is-active::before { box-shadow: inset 0 0 0 4px #fff; }
.ts-shop-wrap .ts-flink__name { flex: 1; min-width: 0; }
.ts-shop-wrap .ts-flink__count { font-size: 13px; color: #6b6b75; order: 2; }
.ts-shop-wrap .ts-toggle-btn { order: 3; width: 24px; min-width: 24px; height: 24px; color: #111; }
.ts-shop-wrap .ts-toggle-btn svg { width: 14px; height: 14px; }

/* Price range: thicker track, round thumbs, value boxes */
.ts-shop-wrap .ts-range-track { height: 6px; margin: 12px 0 22px; background: #d9dce3; }
.ts-shop-wrap .ts-range-track input[type="range"]::-webkit-slider-thumb { width: 22px; height: 22px; border-width: 2px; }
.ts-shop-wrap .ts-range-track input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-width: 2px; }
.ts-shop-wrap .ts-range-labels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ts-shop-wrap .ts-range-labels span {
  height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px;
  background: #fff; border: 1px solid #d9dce3; border-radius: 8px; font-size: 15px; font-weight: 500;
}
.ts-shop-wrap .ts-range-wrap .ts-apply-price { height: 44px; margin-top: 6px; font-size: 15px; }

/* Sort order + rating + availability: round radios, bigger text */
.ts-shop-wrap .ts-checks { gap: 14px; }
.ts-shop-wrap .ts-check { font-size: 16px; color: #111; gap: 12px; }
.ts-shop-wrap .ts-check input { width: 20px; height: 20px; margin: 0; }
.ts-shop-wrap .ts-filterblock .btn { height: 42px; font-size: 15px; }

/* Products: spacing and card size like Figma */
.ts-shop-wrap .ts-panelhead { padding: 0 0 22px; }
.ts-shop-wrap .ts-grid { gap: 10px !important; }
.pcard.tsc { padding: 12px; padding-left:5px; padding-right:5px; border-radius: 16px; border-color: #e6e8ec; }
.tsc__media { border-radius: 12px; }
.tsc__wish { width: 38px; height: 38px; top: 12px; right: 12px; }
.ts-shop-wrap .tsc__body { padding: 16px 4px 0; gap: 8px; }
.ts-shop-wrap .tsc__title { font-size: 16px; font-weight: 500; min-height: 44px; line-height: 1.35; }
.ts-shop-wrap .tsc__price { font-size: 17px; font-weight: 600; }
.ts-shop-wrap .tsc__price del { font-size: 14px; }
.tsc__stock { font-size: 13px; }
.tsc__actions { gap: 10px; padding-top: 12px; }
.tsc__btn { height: 44px; font-size: 14px; font-weight: 500; border-radius: 6px; padding: 0 10px; }
.ts-shop-wrap .ts-subslider__title { font-size: 30px; }
.ts-shop-wrap .ts-subslider__head { margin-bottom: 22px; }

@media (max-width: 600px) {
  .ts-shop-wrap .ts-filters.ts-card { padding: 18px 16px; }
  .ts-shop-wrap .ts-grid { gap: 16px 12px; }
  .ts-shop-wrap .tsc__title { font-size: 14px; min-height: 38px; }
  .tsc__btn { height: 40px; font-size: 13px; }
}

/* ===== v5: outer gutter so the sidebar does not touch the page edge ===== */
.ts-shop-wrap { padding-inline: clamp(16px, 3vw, 48px); box-sizing: border-box; }
@media (max-width: 600px) { .ts-shop-wrap { padding-inline: 14px; } }

/* ===== v6: no inner scroll in categories, smaller fonts, clean no-image state ===== */
.ts-shop-wrap .ts-filters { position: static; }
.ts-shop-wrap .ts-flist.ts-cat-scroll { max-height: none; overflow: visible; padding-right: 0; margin-right: 0; }
.ts-flist.is-collapsed > .ts-cat-list--root > .ts-cat-item:nth-child(n+9) { display: none; }
.ts-cat-more { margin-top: 12px; padding: 0; border: 0; background: none; color: #0a84ff; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.ts-cat-more:hover { text-decoration: underline; }

/* Broken/missing image: empty grey box with a small icon, no alt text */
.is-noimg { position: relative; }
.is-noimg img { visibility: hidden; }
.is-noimg::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%);
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24' fill='none' stroke='%23b4b8c0' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='9' cy='9' r='2'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E");
}
.ts-subcard__img.is-noimg::after { width: 44px; height: 44px; }

/* Smaller type: sidebar */
.ts-shop-wrap .ts-filters .ts-card__head .ts-pill--btn { font-size: 12px; }
.ts-shop-wrap .ts-ftitle { font-size: 16px; margin-bottom: 14px; }
.ts-shop-wrap .ts-flink { font-size: 14px; padding: 6px 0; }
.ts-shop-wrap .ts-flink::before { flex: 0 0 18px; width: 18px; height: 18px; }
.ts-shop-wrap .ts-flink__count { font-size: 12px; }
.ts-shop-wrap .ts-check { font-size: 14px; }
.ts-shop-wrap .ts-range-labels span { font-size: 13px; height: 42px; }
.ts-shop-wrap .ts-range-wrap .ts-apply-price { font-size: 13px; height: 40px; }
.ts-shop-wrap .ts-filterblock .btn { font-size: 13px; height: 40px; }
.ts-shop-wrap .ts-filterblock { padding: 18px 0; }

/* Smaller type: products heading, cards, subcategory slider */
.ts-panelhead__left strong { font-size: 22px; }
.ts-count-label { font-size: 13px; }
.ts-shop-wrap .ts-subslider__title { font-size: 24px; }
.ts-subcard__name { font-size: 13px; }
.ts-subcard__count { font-size: 11px; }
.ts-shop-wrap .tsc__title { font-size: 14px; min-height: 40px; }
.ts-shop-wrap .tsc__price { font-size: 15px; }
.ts-shop-wrap .tsc__price del { font-size: 12px; }
.tsc__stock { font-size: 12px; }
.tsc__btn { font-size: 12px; height: 40px; }
@media (max-width: 600px) {
  .ts-shop-wrap .tsc__title { font-size: 13px; }
  .tsc__btn { font-size: 11px; height: 38px; }
}

/* ===== v8: smaller section headings (Figma scale) ===== */
.ts-shop-wrap .ts-subslider__title { font-size: 20px; }
.ts-panelhead__left strong { font-size: 20px; }
.ts-shop-wrap .ts-ftitle { font-size: 15px; font-weight: 600; }

/* ===== v12: guests see the price block disabled (login to filter) ===== */
.ts-filterblock.is-disabled .ts-range-track,
.ts-filterblock.is-disabled .ts-range-labels span { opacity: .45; }
.ts-filterblock.is-disabled input[type="range"] { pointer-events: none; }
.ts-filterblock .ts-apply-price:disabled { opacity: .45; cursor: not-allowed; }
.ts-price-note { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: #6b6b75; }

/* ===== Sidebar filter: sticky with its own scroll and a blue scrollbar (desktop) ===== */
@media (min-width: 981px) {
  .ts-shop-wrap .ts-filters.ts-card {
    position: sticky; top: 110px; align-self: start;
    max-height: calc(100vh - 130px); overflow-y: auto; overscroll-behavior: contain;
    scrollbar-width: thin; scrollbar-color: #0a84ff transparent;
  }
  .ts-shop-wrap .ts-filters.ts-card::-webkit-scrollbar { width: 6px; }
  .ts-shop-wrap .ts-filters.ts-card::-webkit-scrollbar-track { background: transparent; margin: 18px 0; }
  .ts-shop-wrap .ts-filters.ts-card::-webkit-scrollbar-thumb { background: #0a84ff; border-radius: 6px; }
  .ts-shop-wrap .ts-filters.ts-card::-webkit-scrollbar-thumb:hover { background: #0670d6; }
}

.tsc__btn:hover {
  border: 1px solid #0a84ff !important; }

/* v1.0.4 custom clicker banner */
.ts-cc-banner { display: block; width: 100%; margin: 0 0 18px; background: transparent; border-radius: 16px; overflow: hidden; line-height: 0; }
.ts-cc-banner img { width: 100%; height: auto; object-fit: contain; display: block; transition: transform .25s; box-shadow: 0 10px 28px rgba(15,23,42,.15);border-radius:20px; }
.ts-cc-banner:hover img { transform: scale(1.01); }
@media (max-width: 900px) { .ts-cc-banner img { height: auto; } }

.ts-cat-btn--primary{
   background: linear-gradient(110deg, rgb(0, 140, 255) 0%, rgb(0, 198, 255) 35%, rgb(8, 120, 237) 65%, rgb(0, 63, 189) 100%) !important;
    color: #fff !important;
}