/*
Theme Name: JerseyQuay Store
Theme URI: https://jerseyquay.com/
Author: JerseyQuay
Description: Cheap stitched jersey storefront modeled on league shop layout.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: jerseyquay
*/

:root {
  --navy: #0c1b33;
  --navy-2: #142847;
  --red: #c8102e;
  --gold: #d4a017;
  --text: #1b1b1b;
  --muted: #6b7280;
  --line: #e6e8ee;
  --bg: #f5f7fb;
  --max: 1240px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Barlow", Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #fff;
  font-size: 15px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; }
ul { list-style: none; margin: 0; padding: 0; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

.topbar {
  background: var(--navy);
  color: #fff;
  font-size: 13px;
  letter-spacing: .02em;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
}
.topbar a { color: #fff; }
.topbar a:hover { color: var(--gold); }

.header { background: #fff; border-bottom: 1px solid var(--line); }
.header-mid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 92px;
  gap: 12px;
}
.header-left, .header-right { display: flex; align-items: center; gap: 10px; }
.header-right { justify-content: flex-end; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--navy); }
.logo svg { width: 34px; height: 34px; }
.logo-text { font-size: 28px; font-weight: 800; letter-spacing: .04em; }
.logo-text span { color: var(--red); }
.icon-btn, .cart, .search-btn {
  border: 0;
  background: transparent;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
  cursor: pointer;
}
.icon-btn, .cart { width: 36px; height: 36px; }
.menu-toggle { display: none; }
.search-btn { gap: 6px; width: auto; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.count {
  position: absolute; top: -3px; right: -4px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px;
  background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
}

.search-panel {
  display: none; position: fixed; inset: 0; background: rgba(255,255,255,.98);
  z-index: 80; place-items: center; padding: 40px 20px;
}
.search-panel.is-open { display: grid; }
.search-close { position: absolute; top: 18px; right: 24px; border: 0; background: none; font-size: 34px; }
.search-panel form { width: min(720px, 92vw); display: flex; border-bottom: 2px solid var(--navy); }
.search-panel input { flex: 1; border: 0; padding: 14px 0; font-size: 22px; outline: none; }
.search-panel button[type="submit"] { border: 0; background: none; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }

.nav {
  display: flex; justify-content: center; gap: 28px;
  padding: 0 16px 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.nav a { color: var(--navy); font-size: 14px; }
.nav a:hover, .nav .current a { color: var(--red); }

.drawer { display: none; }
.drawer.is-open { display: block; }
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 90; }
.drawer-panel {
  position: fixed; left: 0; top: 0; bottom: 0; width: min(320px, 86vw);
  background: #fff; z-index: 91; padding: 24px 20px; overflow: auto;
}
.drawer-panel a { display: block; padding: 10px 0; font-weight: 700; color: var(--navy); border-bottom: 1px solid var(--line); }

.league-head { text-align: center; padding: 42px 16px 18px; }
.league-head h5 {
  margin: 0; font-size: 22px; letter-spacing: .12em; text-transform: uppercase; color: var(--navy);
}
.leagues {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; padding-bottom: 28px;
}
.league-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 8px 14px; transition: transform .15s ease, box-shadow .15s ease;
}
.league-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(12,27,51,.08); }
.league-mark {
  width: 74px; height: 74px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-weight: 800; letter-spacing: .04em;
}
.league-card h6 { margin: 0; font-size: 15px; color: var(--navy); }
.lg-nfl { background: #013369; }
.lg-mlb { background: #041e42; }
.lg-nhl { background: #111; }
.lg-nba { background: #c8102e; }
.lg-soccer { background: #1e7a46; }
.lg-caps { background: #7a1f2b; }

.section-title {
  text-align: center; margin: 18px 0 20px;
  font-size: 28px; color: var(--navy); letter-spacing: .04em;
}
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-bottom: 36px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column;
}
.thumb { position: relative; background: #f3f4f6; }
.thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.badge-sale {
  position: absolute; left: 10px; top: 10px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 4px; letter-spacing: .06em;
}
.card h3 { margin: 12px 12px 6px; font-size: 14px; line-height: 1.35; min-height: 54px; }
.card h3 a:hover { color: var(--red); }
.price { margin: 0 12px 14px; font-weight: 700; }
.price del { color: var(--muted); font-weight: 500; margin-right: 8px; }
.price ins { text-decoration: none; color: var(--red); }

.crumbs { font-size: 13px; color: var(--muted); padding: 16px 0; }
.crumbs a { color: var(--navy); }

.shop-wrap, .page-main { padding-bottom: 48px; }
.page-title { font-size: 32px; color: var(--navy); margin: 8px 0 18px; }

.teamcate {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px;
  list-style: none; padding: 0; margin: 0 0 28px;
}
.teamcate li {
  border: 1px solid var(--line); border-radius: 6px; background: #fff; text-align: center;
}
.teamcate a { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; color: #333; }
.teamcate .mark {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; margin-bottom: 6px;
}
.teamname { font-size: 12px; line-height: 1.2; }

.woocommerce ul.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.woocommerce ul.products li.product { width: auto; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.woocommerce ul.products li.product a img { width: 100%; margin: 0; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 14px; padding: 12px 12px 0; }
.woocommerce ul.products li.product .price { padding: 0 12px 12px; }
.woocommerce span.onsale { background: var(--red); }

.yh-pdp, .jq-pdp { display: block; }
.woocommerce div.product { display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: start; }
.woocommerce div.product .product_title { font-size: 28px; color: var(--navy); margin-top: 0; }
.woocommerce div.product p.price { color: var(--red); font-size: 24px; }
.woocommerce div.product p.price del { color: var(--muted); font-size: 16px; }
.jq-size-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-weight: 700; }
.jq-buy-now {
  margin-left: 8px; background: var(--navy); color: #fff; border: 0; padding: 12px 18px;
  font-weight: 700; letter-spacing: .04em; cursor: pointer; border-radius: 4px;
}
.woocommerce div.product form.cart { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.woocommerce div.product form.cart .button { background: var(--red); color: #fff; border-radius: 4px; font-weight: 700; }
.woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.ship-box { background: var(--bg); padding: 16px; border-radius: 8px; }
.ship-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.ship-table th, .ship-table td { border: 1px solid var(--line); padding: 8px; text-align: left; font-size: 13px; }

.woocommerce-cart .shop-wrap, .woocommerce-checkout .shop-wrap { max-width: 1100px; }
.woocommerce table.shop_table { border: 1px solid var(--line); }
.woocommerce-cart-form { margin-bottom: 24px; }
.woocommerce .cart_totals .checkout-button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce #place_order {
  background: var(--red) !important; color: #fff !important; border: 0 !important; border-radius: 4px;
}
body.woocommerce-checkout form.checkout {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: start;
}
body.woocommerce-checkout #customer_details { width: 100%; }
body.woocommerce-checkout #order_review_heading { margin-top: 0; }
body.woocommerce-checkout #order_review { background: var(--bg); padding: 16px; border-radius: 8px; }

.contact-card, .policy {
  max-width: 760px; background: var(--bg); padding: 28px; border-radius: 12px;
}
.contact-card p { margin: 0 0 12px; }
.contact-form { display: grid; gap: 12px; margin-top: 18px; }
.contact-form input, .contact-form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px;
}
.contact-form button { width: fit-content; background: var(--navy); color: #fff; border: 0; padding: 10px 18px; border-radius: 6px; font-weight: 700; }

.footer { background: var(--navy); color: #d7dde8; margin-top: 24px; }
.footer-grid {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 24px; padding: 36px 16px;
}
.footer h4 { color: #fff; margin: 0 0 12px; letter-spacing: .08em; font-size: 13px; }
.footer a { color: #d7dde8; display: block; padding: 4px 0; }
.footer a:hover { color: #fff; }
.legal { border-top: 1px solid rgba(255,255,255,.12); padding: 14px 16px 22px; font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 1100px) {
  .leagues, .grid, .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); }
  .teamcate { grid-template-columns: repeat(6, 1fr); }
  .woocommerce div.product, body.woocommerce-checkout form.checkout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .header-mid { grid-template-columns: auto 1fr auto; min-height: 70px; }
  .menu-toggle { display: inline-flex; }
  .search-btn span, .nav { display: none; }
  .logo-text { font-size: 20px; }
  .leagues, .grid, .woocommerce ul.products, .teamcate { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
