/* ==========================================================================
   The Karate Shop — mobile-first stylesheet
   Base = 390px. Everything scales UP from there.
   ========================================================================== */

:root{
  --tks-red:#C8102E;
  --tks-red-dark:#A00D25;
  --tks-ink:#141618;
  --tks-body:#4A5158;
  --tks-mute:#8E979E;
  --tks-line:#E4E7EA;
  --tks-soft:#F6F7F8;
  --tks-green:#0F7B3E;
  --tks-amber:#B45309;
  --tks-blue:#0B3C7A;
  --tks-r:10px;
  --tks-shadow:0 1px 3px rgba(20,22,24,.08),0 8px 24px rgba(20,22,24,.06);
  --tks-max:1280px;
}

/* --------------------------------------------------------------------------
   1. Base
   -------------------------------------------------------------------------- */
body{
  color:var(--tks-ink);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
img{max-width:100%;height:auto}

/* Kill Astra's sidebar completely — chips replace it */
.woocommerce #secondary,
.ast-woocommerce-container #secondary{display:none!important}
.woocommerce #primary,
.ast-woocommerce-container #primary{width:100%!important;padding-left:0;padding-right:0}

/* --------------------------------------------------------------------------
   2. Announcement bar
   -------------------------------------------------------------------------- */
.tks-ann{
  background:var(--tks-ink);color:#fff;font-size:11.5px;
  text-align:center;padding:8px 12px;font-weight:500;letter-spacing:.02em;
}
.tks-ann b{color:#FFC9CF}

/* --------------------------------------------------------------------------
   3. Header — search-led, sticky
   -------------------------------------------------------------------------- */
.tks-hdr{
  position:sticky;top:0;z-index:600;
  background:#fff;border-bottom:1px solid var(--tks-line);
}
.tks-hdr__row{display:flex;align-items:center;gap:12px;padding:10px 14px}
.tks-logo img{max-height:38px;width:auto}
.tks-hdr__icons{margin-left:auto;display:flex;gap:2px;align-items:center}
.tks-ico{
  width:42px;height:42px;display:grid;place-items:center;
  border-radius:9px;position:relative;color:var(--tks-ink);
}
.tks-ico:hover{background:var(--tks-soft)}
.tks-ico svg{width:21px;height:21px;stroke:currentColor;stroke-width:1.9;fill:none;
  stroke-linecap:round;stroke-linejoin:round}
.tks-cartcount{
  position:absolute;top:5px;right:5px;background:var(--tks-red);color:#fff;
  font-size:9.5px;font-weight:700;min-width:16px;height:16px;border-radius:9px;
  display:grid;place-items:center;padding:0 4px;line-height:1;
}
.tks-cartcount.is-empty{display:none}

/* Search field */
.tks-searchwrap{padding:0 14px 11px}
.tks-search{
  display:flex;align-items:center;gap:9px;
  background:var(--tks-soft);border:1.5px solid var(--tks-line);
  border-radius:var(--tks-r);padding:0 12px;height:46px;
  transition:border-color .15s,background .15s;
}
.tks-search:focus-within{border-color:var(--tks-ink);background:#fff}
.tks-search svg{width:19px;height:19px;stroke:var(--tks-body);stroke-width:2;fill:none;flex:0 0 auto}
.tks-search input{
  border:none;background:none;outline:none;width:100%;
  font:inherit;font-size:16px; /* 16px stops iOS zoom-on-focus */
  color:var(--tks-ink);
}
.tks-search input::placeholder{color:var(--tks-mute)}

/* Predictive results panel */
.tks-pred{
  position:absolute;left:0;right:0;top:100%;
  background:#fff;border-top:1px solid var(--tks-line);
  box-shadow:var(--tks-shadow);max-height:70vh;overflow-y:auto;
  display:none;z-index:610;
}
.tks-pred.is-open{display:block}
.tks-pred__head{
  font-size:10.5px;font-weight:700;letter-spacing:.09em;
  color:var(--tks-mute);padding:12px 14px 6px;text-transform:uppercase;
}
.tks-pred__item{display:flex;gap:11px;align-items:center;padding:9px 14px;color:inherit}
.tks-pred__item:hover,.tks-pred__item:focus{background:var(--tks-soft)}
.tks-pred__item img{
  width:46px;height:46px;object-fit:contain;background:var(--tks-soft);
  border-radius:7px;flex:0 0 auto;mix-blend-mode:multiply;
}
.tks-pred__n{font-size:13.5px;font-weight:500;line-height:1.3}
.tks-pred__p{font-size:12.5px;color:var(--tks-body);margin-top:1px}
.tks-pred__p b{color:var(--tks-ink);font-weight:700}
.tks-pred__empty{padding:18px 14px;font-size:13px;color:var(--tks-mute);text-align:center}

/* --------------------------------------------------------------------------
   4. Discipline rail
   -------------------------------------------------------------------------- */
.tks-sec{padding:18px 0}
.tks-sec__head{
  display:flex;align-items:baseline;justify-content:space-between;
  padding:0 14px 11px;
}
.tks-sec__head h2{font-size:16px;font-weight:700;letter-spacing:-.01em;margin:0}
.tks-sec__head a{font-size:12.5px;color:var(--tks-red);font-weight:600}

.tks-rail{
  display:flex;gap:9px;overflow-x:auto;padding:2px 14px 4px;
  scrollbar-width:none;-webkit-overflow-scrolling:touch;
  scroll-snap-type:x proximity;
}
.tks-rail::-webkit-scrollbar{display:none}
.tks-disc{flex:0 0 100px;text-align:center;scroll-snap-align:start;color:inherit}
.tks-disc__img{
  width:100px;height:100px;border-radius:12px;overflow:hidden;
  background:var(--tks-soft);border:1px solid var(--tks-line);
}
.tks-disc__img img{width:100%;height:100%;object-fit:cover}
.tks-disc__n{font-size:11.5px;font-weight:600;margin-top:7px;line-height:1.25}
.tks-disc__c{font-size:10.5px;color:var(--tks-mute)}

/* --------------------------------------------------------------------------
   5. Trust bar
   -------------------------------------------------------------------------- */
.tks-trust{
  display:grid;grid-template-columns:repeat(3,1fr);gap:1px;
  background:var(--tks-line);
  border-top:1px solid var(--tks-line);border-bottom:1px solid var(--tks-line);
}
.tks-trust__i{background:#fff;padding:14px 8px;text-align:center}
.tks-trust__i svg{
  width:20px;height:20px;stroke:var(--tks-red);stroke-width:1.8;fill:none;
  margin:0 auto 6px;display:block;stroke-linecap:round;stroke-linejoin:round;
}
.tks-trust__i b{display:block;font-size:11px;font-weight:700}
.tks-trust__i span{font-size:10px;color:var(--tks-mute);display:block;line-height:1.3}

/* --------------------------------------------------------------------------
   6. Product grid — 2-up on mobile
   -------------------------------------------------------------------------- */
.woocommerce ul.products,
.woocommerce-page ul.products{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:1px!important;
  background:var(--tks-line);
  border-top:1px solid var(--tks-line);
  margin:0!important;padding:0!important;
}
.woocommerce ul.products li.product{
  width:100%!important;margin:0!important;padding:11px 11px 14px!important;
  background:#fff;float:none!important;position:relative;
}
.woocommerce ul.products li.product a img{
  aspect-ratio:1;object-fit:contain;background:var(--tks-soft);
  border-radius:8px;margin-bottom:9px;mix-blend-mode:multiply;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title{
  font-size:12.5px!important;font-weight:500!important;line-height:1.32!important;
  padding:0!important;margin:0 0 5px!important;
  min-height:32px;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.woocommerce ul.products li.product .price{
  font-size:14.5px!important;font-weight:700!important;
  letter-spacing:-.01em;color:var(--tks-ink)!important;margin:0!important;
}
.woocommerce ul.products li.product .price del{
  font-size:11.5px;color:var(--tks-mute);font-weight:400;margin-left:5px;
}
.woocommerce ul.products li.product .price ins{text-decoration:none;font-weight:700}

/* Badges */
.tks-tag{
  position:absolute;top:18px;left:18px;z-index:3;
  font-size:9.5px;font-weight:700;letter-spacing:.05em;
  padding:3px 7px;border-radius:5px;line-height:1.4;
}
.tks-tag--wkf{background:var(--tks-blue);color:#fff}
.woocommerce span.onsale{
  position:absolute!important;top:18px!important;right:18px!important;left:auto!important;
  background:var(--tks-red)!important;color:#fff!important;
  font-size:9.5px!important;font-weight:700!important;letter-spacing:.05em;
  padding:3px 7px!important;border-radius:5px!important;
  min-height:0!important;min-width:0!important;line-height:1.4!important;margin:0!important;
}

/* Stock indicator */
.tks-stk{
  font-size:10.5px;font-weight:600;color:var(--tks-green);
  margin-top:4px;display:flex;align-items:center;gap:4px;
}
.tks-stk i{width:5px;height:5px;border-radius:99px;background:currentColor;display:block;flex:0 0 auto}
.tks-stk--low{color:var(--tks-amber)}
.tks-stk--out{color:var(--tks-mute)}

/* Add-to-cart on the card: icon-only on mobile to save space */
.woocommerce ul.products li.product .button{
  position:absolute;bottom:12px;right:11px;
  width:34px;height:34px;padding:0!important;border-radius:8px;
  background:var(--tks-ink)!important;color:#fff!important;
  font-size:0!important;display:grid;place-items:center;
  min-height:0!important;border:none!important;
}
.woocommerce ul.products li.product .button::after{
  content:"+";font-size:20px;font-weight:400;line-height:1;color:#fff;
}
.woocommerce ul.products li.product .button.loading::after{content:"…"}
.woocommerce ul.products li.product .added_to_cart{display:none}

/* --------------------------------------------------------------------------
   7. Category page — sticky filter chips
   -------------------------------------------------------------------------- */
.tks-crumb{font-size:11.5px;color:var(--tks-mute);padding:12px 14px 0}
.tks-ctitle{padding:5px 14px 12px}
.tks-ctitle h1{font-size:22px;letter-spacing:-.025em;margin:0}
.tks-ctitle p{font-size:12.5px;color:var(--tks-mute);margin:2px 0 0}

.tks-chips{
  display:flex;gap:7px;overflow-x:auto;
  padding:11px 14px 12px;scrollbar-width:none;
  position:sticky;top:var(--tks-hdr-h,120px);background:#fff;z-index:500;
  border-bottom:1px solid var(--tks-line);
  -webkit-overflow-scrolling:touch;
}
.tks-chips::-webkit-scrollbar{display:none}
.tks-chip{
  flex:0 0 auto;padding:8px 14px;border-radius:99px;
  border:1.5px solid var(--tks-line);font-size:12.5px;font-weight:600;
  color:var(--tks-body);white-space:nowrap;
  display:flex;align-items:center;gap:5px;
}
.tks-chip.is-on{background:var(--tks-ink);color:#fff;border-color:var(--tks-ink)}
.tks-chip svg{width:14px;height:14px;stroke:currentColor;stroke-width:2.2;fill:none}

/* --------------------------------------------------------------------------
   8. Single product
   -------------------------------------------------------------------------- */
.single-product div.product{padding-bottom:86px} /* clearance for sticky ATC */

.single-product .woocommerce-product-gallery{
  background:var(--tks-soft);margin:0 0 4px;padding:20px;
}
.single-product .product_title{
  font-size:21px!important;letter-spacing:-.025em;line-height:1.24;margin:6px 0 9px!important;
}
.single-product .summary{padding:16px 14px 0}
.single-product .summary .price{
  font-size:26px!important;font-weight:800!important;letter-spacing:-.03em;color:var(--tks-ink)!important;
}
.single-product .summary .price del{font-size:15px;color:var(--tks-mute);font-weight:400;margin-left:7px}

/* Variation selectors as tappable chips instead of dropdowns */
.tks-swatches{display:flex;gap:7px;flex-wrap:wrap;margin:8px 0 0}
.tks-swatch{
  min-width:48px;height:44px;padding:0 14px;
  border:1.5px solid var(--tks-line);border-radius:8px;
  display:grid;place-items:center;font-size:13.5px;font-weight:600;
  color:var(--tks-body);background:#fff;cursor:pointer;
  transition:border-color .12s,background .12s,color .12s;
}
.tks-swatch:hover{border-color:#C3C9CF}
.tks-swatch.is-on{border-color:var(--tks-ink);background:var(--tks-ink);color:#fff}
.tks-swatch.is-out{
  color:#C2C8CD;border-color:#EDEFF1;text-decoration:line-through;
  cursor:not-allowed;pointer-events:none;
}
.tks-optlbl{
  font-size:12.5px;font-weight:700;margin:16px 0 0;
  display:flex;justify-content:space-between;align-items:center;
}
.tks-optlbl a{color:var(--tks-red);font-weight:600;font-size:11.5px;text-decoration:underline}
.tks-optlbl .tks-selected{color:var(--tks-mute);font-weight:500}

/* Hide the original select once swatches are active */
.tks-has-swatches .variations select{display:none}
.tks-has-swatches .variations label{display:none}
.tks-has-swatches table.variations{margin:0;border:none}
.tks-has-swatches table.variations td{padding:0;border:none;display:block}

/* Delivery / collect / payment info blocks */
.tks-info{
  display:flex;gap:11px;align-items:flex-start;
  background:var(--tks-soft);border-radius:9px;padding:12px;
  margin:10px 0;font-size:12px;line-height:1.45;
}
.tks-info svg{
  width:18px;height:18px;stroke:var(--tks-ink);stroke-width:1.8;fill:none;
  flex:0 0 auto;margin-top:1px;stroke-linecap:round;stroke-linejoin:round;
}
.tks-info b{display:block;font-size:12.5px}
.tks-info span{color:var(--tks-body)}

/* Sticky add-to-cart */
.tks-atc{
  position:fixed;bottom:0;left:0;right:0;z-index:700;
  background:rgba(255,255,255,.97);
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
  border-top:1px solid var(--tks-line);
  padding:11px 14px calc(14px + env(safe-area-inset-bottom));
  display:flex;gap:9px;align-items:center;
  transform:translateY(100%);transition:transform .2s ease;
}
.tks-atc.is-visible{transform:translateY(0)}
.tks-atc .quantity{flex:0 0 auto;margin:0}
.tks-atc .quantity input{
  height:50px;width:64px;border:1.5px solid var(--tks-line);border-radius:9px;
  font-size:15px;font-weight:700;text-align:center;
}
.tks-atc button{
  flex:1;height:50px;border-radius:9px!important;
  background:var(--tks-red)!important;color:#fff!important;
  font-size:15px!important;font-weight:700!important;letter-spacing:.01em;
  border:none!important;
}
.tks-atc button:hover{background:var(--tks-red-dark)!important}

/* --------------------------------------------------------------------------
   9. Cart & checkout
   -------------------------------------------------------------------------- */
.tks-ship{
  background:#E9F6EE;border:1px solid #BFE3CD;border-radius:9px;
  padding:12px;margin:0 0 14px;font-size:12.5px;color:#0F5C31;line-height:1.4;
}
.tks-ship b{font-weight:700}
.tks-ship--done{background:#E9F6EE;border-color:#9FD4B6}
.tks-ship__bar{
  display:block;height:6px;background:#CFE8DA;border-radius:9px;
  margin-top:8px;overflow:hidden;
}
.tks-ship__bar i{display:block;height:100%;background:var(--tks-green);border-radius:9px;transition:width .3s}

/* Payment method list */
.woocommerce-checkout #payment ul.payment_methods li{
  border:1.5px solid var(--tks-line);border-radius:9px;
  padding:12px!important;margin-bottom:8px;list-style:none;
}
.woocommerce-checkout #payment ul.payment_methods li.tks-pm-active{
  border-color:var(--tks-ink);background:#FAFBFB;
}
.woocommerce-checkout #payment ul.payment_methods label{
  font-size:13.5px;font-weight:700;
}
.woocommerce-checkout #payment div.payment_box{
  background:none!important;padding:6px 0 0 28px!important;margin:0!important;
  font-size:11.5px;color:var(--tks-body);line-height:1.45;
}
.woocommerce-checkout #payment div.payment_box::before{display:none!important}

/* Primary buttons */
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce .checkout-button{
  background:var(--tks-red)!important;color:#fff!important;
  border-radius:9px!important;font-weight:700!important;
  min-height:50px;font-size:15px!important;
}
.woocommerce a.button.alt:hover,.woocommerce button.button.alt:hover{
  background:var(--tks-red-dark)!important;
}

/* --------------------------------------------------------------------------
   10. Mobile bottom nav
   -------------------------------------------------------------------------- */
.tks-bnav{
  position:fixed;bottom:0;left:0;right:0;z-index:650;
  background:rgba(255,255,255,.96);
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
  border-top:1px solid var(--tks-line);
  display:grid;grid-template-columns:repeat(4,1fr);
  padding-bottom:env(safe-area-inset-bottom);
}
.tks-bnav__i{padding:9px 0 5px;text-align:center;color:#9AA2A9;position:relative}
.tks-bnav__i.is-on{color:var(--tks-red)}
.tks-bnav__i svg{
  width:22px;height:22px;stroke:currentColor;stroke-width:1.9;fill:none;
  margin:0 auto 3px;display:block;stroke-linecap:round;stroke-linejoin:round;
}
.tks-bnav__i span{font-size:10px;font-weight:600;display:block}
body.tks-has-bnav{padding-bottom:64px}
/* When the sticky ATC is up, the bottom nav gets out of the way */
body.tks-atc-open .tks-bnav{transform:translateY(100%);transition:transform .2s}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.tks-ftr{background:var(--tks-ink);color:#A8B0B7;padding:28px 14px 26px;font-size:12.5px}
.tks-ftr__col{margin-bottom:22px}
.tks-ftr__col h3{
  color:#fff;font-size:11px;font-weight:700;letter-spacing:.1em;
  margin:0 0 10px;text-transform:uppercase;
}
.tks-ftr__col a{display:block;padding:5px 0;color:#A8B0B7}
.tks-ftr__col a:hover{color:#fff}
.tks-ftr__bot{
  border-top:1px solid #2A2E32;padding-top:16px;
  font-size:11px;color:#727A81;line-height:1.6;
}

/* --------------------------------------------------------------------------
   12. Breakpoints — everything above was mobile
   -------------------------------------------------------------------------- */

/* Large phone / small tablet */
@media (min-width:600px){
  .woocommerce ul.products,
  .woocommerce-page ul.products{grid-template-columns:repeat(3,1fr)!important}
  .tks-disc,.tks-disc__img{flex-basis:120px}
  .tks-disc__img{width:120px;height:120px}
}

/* Tablet */
@media (min-width:782px){
  .tks-trust{grid-template-columns:repeat(4,1fr)}
  .tks-ftr{padding:36px 40px 28px}
  .tks-ftr__grid{display:grid;grid-template-columns:repeat(4,1fr);gap:30px}
}

/* Desktop */
@media (min-width:993px){
  .tks-bnav{display:none}
  body.tks-has-bnav{padding-bottom:0}

  .tks-hdr__row{padding:14px 40px;gap:28px;max-width:var(--tks-max);margin:0 auto}
  .tks-searchwrap{padding:0;flex:1;max-width:540px}
  .tks-sec__head,.tks-rail,.tks-crumb,.tks-ctitle,.tks-chips{
    padding-left:40px;padding-right:40px;
  }

  .woocommerce ul.products,
  .woocommerce-page ul.products{grid-template-columns:repeat(4,1fr)!important}

  /* Product cards get a hover state on pointer devices */
  .woocommerce ul.products li.product{transition:box-shadow .15s}
  .woocommerce ul.products li.product:hover{box-shadow:var(--tks-shadow);z-index:2}

  /* Two-column PDP; sticky ATC becomes inline */
  .single-product div.product{
    display:grid;grid-template-columns:1fr 1fr;gap:44px;
    max-width:var(--tks-max);margin:0 auto;padding:24px 40px 40px;
  }
  .single-product .woocommerce-product-gallery{border-radius:12px;margin:0}
  .single-product .summary{padding:0}
  .single-product .woocommerce-tabs{grid-column:1/-1}
  .tks-atc{
    position:static;transform:none;background:none;border:none;
    padding:18px 0 0;backdrop-filter:none;-webkit-backdrop-filter:none;
  }
  .tks-atc button{max-width:320px}

  /* Add-to-cart on cards becomes a full-width button on hover */
  .woocommerce ul.products li.product .button{
    position:static;width:100%;height:40px;margin-top:10px!important;
    font-size:13px!important;font-weight:600!important;
  }
  .woocommerce ul.products li.product .button::after{content:"Add to cart";font-size:13px}
}

/* --------------------------------------------------------------------------
   13. Accessibility & motion
   -------------------------------------------------------------------------- */
:focus-visible{outline:2px solid var(--tks-red);outline-offset:2px;border-radius:4px}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;animation-iteration-count:1!important;
    transition-duration:.01ms!important;scroll-behavior:auto!important;
  }
}

/* Print — order confirmations get printed for the shop file */
@media print{
  .tks-hdr,.tks-bnav,.tks-atc,.tks-ann,.tks-ftr,.tks-chips{display:none!important}
}
