/* =========================================================
   WordPress / WooCommerce corrections.

   The original design system in style.css is never edited. Everything here
   styles markup that only exists in the WordPress build: the platform picker,
   pagination, WooCommerce notices, cart and checkout.
   ========================================================= */

/* ---------- Platform picker on the product page ---------- */
.buy-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.buy-platform {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--grey);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: var(--track);
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.buy-platform svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.buy-platform:hover {
  border-color: var(--olive-soft);
  color: var(--white);
}

.buy-platform.active {
  border-color: var(--red);
  background: rgba(179, 18, 28, 0.15);
  color: var(--white);
  box-shadow: 0 0 12px var(--red-glow);
}

/* ---------- Add-to-cart loading state ---------- */
.add-to-cart.loading {
  opacity: 0.55;
  pointer-events: none;
}

/* ---------- Pagination ---------- */
.pagination,
.navigation.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0 10px;
}

.pagination .page,
.navigation.pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--grey);
  font-family: var(--font-ui);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.pagination .page:hover,
.navigation.pagination .page-numbers:hover {
  border-color: var(--olive-soft);
  color: var(--white);
}

.pagination .page.current,
.navigation.pagination .page-numbers.current {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
}

/* ---------- Cart drawer emptiness ---------- */
.cart-drawer-empty {
  padding: 24px;
  color: var(--grey);
  text-align: center;
}

/* ---------- WooCommerce notices ---------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-left: 3px solid var(--red);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  font-family: var(--font-ui);
  list-style: none;
}

.woocommerce-message {
  border-left-color: var(--green);
}

/* ---------- WooCommerce cart / checkout / account ---------- */
.woocommerce {
  font-family: var(--font-ui);
  color: var(--white);
}

.woocommerce table.shop_table,
.woocommerce table.cart {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 26px;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
  vertical-align: middle;
}

.woocommerce table.shop_table th {
  color: var(--grey);
  font-size: 0.85rem;
  letter-spacing: var(--track);
  text-transform: uppercase;
}

.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button {
  display: inline-block;
  padding: 13px 26px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--red);
  color: var(--white);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: var(--track);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button:hover {
  background: var(--red-dark);
  box-shadow: 0 0 16px var(--red-glow);
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 1rem;
}

.woocommerce form .form-row label {
  display: block;
  margin-bottom: 6px;
  color: var(--grey);
  font-size: 0.85rem;
  letter-spacing: var(--track);
  text-transform: uppercase;
}

.woocommerce .price,
.woocommerce span.amount {
  color: var(--white);
  font-weight: 700;
}

.woocommerce del span.amount {
  color: var(--grey);
  font-weight: 500;
}

/* My account navigation */
.woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.woocommerce-MyAccount-navigation ul li a {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-sm);
  color: var(--grey);
  font-weight: 600;
  letter-spacing: var(--track);
  text-transform: uppercase;
  text-decoration: none;
  font-size: 0.85rem;
}

.woocommerce-MyAccount-navigation ul li.is-active a {
  border-color: var(--red);
  background: var(--red);
  color: var(--white);
}

/* ---------- Generic page wrappers ---------- */
.page-main {
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: var(--space-section);
  min-height: 60vh;
}

.page-content {
  font-family: var(--font-ui);
  color: var(--grey);
  font-size: 1.05rem;
  line-height: 1.75;
}

.page-content h2,
.page-content h3 {
  color: var(--white);
  font-family: var(--font-display);
  margin: 32px 0 12px;
}

.page-content a {
  color: var(--white);
  text-decoration: underline;
}

/* ---------- News single ---------- */
.news-single {
  padding-top: calc(var(--header-h) + 36px);
  padding-bottom: var(--space-section);
}

.news-article-head h1 {
  margin: 12px 0 8px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
}

.news-article .news-media {
  height: clamp(220px, 40vw, 440px);
  margin: 22px 0 28px;
  border-radius: var(--r-md);
  background-position: center;
  background-size: cover;
}

.news-content {
  font-family: var(--font-ui);
  color: var(--grey);
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 76ch;
}

.news-content p {
  margin: 0 0 16px;
}

/* ---------- 404 ---------- */
.error-404 .lead {
  max-width: 60ch;
}

/* ---------- Elementor: let the theme own the width ---------- */
.elementor-section.elementor-section-boxed > .elementor-container {
  max-width: none;
}

body.elementor-page .page-main {
  padding-top: 0;
}

/* ---------- News feed as a page (no hero above it) ---------- */
.news-feed--page {
  padding-top: calc(var(--header-h) + 32px);
}

.news-feed--page .section-head {
  flex-wrap: wrap;
  gap: 16px;
}

.news-feed--page .no-results {
  color: var(--grey);
  font-family: var(--font-ui);
}

/* The category tabs are links here (server-side filtering), styled like the
   static buttons. */
.news-tabs a {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-sm);
  color: var(--grey);
  font-family: var(--font-nav);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.news-tabs a:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.25);
}

.news-tabs a.active {
  color: #0a0a0a;
  background: var(--green);
  border-color: var(--green);
}

/* ---------- Account page in its logged-out (login) state ---------- */
.gs-auth-page {
  position: relative;
  isolation: isolate;
  padding-top: calc(var(--header-h) + 16px);
}

.gs-auth-page .page-content {
  font-size: inherit;
  line-height: inherit;
}

.gs-auth-page .woocommerce-error,
.gs-auth-page .woocommerce-message,
.gs-auth-page .woocommerce-info {
  width: min(440px, 100%);
  margin: 0 auto 20px;
}

.gs-auth-page .woocommerce-error li,
.gs-auth-page .woocommerce-message li {
  margin: 0;
}

.auth-form .field input.invalid {
  border-color: var(--red);
}

/* WooCommerce's lost-password and reset forms, styled like the auth fields. */
.gs-auth-page .woocommerce-ResetPassword:not(.auth-form),
.gs-auth-page form.reset_password {
  width: min(440px, 100%);
  margin: 0 auto;
}
