/*
 * ALAN theme — medical landing page.
 *
 * Everything for the medical page: hero, equipment cart tour and the
 * "Product Range by Category" cards. Loaded after site.css and upgrade.css by
 * medical/medical.php, so these rules need no !important or override layer.
 */

/* ------------------------------------------------------------------ *
 * B. Category card gradient border
 * ------------------------------------------------------------------ */
.category-card { position: relative; border: 0; border-radius: 16px; --gradient-angle: 270deg;
  background: linear-gradient(var(--gradient-angle), #ffdb85 4.12%, #f7b487 11.74%, #ef8f89 21.53%, #e9728b 30.24%, #e55d8c 40.03%, #e2518d 48.74%, #e24d8e 57.45%, #df4c8e 75.95%, #d74a90 87.93%, #c84792 97.72%, #b44396 105.34%, #af4298 107.52%); }
.category-card:hover { --gradient-angle: 450deg; transition: --gradient-angle .6s ease-in-out; }
.category-card::before { content: ""; position: absolute; top: 1px; left: 1px; width: calc(100% - 2px); height: calc(100% - 2px); background: #fff; border-radius: var(--radius); }
.category-card .wp-block-image { position: relative; }
.category-card img { position: relative; }
.category-card h3 { position: relative; }

.medical-hero { text-align: center; padding-block: clamp(5rem, 8vw, 8rem); overflow: visible; }
/* Paper "Medical": the wash is the 357x459 vector rotated 90deg, top 89.5px,
   left -287px — visible below the header, clipped by the page edge. */
.medical-hero::before { top: 5.625rem; left: -17.9375rem; width: 28.6875rem; height: 22.3125rem; aspect-ratio: auto; border-radius: 0; background: url("../assets/images/medical-wash-left.svg") 0 0 / 100% 100% no-repeat; filter: none; }
/* Paper: the same vector mirrored (rotate -90deg) beside the stand. */
/* Anchored to the full-bleed hero, so it is always cut by the viewport edge. */
.medical-hero::after { content: ""; position: absolute; z-index: -1; right: -16.625rem; bottom: 2rem; width: 28.6875rem; height: 22.3125rem; background: url("../assets/images/medical-wash-right.svg") 0 0 / 100% 100% no-repeat; }
.medical-hero__title { max-width: 72rem; margin-inline: auto; }
.medical-hero__copy { max-width: 64rem; margin: 1.5rem auto 3rem; }
/* The hero device is the product stand; the stand owns its own sizing
   (.product-stand) so no second rule can cap or letterbox it. */
.category-grid,
.category-grid.is-layout-flex { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 3rem; }
@media (max-width: 720px) { .category-grid, .category-grid.is-layout-flex { grid-template-columns: 1fr; } }
.category-card { position: relative; display: flex; flex-direction: column; min-height: 15rem; padding: 1.5rem; border-radius: 16px; color: inherit; text-decoration: none; }
.category-card .wp-block-image { display: flex; min-height: 0; justify-content: flex-end; margin: 0; }
.category-card img { display: block; width: 65px; height: 65px; margin-left: auto; object-fit: contain; opacity: 1; visibility: visible; }
.category-card h3 { max-width: 78%; margin: auto 0 0; color: #0b0701; font-size: 2rem; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
/* The icons ship as black line art; paint them with the brand gradient through
   a mask so they match the design without recolouring the source files. */
.category-card figure { position: relative; }
.category-card figure img { opacity: 0; }
.category-card figure::after { content: ""; position: absolute; top: 0; right: 0; width: 65px; height: 65px; background: var(--gradient); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
/* The whole card is the link. */
.category-card__link { position: absolute; inset: 0; z-index: 2; }
@media (max-width: 720px) {
  .medical-hero__title { max-width: 24rem; margin-inline: auto; font-size: clamp(2.15rem, 9vw, 3rem); line-height: 1.08; }
}
/* Medical cart: product labels tour the shelves; the photo lifts slightly
   while a label is showing (the artwork itself is label-free). */
.medical-cart { position: relative; }
.medical-cart img { transition: transform .6s ease; }
.medical-cart.is-zoomed img { transform: scale(1.04); }
.medical-cart__tag { position: absolute; top: var(--tag-top); right: calc(100% - 7rem); z-index: 2; display: inline-flex; align-items: center; padding: .7rem 1.6rem; border-radius: 999px; background: var(--gradient); color: #fff; font-weight: 600; font-size: clamp(.8rem, 1.1vw, 1rem); letter-spacing: .02em; white-space: nowrap; text-decoration: none; opacity: 0; transform: translateX(-1.5rem); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
.medical-cart__tag.is-active { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 720px) {
  .medical-cart__tag { right: auto; left: 0; }
}

/* Product stand (medical hero): empty stand + individually hoverable products. */
.product-stand { position: relative; width: 100%; max-width: 81.5625rem; margin-inline: auto; }
.product-stand__base { display: block; width: 100%; height: auto; }
.product-stand__screen { position: absolute; left: 28.2%; top: 2.7%; z-index: 0; width: 43.8%; height: 20.5%; overflow: hidden; border-radius: 3px; background: #000; }
.product-stand__screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-stand .product { position: absolute; top: var(--top); left: 50%; width: 25.5%; transform: translateX(-50%); }
.product-stand .product img { position: relative; z-index: 1; width: 100%; height: auto; transition: transform .3s ease-in-out; }
.product-stand .product:hover img { transform: scale(1.1); }
.product-stand .product-label { position: absolute; top: 50%; right: 84%; z-index: 0; min-width: 10rem; padding: 1rem 3.8rem 1rem 1.6rem; border-radius: 2rem; background: var(--gradient); color: #fff; font-size: 1.6rem; line-height: 1; white-space: nowrap; text-align: center; opacity: 0; transform: translate(0,-50%); transition: opacity .3s ease-in-out, transform .3s ease-in-out; }
.product-stand .product:nth-child(even) .product-label { right: auto; left: 84%; padding: 1rem 1.6rem 1rem 3.8rem; }
.product-stand .product:nth-child(6) .product-label { left: 84%; }
.product-stand .product:hover .product-label { opacity: 1; transform: translate(-8%,-50%); }
.product-stand .product:nth-child(even):hover .product-label { opacity: 1; transform: translate(8%,-50%); }
.product-stand .product:nth-child(even):nth-child(6):hover .product-label { opacity: 1; transform: translate(0,-50%); }
.product-stand .product.product5 { width: 24%; }
@media (max-width: 720px) {
  .product-stand { max-width: 22rem; }
  .product-stand .product-label { min-width: 6.5rem; padding: .4rem .7rem; font-size: .72rem; }
}
