/* P6H approved card language: closed frame, inset arc, tonal surface.
   Shared by public cards and the customer portal. Conversation messages retain V6. */
:is(.portal-welcome,.panel,.auth-card,.catalog-card,.service-card,.product-card,.work-card,.gallery-card){
 --surface-accent:#239eb5;--surface-start:#f4fafc;--surface-end:#eaf5f8;
 position:relative;isolation:isolate;border:1.5px solid var(--surface-accent);border-radius:24px;
 background:linear-gradient(145deg,var(--surface-start),var(--surface-end));
 box-shadow:0 3px 10px #163c4b08,0 12px 22px -14px #163c4b45;
}
:is(.portal-welcome,.panel,.auth-card,.catalog-card,.service-card,.product-card,.work-card,.gallery-card)::before{
 content:"";position:absolute;inset:7px;border:1px solid #fffffff0;border-top:4px solid var(--surface-accent);
 border-radius:50% 50% 18px 18px / 17px 17px 18px 18px;pointer-events:none;z-index:-1;
}
:is(.portal-welcome,.panel,.auth-card,.catalog-card,.service-card,.product-card,.work-card,.gallery-card)::after{
 content:"";position:absolute;top:8px;inset-inline:24px;height:28px;border-radius:50%;
 background:linear-gradient(180deg,#fff9,transparent);pointer-events:none;z-index:-1;
}
:is(.panel,.catalog-card,.service-card,.product-card,.work-card,.gallery-card):nth-child(3n+2){--surface-accent:#879eac;--surface-start:#f6f8fa;--surface-end:#edf2f5}
:is(.panel,.catalog-card,.service-card,.product-card,.work-card,.gallery-card):nth-child(3n+3),.portal-welcome{--surface-accent:#319d90;--surface-start:#f3faf7;--surface-end:#e9f5ef}
.panel.expiry-card{--surface-accent:#b18d57;--surface-start:#fcfaf5;--surface-end:#f7f1e6}
/* Reserve a clean band above images, so the arc never obscures a screenshot. */
.catalog-card,.gallery-card{padding:24px 10px 10px}
.catalog-card .product-media,.catalog-card>img,.gallery-card>img{border-radius:14px;overflow:hidden}
.services .service-card{padding:24px 10px 10px}
.services .service-image{border-radius:14px;overflow:hidden}
.portal-welcome,.panel,.auth-card{padding-top:32px}
.stat-card{padding-top:28px}
@media(hover:hover){:is(a.panel,.catalog-card,.gallery-card):hover{border-color:var(--surface-accent);box-shadow:0 5px 14px #163c4b10,0 16px 26px -15px #163c4b55}}
@media(max-width:800px){
 :is(.portal-welcome,.panel,.auth-card,.catalog-card,.service-card,.product-card,.work-card,.gallery-card){border-radius:22px}
 :is(.portal-welcome,.panel,.auth-card,.catalog-card,.service-card,.product-card,.work-card,.gallery-card)::before{inset:6px;border-radius:50% 50% 16px 16px / 13px 13px 16px 16px}
 .portal-welcome,.panel,.auth-card{padding-top:28px}
}

/* Product image viewer: the same identity, restrained around original images. */
.product-lightbox{
 isolation:isolate;border:1.5px solid #239eb5;border-radius:24px;
 padding:30px 20px 16px;background:linear-gradient(145deg,#f5fbfc,#eaf5f6);
 box-shadow:0 24px 90px #03272e66,0 4px 16px #03272e24;
}
.product-lightbox::before{
 content:"";position:absolute;top:7px;inset-inline:8px;height:25px;
 border-top:4px solid #239eb5;border-radius:50% 50% 0 0 / 17px 17px 0 0;
 pointer-events:none;background:linear-gradient(180deg,#ffffff80,transparent);z-index:-1;
}
.product-lightbox .lightbox-heading{padding:0 4px 14px;margin-bottom:16px;border-bottom:1px solid #cfe3e7}
.product-lightbox .lightbox-heading h2{font-size:20px;line-height:1.6;color:#10495a}
.product-lightbox .lightbox-heading button{flex-shrink:0;border-color:#a5cdd3;background:#fff;color:#07515a;cursor:pointer;transition:background .18s,box-shadow .18s}
.product-lightbox .lightbox-heading button:hover{background:#dceff1;box-shadow:0 3px 12px #10495a18}
.product-lightbox .image-zoom-toggle{border:1px solid #9cbfc8;border-radius:10px;background:#fff;color:#10495a;font-weight:700;box-shadow:0 3px 9px #10495a08}
.product-lightbox [data-image-zoom]{background:#07515a;color:#fff;border-color:#07515a}
.product-lightbox [data-image-zoom][aria-pressed=true]{background:#087f91;border-color:#087f91}
.product-lightbox .image-zoom-toggle:hover{background:#e0f1f3;color:#10495a}
.product-lightbox [data-image-counter]{display:inline-grid;place-items:center;min-width:58px;min-height:40px;border-radius:9px;background:#e0eef1;color:#10495a;font-weight:700;font-variant-numeric:tabular-nums}
.product-lightbox .image-viewport,.product-lightbox>img{border:1px solid #ccdde1;border-radius:12px;background:#eef2f3}
.product-lightbox>.text-link{display:flex;align-items:center;justify-content:flex-end;padding:8px 4px;margin-top:8px;font-weight:700}
.product-lightbox :focus-visible{outline:3px solid #00a6bc;outline-offset:3px}
@media(max-width:760px){
 .product-lightbox{padding:26px 12px 12px;border-radius:20px;max-height:94dvh}
 .product-lightbox .lightbox-heading{gap:12px;padding-bottom:12px;margin-bottom:12px}
 .product-lightbox .lightbox-heading h2{font-size:17px}
 .product-lightbox .wtc-image-controls{display:grid;grid-template-columns:1fr auto 1fr;gap:8px}
 .product-lightbox .wtc-image-controls [data-image-zoom]{grid-column:1/-1}
 .product-lightbox .image-zoom-toggle{min-height:44px;font-size:12px;padding:8px}
 .product-lightbox .image-viewport{max-height:58dvh}
 .product-lightbox>.text-link{font-size:12px}
}

/* Fit mode reserves room for the viewer title and controls. Actual-size mode remains scrollable. */
.product-lightbox .image-viewport:not(.is-zoomed) img,.product-lightbox>img{max-height:calc(94dvh - 240px)}
@media(max-width:760px){.product-lightbox .image-viewport:not(.is-zoomed) img,.product-lightbox>img{max-height:calc(94dvh - 290px)}}
