/* =========================================================
   REKHATAMA — DRUPAL COMMERCE
   Product detail + variation tabs + cart

   Catatan penting:
   - Tab variation hanya muncul jika widget Purchased entity memakai
     "Product variation attributes".
   - CSS tidak dapat mengubah entity autocomplete menjadi atribut.
   ========================================================= */

/* ---------------------------------------------------------
   1. DESIGN TOKENS
   --------------------------------------------------------- */
:where(.path-product, .commerce-product--full) {
  --rk-navy: #102f5d;
  --rk-blue: #0876df;
  --rk-blue-dark: #0057c7;
  --rk-cyan: #0ea5e9;
  --rk-text: #14233d;
  --rk-muted: #60738f;
  --rk-border: #d8e3f0;
  --rk-soft: #f4f8fd;
  --rk-white: #ffffff;
  --rk-success: #15803d;
  --rk-warning: #b45309;
  --rk-danger: #dc2626;
}

.commerce-product--full {
  width: min(100%, 1480px);
  margin-inline: auto;
  color: var(--rk-text);
}

/* ---------------------------------------------------------
   2. PRODUCT TITLE
   --------------------------------------------------------- */
.path-product #block-rekhatama-theme-page-title {
  margin: 32px 0 20px;
}

.path-product #block-rekhatama-theme-page-title h1,
.commerce-product--full .field--name-title h1,
.commerce-product--full .product-title h1 {
  margin: 0;
  color: var(--rk-navy, #102f5d);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.commerce-product--full .field--name-title,
.commerce-product--full .product-title {
  margin: 0 0 24px;
  padding: 22px 26px;
  background: var(--rk-white);
  border: 1px solid var(--rk-border);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(15, 47, 93, 0.06);
}

/* ---------------------------------------------------------
   3. TWO-COLUMN LAYOUT
   Add class product-layout-container through Layout Builder.
   --------------------------------------------------------- */
.path-product .product-layout-container {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 32px;
  align-items: start;
  margin-top: 24px;
}

/* ---------------------------------------------------------
   4. FEATURED IMAGE
   Supports the actual Training Program machine name.
   --------------------------------------------------------- */
:where(.path-product, .commerce-product--full)
:where(
  .product-featured-image,
  .field--name-field-featured-image-product,
  .field--name-field-image,
  .field--name-field-course-image
) {
  margin-bottom: 24px;
  padding: 14px;
  overflow: hidden;
  background: var(--rk-white);
  border: 1px solid var(--rk-border);
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(15, 47, 93, 0.07);
}

:where(.path-product, .commerce-product--full)
:where(
  .product-featured-image,
  .field--name-field-featured-image-product,
  .field--name-field-image,
  .field--name-field-course-image
) > .field__label {
  display: none;
}

:where(.path-product, .commerce-product--full)
:where(
  .product-featured-image,
  .field--name-field-featured-image-product,
  .field--name-field-image,
  .field--name-field-course-image
) img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  border-radius: 14px;
}

/* ---------------------------------------------------------
   5. TRAINING DESCRIPTION
   --------------------------------------------------------- */
:where(.path-product, .commerce-product--full)
:where(
  .product-description,
  .field--name-field-short-description-product,
  .field--name-body
) {
  padding: 26px;
  color: #344a68;
  font-size: 1rem;
  line-height: 1.75;
  background: var(--rk-white);
  border: 1px solid var(--rk-border);
  border-radius: 20px;
  box-shadow: 0 14px 34px rgba(15, 47, 93, 0.06);
}

:where(.path-product, .commerce-product--full)
:where(
  .product-description,
  .field--name-field-short-description-product,
  .field--name-body
) > .field__label {
  display: none;
}

:where(.path-product, .commerce-product--full)
:where(
  .product-description,
  .field--name-field-short-description-product,
  .field--name-body
) :last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------
   6. CHECKOUT CARD
   --------------------------------------------------------- */
.path-product .product-checkout-card,
.commerce-product--full .commerce-order-item-add-to-cart-form {
  padding: 26px;
  background: var(--rk-white);
  border: 1px solid var(--rk-border);
  border-radius: 20px;
  box-shadow: 0 18px 46px rgba(15, 47, 93, 0.10);
}

/* Prevent a second card and a second sticky context when the
   form is already placed inside product-checkout-card. */
.path-product .product-checkout-card
.commerce-order-item-add-to-cart-form {
  position: static;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

@media (min-width: 992px) {
  .path-product .product-checkout-card,
  .commerce-product--full .commerce-order-item-add-to-cart-form {
    position: sticky;
    top: 32px;
  }

  .path-product .product-checkout-card
  .commerce-order-item-add-to-cart-form {
    position: static;
  }
}

/* ---------------------------------------------------------
   7. SKU AND PRICE
   --------------------------------------------------------- */
:where(.path-product, .commerce-product--full)
:where(.product-sku-section, .field--name-sku) {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e9eff7;
}

:where(.path-product, .commerce-product--full)
:where(.product-sku-section, .field--name-sku) .field__label {
  margin: 0;
  color: var(--rk-muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

:where(.path-product, .commerce-product--full)
:where(.product-sku-section, .field--name-sku) .field__item {
  padding: 4px 9px;
  color: #334155;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  background: #f1f5f9;
  border-radius: 7px;
}

:where(.path-product, .commerce-product--full)
:where(.product-price-section, .field--name-price) {
  margin: 0 0 22px;
  padding: 18px 20px;
  color: #ffffff;
  text-align: center;
  background: linear-gradient(135deg, var(--rk-navy), var(--rk-blue));
  border-radius: 14px;
}

:where(.path-product, .commerce-product--full)
:where(.product-price-section, .field--name-price) .field__label {
  margin-bottom: 5px;
  color: #cde6ff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

:where(.path-product, .commerce-product--full)
:where(.product-price-section, .field--name-price) .field__item {
  color: #ffffff;
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 900;
  line-height: 1.2;
}

/* ---------------------------------------------------------
   8. VARIATION ATTRIBUTE TABS
   Expected wrapper:
   .field--widget-commerce-product-variation-attributes
   --------------------------------------------------------- */
:where(.path-product, .commerce-product--full)
.field--widget-commerce-product-variation-attributes {
  margin: 0 0 20px;
}

:where(.path-product, .commerce-product--full)
.field--widget-commerce-product-variation-attributes fieldset {
  min-width: 0;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

:where(.path-product, .commerce-product--full)
.field--widget-commerce-product-variation-attributes legend {
  float: none;
  width: auto;
  margin: 0 0 10px;
  color: var(--rk-navy);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.4;
  text-transform: uppercase;
}

:where(.path-product, .commerce-product--full)
.field--widget-commerce-product-variation-attributes .form-radios {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

:where(.path-product, .commerce-product--full)
.field--widget-commerce-product-variation-attributes .form-type-radio {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 0;
}

:where(.path-product, .commerce-product--full)
.field--widget-commerce-product-variation-attributes
.form-type-radio input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  clip-path: inset(50%);
}

:where(.path-product, .commerce-product--full)
.field--widget-commerce-product-variation-attributes .form-type-radio label {
  position: relative;
  display: flex;
  min-height: 52px;
  margin: 0;
  padding: 12px 16px;
  align-items: center;
  justify-content: center;
  color: #263d5c;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
  cursor: pointer;
  background: #ffffff;
  border: 1.5px solid var(--rk-border);
  border-radius: 12px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

:where(.path-product, .commerce-product--full)
.field--widget-commerce-product-variation-attributes
.form-type-radio label:hover {
  color: var(--rk-blue-dark);
  background: #f7fbff;
  border-color: #8fc5f5;
  box-shadow: 0 7px 18px rgba(8, 118, 223, 0.08);
  transform: translateY(-1px);
}

:where(.path-product, .commerce-product--full)
.field--widget-commerce-product-variation-attributes
.form-type-radio input[type="radio"]:checked + label,
:where(.path-product, .commerce-product--full)
.field--widget-commerce-product-variation-attributes
.form-type-radio:has(input[type="radio"]:checked) label {
  color: #ffffff;
  background: linear-gradient(135deg, var(--rk-blue-dark), var(--rk-cyan));
  border-color: var(--rk-blue);
  box-shadow: 0 8px 20px rgba(8, 118, 223, 0.22);
}

:where(.path-product, .commerce-product--full)
.field--widget-commerce-product-variation-attributes
.form-type-radio input[type="radio"]:focus-visible + label,
:where(.path-product, .commerce-product--full)
.field--widget-commerce-product-variation-attributes
.form-type-radio:has(input[type="radio"]:focus-visible) label {
  outline: 3px solid rgba(8, 118, 223, 0.25);
  outline-offset: 2px;
}

/* Select fallback for attributes such as Schedule. */
:where(.path-product, .commerce-product--full)
.field--widget-commerce-product-variation-attributes select,
:where(.path-product, .commerce-product--full)
.commerce-order-item-add-to-cart-form select {
  width: 100%;
  min-height: 50px;
  padding: 10px 42px 10px 14px;
  color: var(--rk-text);
  background-color: #ffffff;
  border: 1px solid var(--rk-border);
  border-radius: 11px;
}

:where(.path-product, .commerce-product--full)
.field--widget-commerce-product-variation-attributes select:focus,
:where(.path-product, .commerce-product--full)
.commerce-order-item-add-to-cart-form select:focus {
  outline: 0;
  border-color: var(--rk-blue);
  box-shadow: 0 0 0 3px rgba(8, 118, 223, 0.12);
}

/* Usable fallback while Drupal still outputs autocomplete.
   This intentionally remains a text field; fix the widget in Drupal
   to obtain the tab interface above. */
:where(.path-product, .commerce-product--full)
.field--widget-entity-reference-autocomplete input.form-autocomplete {
  width: 100%;
  min-height: 50px;
  padding: 10px 42px 10px 14px;
  color: var(--rk-text);
  background-color: #ffffff;
  border: 1px solid var(--rk-border);
  border-radius: 11px;
}

:where(.path-product, .commerce-product--full)
.field--widget-entity-reference-autocomplete input.form-autocomplete:focus {
  outline: 0;
  border-color: var(--rk-blue);
  box-shadow: 0 0 0 3px rgba(8, 118, 223, 0.12);
}

/* ---------------------------------------------------------
   9. SCHEDULE AND AVAILABLE SEAT
   Supports common field machine names.
   --------------------------------------------------------- */
:where(.path-product, .commerce-product--full)
:where(
  .field--name-field-schedule,
  .field--name-field-related-schedule,
  .form-item-field-schedule,
  .form-item-field-related-schedule
) {
  margin: 18px 0;
}

:where(.path-product, .commerce-product--full)
:where(
  .field--name-field-schedule,
  .field--name-field-related-schedule,
  .form-item-field-schedule,
  .form-item-field-related-schedule
) :where(.field__label, label) {
  display: block;
  margin-bottom: 8px;
  color: var(--rk-navy);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

:where(.path-product, .commerce-product--full)
:where(
  .field--name-field-available-seat,
  .field--name-field-available-seats,
  .available-seat
) {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin: 14px 0;
  padding: 12px 14px;
  color: #166534;
  font-size: 0.9rem;
  font-weight: 750;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 11px;
}

:where(.path-product, .commerce-product--full)
:where(
  .field--name-field-available-seat,
  .field--name-field-available-seats,
  .available-seat
) .field__label {
  margin: 0;
  color: #166534;
}

/* Generic variation information injected by Commerce. */
:where(.path-product, .commerce-product--full)
.commerce-order-item-add-to-cart-form .field:not(.field--name-price) {
  margin-bottom: 12px;
}

:where(.path-product, .commerce-product--full)
.commerce-order-item-add-to-cart-form .field__label {
  margin-bottom: 4px;
  color: #6b7f9a;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  line-height: 1.4;
  text-transform: uppercase;
}

:where(.path-product, .commerce-product--full)
.commerce-order-item-add-to-cart-form .field__item {
  color: #193451;
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.5;
}

/* ---------------------------------------------------------
   10. QUANTITY AND ADD TO CART
   --------------------------------------------------------- */
:where(.path-product, .commerce-product--full)
.commerce-order-item-add-to-cart-form
:where(.form-item-quantity-0-value, .form-item-quantity) {
  margin: 18px 0;
}

:where(.path-product, .commerce-product--full)
.commerce-order-item-add-to-cart-form
:where(.form-item-quantity-0-value, .form-item-quantity) label {
  display: block;
  margin-bottom: 7px;
  color: var(--rk-navy);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

:where(.path-product, .commerce-product--full)
.commerce-order-item-add-to-cart-form input[type="number"] {
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  color: var(--rk-text);
  background: #ffffff;
  border: 1px solid var(--rk-border);
  border-radius: 11px;
}

:where(.path-product, .commerce-product--full)
.commerce-order-item-add-to-cart-form input[type="number"]:focus {
  outline: 0;
  border-color: var(--rk-blue);
  box-shadow: 0 0 0 3px rgba(8, 118, 223, 0.12);
}

:where(.path-product, .commerce-product--full)
.commerce-order-item-add-to-cart-form .form-actions {
  margin: 18px 0 0;
}

:where(.path-product, .commerce-product--full)
:where(
  .commerce-order-item-add-to-cart-form .form-submit,
  .product-variations-section .button--add-to-cart
) {
  display: flex;
  width: 100%;
  min-height: 52px;
  margin: 0;
  padding: 13px 20px;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.3;
  cursor: pointer;
  background: linear-gradient(135deg, var(--rk-blue-dark), var(--rk-cyan));
  border: 0;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(8, 118, 223, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

:where(.path-product, .commerce-product--full)
:where(
  .commerce-order-item-add-to-cart-form .form-submit,
  .product-variations-section .button--add-to-cart
):hover {
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(8, 118, 223, 0.30);
}

:where(.path-product, .commerce-product--full)
:where(
  .commerce-order-item-add-to-cart-form .form-submit,
  .product-variations-section .button--add-to-cart
):active {
  transform: translateY(0);
}

:where(.path-product, .commerce-product--full)
.commerce-order-item-add-to-cart-form .form-submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

:where(.path-product, .commerce-product--full) .ajax-progress {
  display: block;
  margin-top: 9px;
  color: var(--rk-muted);
  font-size: 0.8rem;
  text-align: center;
}

/* ---------------------------------------------------------
   11. RELATED COURSE / SCHEDULE CARDS
   --------------------------------------------------------- */
.path-product :where(
  .product-related-course-section,
  .product-related-schedule-section
) {
  margin-bottom: 20px;
  padding: 20px 22px;
  background: #ffffff;
  border: 1px solid var(--rk-border);
  border-radius: 16px;
}

.path-product :where(
  .product-related-course-section,
  .product-related-schedule-section
) .field__label {
  margin-bottom: 9px;
  padding-bottom: 8px;
  color: var(--rk-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid #edf2f7;
}

.path-product :where(
  .product-related-course-section,
  .product-related-schedule-section
) a {
  color: var(--rk-blue-dark);
  font-weight: 750;
  text-decoration: none;
}

.path-product :where(
  .product-related-course-section,
  .product-related-schedule-section
) a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------
   12. PRODUCT RESPONSIVE
   --------------------------------------------------------- */
@media (max-width: 991.98px) {
  .path-product .product-layout-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .path-product .product-checkout-card,
  .commerce-product--full .commerce-order-item-add-to-cart-form {
    position: static;
  }
}

@media (max-width: 575.98px) {
  .commerce-product--full .field--name-title,
  .commerce-product--full .product-title,
  :where(.path-product, .commerce-product--full)
  :where(
    .product-description,
    .field--name-field-short-description-product,
    .field--name-body
  ),
  .path-product .product-checkout-card,
  .commerce-product--full .commerce-order-item-add-to-cart-form {
    padding: 18px;
    border-radius: 15px;
  }

  :where(.path-product, .commerce-product--full)
  .field--widget-commerce-product-variation-attributes .form-radios {
    grid-template-columns: 1fr;
  }

  :where(.path-product, .commerce-product--full)
  :where(.product-sku-section, .field--name-sku) {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

/* =========================================================
   13. SHOPPING CART
   ========================================================= */
.path-cart #block-rekhatama-theme-page-title {
  margin: 32px 0 24px;
}

.path-cart #block-rekhatama-theme-page-title h1 {
  color: #0f172a;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.path-cart .views-table {
  width: 100%;
  margin-bottom: 24px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-collapse: separate;
  border-radius: 16px;
  border-spacing: 0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.path-cart .views-table th {
  padding: 16px 20px;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.path-cart .views-table td {
  padding: 20px;
  color: #334155;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
}

.path-cart .views-table tbody tr:last-child td {
  border-bottom: 0;
}

.path-cart .views-table tbody tr:hover {
  background: #f8fafc;
}

.path-cart .views-table
:is(
  th.views-field-unit-price-number,
  td.views-field-unit-price-number,
  th.views-field-total-price-number,
  td.views-field-total-price-number
) {
  text-align: right;
}

.path-cart .views-table
:is(
  th.views-field-edit-quantity,
  td.views-field-edit-quantity,
  th.views-field-remove-button,
  td.views-field-remove-button
) {
  text-align: center;
}

.path-cart td.views-field-purchased-entity
:where(.field--name-title, .field--name-price, .field__label) {
  display: none;
}

.path-cart td.views-field-purchased-entity .field--name-product-id {
  margin-bottom: 8px;
}

.path-cart td.views-field-purchased-entity .field--name-product-id a {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
}

.path-cart td.views-field-purchased-entity .field--name-product-id a:hover {
  color: #0057d9;
}

.path-cart td.views-field-purchased-entity .field--name-sku {
  display: inline-flex;
  margin: 0 6px 4px 0;
}

.path-cart td.views-field-purchased-entity
.field--name-sku .field__item {
  padding: 3px 8px;
  color: #475569;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}

.path-cart td.views-field-edit-quantity input {
  max-width: 80px;
  padding: 8px;
  color: #0f172a;
  font-weight: 700;
  text-align: center;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
}

.path-cart td.views-field-edit-quantity input:focus {
  outline: none;
  border-color: #0057d9;
  box-shadow: 0 0 0 3px rgba(0, 87, 217, 0.15);
}

.path-cart td.views-field-remove-button
:where(input[type="submit"], button) {
  padding: 7px 12px !important;
  color: #dc2626 !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  background: transparent !important;
  border: 1.5px solid #fecaca !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.path-cart td.views-field-remove-button
:where(input[type="submit"], button):hover {
  color: #b91c1c !important;
  background: #fef2f2 !important;
  border-color: #f87171 !important;
}

.path-cart td.views-field-total-price-number {
  color: #0f172a;
  font-size: 1.05rem;
  font-weight: 800;
}

.path-cart .order-total-line {
  display: flex;
  gap: 24px;
  justify-content: flex-end;
  margin-top: 8px;
  padding-right: 20px;
  font-size: 1rem;
}

.path-cart .order-total-line-label {
  color: #64748b;
  font-weight: 700;
}

.path-cart .order-total-line-value {
  min-width: 140px;
  color: #0f172a;
  font-weight: 800;
  text-align: right;
}

.path-cart .order-total-line__total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid #e2e8f0;
}

.path-cart .order-total-line__total .order-total-line-label {
  color: #0f172a;
  font-size: 1.1rem;
  font-weight: 900;
}

.path-cart .order-total-line__total .order-total-line-value {
  color: #0057d9;
  font-size: 1.5rem;
  font-weight: 900;
}

.path-cart form .form-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.path-cart form .form-actions
:where(input[type="submit"], button, .button) {
  display: inline-flex;
  min-height: 48px;
  padding: 10px 24px;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.path-cart form .form-actions
:where(
  input[type="submit"][value*="Update"],
  input[type="submit"][value*="update"],
  button[name*="update"]
) {
  color: #475569 !important;
  background: #ffffff !important;
  border: 2px solid #cbd5e1 !important;
}

.path-cart form .form-actions
:where(
  input[type="submit"][value*="Checkout"],
  input[type="submit"][value*="checkout"],
  button[name*="checkout"]
) {
  color: #ffffff !important;
  background: linear-gradient(135deg, #0057d9, #0ea5e9) !important;
  border: 0 !important;
  box-shadow: 0 8px 20px rgba(0, 87, 217, 0.18) !important;
}

.path-cart form .form-actions
:where(
  input[type="submit"][value*="Checkout"],
  input[type="submit"][value*="checkout"],
  button[name*="checkout"]
):hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 87, 217, 0.28) !important;
}

@media (max-width: 767.98px) {
  .path-cart .views-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .path-cart .order-total-line {
    padding-right: 0;
  }

  .path-cart form .form-actions
  :where(input[type="submit"], button, .button) {
    width: 100%;
  }
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  :where(.path-product, .commerce-product--full, .path-cart) * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* =========================================================
   14. PRODUCT CHECKOUT POLISH — 2026-09-22
   Higher-specificity overrides for the live Rekhatama theme.
   ========================================================= */

/* Give the purchase panel a quieter, more premium hierarchy. */
body.path-product .product-checkout-card {
  padding: 28px;
  padding: 22px;
  overflow: hidden;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(145deg, #cfe5fb, #edf5fc) border-box;
  border: 1px solid transparent;
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(15, 47, 93, 0.11);
}

/* Clean price card: light surface, strong number, restrained accent. */
body.path-product .commerce-product--full .field--name-price,
body.path-product .product-checkout-card .product-price-section {
body.path-product .field--name-price,
body.path-product .product-price-section {
  position: relative;
  display: flex;
  min-height: 88px;
  gap: 12px;
  min-height: 68px;
  gap: 10px;
  align-items: center;
  margin: 2px 0 24px;
  padding: 17px 20px 17px 23px;
  margin: 0 0 16px;
  padding: 12px 17px 12px 20px;
  overflow: hidden;
  color: #102f5d;
  color: #0f2748 !important;
  text-align: left;
  background: linear-gradient(135deg, #f8fbff 0%, #edf6ff 100%);
  border: 1px solid #cfe2f5;
  border-radius: 15px;
  box-shadow: 0 9px 22px rgba(15, 76, 145, 0.08);
  background: #f7faff !important;
  border: 1px solid #c7daee !important;
  border-radius: 13px;
  box-shadow: 0 6px 16px rgba(15, 76, 145, 0.07);
}

body.path-product .commerce-product--full .field--name-price::before,
body.path-product .product-checkout-card .product-price-section::before {
body.path-product .field--name-price::before,
body.path-product .product-price-section::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  content: "";
  background: linear-gradient(180deg, #0057c7, #0ea5e9);
}

body.path-product .commerce-product--full
.field--name-price > .field__label,
body.path-product .field--name-price > .field__label,
body.path-product .field--name-price .field__label,
body.path-product .product-checkout-card
.product-price-section > .field__label {
  flex: 0 0 auto;
  margin: 0;
  color: #60738f !important;
  font-size: 0.69rem;
  color: #526b89 !important;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.10em;
  line-height: 1;
  text-transform: uppercase;
}

body.path-product .commerce-product--full
.field--name-price > .field__item,
body.path-product .field--name-price > .field__item,
body.path-product .field--name-price .field__item,
body.path-product .product-checkout-card
.product-price-section > .field__item {
  min-width: 0;
  color: #0b3264 !important;
  font-size: clamp(1.7rem, 2.25vw, 2.2rem) !important;
  color: #071e3d !important;
  font-size: clamp(1.55rem, 2vw, 1.95rem) !important;
  font-weight: 900 !important;
  letter-spacing: -0.035em;
  line-height: 1.05 !important;
  white-space: nowrap;
}

/* Make field labels consistent without competing with the price. */
body.path-product .product-checkout-card
:where(.form-item > label, fieldset > legend, .fieldset-legend) {
  color: #4f6684;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.055em;
}

body.path-product .product-checkout-card
.field--widget-commerce-product-variation-attributes
.form-type-radio label {
  min-height: 50px;
  min-height: 44px;
  padding: 9px 12px;
  border-color: #cddced;
  box-shadow: 0 2px 7px rgba(15, 47, 93, 0.025);
}

body.path-product .product-checkout-card
.field--widget-commerce-product-variation-attributes
.form-type-radio:has(input[type="radio"]:checked) label {
  color: #ffffff !important;
  background: linear-gradient(135deg, #075fc7 0%, #0799df 100%);
  border-color: #0876df;
  box-shadow: 0 9px 22px rgba(8, 118, 223, 0.22);
}

body.path-product .product-checkout-card
:where(select, input[type="number"]) {
  min-height: 52px;
  min-height: 46px;
  background-color: #ffffff;
  border-color: #cddced;
  border-radius: 12px;
  box-shadow: 0 2px 7px rgba(15, 47, 93, 0.025);
}

body.path-product .product-checkout-card
.commerce-order-item-add-to-cart-form .form-actions {
  margin-top: 20px;
  margin-top: 14px;
}

body.path-product .product-checkout-card
.commerce-order-item-add-to-cart-form .form-submit {
  min-height: 54px;
  min-height: 50px;
  font-size: 1rem;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, #075fc7 0%, #0799df 100%);
  border-radius: 12px;
  box-shadow: 0 11px 24px rgba(8, 118, 223, 0.24);
}

/* Remove empty Layout Builder/admin placeholders shown below Add to cart.
   These selectors do not hide populated Commerce fields or form controls. */
body.path-product .product-checkout-card
:where(.layout-builder__add-block, .layout-builder__add-section),
body.path-product .commerce-product--full
:where(.layout-builder__add-block, .layout-builder__add-section),
body.path-product .product-checkout-card
.commerce-order-item-add-to-cart-form + :is(div, section):empty,
body.path-product .product-checkout-card
.commerce-order-item-add-to-cart-form :where(.form-actions, .form-wrapper):empty,
body.path-product .commerce-product--full
.layout__region > :where(.block, .layout-builder-block):empty {
  display: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Compact the vertical rhythm of the purchase form. */
body.path-product .product-checkout-card
:where(.product-sku-section, .field--name-sku) {
  margin-bottom: 10px;
  padding-bottom: 10px;
}

body.path-product .product-checkout-card
.field--widget-commerce-product-variation-attributes {
  margin-bottom: 10px;
}

body.path-product .product-checkout-card
.field--widget-commerce-product-variation-attributes fieldset {
  margin-bottom: 12px;
}

body.path-product .product-checkout-card
.field--widget-commerce-product-variation-attributes .form-radios {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.path-product .product-checkout-card
.commerce-order-item-add-to-cart-form
:where(.form-item-quantity-0-value, .form-item-quantity) {
  margin: 12px 0;
}

body.path-product .product-checkout-card
:where(
  .field--name-field-training-schedule,
  .form-item-field-training-schedule,
  .field--name-field-schedule,
  .field--name-field-related-schedule,
  .form-item-field-schedule,
  .form-item-field-related-schedule
) {
  margin: 12px 0;
}

/* The live admin view adds a final visual wrapper with no useful control.
   Hide it only when it contains no interactive or meaningful field content. */
body.path-product .product-checkout-card > :last-child:not(:has(
  input,
  select,
  textarea,
  button,
  a,
  img,
  .field__item,
  .messages
)),
body.path-product .commerce-order-item-add-to-cart-form > :last-child:not(:has(
  input,
  select,
  textarea,
  button,
  a,
  .field__item,
  .messages
)) {
  display: none !important;
}

@media (max-width: 575.98px) {
  body.path-product .product-checkout-card {
    padding: 20px;
    padding: 18px;
    border-radius: 17px;
  }

  body.path-product .commerce-product--full .field--name-price,
  body.path-product .product-checkout-card .product-price-section {
    min-height: 82px;
    padding: 15px 16px 15px 20px;
  body.path-product .field--name-price,
  body.path-product .product-price-section {
    min-height: 64px;
    padding: 11px 14px 11px 19px;
  }

  body.path-product .commerce-product--full
  .field--name-price > .field__item,
  body.path-product .field--name-price > .field__item,
  body.path-product .field--name-price .field__item,
  body.path-product .product-checkout-card
  .product-price-section > .field__item {
    font-size: clamp(1.55rem, 8vw, 1.9rem) !important;
    font-size: clamp(1.45rem, 7vw, 1.8rem) !important;
  }

  body.path-product .product-checkout-card
  .field--widget-commerce-product-variation-attributes .form-radios {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}