/*
Theme Name: Trexx Custom
Theme URI: https://trexx.co.uk/
Author: T-Rexx Sports
Description: Hand-coded custom theme for Trexx Sports, built to match the site's existing visual design with full source code ownership (no third-party theme lock-in). WooCommerce-compatible.
Version: 0.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: trexx-custom
*/

/* ==========================================================================
   Design tokens (captured from live site)
   ========================================================================== */
:root {
  --trexx-font: 'Outfit', sans-serif;
  --trexx-text: #4d4d4d;
  --trexx-heading: #070707;
  --trexx-bg: #ffffff;
  --trexx-dark: #000000;
  --trexx-accent: #7a1f2b; /* maroon/red seen in hero banners */
  --trexx-border: #e5e5e5;
  --container-max: 1320px;
}

* { box-sizing: border-box; }

body {
  font-family: var(--trexx-font);
  color: var(--trexx-text);
  background: var(--trexx-bg);
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--trexx-font);
  color: var(--trexx-heading);
  font-weight: 400;
  margin: 0 0 16px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--trexx-dark);
  background: var(--trexx-dark);
  color: #fff;
  transition: background .2s, color .2s;
}
.btn:hover { background: #fff; color: var(--trexx-dark); }
.btn-outline { background: #fff; color: var(--trexx-dark); }
.btn-outline:hover { background: var(--trexx-dark); color: #fff; }

/* ==========================================================================
   Top marquee + announcement bar
   ========================================================================== */
.trexx-marquee {
  background: var(--trexx-dark);
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  padding: 10px 0;
  font-size: 13px;
  letter-spacing: .04em;
}
.trexx-marquee__track {
  display: inline-block;
  padding-left: 100%;
  animation: trexx-marquee 22s linear infinite;
}
.trexx-marquee__track span { margin: 0 40px; }
@keyframes trexx-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.trexx-announcement {
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--trexx-border);
}
.trexx-announcement a { text-decoration: underline; }

/* ==========================================================================
   Header
   ========================================================================== */
.trexx-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--container-max);
  margin: 0 auto;
}
.trexx-header__nav { display: flex; gap: 32px; }
.trexx-header__nav a {
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
}
.trexx-header__logo { font-size: 28px; font-weight: 700; letter-spacing: 0.02em; }
.trexx-header__logo img { max-height: 40px; }
.trexx-header__icons { display: flex; align-items: center; gap: 22px; }
.trexx-header__icons a { position: relative; display: inline-flex; }
.trexx-header__icons .count {
  position: absolute; top: -8px; right: -10px;
  background: var(--trexx-accent); color: #fff;
  font-size: 10px; width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Mega menu */
.trexx-header__nav li { position: relative; }
.trexx-mega-menu {
  display: none;
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  padding: 32px;
  min-width: 480px;
  z-index: 50;
}
.trexx-header__nav li:hover .trexx-mega-menu { display: flex; gap: 32px; }
.trexx-mega-menu__col h4 { font-size: 13px; text-transform: uppercase; margin-bottom: 12px; color: #999; }
.trexx-mega-menu__col a { display: block; padding: 6px 0; font-size: 14px; text-transform: none; }

/* ==========================================================================
   Hero
   ========================================================================== */
.trexx-hero {
  position: relative;
  min-height: 640px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
}
.trexx-hero .container { padding-bottom: 64px; }
.trexx-hero h1 {
  color: #fff;
  font-size: clamp(32px, 5vw, 68px);
  max-width: 720px;
  margin-bottom: 12px;
}
.trexx-hero p { color: #fff; max-width: 520px; font-size: 16px; opacity: .9; }

/* ==========================================================================
   Deal / countdown banner
   ========================================================================== */
.trexx-deal {
  background: var(--trexx-dark);
  color: #fff;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: stretch;
  margin: 60px auto;
  max-width: var(--container-max);
}
.trexx-deal__image { background-size: cover; background-position: center; min-height: 360px; }
.trexx-deal__content { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.trexx-deal__content h2 { color: #fff; font-size: 40px; }
.trexx-deal__timer { display: flex; gap: 24px; margin: 24px 0; }
.trexx-deal__timer div { text-align: center; }
.trexx-deal__timer .num { font-size: 32px; font-weight: 600; }
.trexx-deal__timer .label { font-size: 12px; text-transform: uppercase; opacity: .7; }

/* ==========================================================================
   Section heading
   ========================================================================== */
.trexx-section { padding: 60px 0; }
.trexx-section__heading { text-align: center; margin-bottom: 40px; }
.trexx-section__heading h2 { font-size: 36px; }
.trexx-section__heading p { max-width: 560px; margin: 0 auto; color: #777; }

/* ==========================================================================
   Product grid (also used for WooCommerce archive)
   ========================================================================== */
.trexx-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.trexx-product-card { position: relative; }
.trexx-product-card__image { aspect-ratio: 3/4; overflow: hidden; background: #f4f4f4; }
.trexx-product-card__image img { width: 100%; height: 100%; object-fit: cover; }
.trexx-product-card__title { margin-top: 14px; font-size: 15px; }
.trexx-product-card__price { font-weight: 600; }
.trexx-product-card__actions {
  position: absolute; top: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 8px; opacity: 0; transition: opacity .2s;
}
.trexx-product-card:hover .trexx-product-card__actions { opacity: 1; }
.trexx-product-card__actions a {
  width: 36px; height: 36px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

@media (max-width: 1024px) { .trexx-product-grid { grid-template-columns: repeat(2, 1fr); } .trexx-deal { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .trexx-product-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .trexx-header__nav { display: none; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.trexx-footer {
  background: var(--trexx-dark);
  color: #ccc;
  padding: 64px 0 24px;
}
.trexx-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 48px; }
.trexx-footer h4 { color: #fff; font-size: 14px; text-transform: uppercase; margin-bottom: 16px; }
.trexx-footer a { display: block; padding: 6px 0; font-size: 14px; color: #ccc; }
.trexx-footer a:hover { color: #fff; }
.trexx-footer__social { display: flex; gap: 16px; margin-top: 16px; }
.trexx-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px; display: flex; justify-content: space-between;
  font-size: 13px; color: #888;
}

/* ==========================================================================
   WooCommerce baseline overrides
   ========================================================================== */
.woocommerce ul.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; list-style: none; }
.woocommerce ul.products li.product { text-align: left; }
.woocommerce div.product .woocommerce-tabs ul.tabs { border: none; padding-left: 0; }
.woocommerce a.button, .woocommerce button.button, .woocommerce #respond input#submit,
.woocommerce input.button {
  background: var(--trexx-dark); color: #fff; border-radius: 999px; padding: 14px 32px;
  text-transform: uppercase; font-size: 13px; letter-spacing: .04em; border: none;
}
.woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--trexx-accent); color: #fff; }
