/* Storefront styling, scoped away from editorial and landing pages. */
.cp-commerce-shell,
body.cp-transaction-page {
  --cp-ink: #152a4d;
  --cp-muted: #5e728a;
  --cp-line: #e7eef5;
  --cp-soft: #f4f7fb;
  --cp-teal: #2fa8a3;
  --cp-deep: #1e4f68;
  color: var(--cp-ink);
  font-family: "Inter", system-ui, sans-serif;
}

.wp-site-blocks > .cp-commerce-shell,
body.cp-transaction-page .wp-site-blocks > main {
  box-sizing: border-box;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto !important;
  padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 48px) 64px !important;
}

.cp-commerce-shell *,
body.cp-transaction-page main * {
  box-sizing: border-box;
}

/* Avoid the scrollbar-width overflow of the shared footer's 100vw wrapper. */
body.woocommerce .cp-footer-wrap,
body.cp-transaction-page .cp-footer-wrap {
  width: 100%;
  margin-inline: 0;
}

.cp-commerce-shell #primary,
.cp-commerce-shell #main,
body.cp-transaction-page main > .wp-block-post-content,
body.cp-transaction-page .wp-block-woocommerce-cart,
body.cp-transaction-page .wp-block-woocommerce-checkout {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.cp-commerce-shell .woocommerce-breadcrumb,
.cp-commerce-steps {
  color: var(--cp-muted);
  font-size: 13px;
  margin: 0 0 28px;
}

.cp-commerce-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.cp-commerce-steps a,
.cp-commerce-steps [aria-current] {
  color: var(--cp-ink);
}

.cp-commerce-steps [aria-current] {
  font-weight: 700;
}

.cp-commerce-heading h1,
.cp-catalog-shell .page-title {
  font-family: "DM Sans", "Inter", sans-serif;
  font-size: clamp(28px, 3.5vw, 40px);
  letter-spacing: -.025em;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--cp-ink);
}

.cp-commerce-heading > p {
  color: var(--cp-muted);
  margin: 0 0 32px;
  font-size: 15px;
}

/* Product detail: gallery and purchase column, without the demo banner. */
.woocommerce .cp-product-shell div.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 48px;
}

.woocommerce .cp-product-shell div.product::before,
.woocommerce .cp-product-shell div.product::after {
  content: none;
}

.woocommerce .cp-product-shell div.product div.images,
.woocommerce .cp-product-shell div.product div.summary {
  width: 100%;
  float: none;
  min-width: 0;
  margin: 0;
}

.cp-product-shell .woocommerce-product-gallery__wrapper {
  margin: 0;
}

.woocommerce .cp-product-shell div.product div.images img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
}

.woocommerce .cp-product-shell div.product .product_title {
  font: 700 clamp(26px, 3vw, 36px)/1.2 "DM Sans", "Inter", sans-serif;
  letter-spacing: -.02em;
  color: var(--cp-ink);
  margin: 0 0 16px;
}

.woocommerce .cp-product-shell div.product p.price {
  color: var(--cp-deep);
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 4px;
}

.cp-product-currency {
  font-size: 12px;
  color: var(--cp-muted);
  margin: 0 0 22px;
}

.cp-product-shell .woocommerce-product-details__short-description {
  font-size: 14px;
  line-height: 1.8;
  color: var(--cp-muted);
}

.woocommerce .cp-product-shell div.product .stock {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 7px 12px;
  background: #e9f5ef;
  color: #236349;
}

.woocommerce .cp-product-shell div.product .out-of-stock {
  background: #fff0ed;
  color: #9b3328;
}

.woocommerce .cp-product-shell div.product form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 18px 0 24px;
}

.cp-product-shell form.cart > .clear {
  display: none;
}

.cp-product-shell form.cart > .tpt__tiered-pricing,
.cp-product-shell form.cart > .variations,
.cp-product-shell form.cart > .single_variation_wrap {
  flex-basis: 100%;
  width: 100%;
}

.cp-product-shell .woocommerce-variation-add-to-cart {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.woocommerce .cp-product-shell div.product form.cart div.quantity {
  margin: 0;
  float: none;
}

.cp-product-shell .cp-quantity {
  display: inline-flex;
  height: 56px;
  border: 1px solid var(--cp-line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.cp-product-shell .cp-quantity button {
  width: 38px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cp-ink);
  font-size: 22px;
  cursor: pointer;
}

.cp-product-shell .cp-quantity button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.woocommerce .cp-product-shell .quantity .qty {
  width: 56px;
  min-height: 54px;
  border: 1px solid var(--cp-line);
  border-radius: 12px;
  background: #fff;
  color: var(--cp-ink);
  font-size: 16px;
  font-weight: 700;
}

.woocommerce .cp-product-shell .cp-quantity .qty {
  border: 0;
  border-radius: 0;
  appearance: textfield;
  -moz-appearance: textfield;
}

.cp-quantity .qty::-webkit-inner-spin-button,
.cp-quantity .qty::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.woocommerce .cp-product-shell button.single_add_to_cart_button,
body.cp-transaction-page .wc-block-components-button:not(.is-link) {
  min-height: 56px;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--cp-teal);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
}

.woocommerce .cp-product-shell button.single_add_to_cart_button:hover,
body.cp-transaction-page .wc-block-components-button:not(.is-link):hover {
  background: #197f7b;
}

.cp-product-resources {
  border-top: 1px solid var(--cp-line);
  padding-top: 20px;
  display: grid;
  gap: 12px;
  font-size: 13px;
}

.cp-product-resources a {
  color: var(--cp-deep);
  font-weight: 700;
}

.cp-product-resources p {
  border-radius: 12px;
  background: var(--cp-soft);
  padding: 14px;
  color: var(--cp-muted);
  line-height: 1.6;
  margin: 0;
}

.cp-product-shell .product_meta {
  display: grid;
  gap: 6px;
  margin-top: 20px;
  font-size: 11px;
  overflow-wrap: anywhere;
  color: var(--cp-muted);
}

.woocommerce .cp-product-shell div.product .woocommerce-tabs,
.cp-product-shell .related,
.cp-product-shell .up-sells {
  grid-column: 1 / -1;
  min-width: 0;
}

.woocommerce .cp-product-shell div.product .woocommerce-tabs {
  margin-top: 12px;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 20px;
  background: var(--cp-deep);
  color: #d6e6ee;
}

.woocommerce .cp-product-shell div.product .woocommerce-tabs ul.tabs {
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.woocommerce .cp-product-shell div.product .woocommerce-tabs ul.tabs::before,
.woocommerce .cp-product-shell div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce .cp-product-shell div.product .woocommerce-tabs ul.tabs li::after {
  display: none;
}

.woocommerce .cp-product-shell div.product .woocommerce-tabs ul.tabs li {
  border: 0;
  border-radius: 0;
  background: transparent;
  margin: 0;
  padding: 0;
}

.woocommerce .cp-product-shell div.product .woocommerce-tabs ul.tabs li a {
  color: #d6e6ee;
  padding: 0 0 10px;
}

.woocommerce .cp-product-shell div.product .woocommerce-tabs ul.tabs li.active a {
  color: #fff;
  border-bottom: 2px solid #9fe3e0;
}

.woocommerce .cp-product-shell div.product .woocommerce-tabs .panel {
  background: transparent;
  font-size: 15px;
  line-height: 1.85;
  margin: 0;
  overflow-wrap: anywhere;
}

.cp-product-shell .woocommerce-tabs :is(h2, h3, h4) {
  color: #fff;
  font-size: 23px;
  line-height: 1.4;
  margin-top: 28px;
}

.cp-product-shell .woocommerce-tabs a {
  color: #9fe3e0;
}

/* Catalog and related products share the existing shop's card language. */
.woocommerce .cp-commerce-shell ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  padding: 0;
}

.woocommerce .cp-commerce-shell ul.products::before,
.woocommerce .cp-commerce-shell ul.products::after {
  content: none;
}

.woocommerce .cp-commerce-shell ul.products li.product {
  display: flex;
  flex-direction: column;
  gap: 0;
  float: none;
  width: auto;
  margin: 0;
  border: 1px solid var(--cp-line);
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  box-shadow: 0 8px 22px rgb(15 42 77 / 6%);
}

.woocommerce .cp-commerce-shell ul.products li.product img {
  height: 200px;
  object-fit: contain;
}

.woocommerce .cp-commerce-shell ul.products li.product .woocommerce-loop-product__title {
  color: var(--cp-ink);
  font-size: 14px;
  line-height: 1.4;
}

.woocommerce .cp-commerce-shell ul.products li.product .price {
  color: #0a6e7d;
  font-weight: 700;
}

.woocommerce .cp-commerce-shell ul.products li.product .button {
  margin-top: auto;
  padding: 13px 16px;
  border-radius: 999px;
  background: #0d5363;
  color: #fff;
  font-size: 13px;
}

/* Native Cart and Checkout blocks retain Store API validation and totals. */
body.cp-transaction-page .wc-block-components-sidebar-layout {
  gap: 28px;
  align-items: flex-start;
  flex-direction: row;
  margin-bottom: 0;
}

body.cp-transaction-page .wc-block-components-sidebar-layout .wc-block-components-main {
  width: calc(65% - 14px);
  padding-right: 0;
  min-width: 0;
}

body.cp-transaction-page .wc-block-components-sidebar-layout .wc-block-components-sidebar {
  width: calc(35% - 14px);
  padding: 0;
  min-width: 0;
}

body.cp-transaction-page .wc-block-cart-items,
body.cp-transaction-page .wc-block-checkout__form {
  background: #fff;
  border: 1px solid var(--cp-line);
  border-radius: 18px;
}

body.cp-transaction-page .wc-block-cart-items {
  border-collapse: separate;
  border-spacing: 0;
  padding: 12px 22px;
}

body.cp-transaction-page .wc-block-cart-items th {
  color: var(--cp-muted);
  font-size: 12px;
}

body.cp-transaction-page .wc-block-cart-items .wc-block-cart-items__row td {
  border-color: var(--cp-line);
  padding-top: 24px;
  padding-bottom: 24px;
}

body.cp-transaction-page .wc-block-components-product-name {
  color: var(--cp-ink);
  font-weight: 700;
  text-decoration: none !important;
  line-height: 1.45;
}

body.cp-transaction-page .wc-block-cart-item__product .wc-block-components-product-metadata__description {
  display: none;
}

body.cp-transaction-page .wc-block-cart-items__row .wc-block-cart-item__image {
  width: 120px;
}

body.cp-transaction-page .wc-block-cart-items__row .wc-block-cart-item__image img {
  max-height: 152px;
  object-fit: contain;
}

body.cp-transaction-page .wc-block-components-quantity-selector {
  border: 1px solid #ccdce4;
  border-radius: 12px;
  min-height: 44px;
}

body.cp-transaction-page .wc-block-components-quantity-selector::after {
  border: 0;
}

body.cp-transaction-page .wc-block-cart__sidebar,
body.cp-transaction-page .wp-block-woocommerce-checkout-order-summary-block {
  border: 1px solid var(--cp-line);
  border-radius: 18px;
  background: var(--cp-soft);
  overflow: hidden;
}

body.cp-transaction-page .wc-block-cart .wc-block-cart__totals-title {
  display: block;
  background: var(--cp-deep);
  color: #fff;
  padding: 22px 24px;
  font: 700 18px/1.4 "DM Sans", sans-serif;
  text-transform: none;
}

/* Woo uses container-size classes as well as viewport media queries. */
body.cp-transaction-page .wc-block-components-sidebar-layout:is(.is-medium, .is-small, .is-mobile) {
  flex-direction: column;
}

body.cp-transaction-page .wc-block-components-sidebar-layout:is(.is-medium, .is-small, .is-mobile) > .wc-block-components-main,
body.cp-transaction-page .wc-block-components-sidebar-layout:is(.is-medium, .is-small, .is-mobile) > .wc-block-components-sidebar {
  width: 100%;
  margin: 0;
}

body.cp-transaction-page :is(.is-medium, .is-small, .is-mobile) .wc-block-cart-items .wc-block-cart-items__row {
  grid-template-columns: 80px minmax(0, 1fr) auto;
  column-gap: 20px;
}

body.cp-transaction-page :is(.is-medium, .is-small, .is-mobile) .wc-block-cart-items__row .wc-block-cart-item__image {
  width: 80px;
  padding-right: 0;
}

body.cp-transaction-page :is(.is-medium, .is-small, .is-mobile) .wc-block-cart-items__row .wc-block-cart-item__product {
  grid-column: 2;
}

body.cp-transaction-page :is(.is-medium, .is-small, .is-mobile) .wc-block-cart-items__row .wc-block-cart-item__total {
  grid-column: 3;
}

body.cp-transaction-page .wc-block-components-totals-wrapper {
  border-color: var(--cp-line);
}

body.cp-transaction-page .wc-block-cart__sidebar .wc-block-components-totals-wrapper {
  padding: 18px 22px;
}

body.cp-transaction-page .wc-block-cart__sidebar .wc-block-components-totals-item {
  padding-inline: 0;
}

body.cp-transaction-page .wc-block-components-button,
body.cp-transaction-page .cp-commerce-footer a {
  text-decoration: none !important;
}

body.cp-transaction-page .wc-block-cart__submit-container {
  padding: 20px;
}

body.cp-transaction-page .wc-block-components-totals-footer-item {
  color: var(--cp-ink);
  font-size: 20px;
}

.cp-checkout-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0 0 32px;
  border-block: 1px solid var(--cp-line);
  padding: 22px 0;
}

.cp-checkout-notes > div {
  display: grid;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.cp-checkout-notes span {
  color: var(--cp-muted);
}

.cp-checkout-notes a {
  color: var(--cp-deep);
}

body.cp-transaction-page .wc-block-checkout__form {
  padding: 24px;
}

body.cp-transaction-page .wc-block-components-title {
  color: var(--cp-ink);
  font-family: "DM Sans", "Inter", sans-serif;
}

body.cp-transaction-page .wc-block-components-text-input input,
body.cp-transaction-page .wc-blocks-components-select .wc-blocks-components-select__container,
body.cp-transaction-page .wc-block-components-textarea {
  border-color: #b9ccd7;
  border-radius: 10px;
}

.cp-commerce-footer {
  margin-top: 28px;
}

body.cp-transaction-page .wp-block-woocommerce-empty-cart-block {
  border: 1px solid var(--cp-line);
  border-radius: 18px;
  padding: clamp(20px, 4vw, 36px);
  background: var(--cp-soft);
}

body.cp-transaction-page .wc-block-grid__products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 20px;
  margin: 0;
}

body.cp-transaction-page .wc-block-grid__products .wc-block-grid__product {
  max-width: none;
  padding: 16px;
  border: 1px solid var(--cp-line);
  border-radius: 14px;
  background: #fff;
  font-size: 13px;
}

body.cp-transaction-page .wc-block-grid__product-image img {
  max-height: 180px;
  object-fit: contain;
}

.cp-product-shell .woocommerce-notices-wrapper > :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) {
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.7;
}

.cp-product-shell .woocommerce-tabs :is(input, textarea, select) {
  color: #152a4d;
  max-width: 100%;
}

.cp-commerce-addons {
  margin-top: 36px;
}

.cp-commerce-addons h2 {
  font-size: 20px;
  margin: 0 0 18px;
}

.cp-commerce-addons.cp-shop-grid ul.products {
  grid-template-columns: minmax(0, 300px);
}

.cp-commerce-continue {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  border: 1px solid #b9ccd7;
  border-radius: 999px;
  padding: 10px 24px;
  color: var(--cp-ink);
  font-size: 14px;
  font-weight: 700;
}

.cp-commerce-help {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 36px;
  padding: clamp(24px, 4vw, 36px);
  background: var(--cp-deep);
  color: #d6e6ee;
  border-radius: 18px;
}

.cp-commerce-help h2 {
  color: #fff;
  font-size: 25px;
  margin: 0 0 8px;
}

.cp-commerce-help p {
  font-size: 14px;
  line-height: 1.7;
  max-width: 560px;
  margin: 0;
}

.cp-commerce-help a {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 14px 22px;
  color: var(--cp-ink);
  background: #a9e5dd;
  font-size: 13px;
  font-weight: 700;
}

.cp-commerce-shell :is(a, button, input, select):focus-visible,
body.cp-transaction-page main :is(a, button, input, select):focus-visible {
  outline: 3px solid #2fa8a3;
  outline-offset: 3px;
}

@media (max-width: 980px) {
  body.cp-transaction-page .wc-block-components-sidebar-layout .wc-block-components-main,
  body.cp-transaction-page .wc-block-components-sidebar-layout .wc-block-components-sidebar {
    width: 100%;
    margin: 0;
  }

  body.cp-transaction-page .wc-block-components-sidebar-layout {
    flex-direction: column;
  }

  .woocommerce .cp-commerce-shell ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .woocommerce .cp-product-shell div.product {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .woocommerce .cp-product-shell div.product div.images img {
    max-height: 320px;
  }

  .cp-checkout-notes {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .cp-commerce-help {
    flex-direction: column;
    align-items: flex-start;
  }

  body.cp-transaction-page .wc-block-cart-items {
    padding: 8px 14px;
  }

  body.cp-transaction-page .wc-block-cart-items__row .wc-block-cart-item__image {
    width: 80px;
  }
}

@media (max-width: 420px) {
  .woocommerce .cp-product-shell button.single_add_to_cart_button {
    width: 100%;
  }

  .woocommerce .cp-commerce-shell ul.products {
    grid-template-columns: 1fr;
  }

  body.cp-transaction-page .wc-block-checkout__form {
    padding: 16px;
  }

  body.cp-transaction-page .wc-block-cart-items .wc-block-cart-items__row {
    grid-template-columns: 64px minmax(0, 1fr);
    column-gap: 14px;
  }

  body.cp-transaction-page .wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image {
    width: 64px;
  }

  body.cp-transaction-page .wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total {
    grid-column: 2;
    grid-row: 2;
    padding: 0;
    text-align: left;
  }
}
