/*
Theme Name: Radio Shankill Shop
Theme URI: https://shop.radioshankill.co.uk
Author: William Gourley
Description: Custom theme for the Radio Shankill merch store - fun, colourful, community-driven gear that funds the station. WooCommerce ready.
Version: 1.0
Requires PHP: 7.4
Text Domain: radioshankillshop
*/

/*
 * Single unified font family (heading + body + nav + footer). Every other
 * site in this project that split heading/body fonts got flagged as
 * "inconsistent" - so Baloo 2 is used everywhere via one --font-family var.
 * Do not add a second font-family anywhere in this stylesheet.
 */
:root {
  --color-bg: #FBF7EC;
  --color-cream-card: #FFFFFF;
  --color-border: #E5DFC8;
  --color-text: #221F1A;

  --color-green: #58AC34;
  --color-green-dark: #2F6B1D;
  --color-orange: #D1401F;
  --color-orange-dark: #A82C13;
  --color-blue: #1E3F91;
  --color-gold: #C99A2E;
  --color-purple: #6A0DAD;
  --color-black: #0D0D0D;

  --font-family: 'Baloo 2', 'Comic Sans MS', cursive, sans-serif;
}

* { box-sizing: border-box; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-weight: 400;
  margin: 0;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-family);
  font-weight: 700;
  color: var(--color-green-dark);
  margin: 0 0 0.5em;
}

button, input, select, textarea, optgroup {
  font-family: var(--font-family);
  font-size: 1rem;
}

a { color: inherit; text-decoration: none; }

.btn {
  display: inline-block;
  background: var(--color-orange);
  color: #fff;
  padding: 0.85em 1.8em;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--color-orange-dark); }

.btn-green { background: var(--color-green); }
.btn-green:hover { background: var(--color-green-dark); }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.skip-link.screen-reader-text:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  clip: auto;
  z-index: 200;
  background: var(--color-green-dark);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
}

h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.3rem; }

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}

/* -----------------------------------------------------------
   Quadrant colour strip - a small nod to the live radioshankill.co.uk
   homepage's 2x2 green/blue/gold/purple colour-block layout on black,
   without turning the shop itself into four colour blocks.
   ----------------------------------------------------------- */
.quadrant-strip {
  display: flex;
  height: 6px;
}
.quadrant-strip span { flex: 1 1 25%; }
.quadrant-strip .q-green { background: var(--color-green); }
.quadrant-strip .q-blue { background: var(--color-blue); }
.quadrant-strip .q-gold { background: var(--color-gold); }
.quadrant-strip .q-purple { background: var(--color-purple); }

/* -----------------------------------------------------------
   Header
   ----------------------------------------------------------- */
.site-header {
  background: var(--color-cream-card);
  border-bottom: 3px solid var(--color-green);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header-inner {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 16px;
  padding: 14px 24px;
  position: relative;
}

.site-branding {
  flex: 1 1 auto;
  min-width: 0;
}

.site-branding .custom-logo-link {
  display: inline-block;
}

/* Fixed height + capped max-width keeps the logo predictable at every
   breakpoint - it's a roughly-square mascot badge, not a wide wordmark. */
.site-branding img.custom-logo {
  display: block;
  height: 72px;
  width: auto;
  max-width: 72px;
}

.site-title {
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--color-green-dark);
}

.main-navigation {
  flex: 0 0 auto;
}

.primary-nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.75rem;
}

.primary-nav-list a {
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 2px;
}

.primary-nav-list a:hover,
.primary-nav-list a:focus {
  color: var(--color-orange);
}

.header-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-icon-link {
  position: relative;
  display: inline-flex;
  color: var(--color-green-dark);
}

.header-icon-link:hover,
.header-icon-link:focus {
  color: var(--color-orange);
}

.cart-count {
  position: absolute;
  top: -7px;
  right: -9px;
  background: var(--color-orange);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 999px;
  padding: 0 3px;
}

.nav-toggle {
  display: none;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--color-green-dark);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
    order: 1;
  }

  .site-branding {
    order: 2;
    flex: 0 1 auto;
    text-align: center;
  }

  .header-actions {
    order: 3;
  }

  /* Mobile logo cap - the pitfall that has broken the header on every
     other site in this project. The logo is a square mascot badge so
     height and max-width are capped to the same small value; it can
     never grow wide enough to push .header-actions onto a new line at
     common mobile widths (375 / 390 / 414px). */
  .site-branding img.custom-logo {
    height: 44px;
    max-width: 44px;
  }

  .site-title {
    font-size: 1.1rem;
  }

  .header-actions {
    gap: 10px;
  }

  .main-navigation {
    order: 4;
    flex-basis: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 0;
    overflow: hidden;
    background: var(--color-cream-card);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.08);
    transition: max-height 0.25s ease;
  }

  body.nav-open .main-navigation {
    max-height: 560px;
  }

  .primary-nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
  }

  .primary-nav-list li {
    border-bottom: 1px solid var(--color-border);
  }

  .primary-nav-list a {
    display: block;
    padding: 13px 4px;
  }
}

/* -----------------------------------------------------------
   Hero - dark band echoing the live site's black backdrop
   ----------------------------------------------------------- */
.hero {
  background: var(--color-black);
  padding: 4rem 0;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero-copy {
  flex: 1 1 480px;
}

.eyebrow {
  font-weight: 700;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  margin-bottom: 0.75em;
}

.hero h1 {
  font-size: 3.2rem;
  line-height: 1.1;
  color: #fff;
}

.hero-sub {
  font-size: 1.1rem;
  max-width: 46ch;
  margin-bottom: 1.75em;
  color: #e9e6db;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-visual {
  flex: 1 1 360px;
  display: flex;
  justify-content: center;
}

.hero-mascot {
  max-width: 100%;
  height: auto;
  width: 320px;
  object-fit: contain;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.45));
}

@media (max-width: 860px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-ctas {
    justify-content: center;
  }
}

/* -----------------------------------------------------------
   Category showcase
   ----------------------------------------------------------- */
.category-showcase {
  padding: 3rem 0 4rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.category-card {
  background: var(--color-cream-card);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 24px rgba(13, 13, 13, 0.1);
}

.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-green);
  margin-bottom: 1rem;
}

/* Each category card gets its own accent colour - the shop-safe way of
   echoing the live site's multi-colour quadrant without four full colour
   blocks fighting for attention on a product page. */
.category-icon.accent-blue { color: var(--color-blue); }
.category-icon.accent-gold { color: var(--color-gold); }
.category-icon.accent-purple { color: var(--color-purple); }

.category-card h3 {
  margin-bottom: 0.35em;
}

.category-card p {
  margin: 0;
  font-size: 0.92rem;
}

@media (max-width: 720px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}

/* -----------------------------------------------------------
   Brand story
   ----------------------------------------------------------- */
.brand-story {
  background: #fff;
  padding: 4rem 0;
  scroll-margin-top: 100px;
}

.brand-story-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
}

.brand-story-visual {
  flex: 0 0 260px;
  display: flex;
  justify-content: center;
}

.brand-story-visual img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-story-copy {
  flex: 1 1 480px;
}

.brand-story-copy .section-title {
  text-align: left;
}

@media (max-width: 860px) {
  .brand-story-inner {
    flex-direction: column;
    text-align: center;
  }

  .brand-story-copy .section-title {
    text-align: center;
  }
}

/* -----------------------------------------------------------
   Feature row - four accent colours, one per quadrant
   ----------------------------------------------------------- */
.feature-row {
  padding: 3.5rem 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-green);
  color: #fff;
  margin-bottom: 0.85rem;
}

.feature-icon.accent-orange { background: var(--color-orange); }
.feature-icon.accent-blue { background: var(--color-blue); }
.feature-icon.accent-purple { background: var(--color-purple); }

.feature-item h4 {
  font-family: var(--font-family);
  color: var(--color-green-dark);
  margin-bottom: 0.35em;
}

.feature-item p {
  margin: 0;
  font-size: 0.88rem;
}

@media (max-width: 720px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* -----------------------------------------------------------
   Generic page template
   ----------------------------------------------------------- */
.page-section {
  padding: 3rem 0 4rem;
}

.page-title {
  margin-bottom: 1em;
}

.page-content :is(h2, h3) {
  margin-top: 1.2em;
}

.page-content .wpcf7-form input:not([type=submit]),
.page-content .wpcf7-form textarea {
  width: 100%;
  max-width: 480px;
  font-family: var(--font-family);
  padding: 0.7em 0.9em;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  margin-bottom: 1em;
  display: block;
}

.page-content .wpcf7-form textarea {
  min-height: 140px;
  resize: vertical;
}

.page-content .wpcf7-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35em;
}

.page-content .wpcf7-form input[type=submit] {
  background: var(--color-orange);
  color: #fff;
  padding: 0.85em 1.8em;
  border-radius: 999px;
  font-weight: 700;
  font-family: var(--font-family);
  border: none;
  cursor: pointer;
}

.page-content .wpcf7-form input[type=submit]:hover {
  background: var(--color-orange-dark);
}

/* -----------------------------------------------------------
   Footer - solid black band, echoing the live site's black backdrop
   ----------------------------------------------------------- */
.site-footer {
  background: var(--color-black);
  color: #f2f0e4;
  margin-top: 3rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding: 3.5rem 24px 2.5rem;
}

.footer-logo img {
  height: 64px;
  width: auto;
  margin-bottom: 0.75em;
}

.footer-tagline {
  font-family: var(--font-family);
  font-weight: 700;
  color: var(--color-gold);
  margin: 0;
}

.footer-heading {
  font-family: var(--font-family);
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.85em;
}

.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-list li {
  margin-bottom: 0.6em;
}

.footer-list a {
  color: #cfd6c6;
  font-size: 0.92rem;
}

.footer-list a:hover {
  color: var(--color-orange);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.25rem 0;
}

.footer-bottom .container {
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.82rem;
  color: #a9a9a9;
}

@media (max-width: 860px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 540px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-logo img {
    height: 56px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* -----------------------------------------------------------
   WooCommerce overrides
   ----------------------------------------------------------- */
.woocommerce-section {
  padding: 2.5rem 0 4rem;
}

.woocommerce-page-inner .page-title,
.woocommerce-page-inner h1.page-title {
  font-size: 2.2rem;
  margin-bottom: 1em;
}

.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

/* WooCommerce's own stylesheet puts a float-clearfix on ul.products
   (::before/::after { content:" "; display:table; }) for its legacy
   float-based grid. Inside a CSS Grid container that generated ::before
   still becomes a real (invisible) grid item and silently occupies the
   first cell, pushing every actual product over by one column. Kill it. */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
  content: none !important;
  display: none !important;
}

/* WooCommerce's legacy float-grid (ul.products.columns-3 li.product { width:
   30.75%; float: left; ... }) still wins on selector specificity over a
   plain ".woocommerce ul.products li.product" rule. Grid on the parent
   neutralizes float, but the leftover width/margin shrinks every card to
   ~22-30% of its grid cell - !important resets are required to win. */
.woocommerce ul.products li.product {
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  background: var(--color-cream-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.25rem;
  text-align: center;
}

.woocommerce ul.products li.product a.woocommerce-loop-product__link {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 10px;
  background: var(--color-bg);
  margin-bottom: 0.85em;
}

.woocommerce ul.products li.product a.woocommerce-loop-product__link img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  margin: 0 !important;
  border-radius: 10px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-family);
  color: var(--color-green-dark);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
  margin: 0 0 0.4em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.woocommerce span.onsale {
  background: var(--color-orange);
  font-weight: 700;
}

.woocommerce ul.products li.product .price {
  color: var(--color-orange-dark);
  font-weight: 700;
  margin-bottom: 0.75em;
}

.woocommerce ul.products li.product a.button {
  margin-top: auto;
  width: 100%;
  text-align: center;
}

.woocommerce div.product .product_title {
  font-size: 2rem;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--color-orange-dark);
  font-weight: 700;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.wc-block-components-button,
.wp-block-woocommerce-checkout .wc-block-components-checkout-place-order-button {
  background: var(--color-orange) !important;
  color: #fff !important;
  border-radius: 999px !important;
  font-family: var(--font-family) !important;
  font-weight: 700 !important;
  border: none !important;
  padding: 0.85em 1.8em !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.wc-block-components-button:hover {
  background: var(--color-orange-dark) !important;
}

.woocommerce a.added_to_cart {
  color: var(--color-green-dark);
  font-weight: 700;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  border-radius: 8px;
}

.woocommerce table.shop_table,
.wc-block-cart,
.wc-block-checkout {
  font-family: var(--font-family);
}

.woocommerce-checkout #payment,
.wp-block-woocommerce-checkout-payment-block {
  border-radius: 12px;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-top-color: var(--color-green) !important;
}

@media (max-width: 1024px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 480px) {
  .woocommerce ul.products {
    gap: 0.85rem;
  }

  .woocommerce ul.products li.product {
    padding: 0.85rem;
  }
}
