/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* =========================
   GENERAL
========================= */
.custom-link-color a {
  color: #ffe8cb;
}

.custom-link-color a:hover {
  color: #ffffff;
}

html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}


/* =========================
   HOMEPAGE PRODUCT CARDS
   Widgets:
   #brxe-khqlxy
   #brxe-stbjdm
========================= */

/* Make each product card a vertical flex card */
#brxe-khqlxy ul.products li.repeater-item.product,
#brxe-stbjdm ul.products li.repeater-item.product {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Keep images normal */
#brxe-khqlxy ul.products li.repeater-item.product div.dynamic[data-field-id="75b050"] img,
#brxe-stbjdm ul.products li.repeater-item.product div.dynamic[data-field-id="75b050"] img {
  display: block;
  width: 100%;
  height: auto;
}

/* Title wrapper: reserve same height on every card */
#brxe-khqlxy ul.products li.repeater-item.product h5.dynamic[data-field-id="8b5093"],
#brxe-stbjdm ul.products li.repeater-item.product h5.dynamic[data-field-id="8b5093"] {
  margin: 15px 0 5px 0 !important;
  line-height: 1.35;
  min-height: calc(1.35em * 2);  /* how many rows per title - need to change 1 other line also */
}

/* Clamp title text to 3 lines */
#brxe-khqlxy ul.products li.repeater-item.product h5.dynamic[data-field-id="8b5093"] a,
#brxe-stbjdm ul.products li.repeater-item.product h5.dynamic[data-field-id="8b5093"] a {
  display: -webkit-box !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;  /* how many rows per title - need to change 1 other line also */
  overflow: hidden !important;
  text-decoration: none;
  color: inherit;
}

/* Push price area down */
#brxe-khqlxy ul.products li.repeater-item.product div.dynamic[data-field-id="b292ab"],
#brxe-stbjdm ul.products li.repeater-item.product div.dynamic[data-field-id="b292ab"] {
  margin-top: auto !important;
  margin-bottom: 6px !important;
}

/* Keep button wrapper tight under the price */
#brxe-khqlxy ul.products li.repeater-item.product div.dynamic[data-field-id="a603cd"],
#brxe-stbjdm ul.products li.repeater-item.product div.dynamic[data-field-id="a603cd"] {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Actual button */
#brxe-khqlxy ul.products li.repeater-item.product div.dynamic[data-field-id="a603cd"] .button,
#brxe-stbjdm ul.products li.repeater-item.product div.dynamic[data-field-id="a603cd"] .button {
  margin-top: 0 !important;
  display: inline-block;
}

/* Optional: make the two outer homepage boxes equal height */
#brxe-cdpabm,
#brxe-wgagip {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Optional: keep the section holding both boxes stretched evenly */
#brxe-imsxcs {
  align-items: stretch;
}

/* =========================
   GENERAL PRODUCT ARCHIVE PAGES
   Keep archive buttons aligned to bottom
========================= */

li.repeater-item.product {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Archive title area */
li.repeater-item.product h2,
li.repeater-item.product .woocommerce-loop-product__title {
  line-height: 1.35;
  min-height: calc(1.35em * 2);
  margin-bottom: 6px;
}

/* Push the ARCHIVE price wrapper down */
li.repeater-item.product div.dynamic[data-field-id="ef3ecb"] {
  margin-top: auto !important;
  margin-bottom: 6px !important;
}

/* Keep archive button wrapper directly under price */
li.repeater-item.product div.dynamic[data-field-id="207681"] {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Actual archive button */
li.repeater-item.product div.dynamic[data-field-id="207681"] .button {
  margin-top: 0 !important;
  display: inline-block;
}

/* =========================
   SINGLE PRODUCT PAGE
========================= */

/* Center entire add to cart area */
.single-product form.variations_form.cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 420px;
}

/* Variation table alignment */
.single-product form.variations_form.cart table.variations {
  width: auto;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0 10px;
}

/* Keep proper table layout */
.single-product form.variations_form.cart table.variations tr {
  display: table-row;
}

/* Labels */
.single-product form.variations_form.cart table.variations th.label {
  text-align: right;
  white-space: nowrap;
  padding: 0 10px 0 0;
  vertical-align: middle;
  width: 120px;
  font-weight: 500;
  font-size: 14px;
  color: #333;
}

/* Dropdown column */
.single-product form.variations_form.cart table.variations td.value {
  text-align: left;
  vertical-align: middle;
  padding: 0;
}

/* Dropdown look */
.single-product form.variations_form.cart table.variations td.value select {
  width: 280px;
  min-width: 280px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: #fff;
  font-size: 18px;
}

/* Hide clear link */
.single-product form.variations_form.cart table.variations .reset_variations {
  display: none !important;
}

/* Variation price + button section */
.single-product form.variations_form.cart .single_variation_wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Variation price */
.single-product form.variations_form.cart .woocommerce-variation.single_variation {
  display: block !important;
  width: 100%;
  text-align: center;
  margin: 10px 0 12px;
  font-size: 20px;
  font-weight: 700;
  color: #111;
}

/* Quantity + button wrapper */
.single-product form.variations_form.cart .variations_button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

/* Quantity box */
.single-product form.variations_form.cart .quantity {
  margin: 0 auto;
}

.single-product form.variations_form.cart .quantity input {
  width: 60px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  height: 40px;
}

/* Add to cart button */
.single-product form.variations_form.cart .single_add_to_cart_button {
  margin: 0 auto;
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.2s ease;
}

.single-product form.variations_form.cart .single_add_to_cart_button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Shipping / supporting text */
.single-product .woocommerce-product-details__short-description + hr,
.single-product .woocommerce-product-details__short-description + p,
.single-product .woocommerce-product-details__short-description ~ p {
  text-align: center;
}

.single-product .woocommerce-product-details__short-description ~ p {
  font-size: 13px;
  color: #666;
  margin-top: 6px;
}


/* Homepage product buttons */
#brxe-khqlxy ul.products li.repeater-item.product div.dynamic[data-field-id="a603cd"] .button,
#brxe-stbjdm ul.products li.repeater-item.product div.dynamic[data-field-id="a603cd"] .button {
  background: #f2c94c !important;
  color: #222 !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 12px 22px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

/* General archive buttons */
li.repeater-item.product div.dynamic[data-field-id="207681"] .button {
  background: #f2c94c !important;
  color: #222 !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 12px 22px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

/* Hover */
#brxe-khqlxy ul.products li.repeater-item.product div.dynamic[data-field-id="a603cd"] .button:hover,
#brxe-stbjdm ul.products li.repeater-item.product div.dynamic[data-field-id="a603cd"] .button:hover,
li.repeater-item.product div.dynamic[data-field-id="207681"] .button:hover {
  background: #e3bb3f !important;
  color: #222 !important;
}

/* WooCommerce Checkout Block buttons */
.wc-block-components-button,
.wc-block-cart__submit-button,
.wc-block-checkout__actions_row .wc-block-components-button,
.wc-block-components-checkout-place-order-button,
.editor-styles-wrapper .wc-block-components-button {
  background: #f2c94c !important;
  color: #222 !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 12px 22px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  box-shadow: none !important;
}

/* Hover */
.wc-block-components-button:hover,
.wc-block-cart__submit-button:hover,
.wc-block-checkout__actions_row .wc-block-components-button:hover,
.wc-block-components-checkout-place-order-button:hover {
  background: #e3bb3f !important;
  color: #222 !important;
}


/* Header mini-cart dropdown buttons */
.woocommerce-mini-cart__buttons.buttons a.button,
.woocommerce-mini-cart__buttons.buttons a.checkout,
.woocommerce-mini-cart__buttons.buttons a.wc-forward {
  background: #f2c94c !important;
  color: #222 !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 8px 10px !important;
  font-weight: 700 !important;
  text-transform: none !important;
  text-decoration: none !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Hover */
.woocommerce-mini-cart__buttons.buttons a.button:hover,
.woocommerce-mini-cart__buttons.buttons a.checkout:hover,
.woocommerce-mini-cart__buttons.buttons a.wc-forward:hover {
  background: #e3bb3f !important;
  color: #222 !important;
}