/*
Theme Name: Rockmaker
Theme URI: https://rockmaker.example.com
Author: Rockmaker
Description: Rockmaker Denim Custom Wordpress Theme
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
Requires Plugins: woocommerce
Text Domain: rockmaker
*/

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #1c1c1a;
  background: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
}

img {
  max-width: 100%;
  height: auto;
}

/* The adaptive header uses white controls over red or the homepage hero.
   Targets both .header-text (this theme's own marker class) and .text-brand-text
   (the Tailwind utility also present on the same elements) so the color applies
   regardless of which class ends up governing on a given element. */
.site-header[data-light-controls='true'] .header-text,
.site-header[data-light-controls='true'] .text-brand-text {
  color: #ffffff !important;
}
.site-header[data-light-controls='true'] .header-link:hover,
.site-header[data-light-controls='true'] .header-icon:hover {
  color: #1c1c1a !important;
}
.site-header[data-light-controls='true'] .header-logo {
  filter: brightness(0) invert(1);
}
.site-header:not([data-light-controls='true']) .header-logo {
  filter: brightness(0);
}
/* Explicit, non-Tailwind-dependent rule so the logo height cap always applies —
   targets the wrapping link rather than a specific class, since the actual logo
   markup can come from three different places (ACF image, WordPress's own
   the_custom_logo() output, or the plain-text site-name fallback), and only one
   of those reliably carries the .header-logo class. */
.site-logo-link img,
img.header-logo {
  max-height: 45px !important;
  width: auto !important;
}

.site-header {
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
@media (prefers-reduced-motion: reduce) {
  .site-header { transition: none; }
}

/* WooCommerce standard button styles */
.wc-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit,
.woocommerce input.button,
.woocommerce #payment #place_order,
.woocommerce a.checkout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.125rem;
  transition: background-color 0.2s ease, color 0.2s ease;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'Poppins', sans-serif;
}
.wc-button-primary,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce #respond input#submit,
.woocommerce input.button.alt,
.woocommerce #payment #place_order,
.woocommerce a.checkout-button,
.woocommerce a.added_to_cart,
.woocommerce ul.products li.product a.button.product_type_simple,
.woocommerce div.product form.cart .button {
  background: #be1f2e !important;
  color: #ffffff !important;
}
.wc-button-primary:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce #respond input#submit:hover,
.woocommerce #payment #place_order:hover,
.woocommerce a.checkout-button:hover,
.woocommerce div.product form.cart .button:hover {
  background: #7f1d1d !important;
  color: #ffffff !important;
}
.wc-button-secondary,
.woocommerce a.button,
.woocommerce button.button:not(.alt) {
  background: #f4f4f0 !important;
  color: #1c1c1a !important;
}
.wc-button-secondary:hover,
.woocommerce a.button:hover,
.woocommerce button.button:not(.alt):hover {
  background: #e6e6df !important;
  color: #1c1c1a !important;
}

/* WooCommerce standard input styles */
.wc-input,
.woocommerce input.input-text,
.woocommerce textarea,
.woocommerce select,
.woocommerce .select2-container .select2-selection--single,
.woocommerce table.shop_table td select {
  width: 100%;
  padding: 0.5rem 1rem;
  background: #f4f4f0;
  border: 1px solid rgba(28, 28, 26, 0.2);
  color: #1c1c1a;
  border-radius: 0.125rem;
  font-family: 'Poppins', sans-serif;
  height: auto;
}
.wc-input::placeholder,
.woocommerce input.input-text::placeholder {
  color: #6e6e68;
}
.wc-input:focus,
.woocommerce input.input-text:focus,
.woocommerce textarea:focus,
.woocommerce select:focus {
  outline: none;
  border-color: #be1f2e;
  box-shadow: 0 0 0 1px #be1f2e;
}
.woocommerce form .form-row label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1c1c1a;
  margin-bottom: 0.25rem;
  display: block;
}
.woocommerce form .form-row {
  margin-bottom: 1rem;
}
.woocommerce-checkout #payment {
  background: #f4f4f0;
  border: none !important;
  border-radius: 0.125rem;
  margin: 15px 0 0;
}
.woocommerce-checkout #payment div.payment_box {
  background: #ffffff;
  border-radius: 0.125rem;
}
.woocommerce table.shop_table {
  border-collapse: collapse;
  width: 100%;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  border: none;
  border-bottom: 1px solid rgba(28,28,26,0.1);
  padding: 1rem 0.5rem;
}
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews,
.woocommerce-notice {
  background: #f4f4f0;
  border-top: 4px solid #be1f2e;
  padding: 1rem 1.5rem;
  list-style: none;
  border-radius: 0.125rem;
}
.woocommerce-message::before,
.woocommerce-info::before {
  display: none;
}
.woocommerce-info {
  margin-bottom: 15px;
}
.woocommerce .star-rating {
  color: #be1f2e;
}
.woocommerce span.onsale {
  background: #be1f2e;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 10px;
  border-radius: 0;
}
.woocommerce nav.woocommerce-pagination ul {
  border: none;
  display: flex;
  gap: 0.5rem;
}
.woocommerce nav.woocommerce-pagination ul li {
  border: none;
}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  border: 1px solid #1c1c1a;
  padding: 0.5rem 0.9rem;
  color: #1c1c1a;
}
.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: #be1f2e;
  color: #fff;
  border-color: #be1f2e;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li {
  border-left: 2px solid transparent;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1c1c1a;
  text-decoration: none;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active {
  border-left-color: #be1f2e;
  background: #f4f4f0;
}
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
  color: #be1f2e;
}
.woocommerce-account .woocommerce-MyAccount-content {
  background: #f4f4f0;
  border: 1px solid rgba(28,28,26,0.08);
  padding: 1.5rem 2rem;
  border-radius: 0.125rem;
}

/* Hero slider crossfade */
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}

/* ---------------------------------------------------------------- */
/* Product page: real WooCommerce variation form driven by our pills */
/* ---------------------------------------------------------------- */
/* WooCommerce still renders its own <table class="variations"> (selects), default
   quantity input, and "Clear" link — we keep them in the DOM (required so WC's own
   variation-form.js can calculate price/stock/availability), but visually hide them
   in favor of our custom pill buttons + quantity stepper. */
.rockmaker-variation-form table.variations,
.rockmaker-variation-form .quantity,
.rockmaker-variation-form .reset_variations {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.rockmaker-variation-form .woocommerce-variation-price {
  font-size: 1rem;
  color: #1c1c1a;
}
.rockmaker-variation-form .woocommerce-variation-availability {
  font-size: 0.8rem;
}
.rockmaker-variation-form .woocommerce-variation-availability .stock.in-stock { color: #1c7a4b; }
.rockmaker-variation-form .woocommerce-variation-availability .stock.out-of-stock { color: #be1f2e; }
.rockmaker-variation-form .single_variation_wrap {
  display: block;
}

.variation-pill-btn[aria-pressed='true'],
.variation-pill-btn.is-selected {
  border-color: #be1f2e;
  background: #be1f2e;
  color: #ffffff;
}

/* Speech-bubble caret on checkout payment box */
.payment-box {
  position: relative;
}
.payment-box::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 1rem;
  width: 1rem;
  height: 1rem;
  background: #f4f4f0;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-left: 1px solid rgba(255,255,255,0.1);
  transform: rotate(45deg);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Product card hover reveal */
.product-card:hover .product-card-overlay,
.product-card:focus-within .product-card-overlay {
  opacity: 1;
}

/* Category filter active state (shop sidebar) */
.category-btn.is-active {
  color: #be1f2e !important;
}

/* Tab accordion (product page) */
[data-accordion-panel].hidden { display: none; }

/* Checkout layout (core WC styles are dequeued; column structure now comes from
   woocommerce/checkout/form-checkout.php directly — these rules are just field/typography styling) */
.woocommerce-checkout h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1c1c1a;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(28,28,26,0.1);
  text-transform: none;
}
.woocommerce-checkout .form-row-first,
.woocommerce-checkout .form-row-last {
  display: inline-block;
  width: 48%;
}
.woocommerce-checkout .form-row-last { float: right; }
.woocommerce-checkout .form-row-wide { clear: both; }
.woocommerce-checkout table.shop_table th,
.woocommerce-checkout table.shop_table td {
  padding: 0.75rem 0;
}
.woocommerce-checkout ul.woocommerce-checkout-payment-methods,
.woocommerce-checkout ul.wc_payment_methods {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.woocommerce-checkout ul.wc_payment_methods li {
  margin-bottom: 0.75rem;
}
.woocommerce-checkout ul.wc_payment_methods label {
  font-weight: 500;
  color: #1c1c1a;
  cursor: pointer;
}
.woocommerce-checkout .payment_box {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #6e6e68;
}
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
  margin-bottom: 1rem;
  font-size: 0.75rem;
  color: #6e6e68;
}
.woocommerce-checkout-review-order-table tfoot th,
.woocommerce-checkout-review-order-table .order-total th {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1c1c1a;
}

/* ---------------------------------------------------------------- */
/* My Account (core WC styles are dequeued; we lay it out here)      */
/* ---------------------------------------------------------------- */
.woocommerce-account .woocommerce {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
@media (min-width: 768px) {
  .woocommerce-account .woocommerce {
    flex-direction: row;
    align-items: flex-start;
  }
  .woocommerce-account .woocommerce-MyAccount-navigation {
    width: 22%;
    flex-shrink: 0;
  }
  .woocommerce-account .woocommerce-MyAccount-content {
    width: 78%;
  }
}
.woocommerce-account table.woocommerce-orders-table {
  width: 100%;
  text-align: left;
  font-size: 0.875rem;
}
.woocommerce-account table.woocommerce-orders-table th {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(28,28,26,0.1);
}
.woocommerce-account table.woocommerce-orders-table td {
  padding: 1rem 0.5rem 1rem 0;
  border-bottom: 1px solid rgba(28,28,26,0.05);
  color: #6e6e68;
}
.woocommerce-account .woocommerce-MyAccount-content form .form-row {
  margin-bottom: 1rem;
}
.woocommerce-account fieldset {
  border: 1px solid rgba(28,28,26,0.1);
  padding: 1rem;
  border-radius: 0.125rem;
  margin-bottom: 1.5rem;
}
.woocommerce-account fieldset legend {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 0.5rem;
}
.woocommerce-account address {
  font-style: normal;
  color: #6e6e68;
  line-height: 1.6;
}
.woocommerce-account .woocommerce-Address-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(28,28,26,0.1);
}
.woocommerce-account .woocommerce-Address-title h3 {
  margin-bottom: 0;
  border-bottom: none;
  font-size: 1.125rem;
}
.woocommerce-account .addresses .edit {
  color: #be1f2e;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.woocommerce-account .u-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .woocommerce-account .u-columns { grid-template-columns: 1fr 1fr; }
}
.woocommerce-account .woocommerce-Address {
  background: #ffffff;
  border: 1px solid rgba(28,28,26,0.1);
  padding: 1.5rem;
  border-radius: 0.125rem;
}
.wc-proceed-to-checkout,
.woocommerce-Addresses {
  margin-top: 15px;
}

/* ---------------------------------------------------------------- */
/* Contact Form 7 reskin — matches wc-input / wc-button styling      */
/* ---------------------------------------------------------------- */
.rockmaker-cf7 .wpcf7-form-control-wrap {
  display: block;
  margin-top: -15px;
}
.rockmaker-cf7 input.wpcf7-form-control,
.rockmaker-cf7 textarea.wpcf7-form-control,
.rockmaker-cf7 select.wpcf7-form-control {
  width: 100%;
  padding: 0.5rem 1rem;
  background: #f4f4f0;
  border: 1px solid rgba(28, 28, 26, 0.2);
  color: #1c1c1a;
  border-radius: 0.125rem;
  font-family: 'Poppins', sans-serif;
}
.rockmaker-cf7 input.wpcf7-form-control::placeholder,
.rockmaker-cf7 textarea.wpcf7-form-control::placeholder {
  color: #6e6e68;
}
.rockmaker-cf7 input.wpcf7-form-control:focus,
.rockmaker-cf7 textarea.wpcf7-form-control:focus,
.rockmaker-cf7 select.wpcf7-form-control:focus {
  outline: none;
  border-color: #be1f2e;
  box-shadow: 0 0 0 1px #be1f2e;
}
/* Label/field spacing is now set directly via classes in the pasted CF7 form
   template (cf7-contact-form-template.txt) — mb-1 on labels, mb-4 after the
   name/email row and subject, mb-6 after the message field — matching the
   original design's differentiated spacing exactly, rather than one blanket
   margin value here. */
.rockmaker-cf7 input.wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.125rem;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'Poppins', sans-serif;
  background: #be1f2e;
  color: #ffffff;
  transition: background-color 0.2s ease;
}
.rockmaker-cf7 input.wpcf7-submit:hover {
  background: #7f1d1d;
}
.rockmaker-cf7 input.wpcf7-submit:disabled {
  opacity: 0.6;
  cursor: default;
}
.rockmaker-cf7 span.wpcf7-not-valid-tip {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #be1f2e;
}
.rockmaker-cf7 .wpcf7-response-output {
  margin-top: 1.5rem;
  padding: 1rem 1.5rem;
  border-radius: 0.125rem;
  font-size: 0.875rem;
  border-top: 4px solid #be1f2e;
  background: #f4f4f0;
}
.rockmaker-cf7 form.sent .wpcf7-response-output {
  border-top-color: #1c7a4b;
  color: #1c7a4b;
}
.rockmaker-cf7 form.failed .wpcf7-response-output,
.rockmaker-cf7 form.aborted .wpcf7-response-output {
  border-top-color: #be1f2e;
  color: #be1f2e;
}
.rockmaker-cf7 .wpcf7-spinner {
  margin-left: 0.75rem;
}

/* About page: H2s typed into the ACF WYSIWYG fields (e.g. "Our Story", "The Craft")
   get the same treatment as the original's hardcoded section headings. */
.rockmaker-about-prose h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1c1c1a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}
.rockmaker-about-prose p {
  color: #6e6e68;
  line-height: 1.75;
  margin-bottom: 1rem;
}
