/* ================================================================
   aliHossain Academy — WooCommerce baseline (dark theme).
   Loaded only when WooCommerce is active.
   ================================================================ */

.aha-woo {
  padding: 0;
}
.woocommerce .aha-shell,
.woocommerce-page .aha-shell {
  padding: 60px 0;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: 0.2s;
}
.woocommerce ul.products li.product:hover {
  border-color: var(--border-2);
  transform: translateY(-4px);
}
.woocommerce ul.products li.product a img {
  border-radius: 14px;
  margin-bottom: 12px;
}
.woocommerce ul.products li.product .price {
  color: var(--violet-l);
  font-weight: 700;
}
.woocommerce ul.products li.product .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
  background: var(--grad-soft);
  color: #fff;
  border-radius: 100px;
  font-weight: 600;
  border: none;
  padding: 10px 20px;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce a.button.alt:hover {
  background: var(--grad-soft);
  opacity: 0.92;
  color: #fff;
}

.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error {
  background: var(--surface);
  border-top: 3px solid var(--violet);
  color: var(--text-2);
  border-radius: 12px;
}
.woocommerce .woocommerce-message::before,
.woocommerce .woocommerce-info::before {
  color: var(--violet-l);
}

.woocommerce table.shop_table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-collapse: separate;
}
.woocommerce table.shop_table th {
  color: #fff;
}
.woocommerce table.shop_table td {
  border-top: 1px solid var(--border);
  color: var(--text-2);
}

.woocommerce .star-rating span {
  color: var(--gold);
}
.woocommerce div.product span.price,
.woocommerce div.product p.price {
  color: var(--violet-l);
}

.woocommerce-breadcrumb {
  color: var(--muted);
}
.woocommerce-breadcrumb a {
  color: var(--violet-l);
}

/* ---- Dark-theme text readability (Woo defaults to dark text on light) ---- */
.woocommerce,
.woocommerce-page {
  color: var(--text-2);
}
.woocommerce h1,
.woocommerce h2,
.woocommerce h3,
.woocommerce h4,
.woocommerce-page h1,
.woocommerce-page h2,
.woocommerce-page h3,
.woocommerce-MyAccount-content h2,
.woocommerce-order-details h2 {
  color: #fff;
}
.woocommerce a:not(.button),
.woocommerce-page a:not(.button) {
  color: var(--violet-l);
}
.woocommerce label,
.woocommerce-page label,
.woocommerce form .form-row label {
  color: var(--text-2);
}
.woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.woocommerce-MyAccount-navigation a {
  color: var(--text-2);
}
.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation a:hover {
  color: #fff;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td,
.woocommerce .cart_totals,
.woocommerce-checkout-review-order {
  color: var(--text-2);
}

/* Keep product-card titles readable on their surface */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: #fff;
}

/* Form fields use a dark surface to match the theme */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce .select2-container .select2-selection,
.woocommerce-page form .form-row input.input-text {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
a.wc-block-components-button.wp-element-button.wc-block-cart__submit-button.contained,
button.wc-block-components-button.wp-element-button.wc-block-components-checkout-place-order-button.wc-block-components-checkout-place-order-button--full-width.contained {
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
a.wc-block-components-button.wp-element-button.wc-block-cart__submit-button.contained:hover,
button.wc-block-components-button.wp-element-button.wc-block-components-checkout-place-order-button.wc-block-components-checkout-place-order-button--full-width.contained:hover {
  background: var(--violet);
}

/* ================================================================
   WooCommerce block Cart / Checkout — dark skin.
   The body gets `has-dark-controls` on cart/checkout (see
   inc/integrations/woocommerce.php), so WooCommerce's own dark form
   styling handles the text inputs, the District select, checkboxes
   and radios — including correct floating-label positioning. We only
   (1) recolor that native dark mode to the brand palette and (2) add
   dark styling for the Country field, which uses the newer
   select-input component that Woo's dark mode does not cover.
   The `body.` prefix lifts specificity above Woo's own rules so no
   layout/padding is touched and the cascade stays clean.
   ================================================================ */

/* ---- Recolor Woo's native dark controls to the brand palette ---- */
body.has-dark-controls .wc-block-components-text-input input[type='text'],
body.has-dark-controls .wc-block-components-text-input input[type='email'],
body.has-dark-controls .wc-block-components-text-input input[type='tel'],
body.has-dark-controls .wc-block-components-text-input input[type='number'],
body.has-dark-controls .wc-block-components-text-input input[type='url'],
body.has-dark-controls .wc-block-components-text-input input[type='password'],
body.has-dark-controls .wc-block-components-textarea,
body.has-dark-controls
  .wc-blocks-components-select
  .wc-blocks-components-select__container,
body.has-dark-controls
  .wc-blocks-components-select
  .wc-blocks-components-select__select {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
body.has-dark-controls .wc-block-components-text-input input:focus,
body.has-dark-controls .wc-block-components-textarea:focus,
body.has-dark-controls
  .wc-blocks-components-select
  .wc-blocks-components-select__select:focus {
  border-color: var(--violet);
}
body.has-dark-controls .wc-block-components-text-input label,
body.has-dark-controls
  .wc-blocks-components-select
  .wc-blocks-components-select__label {
  color: var(--muted);
}
body.has-dark-controls .wc-block-components-text-input.is-active label {
  color: var(--violet-l);
}
body.has-dark-controls
  .wc-blocks-components-select
  .wc-blocks-components-select__expand {
  fill: var(--text-2);
}
body.has-dark-controls
  .wc-block-components-checkbox
  .wc-block-components-checkbox__input[type='checkbox']:checked {
  background: var(--violet);
  border-color: var(--violet);
}

/* Uniform 50px control height across the checkout / cart only. */
body.has-dark-controls .wc-block-components-text-input input,
body.has-dark-controls
  .wc-blocks-components-select
  .wc-blocks-components-select__select,
body.has-dark-controls
  .wc-blocks-components-select
  .wc-blocks-components-select__container,
body.has-dark-controls .wc-block-components-select-input select,
body.has-dark-controls .wc-block-components-select-input input,
body.has-dark-controls .wc-block-components-select-input button {
  box-sizing: border-box;
}

/* ---- Country field: select-input (not covered by has-dark-controls) ---- */
body.has-dark-controls .wc-block-components-select-input select,
body.has-dark-controls .wc-block-components-select-input input,
body.has-dark-controls .wc-block-components-select-input button,
body.has-dark-controls .wc-block-components-select-input__container {
  background-color: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
}
body.has-dark-controls .wc-block-components-select-input label {
  color: var(--muted) !important;
}
body.has-dark-controls .wc-block-components-select-input select option {
  background: var(--bg2);
  color: var(--text);
}
.wc-block-components-address-autocomplete-suggestions {
  background: var(--bg2) !important;
  border-color: var(--border) !important;
}
.wc-block-components-address-autocomplete-suggestions .suggestions-list li {
  color: var(--text-2);
}
.wc-block-components-address-autocomplete-suggestions
  .suggestions-list
  li.active,
.wc-block-components-address-autocomplete-suggestions
  .suggestions-list
  li:hover,
.wc-block-components-address-autocomplete-suggestions
  .suggestions-list
  li:focus {
  background-color: var(--violet) !important;
  color: #fff !important;
}

/* ---- General block text (titles, totals, order summary) ---- */
.wc-block-components-checkout-step__title,
.wc-block-components-title,
.wc-block-components-checkout-step__heading-content {
  color: #fff;
}
.wc-block-components-checkout-step__description {
  color: var(--muted);
}
.wc-block-components-totals-item__label,
.wc-block-components-totals-item__value,
.wc-block-components-product-name,
.wc-block-components-order-summary-item__total-price {
  color: var(--text);
}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item
  .wc-block-components-totals-item__value {
  color: #fff;
}
.wc-block-components-panel__button {
  color: var(--text);
}

/* Tutor courses shown on the empty cart (replaces Woo's "New in store"). */
.aha-cart-courses {
  margin-top: 28px;
}
.aha-course-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
}
.aha-course-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: 0.25s ease;
}
.aha-course-card:hover {
  border-color: var(--violet);
  transform: translateY(-5px);
  box-shadow: 0 22px 44px -16px var(--glow-v);
}
.aha-cart-courses a.aha-course-card,
.aha-cart-courses a.aha-course-card:hover,
.aha-cart-courses a.aha-course-card:focus,
.aha-cart-courses .aha-course-card * {
  text-decoration: none !important;
}
.aha-course-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--grad-soft);
  overflow: hidden;
}
.aha-course-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
  transition: transform 0.4s ease;
}
.aha-course-card:hover .aha-course-thumb img {
  transform: scale(1.05);
}
.aha-course-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px 22px;
}
.aha-course-title {
  color: #fff;
  font-weight: 600;
  font-size: 1.06rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}
.aha-course-card:hover .aha-course-title {
  color: var(--violet-l);
}
.aha-course-price {
  margin-top: auto;
  color: var(--violet-l);
  font-weight: 700;
  font-size: 1.05rem;
}
.aha-course-price .woocommerce-Price-amount,
.aha-course-price bdi {
  color: var(--violet-l);
}
.aha-course-price del,
.aha-course-price del .woocommerce-Price-amount {
  color: var(--muted);
  font-weight: 400;
  margin-right: 6px;
}
@media (max-width: 860px) {
  .aha-course-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .aha-course-grid {
    grid-template-columns: 1fr;
  }
}

/* Order-summary product thumbnail: dark frame so the placeholder
   (shown when a product has no featured image) blends with the panel. */
.wc-block-components-order-summary-item__image {
  border: 1px solid var(--border);
  border-radius: 8px;
}
.wc-block-components-order-summary-item__image img {
  border-radius: 8px;
}
.wc-block-components-order-summary
  .wc-block-components-order-summary-item__quantity
  span {
  color: #fff;
}

.wc-block-components-order-summary-item
  .wc-block-components-order-summary-item__quantity {
  background: var(--violet) !important;
  color: #fff;
  border-color: var(--bg2);
  box-shadow: 0 0 0 2px var(--bg2);
}
/* ================================================================
   Checkout controls — uniform 50px height.
   Scoped to the checkout block so cart and the rest of the site are
   untouched. box-sizing keeps 50px the true rendered height; the
   floating labels re-center against the new height automatically.
   ================================================================ */
body.has-dark-controls
  .wp-block-woocommerce-checkout
  .wc-block-components-text-input
  input,
body.has-dark-controls
  .wp-block-woocommerce-checkout
  .wc-blocks-components-select
  .wc-blocks-components-select__select,
body.has-dark-controls
  .wp-block-woocommerce-checkout
  .wc-block-components-select-input
  select,
body.has-dark-controls
  .wp-block-woocommerce-checkout
  .wc-block-components-select-input
  input,
body.has-dark-controls
  .wp-block-woocommerce-checkout
  .wc-block-components-select-input
  button,
body.has-dark-controls
  .wp-block-woocommerce-checkout
  .wc-block-components-select-input__container {
  height: 60px;
  box-sizing: border-box;
  padding-top: 15px !important;
  padding-bottom: 5px !important;
}
/* Order note: at least 50px but still free to grow with content. */
body.has-dark-controls
  .wp-block-woocommerce-checkout
  .wc-block-components-textarea {
  min-height: 50px;
  box-sizing: border-box;
}
.wc-block-components-form
  .wc-block-components-text-input
  input:-webkit-autofill
  + label,
.wc-block-components-form .wc-block-components-text-input.is-active label,
.wc-block-components-text-input input:-webkit-autofill + label,
.wc-block-components-text-input.is-active label {
  font-size: 14px;
  left: 14px;
}
