/*
Theme Name: GHN Custom Theme
Template: hello-elementor
Version: 1.0
Author: Luke Corrigan
Description: Custom child theme for Get Healthy Nutrition
*/

/* =========================
   GHN Woo Checkout Block
   ========================= */

body.woocommerce-checkout {
  overflow-x: hidden;
  background: linear-gradient(
    to right,
    #ffffff 0%,
    #ffffff 59%,
    #f6f6f4 59%,
    #f6f6f4 100%
  );
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
}

/* Hide header/footer on checkout */
body.woocommerce-checkout .site-header,
body.woocommerce-checkout header,
body.woocommerce-checkout .site-footer,
body.woocommerce-checkout footer {
  display: none !important;
}

/* Hide default checkout page title */
body.woocommerce-checkout h1.entry-title,
body.woocommerce-checkout .wp-block-post-title {
  display: none !important;
}

/* Main checkout wrapper */
body.woocommerce-checkout .wp-site-blocks,
body.woocommerce-checkout .entry-content,
body.woocommerce-checkout .wp-block-woocommerce-checkout {
  max-width: 100% !important;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout {
  max-width: 1120px !important;
  margin: 0 auto !important;
  padding-top: 50px !important;
  padding-bottom: 60px !important;
}

/* Add GHN checkout intro */
body.woocommerce-checkout .wp-block-woocommerce-checkout::before {
  content: "Get Healthy Nutrition\A Fresh meals delivered every Sunday & Wednesday";
  white-space: pre-line;
  display: block;
  margin-bottom: 34px;
  font-size: 15px;
  line-height: 1.5;
  color: #555;
  font-weight: 500;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout::first-line {
  font-size: 30px;
  line-height: 1.2;
  color: #111;
  font-weight: 800;
}

/* Checkout section headings */
body.woocommerce-checkout .wc-block-components-title,
body.woocommerce-checkout .wc-block-components-checkout-step__title {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #111 !important;
}

/* Form text */
body.woocommerce-checkout .wc-block-components-checkout-step__description,
body.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input label,
body.woocommerce-checkout .wc-block-components-checkbox__label,
body.woocommerce-checkout .wc-block-components-radio-control__label {
  color: #444 !important;
}

/* Inputs */
body.woocommerce-checkout .wp-block-woocommerce-checkout
.wc-block-components-text-input input,
body.woocommerce-checkout .wp-block-woocommerce-checkout
.wc-block-components-text-input textarea,
body.woocommerce-checkout .wp-block-woocommerce-checkout
.wc-blocks-components-select__container,
body.woocommerce-checkout .wp-block-woocommerce-checkout
.wc-block-components-select__container {
  border: 1px solid #e3e3e3 !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  background: #fff !important;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout
.wc-block-components-text-input input:focus,
body.woocommerce-checkout .wp-block-woocommerce-checkout
.wc-block-components-text-input textarea:focus,
body.woocommerce-checkout .wp-block-woocommerce-checkout
.wc-blocks-components-select__container:focus-within,
body.woocommerce-checkout .wp-block-woocommerce-checkout
.wc-block-components-select__container:focus-within {
  border-color: #78a943 !important;
  box-shadow: 0 0 0 1px #78a943 !important;
}

/* Select cleanup */
body.woocommerce-checkout .wp-block-woocommerce-checkout
select.wc-blocks-components-select__select,
body.woocommerce-checkout .wp-block-woocommerce-checkout
select.wc-block-components-select__select {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Shipping and payment rows */
body.woocommerce-checkout .wp-block-woocommerce-checkout
.wc-block-components-radio-control__option,
body.woocommerce-checkout .wp-block-woocommerce-checkout
.wc-block-components-radio-control-accordion-option,
body.woocommerce-checkout .wp-block-woocommerce-checkout
.wc-block-components-radio-control-accordion-option__item {
  border: 1px solid #e3e3e3 !important;
  border-radius: 6px !important;
  background: #fff !important;
  box-shadow: none !important;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout
.wc-block-components-radio-control__option::before,
body.woocommerce-checkout .wp-block-woocommerce-checkout
.wc-block-components-radio-control__option::after,
body.woocommerce-checkout .wp-block-woocommerce-checkout
.wc-block-components-radio-control-accordion-option::before,
body.woocommerce-checkout .wp-block-woocommerce-checkout
.wc-block-components-radio-control-accordion-option::after {
  display: none !important;
}

/* Order summary */
body.woocommerce-checkout 
.wp-block-woocommerce-checkout-order-summary-block,
body.woocommerce-checkout 
.wc-block-components-order-summary,
body.woocommerce-checkout 
.wc-block-components-totals-wrapper {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.woocommerce-checkout .wc-block-components-sidebar.wc-block-checkout__sidebar {
  top: 90px !important;
}

/* Add trust notes above order summary */
body.woocommerce-checkout .wc-block-components-sidebar::before {
  content: "✓ Fresh meals delivered Sunday & Wednesday\A✓ Order before Friday 3PM\A✓ Secure payment powered by Stripe";
  white-space: pre-line;
  display: block;
  margin-bottom: 22px;
  padding: 18px 20px;
  border-radius: 10px;
  background: #eef6e8;
  border: 1px solid #dcebd1;
  color: #24331d;
  font-size: 14px;
  line-height: 1.8;
  font-weight: 700;
}

/* Hide long product descriptions in order summary */
body.woocommerce-checkout 
.wc-block-components-order-summary-item__description p {
  display: none !important;
}

/* Coupon section */
body.woocommerce-checkout 
.wc-block-components-totals-coupon__content {
  display: flex;
  gap: 8px;
}

body.woocommerce-checkout 
.wc-block-components-totals-coupon__content input {
  flex: 2 !important;
  border-radius: 6px !important;
}

body.woocommerce-checkout 
.wc-block-components-totals-coupon__content button {
  flex: 1 !important;
  border-radius: 6px !important;
}

/* Main buttons */
body.woocommerce-checkout 
.wc-block-components-checkout-place-order-button,
body.woocommerce-checkout 
button.wc-block-components-button {
  background: #78a943 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 6px !important;
  font-weight: 800 !important;
  min-height: 52px !important;
  box-shadow: none !important;
}

body.woocommerce-checkout 
.wc-block-components-checkout-place-order-button:hover,
body.woocommerce-checkout 
button.wc-block-components-button:hover {
  background: #689538 !important;
  color: #fff !important;
}

/* Place order button full width */
body.woocommerce-checkout .wp-block-woocommerce-checkout 
.wc-block-components-checkout-place-order-button {
  width: 100% !important;
  padding: 15px 18px !important;
}

/* Totals */
body.woocommerce-checkout .wc-block-components-totals-item__label,
body.woocommerce-checkout .wc-block-components-totals-item__value {
  color: #111 !important;
}

body.woocommerce-checkout .wc-block-components-totals-footer-item {
  font-size: 18px !important;
  font-weight: 800 !important;
}

/* Mobile */
@media (max-width: 900px) {
  body.woocommerce-checkout {
    background: #ffffff !important;
  }

  body.woocommerce-checkout .wp-block-woocommerce-checkout {
    padding-top: 32px !important;
    padding-bottom: 40px !important;
  }

  body.woocommerce-checkout .wp-block-woocommerce-checkout::before {
    margin-bottom: 24px;
  }

  body.woocommerce-checkout .wp-block-woocommerce-checkout::first-line {
    font-size: 25px;
  }

  body.woocommerce-checkout .wc-block-components-sidebar::before {
    margin-top: 18px;
  }
}

@media (max-width: 520px) {
  body.woocommerce-checkout .wp-site-blocks,
  body.woocommerce-checkout .entry-content,
  body.woocommerce-checkout .wp-block-woocommerce-checkout {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body.woocommerce-checkout .wc-block-components-title,
  body.woocommerce-checkout .wc-block-components-checkout-step__title {
    font-size: 18px !important;
  }
}

/* ================================
   GHN - Thank You Page
================================ */

.ghn-thankyou-page {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    max-width: 1140px;
    margin: 0 auto;
    min-height: 100vh;
    background: #ffffff;
    font-family: "Plus Jakarta Sans", Arial, sans-serif;
}

.ghn-thankyou-left {
    padding: 56px 64px;
    background: #ffffff;
}

.ghn-thankyou-right {
    padding: 56px 48px;
    background: #f6f6f4;
    border-left: 1px solid #e6e6e6;
}

.ghn-thankyou-brand {
    margin-bottom: 30px;
}

.ghn-thankyou-brand img {
    max-width: 200px;
    height: auto;
    display: block;
}

.ghn-thankyou-order-number {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 6px;
}

.ghn-thankyou-heading {
    font-size: 35px;
    line-height: 1.1;
    letter-spacing: -0.6px;
    margin: 0 0 30px;
    color: #111;
}

.ghn-order-map {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 28px;
    border: 1px solid #e6e6e6;
}

.ghn-thankyou-card {
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    padding: 24px 26px;
    margin-bottom: 22px;
    background: #fff;
}

.ghn-thankyou-card--success {
    border-color: #dcebd1;
    background: #eef6e8;
}

.ghn-thankyou-card h2 {
    font-size: 20px;
    margin: 0 0 12px;
    color: #111;
}

.ghn-thankyou-card h3 {
    font-size: 16px;
    margin: 0 0 10px;
    color: #111;
}

.ghn-thankyou-card p {
    margin: 0 0 10px;
    color: #222;
    font-size: 15px;
    line-height: 1.6;
}

.ghn-next-steps {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.ghn-next-step {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 14px;
    align-items: start;
}

.ghn-next-step span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #78a943;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
}

.ghn-next-step strong {
    display: block;
    font-size: 15px;
    color: #111;
    margin-bottom: 4px;
}

.ghn-thankyou-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-top: 16px;
}

.ghn-thankyou-address {
    line-height: 1.7;
    font-size: 15px;
    color: #222;
}

.ghn-thankyou-subheading {
    margin-top: 20px !important;
}

.ghn-thankyou-summary-panel {
    max-width: 420px;
    margin: 0 auto;
}

.ghn-thankyou-summary-panel h2 {
    font-size: 22px;
    margin: 0 0 22px;
    color: #111;
}

.ghn-order-summary-items {
    margin-bottom: 18px;
}

.ghn-order-summary-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 14px;
    align-items: start;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e3e3e3;
}

.ghn-order-summary-item-image img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
    background: #fff;
}

.ghn-order-summary-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    line-height: 1.4;
}

.ghn-order-summary-item-qty {
    font-size: 13px;
    color: #6b7280;
    margin-left: 6px;
}

.ghn-order-summary-item-total {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    padding-top: 2px;
}

.ghn-order-summary-totals {
    border-top: 1px solid #e3e3e3;
    padding-top: 14px;
}

.ghn-order-summary-total-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 15px;
    color: #111;
}

.ghn-order-summary-total-row strong {
    font-weight: 700;
}

.ghn-order-summary-total-row--order_total {
    margin-top: 10px;
    padding-top: 16px;
    border-top: 1px solid #e3e3e3;
    font-size: 18px;
}

.ghn-order-summary-total-row--order_total strong {
    font-size: 28px;
    font-weight: 800;
}

.ghn-thankyou-help {
    margin-top: 28px;
    padding: 18px;
    border-radius: 10px;
    background: #eef6e8;
    border: 1px solid #dcebd1;
}

.ghn-thankyou-help strong {
    display: block;
    margin-bottom: 6px;
    color: #111;
}

.ghn-thankyou-help p {
    margin: 0;
    font-size: 14px;
}

.ghn-thankyou-help a {
    color: #78a943;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 1024px) {
    .ghn-thankyou-page {
        grid-template-columns: 1fr;
    }

    .ghn-thankyou-left,
    .ghn-thankyou-right {
        padding: 32px 24px;
    }

    .ghn-thankyou-right {
        border-left: none;
        border-top: 1px solid #e6e6e6;
    }

    .ghn-thankyou-summary-panel {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .ghn-thankyou-heading {
        font-size: 32px;
    }

    .ghn-thankyou-card {
        padding: 18px;
    }

    .ghn-thankyou-info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ghn-order-summary-item {
        grid-template-columns: 56px 1fr auto;
        gap: 12px;
    }

    .ghn-order-summary-item-image img {
        width: 56px;
        height: 56px;
    }

    .ghn-order-summary-total-row--order_total strong {
        font-size: 22px;
    }
}

/* ================================
   GHN Variation Pills
================================ */

body.single-product .variations_form table.variations {
  width: 100%;
  margin: 0 0 18px;
  border: none;
}

body.single-product .variations_form table.variations tbody,
body.single-product .variations_form table.variations tr,
body.single-product .variations_form table.variations th,
body.single-product .variations_form table.variations td {
  display: block;
  width: 100%;
  border: none !important;
  padding: 0;
  text-align: left !important;
}

body.single-product .variations_form table.variations th.label {
  margin-bottom: 10px;
  text-align: left !important;
}

body.single-product .variations_form table.variations th.label label {
  display: block;
  text-align: left !important;
  font-size: 15px;
  font-weight: 800;
  color: #111;
}

body.single-product .variations_form.ghn-pills-active table.variations select {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.single-product .ghn-variation-pills {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 10px;
  justify-content: start;
  align-items: center;
  margin: 0 0 12px;
  max-width: 100%;
}

body.single-product .ghn-variation-pill {
  appearance: none;
  border: 1px solid #dcdcdc;
  background: #fff;
  color: #111;
  border-radius: 100px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: none;
  white-space: nowrap;
}

body.single-product .ghn-variation-pill:hover {
  border-color: #78a943;
  color: #78a943;
}

body.single-product .ghn-variation-pill.is-selected {
  background: #78a943;
  border-color: #78a943;
  color: #fff;
}

body.single-product .ghn-variation-pill.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
  text-decoration: line-through;
}

body.single-product .reset_variations {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: #666;
  text-decoration: underline;
}

body.single-product .woocommerce-variation-add-to-cart {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

body.single-product .woocommerce-variation-add-to-cart .quantity input.qty {
  width: 70px;
  height: 48px;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  text-align: center;
  font-weight: 700;
}

body.single-product .single_add_to_cart_button {
  min-height: 48px;
  border-radius: 6px !important;
  background: #78a943 !important;
  color: #fff !important;
  border: none !important;
  padding: 0 28px !important;
  font-weight: 800 !important;
}

body.single-product .single_add_to_cart_button:hover {
  background: #689538 !important;
}

@media (max-width: 767px) {
  body.single-product .ghn-variation-pills {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  body.single-product .ghn-variation-pill {
    width: 100%;
    min-width: 0;
    padding: 13px 10px;
    text-align: center;
    white-space: normal;
    line-height: 1.25;
  }

  body.single-product .woocommerce-variation-add-to-cart {
    align-items: stretch;
  }

  body.single-product .single_add_to_cart_button {
    flex: 1;
  }
}

body.single-product .variations_form .reset_variations,
body.single-product .variations_form .reset_variations[style] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ================================
   GHN Quantity + Add To Cart
================================ */

body.single-product .woocommerce-variation-add-to-cart {
  display: grid !important;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  width: 100%;
  margin-top: 18px;
}

body.single-product .quantity.ghn-qty-wrap {
  display: grid !important;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  height: 48px;
  width: 120px;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

body.single-product .quantity.ghn-qty-wrap input.qty {
  width: 100% !important;
  height: 48px !important;
  border: none !important;
  border-left: 1px solid #e8e8e8 !important;
  border-right: 1px solid #e8e8e8 !important;
  border-radius: 0 !important;
  text-align: center;
  font-weight: 700;
  padding: 0 !important;
  background: #fff;
  box-shadow: none !important;
}

body.single-product .ghn-qty-btn {
  width: 36px;
  height: 48px;
  border: none !important;
  background: #fff !important;
  color: #111 !important;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 !important;
  box-shadow: none !important;
}

body.single-product .ghn-qty-btn:hover {
  background: #f6f6f4 !important;
}

body.single-product .single_add_to_cart_button {
  width: 100% !important;
  min-height: 48px;
  border-radius: 6px !important;
  background: #78a943 !important;
  color: #fff !important;
  border: none !important;
  padding: 0 28px !important;
  font-weight: 800 !important;
}

body.single-product .single_add_to_cart_button:hover {
  background: #689538 !important;
}

body.single-product .single_add_to_cart_button.disabled,
body.single-product .single_add_to_cart_button.wc-variation-selection-needed {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
}

/* Hide number input arrows */
body.single-product .quantity.ghn-qty-wrap input.qty::-webkit-outer-spin-button,
body.single-product .quantity.ghn-qty-wrap input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

body.single-product .quantity.ghn-qty-wrap input.qty[type="number"] {
  -moz-appearance: textfield;
}

@media (max-width: 520px) {
  body.single-product .woocommerce-variation-add-to-cart {
    grid-template-columns: 110px 1fr;
    gap: 10px;
  }

  body.single-product .quantity.ghn-qty-wrap {
    width: 110px;
  }
}

/* Hide success/info notices only */

.woocommerce-message,
.woocommerce-info,
.wc-block-components-notice-banner.is-success,
.wc-block-components-notice-banner.is-info {
    display: none !important;
}