/* Reuse category cards without the old fixed empty content rows. */
.pc-catalog.ph-catalog-home{max-width:none;padding:0;margin:0}
.ph-catalog-home .ph-offer-rail.pc-grid{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:calc((100% - 84px)/4.25);gap:20px;align-items:stretch;padding:4px 2px 16px;scroll-snap-type:x mandatory}
.ph-catalog-home .ph-offer-rail.pc-grid .product-card{height:auto;min-width:0;border:1px solid #e8dec9;border-radius:14px;background:#fff;scroll-snap-align:start}
.ph-catalog-home .ph-offer-rail.pc-grid .product-card>a{display:flex;flex-direction:column;height:100%;padding:0}
body.pidev-public .pc-catalog.ph-catalog-home .pc-grid .product-card .product-image{height:auto!important;aspect-ratio:1!important;margin:0 0 8px;overflow:hidden;flex-shrink:0;border-radius:0;background:#fff}
.ph-catalog-home .ph-offer-rail .product-image img{object-fit:contain;transform:none!important;transition:none!important}
.ph-catalog-home .ph-offer-rail.pc-grid .product-card h3{font-size:15px!important;line-height:1.45;min-height:44px;margin:0 16px 10px;font-weight:600}
.ph-catalog-home .ph-offer-rail.pc-grid .product-card p{font-size:10px;margin:6px 16px;letter-spacing:.35px}
.ph-catalog-home .pc-product-colors{margin:0 16px 5px;min-height:20px}
.ph-catalog-home .pc-product-characteristics,.ph-catalog-home .pc-product-grammage{margin-inline:16px;font-size:12px;line-height:1.5}
.ph-catalog-home .ph-offer-rail.pc-grid .pc-marking{margin:12px 16px;gap:5px;flex-wrap:wrap}
.ph-catalog-home .ph-offer-rail.pc-grid .product-bottom{margin:auto 16px 12px;padding-top:14px;font-size:15px;line-height:1.4}
.ph-catalog-home .pc-composition-note{margin-bottom:10px!important}
.ph-catalog-home .ph-section-heading h2{font-size:25px!important;line-height:1.25}
.ph-catalog-home .ph-section-heading p{font-size:14px;line-height:1.5}
.ph-catalog-home .section{padding-block:36px}
@media(max-width:1100px){.ph-catalog-home .ph-offer-rail.pc-grid{grid-auto-columns:calc((100% - 40px)/3.15)}}
@media(max-width:760px){.ph-catalog-home .ph-offer-rail.pc-grid{grid-auto-columns:76%;gap:14px}.ph-catalog-home .section{padding-block:25px}.ph-catalog-home .ph-section-heading h2{font-size:21px!important}}

.ph-catalog-home .ph-card-details{margin:0 16px 8px;min-height:68px;font-size:12px;line-height:1.5}
.ph-catalog-home .ph-card-details .pc-product-characteristics,.ph-catalog-home .ph-card-details .pc-product-grammage{margin:3px 0;font-size:12px!important;line-height:1.5}
.ph-catalog-home .ph-print-option{font-size:12px;line-height:1.5;margin:3px 0;color:#65645e;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ph-catalog-home .ph-print-option strong{font-size:inherit}

.ph-slide-black-friday img{object-fit:contain!important;object-position:center;background:#050505}

/* Compact home cards; keep campaign colours outside the white product cards. */
@media(min-width:1101px){.ph-catalog-home .ph-offer-rail.pc-grid{grid-auto-columns:calc((100% - 80px)/6);gap:16px}}
body.pidev-public .pc-catalog.ph-catalog-home .pc-grid .product-card .product-image{height:180px!important;aspect-ratio:auto!important;margin-bottom:6px}
.ph-catalog-home .ph-offer-rail.pc-grid .product-card h3{min-height:0;margin:0 12px 5px;font-size:13px!important;line-height:18px}
.ph-catalog-home .ph-offer-rail.pc-grid .product-card p{margin:3px 12px;font-size:9px}
.ph-catalog-home .pc-product-colors{margin:3px 12px 5px;gap:4px}
.ph-catalog-home .pc-product-color{width:15px;height:15px}
.ph-catalog-home .ph-card-details{min-height:0;margin:0 12px 6px;font-size:11px;line-height:15px}
.ph-catalog-home .ph-card-details .pc-product-characteristics,.ph-catalog-home .ph-card-details .pc-product-grammage{font-size:11px!important;line-height:15px;margin:2px 0}
.ph-catalog-home .ph-print-option{font-size:10px;line-height:14px;margin:2px 0}
.ph-catalog-home .ph-offer-rail.pc-grid .pc-marking{margin:4px 12px 6px;gap:3px}
.ph-catalog-home .pc-marking>span{font-size:9px;padding:3px 5px;min-height:20px}
.ph-catalog-home .ph-offer-rail.pc-grid .product-bottom{margin:auto 12px 6px;padding-top:5px;font-size:13px;line-height:18px;gap:5px!important}
.ph-catalog-home .product-bottom .ph-brand-logo{max-width:48px;max-height:25px}
.ph-catalog-home .pc-composition-note{margin-top:0!important;margin-bottom:4px!important;height:12px!important;min-height:12px!important;font-size:8px!important}
.ph-catalog-home .pc-composition-note[aria-hidden=true]{display:none!important}
.ph-catalog-home .ph-black-friday{background:#080808;color:#fff}
.ph-catalog-home .ph-black-friday .ph-section-heading h2,.ph-catalog-home .ph-black-friday .ph-section-heading>.text-link{color:#fff}
.ph-catalog-home .ph-black-friday .ph-rail-controls button{background:#fff;color:#20211f;border-color:#fff}
.ph-catalog-home .ph-black-friday .product-card{color:#20211f;border-color:#fff}
@media(max-width:760px){body.pidev-public .pc-catalog.ph-catalog-home .pc-grid .product-card .product-image{height:180px!important}.ph-catalog-home .ph-offer-rail.pc-grid{grid-auto-columns:72%}}

/* Bound each content row so a long off-screen title cannot stretch the whole rail. */
.ph-catalog-home .ph-offer-rail.pc-grid .product-card>a{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:32px 150px 18px 36px 24px 40px 28px 78px 12px;align-content:start;height:auto}
body.pidev-public .pc-catalog.ph-catalog-home .pc-grid .product-card .pc-product-badges{grid-row:1;min-height:0!important;margin:5px 12px 0!important;overflow:hidden}
body.pidev-public .pc-catalog.ph-catalog-home .pc-grid .product-card .product-image{grid-row:2;height:150px!important;margin:0}
.ph-catalog-home .ph-offer-rail.pc-grid .product-card p{grid-row:3}
.ph-catalog-home .ph-offer-rail.pc-grid .product-card h3{grid-row:4;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.ph-catalog-home .pc-product-colors{grid-row:5;overflow:hidden;flex-wrap:nowrap}
.ph-catalog-home .ph-card-details{grid-row:6;overflow:hidden}
.ph-catalog-home .ph-offer-rail.pc-grid .pc-marking{grid-row:7;overflow:hidden;flex-wrap:nowrap}
.ph-catalog-home .ph-offer-rail.pc-grid .product-bottom{grid-row:8;margin:2px 12px 0;align-self:end;padding:0}
.ph-catalog-home .pc-composition-note{grid-row:9}

/* Place the campaign label at the top of the white card, above the photo. */
.ph-catalog-home .ph-black-friday .product-card{position:relative}
body.pidev-public .pc-catalog.ph-catalog-home .ph-black-friday .pc-grid .product-card .product-image{position:static!important}
.ph-catalog-home .ph-black-friday .bf-image-badge{top:9px!important;left:12px!important}

/* Larger campaign photos, keeping a compact heading and unchanged details. */
.ph-catalog-home .ph-black-friday .ph-offer-rail.pc-grid .product-card>a{grid-template-rows:12px 200px 18px 36px 24px 40px 28px 78px 12px}
body.pidev-public .pc-catalog.ph-catalog-home .ph-black-friday .pc-grid .product-card .product-image{height:200px!important}

/* All home product rails share the campaign's image and card dimensions. */
.ph-catalog-home .ph-offer-rail.pc-grid .product-card{position:relative}
.ph-catalog-home .ph-offer-rail.pc-grid .product-card>a{grid-template-rows:12px 200px 18px 36px 24px 40px 28px 78px 12px}
body.pidev-public .pc-catalog.ph-catalog-home .pc-grid .product-card .product-image{height:200px!important;position:static!important}
body.pidev-public .pc-catalog.ph-catalog-home .pc-grid .product-card .pc-product-badges{position:absolute;top:9px;left:12px;margin:0!important;overflow:visible;z-index:3;max-width:calc(100% - 24px)}
.ph-catalog-home .bf-image-badge{top:9px!important;left:12px!important}
.ph-catalog-home .product-card:has(.pc-product-label) .bf-image-badge{top:46px!important}

/* Override the catalogue's in-flow badge positioning only on home rails. */
body.pidev-public .pc-catalog.ph-catalog-home .pc-grid .product-card .pc-product-badges{position:absolute!important;inset:12px auto auto 12px!important;margin:0!important;min-height:0!important;gap:6px!important;z-index:3;overflow:visible;flex-wrap:nowrap}
.ph-catalog-home .product-card:has(.pc-product-label:nth-child(2)) .bf-image-badge{top:80px!important}
.ph-catalog-home .product-card:has(.pc-product-label:nth-child(3)) .bf-image-badge{top:114px!important}

/* The Black Friday rail displays only its campaign badge. */
body.pidev-public .pc-catalog.ph-catalog-home .ph-black-friday .pc-grid .product-card .pc-product-badges{display:none!important}
body.pidev-public .pc-catalog.ph-catalog-home .ph-black-friday .pc-grid .product-card .bf-image-badge{top:9px!important;left:12px!important}

/* Coupon is a dedicated row below the photograph on every home rail. */
body.pidev-public .pc-catalog.ph-catalog-home .ph-offer-rail.pc-grid .product-card>a{grid-template-rows:200px 32px 18px 36px 24px 40px 28px 58px 12px!important}
body.pidev-public .pc-catalog.ph-catalog-home .pc-grid .product-card .product-image{grid-row:1!important}
body.pidev-public .pc-catalog.ph-catalog-home .pc-grid .product-card .pc-black25-code{grid-row:2!important;align-self:center;justify-self:start;margin:0 12px!important;overflow:visible;position:static!important}
body.pidev-public .pc-catalog.ph-catalog-home .pc-grid .product-card .bf-image-badge{grid-row:2!important;position:static!important;inset:auto!important;align-self:center;justify-self:start;margin:0 12px!important;padding:5px 8px!important;font-size:11px!important;width:fit-content;max-width:calc(100% - 24px);box-sizing:border-box}

/* Mobile descriptive cards need content-driven rows to prevent text overlap. */
@media(max-width:760px){
    body.pidev-public .pc-catalog.ph-catalog-home .ph-offer-rail.pc-grid .product-card:has(.pc-panel-tips){align-self:stretch}
    body.pidev-public .pc-catalog.ph-catalog-home .ph-offer-rail.pc-grid .product-card:has(.pc-panel-tips)>a{display:flex;flex-direction:column;height:100%!important}
    body.pidev-public .pc-catalog.ph-catalog-home .ph-offer-rail.pc-grid .product-card:has(.pc-panel-tips) h3{display:block;overflow:visible;min-height:0}
    body.pidev-public .pc-catalog.ph-catalog-home .ph-offer-rail.pc-grid .product-card .pc-panel-tips{height:auto;min-height:0;flex-shrink:0}
    body.pidev-public .pc-catalog.ph-catalog-home .ph-offer-rail.pc-grid .product-card:has(.pc-panel-tips) .ph-card-details:empty{display:none}
}
