/**
 * eXthus Apps Portal — standard_cart order form
 */

body.exthus-portal #order-standard_cart {
  position: relative;
  color: var(--ex-text);
  padding-bottom: 16px;
}

/* Textured store backdrop */
body.exthus-portal #order-standard_cart.exthus-store .exthus-store__backdrop {
  position: absolute;
  inset: -32px -24px auto;
  height: 420px;
  z-index: 0;
  pointer-events: none;
  border-radius: 0 0 var(--ex-radius) var(--ex-radius);
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(143, 224, 0, 0.1) 0%, transparent 60%),
    radial-gradient(circle at 90% 80%, rgba(143, 224, 0, 0.05) 0%, transparent 40%),
    linear-gradient(180deg, var(--ex-panel-2) 0%, var(--ex-bg) 100%);
  overflow: hidden;
}
body.exthus-portal #order-standard_cart.exthus-store .exthus-store__backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 20, 25, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 20, 25, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65) 0%, transparent 100%);
}

body.exthus-portal #order-standard_cart .exthus-store__layout,
body.exthus-portal #order-standard_cart .exthus-store__body,
body.exthus-portal #order-standard_cart .exthus-store__sidebar {
  position: relative;
  z-index: 1;
}

/* Store page shell */
body.exthus-portal.exthus-store-page section#main-body {
  background: var(--ex-bg);
}
body.exthus-portal.exthus-store-page .exthus-breadcrumb {
  background: transparent;
  border-bottom: none;
  padding-bottom: 4px;
}
body.exthus-portal.exthus-store-page .exthus-content {
  padding-top: 8px;
}

/* Sidebar */
body.exthus-portal #order-standard_cart .cart-sidebar .panel-sidebar {
  border-radius: var(--ex-radius-sm);
  overflow: hidden;
  box-shadow: var(--ex-shadow);
  border: 1px solid var(--ex-line);
  background: var(--ex-panel);
}
body.exthus-portal #order-standard_cart .cart-sidebar .panel-heading.card-header {
  background: var(--ex-panel-2);
  border-bottom: 1px solid var(--ex-line);
}
body.exthus-portal #order-standard_cart .cart-sidebar .panel-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ex-muted);
}

/* Store hero header */
body.exthus-portal .exthus-store-hero {
  margin: 0 0 28px;
  padding: 28px 32px;
  border-radius: var(--ex-radius);
  background: var(--ex-chrome);
  color: var(--ex-text-on-dark);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 50px rgba(5, 6, 7, 0.18);
  position: relative;
  overflow: hidden;
}
body.exthus-portal .exthus-store-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% -20%, rgba(143, 224, 0, 0.16) 0%, transparent 60%),
    radial-gradient(circle at 85% 75%, rgba(143, 224, 0, 0.07) 0%, transparent 45%);
}
body.exthus-portal .exthus-store-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, transparent 85%);
}
body.exthus-portal .exthus-store-hero__eyebrow,
body.exthus-portal .exthus-store-hero__title,
body.exthus-portal .exthus-store-hero__lead {
  position: relative;
  z-index: 1;
}
body.exthus-portal .exthus-store-hero__eyebrow {
  margin: 0 0 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ex-lime);
}
body.exthus-portal .exthus-store-hero__title {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ex-text-on-dark) !important;
}
body.exthus-portal .exthus-store-hero__lead {
  margin: 0;
  max-width: 58ch;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--ex-muted-on-dark);
}

/* Product grid — two columns max */
body.exthus-portal #order-standard_cart .exthus-store-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
}
body.exthus-portal #order-standard_cart .exthus-store-products > .row {
  display: contents;
}
body.exthus-portal #order-standard_cart .exthus-store-products .col-md-6 {
  display: contents;
}

/* Centre lone card on last row (e.g. 3 products) */
body.exthus-portal #order-standard_cart .exthus-store-products .exthus-product-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: calc(50% - 12px);
  justify-self: center;
  width: 100%;
}

/* Product cards */
body.exthus-portal #order-standard_cart .exthus-product-card {
  display: flex;
  flex-direction: column;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: var(--ex-radius) !important;
  overflow: hidden;
  background: var(--ex-panel) !important;
  border: 1px solid var(--ex-line) !important;
  box-shadow: var(--ex-shadow) !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  clear: both;
}
body.exthus-portal #order-standard_cart .exthus-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ex-shadow-lg) !important;
  border-color: rgba(143, 224, 0, 0.35) !important;
}

body.exthus-portal #order-standard_cart .exthus-product-card__head {
  padding: 24px 24px 12px !important;
  background: linear-gradient(180deg, var(--ex-panel) 0%, rgba(238, 242, 246, 0.35) 100%) !important;
  border: none !important;
}
body.exthus-portal #order-standard_cart .exthus-product-card__title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
body.exthus-portal #order-standard_cart .exthus-product-card__title {
  margin: 0;
  font-size: 1.2rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--ex-text) !important;
}
body.exthus-portal #order-standard_cart .exthus-product-card__stock {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ex-muted);
  background: var(--ex-panel-2);
  border: 1px solid var(--ex-line);
}

body.exthus-portal #order-standard_cart .exthus-product-card__body,
body.exthus-portal #order-standard_cart .exthus-product-card div.product-desc {
  float: none !important;
  width: auto !important;
  padding: 0 24px 20px !important;
  flex: 1;
  color: var(--ex-muted) !important;
  line-height: 1.65;
  font-size: 0.92rem !important;
}
body.exthus-portal #order-standard_cart .exthus-product-card__desc {
  margin: 0 0 14px;
}
body.exthus-portal #order-standard_cart .exthus-product-card__features {
  margin: 0;
  padding: 0;
  list-style: none;
}
body.exthus-portal #order-standard_cart .exthus-product-card__features li {
  position: relative;
  padding: 6px 0 6px 18px;
  border-top: 1px solid var(--ex-line);
  font-size: 0.88rem;
}
body.exthus-portal #order-standard_cart .exthus-product-card__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ex-lime);
  box-shadow: 0 0 0 3px var(--ex-lime-soft);
}
body.exthus-portal #order-standard_cart .exthus-product-card__features .feature-value {
  font-weight: 700;
  color: var(--ex-text);
}

body.exthus-portal #order-standard_cart .exthus-product-card__foot,
body.exthus-portal #order-standard_cart .exthus-product-card footer {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  margin-top: auto !important;
  padding: 20px 24px 24px !important;
  text-align: left !important;
  background: var(--ex-panel-2) !important;
  border-top: 1px solid var(--ex-line) !important;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
body.exthus-portal #order-standard_cart .exthus-product-card__pricing {
  margin: 0 !important;
  min-width: 0;
}
body.exthus-portal #order-standard_cart .exthus-product-card__term {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ex-muted);
}
body.exthus-portal #order-standard_cart .exthus-product-card__price,
body.exthus-portal #order-standard_cart .exthus-product-card footer .price {
  display: block;
  font-size: 1.65rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ex-text) !important;
}
body.exthus-portal #order-standard_cart .exthus-product-card__cycle {
  display: block;
  margin-top: 2px;
  font-size: 0.88rem;
  color: var(--ex-muted);
}
body.exthus-portal #order-standard_cart .exthus-product-card__setup {
  display: block;
  margin-top: 4px;
  color: var(--ex-muted);
}
body.exthus-portal #order-standard_cart .exthus-product-card__cta {
  flex-shrink: 0;
  min-width: 148px;
  margin: 0 !important;
}

/* Cart & checkout shared */
body.exthus-portal #order-standard_cart .view-cart-items {
  border-radius: var(--ex-radius-sm);
  overflow: hidden;
  box-shadow: var(--ex-shadow);
  border: 1px solid var(--ex-line);
}
body.exthus-portal #order-standard_cart .order-summary {
  border-radius: var(--ex-radius-sm);
  box-shadow: var(--ex-shadow);
  border: 1px solid var(--ex-line);
  overflow: hidden;
}
body.exthus-portal #order-standard_cart .subtotal,
body.exthus-portal #order-standard_cart .bordered-totals {
  background: var(--ex-panel);
}
body.exthus-portal #order-standard_cart .checkout-container {
  border-radius: var(--ex-radius-sm);
  box-shadow: var(--ex-shadow);
  border: 1px solid var(--ex-line);
}

@media (max-width: 991.98px) {
  body.exthus-portal #order-standard_cart.exthus-store .exthus-store__backdrop {
    inset: -24px -12px auto;
    height: 360px;
  }
  body.exthus-portal .exthus-store-hero {
    padding: 24px 22px;
  }
}

@media (max-width: 767.98px) {
  body.exthus-portal #order-standard_cart .exthus-store-products {
    grid-template-columns: 1fr;
  }
  body.exthus-portal #order-standard_cart .exthus-store-products .exthus-product-card:last-child:nth-child(odd) {
    grid-column: auto;
    max-width: none;
    justify-self: stretch;
  }
  body.exthus-portal #order-standard_cart .exthus-product-card__foot {
    flex-direction: column;
    align-items: stretch;
  }
  body.exthus-portal #order-standard_cart .exthus-product-card__cta {
    width: 100%;
  }
}
