/*
Theme Name:  TEBA Shop
Theme URI:   https://tebaleague.com
Author:      TEBA League / Supreme Agency
Author URI:  https://supremeagency.com
Description: Official WooCommerce storefront for the Thai Elite Basketball Association.
Version:     2.0.2
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
WC tested up to: 9.x
License:     Proprietary
Text Domain: teba-shop
Tags:        woocommerce, e-commerce, sports, basketball
*/

/* ============================================================
   GOOGLE FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --ts-paper:    #F2EFE6;
  --ts-paper-2:  #EAE6D9;
  --ts-card:     #FAF7EE;
  --ts-ink:      #0B0B0C;
  --ts-ink-2:    #2A2A2A;
  --ts-mute:     #777268;
  --ts-line:     rgba(26,26,26,.10);
  --ts-line-2:   rgba(26,26,26,.20);
  --ts-accent:   #D62246;
  --ts-navy:     #2D2557;
  --ts-gold:     #B5A06D;
  --ts-good:     #1F8A5B;
  --ts-display:  'Archivo Black', system-ui, sans-serif;
  --ts-ui:       'Inter', system-ui, sans-serif;
  --ts-mono:     'JetBrains Mono', ui-monospace, monospace;
  --ts-radius:   6px;
  --ts-max-w:    1440px;
}

/* ============================================================
   RESET + BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--ts-ui);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ts-ink-2);
  background: var(--ts-paper);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; }
ul, ol { list-style: none; }
input, select, textarea { font: inherit; }

/* ============================================================
   WPBAKERY RESET
   The single most important block of CSS in this file.
   WPBakery adds padding, overflow:hidden, and margins to every
   wrapper. We strip them all so our blocks control their own layout.
   ============================================================ */
.vc_row,
.vc_row.wpb_row,
.vc_row-fluid,
.vc_column_container,
.vc_col-sm-12,
.vc_column-inner,
.wpb_column,
.wpb_wrapper,
.wpb_content_element,
.wpb_text_column {
  padding: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Allow overflow for absolutely-positioned children (hero, CTA) */
.vc_row,
.vc_column-inner,
.wpb_wrapper,
.wpb_content_element {
  overflow: visible !important;
}

/* WPBakery sometimes sets max-width on rows — remove */
.vc_row > .container { max-width: none !important; }

/* ============================================================
   PROMO BAR
   ============================================================ */
.ts-promo-bar {
  background: var(--ts-ink);
  color: var(--ts-paper);
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 100;
  overflow: hidden;
}
.ts-promo-bar__messages {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 36px;
  overflow: hidden;
}
.ts-promo-bar__msg {
  position: absolute;
  font-family: var(--ts-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .35s, transform .35s;
  white-space: nowrap;
  pointer-events: none;
}
.ts-promo-bar__msg.ts-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.ts-promo-bar__btn {
  background: none;
  border: none;
  color: var(--ts-paper);
  padding: 0 12px;
  font-size: 18px;
  opacity: .5;
  transition: opacity .2s;
  flex-shrink: 0;
}
.ts-promo-bar__btn:hover { opacity: 1; }

/* ============================================================
   HEADER
   ============================================================ */
.ts-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--ts-paper);
  border-bottom: 1px solid var(--ts-line-2);
}
.ts-header-top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 32px;
  height: 68px;
}
.ts-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.ts-header-brand__logo { height: 44px; width: 44px; }
.ts-header-brand__name {
  font-family: var(--ts-display);
  font-size: 20px;
  color: var(--ts-ink);
  text-transform: uppercase;
  display: block;
}
.ts-header-brand__sub {
  font-family: var(--ts-mono);
  font-size: 7.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ts-mute);
  display: block;
}
.ts-header-search { flex: 1; max-width: 520px; }
.ts-header-search form {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--ts-line-2);
  border-radius: 100px;
  height: 42px;
  overflow: hidden;
  transition: border-color .2s;
}
.ts-header-search form:focus-within { border-color: var(--ts-ink-2); }
.ts-header-search input[type="search"] {
  flex: 1;
  padding: 0 18px;
  background: none;
  border: none;
  outline: none;
  font-size: 13.5px;
  color: var(--ts-ink-2);
}
.ts-header-search input::placeholder { color: #9E9A92; }
.ts-header-search button[type="submit"] {
  padding: 0 16px;
  background: none;
  border: none;
  color: #9E9A92;
  transition: color .2s;
}
.ts-header-search button[type="submit"]:hover { color: var(--ts-ink); }
.ts-header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ts-header-icon-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--ts-radius);
  color: var(--ts-ink);
  background: none;
  border: none;
  transition: background .15s;
  cursor: pointer;
}
.ts-header-icon-btn:hover { background: var(--ts-paper-2); }
.ts-cart-count {
  position: absolute;
  top: 5px; right: 5px;
  background: var(--ts-accent);
  color: #fff;
  font-family: var(--ts-mono);
  font-size: 8.5px;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
.ts-hamburger {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  border-radius: var(--ts-radius);
  color: var(--ts-ink);
  background: none; border: none;
}
/* Nav row */
.ts-header-nav {
  border-top: 1px solid rgba(0,0,0,.08);
  padding: 0 32px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ts-header-nav__items {
  display: flex;
  align-items: center;
  gap: 0;
}
.ts-header-nav__link {
  font-family: var(--ts-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ts-ink-2);
  padding: 0 13px;
  height: 40px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
  text-decoration: none;
}
.ts-header-nav__link:hover { color: var(--ts-ink); border-bottom-color: var(--ts-accent); }
.ts-header-nav__link.ts-sale { color: var(--ts-accent); font-weight: 800; }
.ts-header-nav__meta {
  font-family: var(--ts-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ts-mute);
  white-space: nowrap;
}
/* Mobile nav */
.ts-mobile-nav {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
}
.ts-mobile-nav__overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.5); opacity: 0; transition: opacity .3s;
}
.ts-mobile-nav__drawer {
  position: absolute; top: 0; left: 0;
  width: 320px; height: 100%;
  background: var(--ts-paper);
  transform: translateX(-100%);
  transition: transform .3s ease;
  overflow-y: auto;
  padding: 24px;
}
.ts-mobile-nav.ts-open { pointer-events: auto; }
.ts-mobile-nav.ts-open .ts-mobile-nav__overlay { opacity: 1; }
.ts-mobile-nav.ts-open .ts-mobile-nav__drawer { transform: translateX(0); }
.ts-mobile-nav__header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 32px;
}
.ts-mobile-nav__link {
  display: block;
  font-family: var(--ts-mono); font-size: 12px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ts-ink-2);
  padding: 14px 0; border-bottom: 1px solid var(--ts-line);
  transition: color .15s; text-decoration: none;
}
.ts-mobile-nav__link:hover { color: var(--ts-accent); }
.ts-mobile-nav__link.ts-sale { color: var(--ts-accent); }
/* Cart drawer */
.ts-cart-overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.ts-cart-overlay.ts-open { opacity: 1; pointer-events: auto; }
.ts-cart-drawer {
  position: fixed; top: 0; right: 0;
  width: 400px; max-width: 100vw; height: 100%;
  background: var(--ts-paper);
  z-index: 160;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s ease;
  box-shadow: -4px 0 32px rgba(0,0,0,.12);
}
.ts-cart-drawer.ts-open { transform: translateX(0); }
.ts-cart-drawer__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--ts-line);
  display: flex; align-items: center; justify-content: space-between;
}
.ts-cart-drawer__title {
  font-family: var(--ts-display); font-size: 18px;
  text-transform: uppercase; color: var(--ts-ink);
}
.ts-cart-drawer__count { font-size: 14px; color: var(--ts-mute); }
.ts-cart-drawer__close {
  background: none; border: none; font-size: 22px; color: var(--ts-mute);
  cursor: pointer; line-height: 1;
}
.ts-cart-drawer__items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.ts-cart-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 0; border-bottom: 1px solid var(--ts-line);
}
.ts-cart-item__img {
  width: 72px; height: 72px; object-fit: cover;
  border-radius: var(--ts-radius); flex-shrink: 0;
}
.ts-cart-item__info { flex: 1; }
.ts-cart-item__name {
  font-family: var(--ts-display); font-size: 13px;
  text-transform: uppercase; color: var(--ts-ink); margin-bottom: 4px;
}
.ts-cart-item__meta {
  font-size: 11px; color: var(--ts-mute); margin-bottom: 8px;
}
.ts-cart-item__bottom { display: flex; align-items: center; justify-content: space-between; }
.ts-qty-stepper {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--ts-line-2); border-radius: var(--ts-radius);
  overflow: hidden;
}
.ts-qty-btn {
  width: 30px; height: 30px;
  background: none; border: none;
  font-size: 16px; color: var(--ts-ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s;
}
.ts-qty-btn:hover { background: var(--ts-paper-2); }
.ts-qty-num { width: 30px; text-align: center; font-size: 13px; }
.ts-cart-item__price {
  font-family: var(--ts-display); font-size: 14px; color: var(--ts-ink);
}
.ts-cart-item__remove {
  background: none; border: none; color: var(--ts-mute);
  font-size: 18px; cursor: pointer; flex-shrink: 0;
  padding: 0 4px;
}
.ts-cart-drawer__footer {
  padding: 20px 24px;
  border-top: 1px solid var(--ts-line);
}
.ts-cart-subtotal {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}
.ts-cart-subtotal__label { font-family: var(--ts-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ts-mute); }
.ts-cart-subtotal__amount { font-family: var(--ts-display); font-size: 20px; color: var(--ts-ink); }
.ts-cart-vat { font-size: 11px; color: var(--ts-mute); margin-bottom: 16px; }
.ts-cart-drawer__ctas { display: flex; flex-direction: column; gap: 8px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.ts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--ts-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding: 13px 24px;
  border-radius: var(--ts-radius);
  border: none;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  text-decoration: none;
  white-space: nowrap;
}
.ts-btn--primary { background: var(--ts-accent); color: #fff; }
.ts-btn--primary:hover { background: #b81d3c; }
.ts-btn--outline { background: transparent; border: 2px solid var(--ts-ink); color: var(--ts-ink); }
.ts-btn--outline:hover { background: var(--ts-ink); color: #fff; }
.ts-btn--ghost { background: transparent; border: 1.5px solid var(--ts-line-2); color: var(--ts-ink-2); }
.ts-btn--ghost:hover { border-color: var(--ts-ink); color: var(--ts-ink); }
.ts-btn--full { width: 100%; }

/* Accessible outline button used by plugin */
.ts-outline-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--ts-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ts-ink);
  border: 1.5px solid var(--ts-line-2);
  padding: 9px 16px;
  border-radius: var(--ts-radius);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s;
}
.ts-outline-button:hover { background: var(--ts-ink); border-color: var(--ts-ink); color: #fff; }

/* ============================================================
   SKIP LINK
   ============================================================ */
.ts-skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--ts-accent); color: #fff;
  padding: 8px 16px; z-index: 9999;
  font-family: var(--ts-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  border-radius: var(--ts-radius); transition: top .2s;
}
.ts-skip-link:focus { top: 16px; }

/* ============================================================
   MAIN + 404
   ============================================================ */
#ts-main { display: block; }
.ts-main--404 {
  background: var(--ts-ink); color: #fff;
  min-height: 70vh; display: flex; align-items: center;
}
.ts-404__inner { text-align: center; padding: 64px 24px; }
.ts-404__num {
  font-family: var(--ts-display); font-size: 140px;
  color: rgba(255,255,255,.06); line-height: 1; margin: 0;
}
.ts-404__title {
  font-family: var(--ts-display); font-size: 48px;
  text-transform: uppercase; margin: -30px 0 16px; position: relative;
  color: #fff;
}
.ts-404__sub { font-size: 16px; color: rgba(255,255,255,.6); margin-bottom: 40px; }
.ts-404__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   PAGINATION
   ============================================================ */
.ts-pagination { margin-top: 48px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.ts-pagination a,
.ts-pagination span {
  font-family: var(--ts-mono); font-size: 12px; font-weight: 700;
  padding: 8px 14px; border-radius: var(--ts-radius);
  border: 1.5px solid var(--ts-line-2); color: var(--ts-ink-2);
  text-decoration: none; transition: background .15s, border-color .15s;
}
.ts-pagination .current,
.ts-pagination a:hover {
  background: var(--ts-ink); border-color: var(--ts-ink); color: #fff;
}

/* ============================================================
   FOOTER (theme footer — fallback when plugin footer not used)
   ============================================================ */
.ts-footer {
  background: var(--ts-ink);
  color: rgba(255,255,255,.75);
}
.ts-footer__main {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 56px 40px 40px;
  max-width: var(--ts-max-w); margin: 0 auto;
}
.ts-footer__brand-name {
  font-family: var(--ts-display); font-size: 20px;
  text-transform: uppercase; color: #fff; margin-bottom: 12px;
}
.ts-footer__brand-desc {
  font-size: 13px; line-height: 1.6;
  color: rgba(255,255,255,.5); margin-bottom: 20px; max-width: 280px;
}
.ts-footer__socials { display: flex; gap: 8px; flex-wrap: wrap; }
.ts-footer__social {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: rgba(255,255,255,.08); border-radius: var(--ts-radius);
  color: rgba(255,255,255,.6); transition: background .2s, color .2s;
  text-decoration: none;
}
.ts-footer__social:hover { background: rgba(255,255,255,.18); color: #fff; }
.ts-footer__col-title {
  font-family: var(--ts-mono); font-size: 9.5px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: rgba(255,255,255,.35); margin-bottom: 18px;
}
.ts-footer__links { display: flex; flex-direction: column; gap: 10px; }
.ts-footer__link {
  font-size: 13.5px; color: rgba(255,255,255,.6);
  text-decoration: none; transition: color .15s;
}
.ts-footer__link:hover { color: #fff; }
.ts-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 40px;
  max-width: var(--ts-max-w); margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.ts-footer__copy { font-size: 12px; color: rgba(255,255,255,.3); }
.ts-footer__payments { display: flex; gap: 6px; flex-wrap: wrap; }
.ts-payment-chip {
  font-family: var(--ts-mono); font-size: 9px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  padding: 4px 9px; border-radius: 4px;
}

/* ============================================================
   NEWSLETTER (theme footer newsletter strip)
   ============================================================ */
.ts-newsletter {
  background: var(--ts-navy);
  padding: 72px 40px;
}
.ts-newsletter__inner {
  max-width: 640px; margin: 0 auto; text-align: center;
}
.ts-newsletter__inner h2 {
  font-family: var(--ts-display);
  font-size: clamp(28px, 5vw, 48px); font-weight: 900;
  text-transform: uppercase; letter-spacing: -.03em;
  line-height: .92; color: #fff; margin: 0 0 14px;
}
.ts-newsletter__inner p {
  font-size: 14.5px; line-height: 1.55;
  color: rgba(255,255,255,.65); margin: 0 0 32px;
}
.ts-newsletter__form {
  display: flex; max-width: 480px; margin: 0 auto;
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: var(--ts-radius); overflow: hidden;
  background: rgba(255,255,255,.06);
}
.ts-newsletter__input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #fff; font-size: 14px; padding: 0 20px; height: 52px;
}
.ts-newsletter__input::placeholder { color: rgba(255,255,255,.35); }
.ts-newsletter__btn {
  background: #fff; color: var(--ts-ink); border: none;
  font-family: var(--ts-mono); font-size: 11px; font-weight: 800;
  letter-spacing: .16em; text-transform: uppercase;
  padding: 0 24px; height: 52px; cursor: pointer;
  transition: background .2s; flex-shrink: 0;
}
.ts-newsletter__btn:hover { background: var(--ts-paper); }
.ts-newsletter__success { display: none; color: rgba(255,255,255,.8); margin-top: 16px; font-size: 13px; }

/* ============================================================
   WC NOTICES
   ============================================================ */
.ts-wc-notices { list-style: none; margin: 0 0 24px; padding: 14px 20px; border-radius: var(--ts-radius); }
.ts-wc-notices--error { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.ts-wc-notices--success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.ts-wc-notices--info { background: #eff6ff; border: 1px solid #93c5fd; color: #1e40af; }

/* ============================================================
   UTILITY
   ============================================================ */
.screen-reader-text {
  position: absolute !important; width: 1px !important; height: 1px !important;
  overflow: hidden !important; clip: rect(0,0,0,0) !important;
  white-space: nowrap !important; border: 0 !important;
}
.ts-hp {
  position: absolute !important; width: 1px !important; height: 1px !important;
  overflow: hidden !important; clip: rect(0,0,0,0) !important;
  white-space: nowrap !important; border: 0 !important;
}
