/* ==========================================================================
   WooCommerce — Free Your Voice Hub

   Loaded only on WooCommerce pages (shop/product/cart/checkout/account) via
   fyvh_enqueue_woocommerce_styles() in functions.php. Reuses the design
   tokens, .container/.section/.btn/.page-hero primitives, and breakpoints
   (768/1024/1280) already defined in style.css.

   Cart & Checkout keep WooCommerce's default Gutenberg blocks (no PHP
   template override), so those sections theme the block markup directly —
   broad + scoped selectors, same strategy as the Gravity Forms rules in
   style.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shop toolbar
   -------------------------------------------------------------------------- */

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 20px;
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.shop-toolbar-label,
.shop-toolbar-count {
  font-size: 16px;
  line-height: 26px;
  color: #818181;
}

/* --------------------------------------------------------------------------
   Shop product grid + card
   -------------------------------------------------------------------------- */

.shop-product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.shop-product-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid #d9d9d9;
  border-radius: var(--radius-sm);
  padding: 23px;
  text-align: center;
}

.shop-product-card-image {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-light);
  margin-bottom: 16px;
}

.shop-product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-product-card-title {
  font-family: var(--font-body);
  text-transform: none;
  font-size: 16px;
  font-weight: 700;
  color: #3b3b3b;
  margin-bottom: 6px;
}

.shop-product-card-title a {
  color: inherit;
}

.shop-product-card-price {
  display: block;
  font-size: 16px;
  line-height: 26px;
  color: #3b3b3b;
  margin-bottom: 16px;
}

.shop-product-card-price .woocommerce-Price-amount {
  color: inherit;
}

.shop-product-card-cta {
  margin-top: auto;
}

.shop-product-card-cta .button,
.shop-product-card-cta a.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  background: var(--color-teal);
  color: var(--color-white);
  font-weight: 700;
  font-size: 16px;
  text-transform: capitalize;
  transition: transform 0.15s ease;
}

.shop-product-card-cta .button:hover {
  transform: translateY(-2px);
}

.woocommerce-no-products-found .woocommerce-info {
  font-size: 16px;
  color: var(--color-text);
}

@media (min-width: 768px) {
  .shop-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .shop-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
  .shop-product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   Pagination (shop + account orders)
   -------------------------------------------------------------------------- */

.woocommerce-pagination {
  margin-top: 40px;
  text-align: center;
}

.woocommerce-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.woocommerce-pagination .page-numbers li { display: inline-flex; }

.woocommerce-pagination a,
.woocommerce-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  color: var(--color-text);
  font-size: 14px;
}

.woocommerce-pagination .current {
  background: var(--color-teal);
  color: var(--color-white);
}

/* --------------------------------------------------------------------------
   Single product
   -------------------------------------------------------------------------- */

.product-section .product:not(.shop-product-card) {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.product-section .woocommerce-product-gallery {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.product-section .woocommerce-product-gallery img {
  border-radius: var(--radius-md);
}

.product-section .summary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-section .product_title {
  font-size: 28px;
  color: var(--color-navy);
}

.product-section .price {
  font-size: 24px;
  color: var(--color-teal);
  font-weight: 700;
}

.product-section .woocommerce-product-details__short-description {
  color: var(--color-text);
  line-height: 1.6;
}

.product-section form.cart {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.product-section .quantity .qty {
  width: 72px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 15px;
}

.product-section .single_add_to_cart_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  background: var(--color-orange);
  color: var(--color-white);
  font-weight: 700;
  font-size: 15px;
  box-shadow: var(--shadow-cta);
}

.product-section .single_add_to_cart_button:hover { transform: translateY(-2px); }

.product-section .product_meta {
  font-size: 13px;
  color: var(--color-text-muted);
}

.product-section .woocommerce-tabs ul.tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
  padding: 0;
  list-style: none;
}

.product-section .woocommerce-tabs ul.tabs li {
  padding-bottom: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
}

.product-section .woocommerce-tabs ul.tabs li.active {
  color: var(--color-navy);
  border-bottom: 2px solid var(--color-teal);
}

.product-section .related.products {
  margin-top: 48px;
}

.product-section .related.products > h2 {
  font-size: 28px;
  color: var(--color-navy);
  margin-bottom: 24px;
}

.product-section .related.products ul.products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  list-style: none;
  padding: 0;
}

@media (min-width: 768px) {
  .product-section .product:not(.shop-product-card) { flex-direction: row; flex-wrap: wrap; }
  .product-section .woocommerce-product-gallery { flex: 0 0 45%; }
  .product-section .summary { flex: 1; }
  .product-section .woocommerce-tabs,
  .product-section .related.products { flex: 0 0 100%; }
  .product-section .related.products ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------------------
   My Account
   -------------------------------------------------------------------------- */

.account-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.woocommerce-MyAccount-navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.woocommerce-MyAccount-navigation li {
  border-radius: var(--radius-pill);
  background: var(--color-light);
}

.woocommerce-MyAccount-navigation li a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.woocommerce-MyAccount-navigation li.is-active {
  background: var(--color-teal);
}

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

.woocommerce-MyAccount-content table.shop_table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}

.woocommerce-MyAccount-content table.shop_table th,
.woocommerce-MyAccount-content table.shop_table td {
  padding: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: left;
  font-size: 14px;
}

.woocommerce-MyAccount-content .woocommerce-Button,
.woocommerce-MyAccount-content .button {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  background: var(--color-teal);
  color: var(--color-white);
  font-weight: 700;
  font-size: 14px;
}

.woocommerce-MyAccount-content .woocommerce-Address {
  margin-top: 16px;
}

.woocommerce-MyAccount-content fieldset {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-top: 16px;
}

.woocommerce-MyAccount-content legend {
  font-family: var(--font-heading);
  color: var(--color-navy);
  padding: 0 8px;
}

@media (min-width: 1024px) {
  .account-grid { flex-direction: row; align-items: flex-start; }
  .woocommerce-MyAccount-navigation { flex: 0 0 220px; }
  .woocommerce-MyAccount-navigation ul { flex-direction: column; }
  .woocommerce-MyAccount-content { flex: 1; }
}

/* Login / register (form-login.php) */

.account-auth-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.account-auth-grid--single {
  max-width: 480px;
  margin: 0 auto;
}

.account-login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.contact-form-panel .form-row {
  margin-bottom: 16px;
}

.contact-form-panel label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-bottom: 6px;
}

/* WooCommerce account forms (login/register, edit account, edit address,
   payment methods) all render fields with these classes but the theme never
   sized them, so they fell back to tiny browser-default inputs. Match the
   .contact-field input treatment used on the contact page. */
.woocommerce-Input,
.woocommerce-form-row select,
.woocommerce-MyAccount-content textarea {
  width: 100%;
  height: 52px;
  padding: 0 20px;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  background: var(--color-white);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text);
  box-sizing: border-box;
}

.woocommerce-MyAccount-content textarea {
  height: 120px;
  padding: 14px 20px;
  resize: vertical;
}

.woocommerce-Input:focus,
.woocommerce-form-row select:focus,
.woocommerce-MyAccount-content textarea:focus {
  outline: 2px solid var(--color-teal);
  outline-offset: -1px;
}

@media (min-width: 768px) {
  .account-auth-grid:not(.account-auth-grid--single) { grid-template-columns: 1fr 1fr; }
}

/* --------------------------------------------------------------------------
   Order received / thank you page (checkout/thankyou.php + order/order-details*.php
   — unstyled by default, so this was falling back to plain browser typography)
   -------------------------------------------------------------------------- */

.woocommerce-order > * + * {
  margin-top: 28px;
}

.woocommerce-order .woocommerce-notice.woocommerce-thankyou-order-received,
.woocommerce-order .woocommerce-notice.woocommerce-thankyou-order-failed {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 20px 24px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.woocommerce-order .woocommerce-notice.woocommerce-thankyou-order-received {
  background: rgba(85, 182, 179, 0.12);
  color: var(--color-navy);
  border: 1px solid rgba(85, 182, 179, 0.3);
}

.woocommerce-order .woocommerce-notice.woocommerce-thankyou-order-received::before {
  content: "\2713";
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-teal);
  color: var(--color-white);
  font-size: 15px;
  font-weight: 700;
}

.woocommerce-order .woocommerce-notice.woocommerce-thankyou-order-failed {
  background: rgba(232, 98, 26, 0.1);
  color: var(--color-navy);
  border: 1px solid rgba(232, 98, 26, 0.3);
  font-weight: 400;
}

.woocommerce-order .woocommerce-thankyou-order-failed-actions {
  display: flex;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
}

/* Order overview strip: order number / date / email / total / payment method */
.woocommerce-order-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 40px;
  margin: 0;
  padding: 24px;
  list-style: none;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}

.woocommerce-order-overview li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}

.woocommerce-order-overview li strong {
  font-size: 16px;
  text-transform: none;
  letter-spacing: normal;
  color: var(--color-navy);
}

.woocommerce-order-details__title,
.woocommerce-column__title {
  font-family: var(--font-heading);
  color: var(--color-navy);
  margin: 0 0 16px;
}

table.woocommerce-table--order-details {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

table.woocommerce-table--order-details th,
table.woocommerce-table--order-details td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 14px;
  text-align: left;
}

table.woocommerce-table--order-details thead th {
  background: var(--color-light);
  color: var(--color-navy);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.03em;
}

table.woocommerce-table--order-details tbody td.product-total,
table.woocommerce-table--order-details tfoot td,
table.woocommerce-table--order-details tfoot th {
  text-align: right;
}

table.woocommerce-table--order-details tfoot th {
  font-weight: 600;
  color: var(--color-text);
}

table.woocommerce-table--order-details tfoot tr:last-child th,
table.woocommerce-table--order-details tfoot tr:last-child td {
  border-bottom: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-navy);
}

table.woocommerce-table--order-details .product-quantity {
  color: var(--color-text-muted);
  font-weight: 400;
}

table.woocommerce-table--order-details .order-actions-button {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  margin-right: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-teal);
  color: var(--color-white);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

.woocommerce-customer-details address {
  font-style: normal;
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-text);
}

.woocommerce-columns--addresses {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.woocommerce-column--billing-address,
.woocommerce-column--shipping-address {
  padding: 20px;
  background: var(--color-white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}

@media (min-width: 768px) {
  .woocommerce-columns--addresses { grid-template-columns: 1fr 1fr; }
}

/* --------------------------------------------------------------------------
   Cart & Checkout (WooCommerce Blocks — kept as default blocks, themed via
   their block-generated classnames since there is no PHP template to override)
   -------------------------------------------------------------------------- */

.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
  font-family: var(--font-body);
  color: var(--color-text);
}

.wc-block-components-product-name {
  color: var(--color-navy);
  font-weight: 600;
}

.wc-block-cart-item__product-image img,
.wc-block-components-product-image img {
  border-radius: var(--radius-sm);
}

.wc-block-components-totals-item__label,
.wc-block-components-totals-item__value {
  font-size: 15px;
}

.wc-block-components-panel,
.wc-block-components-totals-wrapper {
  border-radius: var(--radius-sm);
}

.wp-block-woocommerce-cart .wc-block-cart__submit-container .wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button,
.wc-block-components-button:not(.is-link) {
  border-radius: var(--radius-pill) !important;
  background: var(--color-orange) !important;
  color: var(--color-white) !important;
  font-weight: 700 !important;
  box-shadow: var(--shadow-cta);
}

.wc-block-components-button:not(.is-link):hover {
  transform: translateY(-2px);
}

.wc-block-components-quantity-selector {
  border-radius: var(--radius-pill);
  border-color: rgba(0, 0, 0, 0.15);
}

.wc-block-components-text-input input,
.wc-block-components-textarea textarea,
.wc-block-checkout__form select {
  border-radius: 6px !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  font-family: var(--font-body);
}

.wc-block-components-radio-control__label {
  font-size: 15px;
}

.wc-block-components-notice-banner {
  border-radius: var(--radius-sm);
}
