/*
Theme Name: Historic Motorsport
Theme URI: https://example.com/
Author: Dancing Badger
Author URI: https://example.com/
Description: Lightweight block theme for WordPress & WooCommerce.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: historic-motorsport
*/


/* Base fallbacks (the rest is handled via theme.json) */

body {
  margin: 0;
}

body a {
    text-decoration: none;
}

.wp-block-post-content ul:not(.wp-block-post-template):not([data-block-name="woocommerce/product-template"]),
.wp-block-post-content ol {
  margin: 0;
  padding: 0 0 30px 30px;
}

.wp-block-post-content blockquote {
  margin: 0 0 30px;
  padding: 0 0 0 30px;
}




/* Header */

header.core-header .header-left div.widget, 
header.core-header .header-right div.widget {
  width: 100%;
}



/* Minicart icon */

.wc-block-mini-cart__button .wc-block-mini-cart__icon {
    height: 50px;
    width: 50px;
}

/* Search bar */

.wp-block-search__inside-wrapper {
    overflow: hidden;
    padding: 0;
}

:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input {
    height: 48px;
    padding: 0 20px;
}

.wp-block-search__button.has-icon {
    height: 48px;
}



/* Navigation */

:where(.wp-block-navigation.has-background .wp-block-navigation-item a:not(.wp-element-button)),
:where(.wp-block-navigation.has-background .wp-block-navigation-submenu a:not(.wp-element-button)) {
    padding: 0;
}

:where(.wp-block-navigation.has-background .wp-block-navigation-item > ul a:not(.wp-element-button)) {
  border-top: 1px solid #f0f0f0;
  font-weight: 400;
  line-height: 1.6;
  text-transform: none;
}

.wp-block-navigation .has-child:not(.open-on-click):hover>.wp-block-navigation__submenu-container {
  left: -14px;
  width: 260px;
}

.wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content:hover {
  color: #ffb535;
}

ul.wp-block-navigation-submenu {
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
}



/* mobile header */

@media (max-width: 1023px) {

  .wp-block-template-part {
    position: relative;
  }

  .not-on-mobile {
    display: none !important;
  }

  header.wp-block-template-part .wp-block-columns {
    flex-direction: column-reverse;
    gap: var(--wp--preset--spacing--s);
  }

  .wp-block-site-logo {
    text-align: left !important;
  }

  .wp-block-site-logo img {
    position: relative;
    z-index: 100001 !important;
  }

}



/* mobile navigation */

@media (max-width: 1023px) {

  .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: flex;
  }

  .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: none;
  }

  .wp-block-group.main-nav {
    position: static;
  }

  .wp-block-navigation {
  position: static;
  }

  .wp-block-navigation button {
    align-items: center;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    display: flex;
    height: 50px;
    justify-content: center;
    position: absolute;
    right: var(--wp--preset--spacing--s);
    top: 18px;
    width: 50px;
  }

  .wp-block-navigation__responsive-container {
    background: none !important;
  }

  .wp-block-navigation__responsive-container button.wp-block-navigation__responsive-container-close { 
    background: #fff;
    margin-top: 0;
  }

  .wp-block-navigation__responsive-container-content {
    background: #fff;
    padding-top: 88px !important;
  }

  .wp-block-navigation__responsive-container-content ul {
    gap: 0 !important;
    width: 100% !important;
  }

  .wp-block-navigation__responsive-container-content > ul {
    border-bottom: 1px solid #e0e0e0 !important;
  }

  .wp-block-navigation__responsive-container-content ul li {
    width: 100% !important;
  }

  .wp-block-navigation__responsive-container-content ul li a {
    border-top: 1px solid #e0e0e0 !important;
    display: block !important;
    line-height: 3 !important;
    padding: 7px 20px !important;
    width: 100% !important;
  }

  .wp-block-navigation__responsive-container-content ul li ul {
    background-color: var(--wp--preset--color--neutral-100) !important;
    padding: 0 !important;
  }

  .wp-block-navigation__responsive-container-content ul li ul li a {
    line-height: 2 !important;
    padding-left: 40px !important;
  }

}

@media (min-width: 1024px) {

  .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: none !important;
  }

  .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: block !important;
  }

}



/* Mobile slider */

@media (max-width: 768px) {

  .swiper-button-prev,
  .swiper-button-next {
    display: none;
  }

}



/* Sort ordering on catalogue */

.woocommerce-ordering select {
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  height: 40px;
  padding: 0 10px;
}


/* Pagination */

.wp-block-query-pagination {
  align-items: center;
  column-gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 30px 0;
  row-gap: 8px;
}

.wp-block-query-pagination .wp-block-query-pagination-previous,
.wp-block-query-pagination .wp-block-query-pagination-next,
.wp-block-query-pagination .page-numbers {
  align-items: center;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  color: #1a1a1a;
  display: inline-flex;
  font-size: 14px;
  font-weight: 500;
  height: 38px;
  justify-content: center;
  line-height: 1;
  min-width: 38px;
  padding: 0 12px;
  transition: all 150ms ease;
}

.wp-block-query-pagination .page-numbers.dots {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #7a7a7a;
  min-width: auto;
  padding: 0 6px;
}

.wp-block-query-pagination .page-numbers.current {
  background: #111;
  border-color: #111;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.wp-block-query-pagination .wp-block-query-pagination-previous:hover,
.wp-block-query-pagination .wp-block-query-pagination-next:hover,
.wp-block-query-pagination .page-numbers:not(.current):hover {
  background: #f5f5f5;
  border-color: #d6d6d6;
  color: #111;
}

.wp-block-query-pagination .wp-block-query-pagination-previous:focus-visible,
.wp-block-query-pagination .wp-block-query-pagination-next:focus-visible,
.wp-block-query-pagination .page-numbers:focus-visible {
  outline: 2px solid #ffb535;
  outline-offset: 2px;
}


/* Order confirmation summary */

.mbwc-order-summary {
  display: grid;
  gap: 16px;
}

.mbwc-order-summary__card {
  background: #fff;
  border: 1px solid #e7e7e7;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  padding: 18px;
}

.mbwc-order-summary__card-header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mbwc-order-summary__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.mbwc-order-summary__count {
  align-items: center;
  background: #111;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  height: 28px;
  justify-content: center;
  min-width: 28px;
  padding: 0 10px;
}

.mbwc-order-summary__items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mbwc-order-summary__item {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 64px 1fr auto;
  padding: 10px 0;
}

.mbwc-order-summary__item + .mbwc-order-summary__item {
  border-top: 1px solid #f1f1f1;
}

.mbwc-order-summary__item-media {
  background: #fafafa;
  border: 1px solid #ededed;
  border-radius: 8px;
  overflow: hidden;
}

.mbwc-order-summary__thumb {
  display: block;
  height: 64px;
  object-fit: cover;
  width: 64px;
}

.mbwc-order-summary__item-content {
  display: grid;
  gap: 4px;
}

.mbwc-order-summary__item-title a,
.mbwc-order-summary__item-title span {
  color: #111;
  font-weight: 600;
  text-decoration: none;
}

.mbwc-order-summary__item-title a:hover {
  color: #ffb535;
}

.mbwc-order-summary__item-meta {
  color: #666;
  font-size: 13px;
}

.mbwc-order-summary__item-qty {
  color: #444;
  font-size: 13px;
  font-weight: 500;
}

.mbwc-order-summary__item-total {
  color: #111;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.mbwc-order-summary__totals {
  margin: 0;
}

.mbwc-order-summary__totals-row {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto;
  padding: 8px 0;
}

.mbwc-order-summary__totals-row + .mbwc-order-summary__totals-row {
  border-top: 1px solid #f1f1f1;
}

.mbwc-order-summary__totals-row dt {
  color: #444;
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}

.mbwc-order-summary__totals-row dd {
  color: #111;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  text-align: right;
}

@media (max-width: 640px) {
  .mbwc-order-summary__item {
    grid-template-columns: 56px 1fr;
  }

  .mbwc-order-summary__item-total {
    grid-column: 2;
    text-align: left;
  }
}



/* Checkout */

.wc-block-components-product-metadata__description {
  display: none;
}

.wc-block-order-confirmation-shipping-address,
.wc-block-order-confirmation-billing-address {
  border: 0;
  padding: 0;
}

.wp-block-woocommerce-order-confirmation-status {
  padding-bottom: var(--wp--preset--spacing--s);
}

.wp-block-woocommerce-order-confirmation-status h1 {
  border-bottom: 1px solid #f0f0f0;
  font-size: 22.5px;
  margin: 0;
  margin-bottom: var(--wp--preset--spacing--s);
  padding-bottom: var(--wp--preset--spacing--xs);
}

.ppcp-place-order-description {
  text-align: left !important;
}



/* Order Confirmation */

.wp-block-woocommerce-checkout-order-summary-block {
  margin-bottom: var(--wp--preset--spacing--m);
}

.wc-block-components-order-summary .wc-block-components-order-summary-item__quantity {
  padding: 0;
}

body:not(.page-id-31) .wc-block-components-order-summary .wc-block-components-order-summary-item {
    display: flex;
    font-size: .875em;
    padding-bottom: 1px;
    padding-top: var(--wp--preset--spacing--s);
    width: 100%;
}

body:not(.page-id-31) .wc-block-components-order-summary .wc-block-components-order-summary-item:last-child {
    border-bottom: 0;
}

body:not(.page-id-31) .wc-block-components-order-summary .wc-block-components-order-summary-item__description, 
.wc-block-components-order-summary .wc-block-components-order-summary-item__image {
    display: table-cell;
    vertical-align: top;
}

body:not(.page-id-31) .wc-block-components-order-summary .wc-block-components-order-summary-item__image {
    margin-top: 10px;
    padding-bottom: 16px;
    position: relative;
    width: 48px;
}

body:not(.page-id-31) .wc-block-components-order-summary .wc-block-components-order-summary-item__image > img {
    max-width: 48px;
    width: 48px;
}

body:not(.page-id-31) .wc-block-components-order-summary .wc-block-components-order-summary-item__quantity {
    align-items: center;
    background: #fff;
    border: 2px solid hsla(0, 0%, 7%, .11);
    border-radius: 1em;
    box-shadow: 0 0 0 2px #fff;
    color: #000;
    display: flex;
    font-size: 10px;
    font-weight: 600;
    justify-content: center;
    line-height: 1;
    min-height: 20px;
    min-width: 20px;
    padding: 0;
    position: absolute;
    right: 0;
    top: 0;
    transform: translate(50%, -50%);
    white-space: nowrap;
    z-index: 1;
}

body:not(.page-id-31) .wc-block-components-order-summary .wc-block-components-order-summary-item__description {
    padding-bottom: var(--wp--preset--spacing--s);
    padding-left: var(--wp--preset--spacing--s);
    padding-right: var(--wp--preset--spacing--s);
}

body:not(.page-id-31) .wc-block-components-order-summary .wc-block-components-order-summary-item__description h3 {
    font-size: 1em;
    font-weight: 400;
    line-height: 2;
    margin: 0;
}

body:not(.page-id-31) .wc-block-components-order-summary .wc-block-components-order-summary-item:last-child > div {
    padding-bottom: 0;
}

body:not(.page-id-31) .wc-block-components-order-summary .wc-block-components-order-summary-item__total-price {
    font-weight: 700;
    margin-left: auto;
    text-align: right;
}

body:not(.page-id-31) .wc-block-components-order-summary .wc-block-components-order-summary-item__total-price .tax_label {
  display: none;
}

body:not(.page-id-31) .wp-block-woocommerce-checkout-order-summary-totals-block {
    border-top: 1px solid #f0f0f0;
    margin-top: var(--wp--preset--spacing--s);
}

body:not(.page-id-31) .wc-block-components-totals-item {
  padding: var(--wp--preset--spacing--s) 0 0;
}

body:not(.page-id-31) .wc-block-components-totals-item {
  align-items: center;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  width: 100%;
}

@container (min-width: 700px) {

  .wc-block-components-sidebar .wc-block-components-totals-item {
      padding-left: var(--wp--preset--spacing--s);
      padding-right: var(--wp--preset--spacing--s);
    }

}

.wc-block-components-totals-item__label {
  flex-grow: 1;
}

.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-formatted-money-amount {
  font-weight: 600;
}

.wc-block-components-formatted-money-amount {
  white-space: nowrap;
}

.wc-block-components-totals-item-total {
  border-top: 1px solid #f0f0f0;
  font-size: 20px;
  font-weight: bold;
  margin: var(--wp--preset--spacing--s) 0 0;
  padding: var(--wp--preset--spacing--s) 0 0;
}


/* Category page */

p.woocommerce-result-count {
  padding-bottom: 0 !important;
}



/* Product page */

.wp-block-group.woocommerce.product {
  padding: 0;
}

p.stock.in-stock {
  color: #ffb535;
}

p.stock.out-of-stock {
  color: #c00;
}

.woocommerce div.product form.cart {
  padding: 0;
}

.woocommerce .quantity .qty {
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 60px;
  height: 50px;
}

.woocommerce div.product form.cart button.single_add_to_cart_button, 
.woocommerce div.product form.cart button[name=add-to-cart] {
  border-radius: 4px;
  line-height: 50px;
  padding: 0 40px;
}

.woocommerce .wp-block-woocommerce-product-image-gallery {
  max-width: none;
}

.woocommerce .wp-block-woocommerce-product-image-gallery .woocommerce-product-gallery__image {
  margin-bottom: var(--wp--preset--spacing--s);
}

.woocommerce div.product div.images .flex-control-thumbs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 30px) / 4);
  gap: 10px;
  list-style: none;
  margin: var(--wp--preset--spacing--s) 0 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 12px;
  scrollbar-color: #9a9a9a #f1f1f1;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.woocommerce div.product div.images .flex-control-thumbs li {
  box-sizing: border-box;
  margin: 0;
  width: 100%;
}

.woocommerce div.product div.images .flex-control-thumbs::-webkit-scrollbar {
  height: 6px;
}

.woocommerce div.product div.images .flex-control-thumbs::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 999px;
  margin: 0 25%;
}

.woocommerce div.product div.images .flex-control-thumbs::-webkit-scrollbar-thumb {
  background: #9a9a9a;
  border-radius: 999px;
}

.woocommerce div.product div.images .flex-control-thumbs::-webkit-scrollbar-thumb:hover {
  background: #757575;
}

.woocommerce div.product div.images .flex-control-thumbs::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}


body.product_cat-car-sales .product-summary div[data-block-name="woocommerce/add-to-cart-form"] {
  display: none !important;
}

body:not(.product_cat-car-sales) .product-summary #wpforms-17809 {
  display: none !important;
}


/* WP Forms Car Sales Enquiry */

#wpforms-17809 {
  background: #f0f0f0;
  border-radius: 4px;
  margin-top: var(--wp--preset--spacing--m);
  padding: var(--wp--preset--spacing--s) var(--wp--preset--spacing--m) var(--wp--preset--spacing--m);
}

.wpforms-container .wpforms-field {
  padding-bottom: 20px !important;
  padding-top: 0 !important;
}

.wpforms-container .wpforms-field.wpforms-field-layout {
  padding-bottom: 0 !important;
}

.wpforms-container input[type=text],
.wpforms-container input[type=email],
.wpforms-container input[type=tel] {
  border: 1px solid #ccc;
  border-radius: 4px;
  height: 50px;
  padding: 0 20px;
}

.wpforms-container textarea {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 14px 20px;
}

.wpforms-submit-container button {
  background: #333;
  border-radius: 4px;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  line-height: 50px;
  padding: 0 40px;
}


/* Notices */

.woocommerce-notices-wrapper {
  padding-bottom: var(--wp--preset--spacing--s);
}

.woocommerce-notices-wrapper .wc-block-components-notice-banner {
  margin: 0 0 var(--wp--preset--spacing--s);
}




/* Footer */

@media (max-width: 781px) {

  footer.wp-block-template-part {
    padding: 0 !important;
  }

  footer.wp-block-template-part .uagb-icon-wrapper {
    cursor: pointer;
    float: right;
    margin: 15px var(--wp--preset--spacing--s) 10px;
  }

  footer.wp-block-template-part .wp-block-group {
    padding: var(--wp--preset--spacing--m) !important;
  }

  footer.wp-block-template-part .wp-block-group .wp-block-group {
    display: none;
    padding: 0 var(--wp--preset--spacing--s) !important;
  }

  footer.wp-block-template-part .wp-block-columns {
    gap: 0;
  }

  footer.wp-block-template-part .wp-block-columns h2 {
    font-size: 20px;
    padding: var(--wp--preset--spacing--xs) var(--wp--preset--spacing--s);
  }

  footer.wp-block-template-part .wp-block-columns h2.is-open + .wp-block-group {
    display: block;
  }

  footer.wp-block-template-part .wp-block-columns .uagb-icon-wrapper.is-open {
    margin: 10px var(--wp--preset--spacing--s) 15px;
    transform: rotate(180deg);
  }

  footer.wp-block-template-part .wp-block-columns:not(.spiderlinks) .wp-block-column {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0;
  }

  footer.wp-block-template-part .wp-block-columns.spiderlinks {
    padding: var(--wp--preset--spacing--m);
  }

  footer.wp-block-template-part .wp-block-columns.spiderlinks p {
    padding: 0;
    text-align: center !important;
  }

}

@media (min-width: 782px) {

  footer.wp-block-template-part .uagb-icon-wrapper {
    display: none;
  }

}




/* Minicart */

table.wc-block-mini-cart-items .wc-block-components-product-name {
  padding-right: 16px;
}

table.wc-block-mini-cart-items .wc-block-components-product-price {
  font-weight: 700;
}

table.wc-block-mini-cart-items .wc-block-cart-item__prices {
  display: none;
}