/*
 * Yourcloudweb Portal v1.1.9 RC10
 * Catalog layout bugfix, compact product cards and domain header geometry.
 * Scope is deliberately restricted to products.tpl and domainregister.tpl.
 * WHMCS prices, product URLs, forms, lookup handlers and dynamic icons are unchanged.
 */

/* 1. CSS grid must not treat Bootstrap's .row clearfix pseudo-elements as grid items.
   These invisible boxes caused the blank first product position in RC9. */
#order-ycw-of.ycw-products-page .ycw-responsive-catalog > .row.row-eq-height::before,
#order-ycw-of.ycw-products-page .ycw-responsive-catalog > .row.row-eq-height::after,
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product.clearfix::before,
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product.clearfix::after {
  content: none !important;
  display: none !important;
}

#order-ycw-of.ycw-products-page .ycw-responsive-catalog > .row.row-eq-height {
  justify-content: start !important;
  align-content: start !important;
  grid-auto-flow: row !important;
  gap: 20px !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog > .row.row-eq-height > .col-md-4 {
  min-width: 0 !important;
  max-width: 100% !important;
}

/* 2. Pricing cards with a clear sequence: product, price, action, available details.
   Dynamic icons/type colors assigned by the existing products.tpl script remain intact. */
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  min-width: 0 !important;
  min-height: 292px !important;
  height: 100% !important;
  margin: 0 !important;
  border: 1px solid #e5ebf4 !important;
  border-radius: 17px !important;
  background: #fff !important;
  box-shadow: 0 8px 25px rgba(20, 36, 67, .045) !important;
  overflow: hidden !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product:hover {
  border-color: #ffceae !important;
  box-shadow: 0 15px 34px rgba(20, 36, 67, .085) !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product header {
  order: 1 !important;
  flex: 0 0 auto !important;
  min-height: 104px !important;
  margin: 0 !important;
  padding: 18px 20px 15px !important;
  border: 0 !important;
  border-bottom: 1px solid #f0f3f8 !important;
  background: linear-gradient(145deg, #f8faff 0%, #fff 100%) !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product[data-product-type="microsoft"] header,
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product[data-product-type="hosting"] header,
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product[data-product-type="storage"] header {
  background: linear-gradient(145deg, #f1f6ff 0%, #fff 100%) !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product[data-product-type="security"] header,
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product[data-product-type="connectivity"] header {
  background: linear-gradient(145deg, #effaf4 0%, #fff 100%) !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product[data-product-type="domain"] header,
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product[data-product-type="telephony"] header {
  background: linear-gradient(145deg, #fff6ee 0%, #fff 100%) !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product header > i {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 43px !important;
  height: 43px !important;
  margin: 0 0 12px !important;
  border-radius: 11px !important;
  font-size: 19px !important;
  line-height: 1 !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product header > span[id$="-name"] {
  display: block !important;
  max-width: 100% !important;
  margin: 0 !important;
  color: #142443 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: -.01em !important;
  line-height: 1.48 !important;
  overflow-wrap: break-word !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product .product-pricing {
  order: 2 !important;
  flex: 0 0 auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 21px 20px 12px !important;
  border: 0 !important;
  color: #7d8aa0 !important;
  background: #fff !important;
  font-size: 11px !important;
  line-height: 1.75 !important;
  text-align: left !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product .product-pricing .price {
  display: block !important;
  max-width: 100% !important;
  margin-bottom: 4px !important;
  color: #ff5900 !important;
  font-size: clamp(21px, 1.8vw, 27px) !important;
  font-weight: 800 !important;
  letter-spacing: -.03em !important;
  line-height: 1.27 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product footer {
  order: 3 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  flex: 0 0 auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 8px 20px 22px !important;
  border: 0 !important;
  background: #fff !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product footer a.wdes-ycw-of-order-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  gap: 8px !important;
  width: max-content !important;
  min-width: max-content !important;
  max-width: 100% !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 10px 16px !important;
  background: #ff5900 !important;
  border: 1px solid #ff5900 !important;
  border-radius: 10px !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product footer a.wdes-ycw-of-order-btn:hover {
  background: #e54f00 !important;
  border-color: #e54f00 !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product .product-desc {
  order: 4 !important;
  flex: 1 0 auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 17px 20px 19px !important;
  border: 0 !important;
  border-top: 1px solid #edf1f6 !important;
  background: #fff !important;
  color: #697991 !important;
  font-size: 11.5px !important;
  line-height: 1.75 !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product .product-desc p {
  margin: 0 0 11px !important;
  color: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  overflow-wrap: anywhere;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product .product-desc ul {
  margin: 0 !important;
  padding: 0 !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product .product-desc li {
  margin: 0 0 7px !important;
  padding-left: 18px !important;
  font-size: inherit !important;
  line-height: 1.55 !important;
}
#order-ycw-of.ycw-products-page .ycw-responsive-catalog .product .product-desc li:last-child {
  margin-bottom: 0 !important;
}

/* 3. The legacy orderform stylesheet floats all header-lined H1 elements left.
   Explicitly reset that for domain registration so eyebrow, title and intro
   always stack in their natural reading order, including on ultrawide displays. */
#order-ycw-of.ycw-domain-register-page .cart-body > .ycw-domain-register-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  float: none !important;
  clear: both !important;
  position: relative !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 0 25px !important;
  padding: 0 !important;
  text-align: left !important;
}
#order-ycw-of.ycw-domain-register-page .ycw-domain-register-header > .ycw-domain-eyebrow {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  float: none !important;
  clear: both !important;
  width: auto !important;
  max-width: 100% !important;
  margin: 0 0 9px !important;
  padding: 0 !important;
  white-space: normal !important;
}
#order-ycw-of.ycw-domain-register-page .ycw-domain-register-header > h1 {
  display: block !important;
  flex: 0 0 auto !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 9px !important;
  padding: 0 !important;
  text-align: left !important;
}
#order-ycw-of.ycw-domain-register-page .ycw-domain-register-header > p {
  display: block !important;
  flex: 0 0 auto !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  max-width: 760px !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

@media (max-width: 767px) {
  #order-ycw-of.ycw-products-page .ycw-responsive-catalog > .row.row-eq-height { gap: 16px !important; }
  #order-ycw-of.ycw-products-page .ycw-responsive-catalog .product { min-height: 0 !important; }
  #order-ycw-of.ycw-products-page .ycw-responsive-catalog .product header { padding: 17px 18px 14px !important; min-height: 0 !important; }
  #order-ycw-of.ycw-products-page .ycw-responsive-catalog .product .product-pricing { padding: 19px 18px 10px !important; }
  #order-ycw-of.ycw-products-page .ycw-responsive-catalog .product footer { padding: 6px 18px 19px !important; }
  #order-ycw-of.ycw-products-page .ycw-responsive-catalog .product .product-desc { padding: 15px 18px 17px !important; }
  #order-ycw-of.ycw-domain-register-page .cart-body > .ycw-domain-register-header { margin-bottom: 18px !important; }
}
