/*
Theme Name: Astra Course Child
Theme URI: https://wpastra.com/
Description: Astra child theme for an Elementor-designed WooCommerce course website.
Author: Custom Child Theme
Template: astra
Version: 1.3.0
Text Domain: astra-course-child
*/

:root {
  --acc-primary: #173f35;
  --acc-primary-dark: #102f28;
  --acc-accent: #c7a76c;
  --acc-ink: #202821;
  --acc-muted: #68736b;
  --acc-surface: #f7f7f1;
  --acc-border: #e6e8df;
  --acc-radius: 18px;
  --acc-shadow: 0 12px 35px rgba(22, 48, 38, .08);
}

body.woocommerce, body.single-product, body.post-type-archive-product,
body.tax-product_cat { color: var(--acc-ink); }

.woocommerce .site-content, .woocommerce-page .site-content {
  padding-top: clamp(22px, 4vw, 48px);
  padding-bottom: clamp(32px, 5vw, 64px);
}

.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce a.button.alt,
.woocommerce button.button.alt, .woocommerce input.button.alt,
.woocommerce #payment #place_order, .woocommerce-page #payment #place_order {
  background: var(--acc-primary);
  color: #fff;
  border: 1px solid var(--acc-primary);
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 700;
  line-height: 1.35;
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.woocommerce a.button:hover, .woocommerce button.button:hover,
.woocommerce input.button:hover, .woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover, .woocommerce input.button.alt:hover,
.woocommerce #payment #place_order:hover {
  background: var(--acc-primary-dark);
  color: #fff;
  border-color: var(--acc-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(23, 63, 53, .16);
}

/* Single course: keep the existing long description as the primary content. */
body.single-product div.product div.images,
body.single-product div.product div.summary { display: none !important; }
body.single-product div.product .woocommerce-tabs {
  display: block !important;
  float: none !important;
  clear: both;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
}
body.single-product div.product .woocommerce-tabs ul.tabs { display: none !important; }
body.single-product div.product .woocommerce-tabs .panel,
body.single-product div.product .woocommerce-tabs #tab-description {
  display: block !important;
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent;
  border: 0 !important;
  box-shadow: none !important;
}
body.single-product div.product .woocommerce-tabs .panel > h2 { display: none !important; }
body.single-product div.product #tab-reviews,
body.single-product div.product .related,
body.single-product div.product .upsells { display: none !important; }
body.single-product div.product { max-width: 1120px; margin-inline: auto; }
body.single-product div.product .woocommerce-tabs #tab-description > *:first-child { margin-top: 0; }
body.single-product #tab-description img { max-width: 100%; height: auto; border-radius: 12px; }
body.single-product #tab-description h1,
body.single-product #tab-description h2,
body.single-product #tab-description h3,
body.single-product #tab-description h4 { color: var(--acc-primary); line-height: 1.25; }
body.single-product #tab-description a:not(.button) { text-underline-offset: 3px; }
body.single-product #tab-description .elementor-button,
body.single-product #tab-description a.button { border-radius: 999px; }

/* Registration panel and shortcode buttons */
.acc-registration-panel {
  margin: 28px 0 12px;
  padding: clamp(20px, 4vw, 34px);
  background: var(--acc-surface);
  border: 1px solid var(--acc-border);
  border-radius: var(--acc-radius);
  text-align: center;
}
.acc-registration-panel__title {
  margin: 0 0 8px;
  color: var(--acc-primary);
  font-size: clamp(1.35rem, 2.5vw, 1.9rem);
  line-height: 1.25;
}
.acc-registration-panel__text {
  margin: 0 auto 18px;
  max-width: 650px;
  color: var(--acc-muted);
}
.acc-registration-panel .button,
.acc-registration-panel a.button,
.acc-course-register-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  margin: 0;
}
.acc-registration-panel .cart,
.acc-registration-panel form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
}
.acc-registration-panel .variations { margin: 0 0 12px; }
.acc-registration-panel .reset_variations { margin-left: 8px; }
.acc-registration-panel .quantity { margin: 0 !important; }
.acc-registration-panel .quantity .qty {
  min-height: 46px;
  border: 1px solid var(--acc-border);
  border-radius: 10px;
}
.acc-registration-panel .single_add_to_cart_button { min-height: 48px; }
.acc-course-register-button { text-decoration: none !important; }

/* Course catalog cards */
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  padding: 18px;
  border: 1px solid var(--acc-border);
  border-radius: var(--acc-radius);
  background: #fff;
  box-shadow: 0 5px 20px rgba(22, 48, 38, .035);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.woocommerce ul.products li.product:hover {
  transform: translateY(-4px);
  border-color: #d7d9ca;
  box-shadow: var(--acc-shadow);
}
.woocommerce ul.products li.product a img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 0 0 18px;
  border-radius: 12px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: var(--acc-primary);
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 750;
  padding: 0;
  margin: 0 0 10px;
}
.woocommerce ul.products li.product .price {
  color: var(--acc-primary);
  font-size: 1.15rem;
  font-weight: 750;
}
.woocommerce ul.products li.product .button { margin-top: 12px; }

/* ============================================================
   Checkout — premium two-panel layout
   Left: "your details" card · Right: sticky order-summary card
   ============================================================ */

/* Order received page keeps its simple card surfaces */
.woocommerce .woocommerce-order,
.woocommerce .woocommerce-order-details,
.woocommerce .woocommerce-customer-details {
  background: #fff;
  border: 1px solid var(--acc-border);
  padding: clamp(18px, 3vw, 30px);
  border-radius: var(--acc-radius);
}

/* Warm canvas behind the checkout so the white cards read as objects */
.woocommerce-checkout .site-content,
.woocommerce-checkout .entry-content { background: var(--acc-surface); }

/* The core "Your order" heading is replaced by the in-card heading */
.woocommerce form.checkout #order_review_heading,
.woocommerce form.woocommerce-checkout #order_review_heading { display: none; }

/* Both checkout panels are premium cards */
.woocommerce form.checkout #customer_details,
.woocommerce form.woocommerce-checkout #customer_details,
.woocommerce form.checkout #order_review,
.woocommerce form.woocommerce-checkout #order_review {
  background: #fff;
  border: 1px solid var(--acc-border);
  border-radius: 20px;
  padding: clamp(22px, 3vw, 34px);
  box-shadow: 0 16px 40px rgba(22, 48, 38, .055);
  box-sizing: border-box;
}

/* Summary panel: soft vertical gradient + gold→green accent rule on top */
.woocommerce form.checkout #order_review,
.woocommerce form.woocommerce-checkout #order_review {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbf5 100%);
  box-shadow: 0 22px 52px rgba(22, 48, 38, .10);
}
.woocommerce form.checkout #order_review::before,
.woocommerce form.woocommerce-checkout #order_review::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--acc-accent), #efe0bf 55%, var(--acc-primary));
}

/* In-card panel headings (printed by the theme) */
.acc-co-head { margin: 0 0 22px; }
.acc-co-step {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  color: var(--acc-primary);
  background: rgba(199, 167, 108, .20);
  border-radius: 999px;
  padding: 4px 12px;
  margin: 0 0 10px;
}
.acc-co-title {
  margin: 0;
  font-size: clamp(1.18rem, 1.9vw, 1.4rem);
  line-height: 1.3;
  font-weight: 800;
  color: var(--acc-primary);
}
.acc-co-sub { margin: 6px 0 0; color: var(--acc-muted); font-size: .95rem; }

/* 50/50 split; summary sticks while the form scrolls */
@media (min-width: 769px) {
  .woocommerce form.checkout,
  .woocommerce form.woocommerce-checkout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(20px, 3vw, 34px);
    align-items: start;
  }
  .woocommerce form.checkout #customer_details,
  .woocommerce form.checkout #order_review,
  .woocommerce form.checkout #order_review_heading,
  .woocommerce form.woocommerce-checkout #customer_details,
  .woocommerce form.woocommerce-checkout #order_review,
  .woocommerce form.woocommerce-checkout #order_review_heading {
    float: none !important;
    width: auto !important;
    max-width: none !important;
    margin: 0;
    box-sizing: border-box;
  }
  .woocommerce form.checkout #customer_details,
  .woocommerce form.woocommerce-checkout #customer_details { grid-column: 1; grid-row: 1; }
  .woocommerce form.checkout #order_review,
  .woocommerce form.woocommerce-checkout #order_review { grid-column: 2; grid-row: 1; position: sticky; top: 24px; }
}

/* Form fields: one clean column inside the details card */
.woocommerce form.checkout .form-row,
.woocommerce form.woocommerce-checkout .form-row,
.woocommerce form.checkout .form-row-first,
.woocommerce form.checkout .form-row-last,
.woocommerce form.woocommerce-checkout .form-row-first,
.woocommerce form.woocommerce-checkout .form-row-last {
  float: none !important;
  width: 100% !important;
  padding: 0;
  margin: 0 0 16px;
}
.woocommerce form.checkout #customer_details .col-1,
.woocommerce form.checkout #customer_details .col-2,
.woocommerce form.woocommerce-checkout #customer_details .col-1,
.woocommerce form.woocommerce-checkout #customer_details .col-2 {
  float: none !important;
  width: 100% !important;
  margin: 0;
}
.woocommerce form.checkout #customer_details .col-2,
.woocommerce form.woocommerce-checkout #customer_details .col-2 { margin-top: 8px; }
.woocommerce form.checkout .form-row label,
.woocommerce form.woocommerce-checkout .form-row label {
  display: block;
  margin: 0 0 6px;
  font-size: .95rem;
  font-weight: 650;
  color: var(--acc-ink);
}
.woocommerce form.checkout .form-row .required,
.woocommerce form.woocommerce-checkout .form-row .required { color: #b3261e; text-decoration: none; }
.woocommerce form.checkout .form-row input.input-text,
.woocommerce form.checkout .form-row select,
.woocommerce form.checkout .form-row textarea,
.woocommerce form.woocommerce-checkout .form-row input.input-text,
.woocommerce form.woocommerce-checkout .form-row select,
.woocommerce form.woocommerce-checkout .form-row textarea,
.woocommerce-checkout .select2-container--default .select2-selection--single {
  min-height: 52px;
  border: 1px solid #e2e5da;
  border-radius: 12px;
  background: #fbfbf7;
  padding: 12px 15px;
  font-size: 1rem;
  color: var(--acc-ink);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.woocommerce form.checkout .form-row input.input-text:focus,
.woocommerce form.checkout .form-row select:focus,
.woocommerce form.checkout .form-row textarea:focus {
  background: #fff;
  border-color: var(--acc-accent);
  box-shadow: 0 0 0 3px rgba(199, 167, 108, .30);
  outline: none;
}

/* Order summary table */
.woocommerce form.checkout #order_review .shop_table,
.woocommerce form.woocommerce-checkout #order_review .shop_table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
}
.woocommerce form.checkout #order_review .shop_table thead { display: none; }
.woocommerce form.checkout #order_review .shop_table tbody th,
.woocommerce form.checkout #order_review .shop_table tbody td {
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--acc-border);
  background: transparent;
  text-align: left;
  vertical-align: top;
}
.woocommerce form.checkout #order_review .shop_table .product-name { font-weight: 650; color: var(--acc-ink); }
.woocommerce form.checkout #order_review .shop_table .product-total { text-align: right; white-space: nowrap; }
.woocommerce form.checkout #order_review .shop_table .product-total .amount { font-weight: 750; color: var(--acc-primary); }
.woocommerce form.checkout #order_review .shop_table tfoot th,
.woocommerce form.checkout #order_review .shop_table tfoot td {
  padding: 11px 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-weight: 500;
  color: var(--acc-muted);
}
.woocommerce form.checkout #order_review .shop_table tfoot td { text-align: right; color: var(--acc-ink); }
.woocommerce form.checkout #order_review .shop_table tfoot tr.cart-subtotal th,
.woocommerce form.checkout #order_review .shop_table tfoot tr.cart-subtotal td {
  padding-top: 14px;
  border-top: 1px solid var(--acc-border);
}
.woocommerce form.checkout #order_review .shop_table tfoot tr.order-total th,
.woocommerce form.checkout #order_review .shop_table tfoot tr.order-total td {
  padding-top: 16px;
  border-top: 1px solid var(--acc-border);
  font-weight: 800;
  color: var(--acc-primary);
}
.woocommerce form.checkout #order_review .shop_table tfoot tr.order-total .amount {
  font-size: 1.6rem;
  font-weight: 850;
  letter-spacing: -.01em;
  color: var(--acc-primary);
}

/* Payment methods as selectable tiles */
.woocommerce-checkout #payment {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.woocommerce-checkout #payment ul.payment_methods {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  list-style: none;
}
.woocommerce-checkout #payment ul.payment_methods li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 10px;
  margin: 0 0 10px;
  padding: 15px 16px;
  background: #fff;
  border: 1px solid var(--acc-border);
  border-radius: 14px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.woocommerce-checkout #payment ul.payment_methods li:hover { border-color: #d5d8c9; }
.woocommerce-checkout #payment ul.payment_methods li > label {
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  font-weight: 650;
  color: var(--acc-ink);
  cursor: pointer;
}
.woocommerce-checkout #payment ul.payment_methods li input.input-radio {
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--acc-primary);
}
.woocommerce-checkout #payment ul.payment_methods li:has(.input-radio:checked) {
  border-color: var(--acc-primary);
  background: #f2f7f3;
  box-shadow: 0 0 0 1px var(--acc-primary);
}
.woocommerce-checkout #payment div.payment_box {
  flex: 1 0 100%;
  margin: 12px 0 0;
  padding: 14px 16px;
  background: var(--acc-surface);
  border-radius: 12px;
  font-size: .93rem;
}
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--acc-surface); }

/* Commit button + trust line */
.woocommerce form.checkout #place_order,
.woocommerce form.woocommerce-checkout #place_order {
  width: 100%;
  min-height: 56px;
  margin-top: 4px;
  font-size: 1.05rem;
  border-radius: 999px;
  box-shadow: 0 16px 32px rgba(23, 63, 53, .24);
}
.acc-co-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 0 0;
  color: var(--acc-muted);
  font-size: .88rem;
}
.acc-co-trust svg { width: 15px; height: 15px; flex: 0 0 auto; }

@media (max-width: 544px) {
  .woocommerce form.checkout #customer_details,
  .woocommerce form.woocommerce-checkout #customer_details,
  .woocommerce form.checkout #order_review,
  .woocommerce form.woocommerce-checkout #order_review { padding: 20px 18px; border-radius: 16px; }
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.select2-container--default .select2-selection--single {
  min-height: 48px;
  border: 1px solid #dfe3d9;
  border-radius: 10px;
  padding: 10px 13px;
  background: #fff;
  box-shadow: none;
}
.woocommerce form .form-row textarea { min-height: 110px; }
.woocommerce form .form-row input:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
  outline: 2px solid rgba(199, 167, 108, .45);
  border-color: var(--acc-accent);
}
.woocommerce-checkout #payment {
  background: var(--acc-surface);
  border: 1px solid var(--acc-border);
  border-radius: 14px;
}
.woocommerce-checkout #payment div.payment_box { background: #fff; border-radius: 10px; }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: #fff; }
.woocommerce .woocommerce-info, .woocommerce .woocommerce-message {
  border-top-color: var(--acc-primary);
  border-radius: 10px;
}
.woocommerce .woocommerce-info::before, .woocommerce .woocommerce-message::before { color: var(--acc-primary); }
.woocommerce .woocommerce-error { border-radius: 10px; }
.woocommerce .woocommerce-order-overview {
  padding: 20px;
  background: var(--acc-surface);
  border-radius: 14px;
}
.woocommerce .woocommerce-order h2,
.woocommerce .woocommerce-order-details__title,
.woocommerce .woocommerce-column__title { color: var(--acc-primary); }

@media (max-width: 921px) {
  .woocommerce ul.products { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}
@media (max-width: 544px) {
  .woocommerce ul.products { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .woocommerce ul.products li.product { padding: 14px; }
  .woocommerce form.checkout #customer_details,
  .woocommerce form.checkout #order_review,
  .woocommerce .woocommerce-order { padding: 16px; }
  .woocommerce .woocommerce-order-overview { padding: 14px; }
  .acc-registration-panel { padding: 18px 14px; }
  .acc-registration-panel .cart,
  .acc-registration-panel form.cart { flex-direction: column; align-items: stretch; }
  .acc-registration-panel .single_add_to_cart_button,
  .acc-registration-panel a.button,
  .acc-course-register-button { width: 100%; }
}
.woocommerce a:focus-visible, .woocommerce button:focus-visible,
.woocommerce input:focus-visible, .woocommerce select:focus-visible,
.woocommerce textarea:focus-visible {
  outline: 3px solid rgba(199, 167, 108, .8);
  outline-offset: 2px;
}


/* Bengali-first typography */
body, button, input, select, textarea,
.woocommerce, .woocommerce-page, .elementor-widget,
.woocommerce button.button, .woocommerce a.button {
  font-family: "Noto Sans Bengali", sans-serif;
}
.acc-fee-choice-form { width: 100%; max-width: 680px; margin: 0 auto; text-align: left; }
.acc-fee-choice-options { margin: 0 0 20px; padding: 0; border: 0; }
.acc-fee-choice-options legend { width: 100%; margin: 0 0 12px; color: var(--acc-primary); font-weight: 750; font-size: 1.08rem; }
.acc-fee-option {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  margin: 0 0 10px; padding: 14px 16px; border: 1px solid var(--acc-border); border-radius: 12px;
  background: #fff; cursor: pointer; line-height: 1.5;
}
.acc-fee-option:has(input:checked) { border-color: var(--acc-primary); background: #f1f6f2; box-shadow: 0 0 0 1px var(--acc-primary); }
.acc-fee-option input { margin: 0; accent-color: var(--acc-primary); }
.acc-fee-option span { font-weight: 600; }
.acc-fee-option strong { color: var(--acc-primary); white-space: nowrap; font-weight: 750; }
.acc-fee-choice-form .acc-course-register-button { width: 100%; min-height: 52px; border-radius: 999px; font-family: "Noto Sans Bengali", sans-serif; font-size: 1rem; }
.acc-fee-notice { text-align: center; color: var(--acc-muted); }
.woocommerce ul.products li.product .button { font-family: "Noto Sans Bengali", sans-serif; }
@media (max-width: 544px) {
  .acc-fee-option { grid-template-columns: 20px minmax(0, 1fr); padding: 12px; }
  .acc-fee-option strong { grid-column: 2; white-space: normal; }
}
