/*
Theme Name: Recoilshop
Theme URI: https://www.recoilshop.co.uk
Author: Shire-Tech
Description: Custom WooCommerce theme for Recoil Shop — wire thread inserts, thread repair kits and tooling. Multi-language (WPML) and multi-currency (GBP/EUR).
Version: 0.2.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: recoilshop
*/

:root {
  --rs-accent: #C8102E;
  --rs-accent-dark: #A00D25;
  --rs-ink: #1B1E22;
  --rs-ink-2: #5A6068;
  --rs-ground: #F6F7F8;
  --rs-panel: #FFFFFF;
  --rs-line: #E2E5E9;
  --rs-ok: #1E7B3C;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--rs-ground);
  color: var(--rs-ink);
  font: 16px/1.6 "Segoe UI", system-ui, -apple-system, sans-serif;
}
h1, h2, h3, h4, .rs-disp {
  font-family: "Bahnschrift", "Arial Narrow", system-ui, sans-serif;
  letter-spacing: .01em;
  line-height: 1.15;
  text-wrap: balance;
}
a { color: var(--rs-accent); }
img { max-width: 100%; height: auto; }
.rs-wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* Header */
.rs-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--rs-ink); color: #fff;
  border-bottom: 3px solid var(--rs-accent);
}
.rs-header .rs-wrap {
  display: flex; align-items: center; gap: 24px;
  padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap;
}
.rs-logo {
  font-family: "Bahnschrift", "Arial Narrow", sans-serif;
  font-weight: 700; font-size: 24px; text-transform: uppercase;
  color: #fff; text-decoration: none; letter-spacing: .03em;
}
.rs-logo b { color: var(--rs-accent); }
.rs-nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.rs-nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; flex-wrap: wrap; }
.rs-nav a {
  color: #E8EAEC; text-decoration: none; font-size: 14px;
  padding: 8px 12px; border-radius: 4px; display: block;
}
.rs-nav a:hover { background: rgba(255,255,255,.09); color: #fff; }
/* Header search */
.rs-search { display: flex; align-items: stretch; margin-left: auto; }
.rs-nav + .rs-search { margin-left: 0; }
.rs-search input[type="search"] {
  width: clamp(190px, 24vw, 300px);
  border: 1px solid rgba(255,255,255,.22);
  border-right: 0;
  border-radius: 4px 0 0 4px;
  background: rgba(255,255,255,.07);
  color: #fff;
  font: inherit; font-size: 14px;
  padding: 8px 12px;
  -webkit-appearance: none;
}
.rs-search input[type="search"]::placeholder { color: rgba(232,234,236,.55); }
.rs-search input[type="search"]:focus {
  outline: none; background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.4);
}
.rs-search button {
  border: 0; border-radius: 0 4px 4px 0;
  background: var(--rs-accent); color: #fff;
  padding: 0 14px; cursor: pointer; display: flex; align-items: center;
}
.rs-search button:hover { background: var(--rs-accent-dark); }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
@media (max-width: 900px) {
  .rs-search { order: 3; width: 100%; margin-left: 0; }
  .rs-search input[type="search"] { width: 100%; }
}

.rs-cart-link {
  color: #fff; text-decoration: none; font-size: 14px; font-weight: 600;
  background: var(--rs-accent); padding: 8px 16px; border-radius: 4px;
}
.rs-cart-link:hover { background: var(--rs-accent-dark); color: #fff; }

/* Hero */
.rs-hero { background: var(--rs-ink); color: #F6F7F8; }
.rs-hero .rs-wrap {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 36px; align-items: center;
  padding-top: 64px; padding-bottom: 64px;
}
.rs-hero h1 {
  font-size: clamp(32px, 4.5vw, 52px); margin: 0 0 16px; text-transform: uppercase;
}
.rs-hero h1 em { color: var(--rs-accent); font-style: normal; }
.rs-hero p { max-width: 54ch; color: rgba(246,247,248,.78); margin: 0 0 26px; font-size: 17px; }
.rs-btn {
  display: inline-block; background: var(--rs-accent); color: #fff !important;
  text-decoration: none; font-weight: 600; font-size: 16px;
  padding: 13px 26px; border-radius: 4px; border: 0; cursor: pointer;
}
.rs-btn:hover { background: var(--rs-accent-dark); }
.rs-hero-art { justify-self: center; }
.rs-hero-art svg { display: block; width: 100%; max-width: 300px; }
@media (max-width: 780px) {
  .rs-hero .rs-wrap { grid-template-columns: 1fr; }
  .rs-hero-art svg { max-width: 200px; }
}

/* Sections */
.rs-section { padding: 56px 0; }
.rs-kicker {
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rs-accent); font-weight: 700; margin: 0 0 6px;
}
.rs-section h2 { font-size: 30px; margin: 0 0 22px; text-transform: uppercase; }

/* Category tiles */
.rs-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 900px) { .rs-cats { grid-template-columns: repeat(2, 1fr); } }
.rs-cat {
  background: var(--rs-panel); border: 1px solid var(--rs-line);
  border-top: 3px solid var(--rs-accent); border-radius: 6px;
  padding: 22px 18px; text-decoration: none; color: var(--rs-ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.rs-cat:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(27,30,34,.10); }
.rs-cat h3 { margin: 0 0 6px; font-size: 17px; }
.rs-cat span { font-size: 14px; color: var(--rs-ink-2); }

/* WooCommerce product grids */
.woocommerce ul.products li.product {
  background: var(--rs-panel); border: 1px solid var(--rs-line); border-radius: 6px;
  padding: 16px; text-align: left;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: inherit; font-size: 15.5px; line-height: 1.35; padding-top: 6px;
}
.woocommerce ul.products li.product .price {
  color: var(--rs-ink); font-weight: 700; font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.woocommerce ul.products li.product .button,
.woocommerce a.button, .woocommerce button.button,
.woocommerce input.button, .woocommerce #respond input#submit {
  background: var(--rs-ink); color: #fff; border-radius: 4px; font-weight: 600;
}
.woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce ul.products li.product .button:hover {
  background: var(--rs-accent); color: #fff;
}
.woocommerce a.button.alt, .woocommerce button.button.alt,
.woocommerce #payment #place_order {
  background: var(--rs-accent); color: #fff;
}
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover { background: var(--rs-accent-dark); }
.woocommerce span.onsale { background: var(--rs-accent); }
.woocommerce .star-rating span::before { color: var(--rs-accent); }
.woocommerce nav.woocommerce-pagination ul li a:focus,
.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--rs-accent); color: #fff; }

/* Content area */
.rs-content { padding: 40px 0 64px; }
.rs-content .rs-wrap > h1 { font-size: 32px; text-transform: uppercase; }

/* Category menu bar — mirrors the old recoilshop.net top navigation */
.rs-catbar { background: #24282d; border-top: 1px solid rgba(255,255,255,.08); }
.rs-catbar .rs-wrap { padding: 0 20px; }
.rs-catbar ul { list-style: none; margin: 0; padding: 0; }
.rs-catbar-top { display: flex; flex-wrap: wrap; }
.rs-catbar-top > li { position: relative; }
.rs-catbar-top > li > a {
  display: block; padding: 13px 16px; color: #fff; text-decoration: none;
  font-family: Bahnschrift, "Arial Narrow", sans-serif; font-size: 14px;
  text-transform: uppercase; letter-spacing: .05em; white-space: nowrap;
}
.rs-catbar-top > li:hover > a,
.rs-catbar-top > li:focus-within > a { background: var(--rs-accent); }

/* Dropdown panels */
.rs-catbar .rs-catbar-sub {
  position: absolute; top: 100%; left: 0; z-index: 60; min-width: 300px;
  background: #fff; border: 1px solid #e0e2e6; border-top: 3px solid var(--rs-accent);
  box-shadow: 0 10px 28px rgba(27,30,34,.16); padding: 8px 0; display: none;
}
.rs-catbar-top > li:hover > .rs-catbar-sub,
.rs-catbar-top > li:focus-within > .rs-catbar-sub { display: block; }
.rs-catbar .rs-catbar-sub a {
  display: block; padding: 8px 18px; color: var(--rs-ink); text-decoration: none; font-size: 14px;
}
.rs-catbar .rs-catbar-sub a:hover { background: #f4f5f7; color: var(--rs-accent); }
/* Third level shown inline, indented under its parent */
.rs-catbar .rs-catbar-sub .rs-catbar-sub {
  position: static; display: block; min-width: 0; border: 0; box-shadow: none; padding: 0 0 4px;
}
.rs-catbar .rs-catbar-sub .rs-catbar-sub a { padding: 5px 18px 5px 34px; font-size: 13px; color: #5b6067; }

/* On small screens the bar scrolls sideways; dropdowns are skipped —
   the top-level pages list their subcategories anyway. */
@media (max-width: 860px) {
  .rs-catbar-top { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .rs-catbar .rs-catbar-sub { display: none !important; }
}

/* Thread size finder strip */
.rs-finder { background: #f4f5f7; border-bottom: 1px solid #e6e8eb; }
.rs-finder-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 22px 0; }
.rs-finder h2 { font-size: 19px; margin: 0; font-family: Bahnschrift, "Arial Narrow", sans-serif; text-transform: uppercase; letter-spacing: .03em; }
.rs-finder-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.rs-finder-controls select {
  height: 42px; border: 1px solid #d7dade; border-radius: 6px; background: #fff;
  font-size: 14px; padding: 0 12px; min-width: 170px; cursor: pointer;
}
.rs-finder-controls select:disabled { opacity: .5; cursor: default; }
.rs-finder-controls button {
  height: 42px; border: 0; border-radius: 6px; background: var(--rs-accent); color: #fff;
  font-weight: 700; padding: 0 20px; cursor: pointer;
}
.rs-finder-controls button:hover { background: var(--rs-accent-dark); }
.rs-finder-controls button:disabled { opacity: .45; cursor: default; }
@media (max-width: 860px) {
  .rs-finder-controls { margin-left: 0; width: 100%; }
  .rs-finder-controls select { flex: 1 1 40%; min-width: 0; }
}

/* Out-of-stock enquiry form */
.rs-enquiry { margin: 22px 0; padding: 18px 20px; border: 1px solid #e3e5e8; border-left: 4px solid var(--rs-accent); border-radius: 6px; background: #fafbfc; }
.rs-enquiry h3 { margin: 0 0 6px; font-family: Bahnschrift, "Arial Narrow", sans-serif; text-transform: uppercase; font-size: 16px; letter-spacing: .03em; }
.rs-enquiry-sub { font-size: 14px; color: #5b6067; margin: 0 0 12px; }
.rs-enquiry-form input[type=text], .rs-enquiry-form input[type=email], .rs-enquiry-form textarea {
  width: 100%; max-width: 420px; border: 1px solid #d7dade; border-radius: 5px; padding: 8px 10px; font: inherit; font-size: 14px;
}
.rs-enquiry-form input:focus, .rs-enquiry-form textarea:focus { outline: none; border-color: var(--rs-accent); }
.rs-enquiry-form label { font-size: 14px; font-weight: 600; }
.rs-enquiry-form button { border: 0; border-radius: 5px; background: var(--rs-accent); color: #fff; font-weight: 700; padding: 10px 20px; cursor: pointer; }
.rs-enquiry-form button:hover { background: var(--rs-accent-dark); }
.rs-enquiry-form button:disabled { opacity: .5; cursor: wait; }
.rs-enquiry-status { display: block; margin-top: 8px; font-size: 14px; color: #b3261e; }
.rs-enquiry-status.is-sent { color: #1b7f3b; font-weight: 600; }
.rs-hp { position: absolute !important; left: -9999px !important; height: 1px; width: 1px; overflow: hidden; }

/* One-click removal button inside the EU-restriction error notice */
.rs-eu-remove {
  display: block; margin-top: 10px; border: 0; border-radius: 5px; cursor: pointer;
  background: var(--rs-accent); color: #fff; font-weight: 600; font-size: 14px; padding: 9px 16px;
}
.rs-eu-remove:hover { background: var(--rs-accent-dark); }
.rs-eu-remove:disabled { opacity: .6; cursor: wait; }

/* Currency toggle in the header */
.rs-currency-toggle {
  display: flex; border: 1px solid rgba(255,255,255,.25); border-radius: 5px; overflow: hidden;
}
.rs-currency-toggle a {
  display: block; padding: 6px 12px; color: #E8EAEC; text-decoration: none;
  font-size: 14px; line-height: 1; font-weight: 600;
}
.rs-currency-toggle a + a { border-left: 1px solid rgba(255,255,255,.25); }
.rs-currency-toggle a:hover { background: rgba(255,255,255,.1); }
.rs-currency-toggle a.is-active { background: var(--rs-accent); color: #fff; }

/* Geolocation advice banner */
.rs-geo-banner {
  display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  background: #103A63; color: #fff; padding: 10px 44px 10px 16px; font-size: 14px; position: relative;
}
.rs-geo-banner .rs-geo-go {
  color: #fff; background: var(--rs-accent); text-decoration: none; padding: 6px 14px;
  border-radius: 4px; font-weight: 600; white-space: nowrap;
}
.rs-geo-banner .rs-geo-go:hover { background: var(--rs-accent-dark); }
.rs-geo-banner .rs-geo-close {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: rgba(255,255,255,.7); font-size: 22px; cursor: pointer; line-height: 1;
}
.rs-geo-banner .rs-geo-close:hover { color: #fff; }

/* Filter + sort toolbar above the grid */
.rs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 20px; }
.rs-toolbar select,
.woocommerce-ordering select {
  height: 40px; border: 1px solid #d7dade; border-radius: 6px; background: #fff;
  font-size: 14px; color: var(--rs-ink); cursor: pointer; padding: 0 28px 0 12px; max-width: 240px;
}
.rs-toolbar select:focus,
.woocommerce-ordering select:focus { outline: none; border-color: var(--rs-accent); }
.rs-toolbar .woocommerce-ordering { float: none; margin: 0 0 0 auto; }
.rs-toolbar-count { flex-basis: 100%; }
.rs-toolbar-count .woocommerce-result-count { margin: 2px 0 0; color: #8a8f96; font-size: 13px; float: none; }
@media (max-width: 600px) {
  .rs-toolbar select { max-width: 100%; flex: 1 1 45%; }
  .rs-toolbar .woocommerce-ordering { margin-left: 0; flex: 1 1 100%; }
  .rs-toolbar .woocommerce-ordering select { width: 100%; max-width: none; }
}
.rs-filter-widgets .price_slider_amount .button { background: var(--rs-ink); color: #fff; border: 0; padding: 6px 14px; border-radius: 4px; cursor: pointer; }
.rs-filter-widgets .ui-slider .ui-slider-range,
.rs-filter-widgets .ui-slider .ui-slider-handle { background: var(--rs-accent); }
@media (max-width: 860px) {
  .rs-shop-layout { grid-template-columns: 1fr; gap: 18px; }
  .rs-filters details { padding: 10px 14px; }
  .rs-filters details:not([open]) { padding-bottom: 10px; }
}

/* Brand bar — authorised distributor strip */
.rs-brands { background: var(--rs-panel); border-top: 1px solid var(--rs-line); margin-top: 40px; }
.rs-brands .rs-wrap {
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
  padding-top: 26px; padding-bottom: 26px;
}
.rs-brands img { height: 44px; width: auto; display: block; }
/* The Stella Seven mark is cropped tight to its lettering, while the Recoil
   and Howmet artwork carries its own whitespace — so it needs less height to
   sit level with them. Use the -light variant on any dark surface. */
.rs-brands .rs-stella img { height: 30px; }
@media (max-width: 600px) { .rs-brands .rs-stella img { height: 24px; } }
.rs-brands p { margin: 0; font-size: 13.5px; color: var(--rs-ink-2); max-width: 46ch; }
@media (max-width: 600px) { .rs-brands .rs-wrap { gap: 18px; } .rs-brands img { height: 34px; } }

/* Footer */
.rs-footer { background: var(--rs-ink); color: #9BA1A9; }
.rs-footer .rs-wrap {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px;
  padding-top: 44px; padding-bottom: 20px;
}
@media (max-width: 780px) { .rs-footer .rs-wrap { grid-template-columns: 1fr; } }
.rs-footer h4 { color: #fff; font-size: 15px; text-transform: uppercase; margin: 0 0 12px; }
.rs-footer a { color: #C9CDD2; text-decoration: none; }
.rs-footer a:hover { color: #fff; }
.rs-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.rs-footer .rs-fine {
  grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.12);
  padding: 16px 0 24px; font-size: 12.5px;
}

/* Focus visibility */
a:focus-visible, button:focus-visible, .rs-btn:focus-visible {
  outline: 2px solid var(--rs-accent); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .rs-cat { transition: none; }
}
