/* Shared standard product gallery; preserve the existing site header and footer. */
.product-page main {max-width:1680px}
.product-page main>.product-detail {min-height:calc(100svh - var(--site-header-height,86px));padding:38px 0 44px;width:100%}
.product-detail-layout {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(32px,4vw,64px);align-items:start;width:100%;max-width:1520px;margin:auto}
.piece-gallery,.piece-information {min-width:0}
.piece-gallery-stage {position:relative;overflow:hidden;aspect-ratio:1/1;border:4px solid #c5a47a;border-radius:25px;background:#eee2cd;box-shadow:0 0 20px #49332418;touch-action:pan-y}
.piece-main-image {display:block;width:100%;height:100%;object-position:50% 35%;user-select:none}
.product-page .piece-gallery-arrow {position:absolute;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:0;border-radius:50%;border:1px solid #ad8e67;background:#f4ead8ed;color:#333;box-shadow:0 2px 8px #3332;cursor:pointer}
.piece-gallery-arrow.previous {left:12px}
.piece-gallery-arrow.next {right:12px}
.piece-gallery-arrow svg {width:24px;height:24px}
.piece-gallery-arrow.next svg {transform:rotate(180deg)}
.piece-gallery-arrow:hover {background:#fff3df}
.piece-photo-count,.piece-photo-note {position:absolute;font-size:14px;line-height:1.3;padding:5px 10px;border-radius:999px;pointer-events:none}
.piece-photo-count {right:12px;top:12px;color:white;background:#333d}
.piece-photo-note {bottom:12px;left:12px;background:#f4ead8ed;color:#333;max-width:calc(100% - 24px)}
.piece-thumbnails {display:flex;gap:12px;margin-top:16px;overflow-x:auto;padding:3px 3px 10px;scrollbar-width:thin}
.product-page .piece-thumbnail {display:block;flex:0 0 calc((100% - 36px)/4);min-width:74px;aspect-ratio:1/1;min-height:0;padding:0;overflow:hidden;border:2px solid #c5a47a;border-radius:13px;background:#eee2cd;cursor:pointer}
.piece-thumbnail img {display:block;width:100%;height:100%;object-fit:cover;object-position:center}
.product-page .piece-thumbnail[aria-pressed="true"] {border:3px solid var(--brick);outline:1px solid var(--brick);outline-offset:1px}
.product-page main .piece-information h1 {font-size:clamp(32px,3vw,46px);line-height:1.15;color:var(--brick);letter-spacing:-.5px;margin:0 0 24px}
.piece-information h1::after {content:"";display:block;width:100%;max-width:100%;height:4px;border-radius:999px;background:var(--charcoal);margin-top:20px}
.product-page main .piece-description {font-size:22px;line-height:1.55;margin:0 0 18px}
.product-page main .piece-home-note {font-size:19px;line-height:1.5;margin:0 0 22px}
.piece-detail-tags {display:flex;flex-wrap:wrap;gap:8px;margin-bottom:28px}
.piece-detail-tags>span {font-family:var(--control);font-size:15px;font-weight:700;line-height:1.4;padding:7px 10px;border:1px solid #c0a17b;border-radius:999px;background:#e5d2b5;color:#333}
.piece-option-note {padding:20px 22px;background:#f4ead8;border:1px solid #c4ab89;border-radius:18px;margin-bottom:28px}
.product-page main .piece-option-note h2 {font-size:21px;color:var(--brick);line-height:1.3;letter-spacing:0;margin:0 0 10px}
.product-page main .piece-option-note p {font-size:18px;line-height:1.5;margin:0}
.piece-detail-actions {display:flex;flex-direction:column;gap:12px}
.piece-detail-actions>.button {width:100%;justify-content:center;text-align:center}
.product-page .piece-whatsapp {background:#12804f;border-color:#12804f;color:white}
.product-page .piece-whatsapp:hover {background:#0c653d;border-color:#0c653d}
.piece-whatsapp svg {width:28px;height:28px;flex:none}
.product-page .piece-back {background:#e7d7bf;color:#333;border-color:#927959}
.product-page .piece-back:hover {background:#d7c19f}
@media(max-width:1000px) and (min-width:741px) {
  .product-detail-layout {gap:28px;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}
  .product-page main .piece-description {font-size:20px}
}
@media(max-width:740px) {
  .product-page main>.product-detail {min-height:0;padding:28px 0 38px}
  .product-detail-layout {grid-template-columns:minmax(0,1fr);gap:30px;max-width:580px}
  .piece-gallery-stage {border-width:3px;border-radius:20px}
  .product-page main .piece-information h1 {font-size:34px}
  .product-page main .piece-description {font-size:20px}
  .piece-thumbnails {gap:8px;margin-top:12px}
  .product-page .piece-thumbnail {flex-basis:calc((100% - 24px)/4)}
}

/* Compact square galleries; action row spans both columns. */
.product-page main>.product-detail {padding:24px 0 28px}
.product-detail-layout {grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);max-width:1320px;gap:22px 64px;align-items:center}
.piece-gallery {width:min(100%,520px,calc((100svh - var(--site-header-height,86px) - 190px)/1.22));justify-self:start}
.product-page main .piece-information h1 {text-align:center}
.piece-information h1::after {margin-left:auto;margin-right:auto}
.piece-thumbnails {margin-top:10px;gap:10px}
.product-page .piece-thumbnail {flex-basis:calc((100% - 40px)/5);min-width:56px}
.piece-detail-tags {justify-content:center;margin:8px 0 0;gap:6px}
.piece-detail-tags>span {font-size:13px;padding:5px 9px}
.piece-detail-actions {grid-column:1/-1;flex-direction:row;justify-content:center;gap:12px}
.piece-detail-actions>.button {width:auto;flex:1;white-space:nowrap}
.product-page main .piece-home-note {margin-bottom:0}
@media(max-width:740px) {
 .product-detail-layout {grid-template-columns:minmax(0,1fr);gap:24px}
 .piece-gallery {width:min(100%,440px);justify-self:center}
 .piece-detail-actions {flex-wrap:wrap}
 .piece-detail-actions>.button {flex:1 1 180px}
}

/* Africa-only layout trial: keep controls inside the details column. */
.product-detail.africa-layout .product-detail-layout {max-width:1440px;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:clamp(36px,4vw,70px);align-items:stretch}
.africa-layout .piece-gallery {width:min(100%,630px,calc((100svh - var(--site-header-height,86px) - 90px)/1.22));justify-self:start}
.africa-layout .piece-information {display:flex;flex-direction:column;justify-content:center;padding:12px 0}
.africa-layout .piece-detail-tags {justify-content:flex-start;margin:24px 0 20px}
.africa-layout .piece-option-note {background:#eddfc5;border-color:#c5ab85;margin-bottom:26px;padding:22px 24px}
.africa-layout .piece-detail-actions {display:flex;flex-direction:row;gap:9px;grid-column:auto;margin-top:0}
.africa-layout .piece-detail-actions>.button {flex:1 1 auto;padding:10px 12px;font-size:15px;white-space:nowrap;min-width:0}
.africa-layout .piece-whatsapp svg {width:21px;height:21px}
@media(max-width:1100px) and (min-width:741px) {
 .africa-layout .piece-detail-actions {flex-wrap:wrap}
 .africa-layout .piece-detail-actions>.button {flex:1 1 140px}
}
@media(max-width:740px) {
 .product-detail.africa-layout .product-detail-layout {grid-template-columns:minmax(0,1fr);gap:26px}
 .africa-layout .piece-gallery {width:min(100%,440px);justify-self:center}
 .africa-layout .piece-information {padding:0}
 .africa-layout .piece-detail-actions {flex-wrap:wrap}
 .africa-layout .piece-detail-actions>.button {flex:1 1 150px}
}

/* Africa: heading at top, copy between tags and options, actions level with thumbnails. */
.africa-layout .piece-information {display:grid;grid-template-rows:auto auto 1fr auto auto;padding:0;align-items:start}
.product-page main .africa-layout .piece-information h1 {margin-bottom:16px}
.africa-layout .piece-detail-tags {justify-content:center;margin:0 0 20px}
.africa-layout .piece-copy-block {align-self:center;padding:16px 0 24px}
.africa-layout .piece-option-note {margin-bottom:0}
.africa-layout .piece-detail-actions {align-self:center;align-items:center;min-height:calc((min(630px,(100svh - var(--site-header-height,86px) - 90px)/1.22) - 40px)/5 + 23px)}
@media(max-width:740px) {
 .africa-layout .piece-information {display:flex;flex-direction:column;align-items:stretch}
 .africa-layout .piece-copy-block {padding:12px 0 24px}
 .africa-layout .piece-detail-actions {min-height:0;margin-top:24px;align-self:stretch}
}

.africa-layout .piece-detail-tags {justify-content:flex-start}
.africa-layout .piece-copy-block {align-self:start;padding:8px 0 24px}
.product-page main .africa-layout .piece-description {font-size:21px;line-height:1.5;margin-bottom:0}
.product-page main .africa-layout .piece-size-list {font-size:18px;line-height:1.5;margin:10px 0 14px;padding-left:24px}
.africa-layout .piece-size-list li+li {margin-top:5px}
.product-page main .africa-layout .piece-option-note p {font-size:17px;line-height:1.45}
.africa-layout .piece-option-note {padding:18px 22px}

/* Africa reference list and quiet thumbnail scrollbar. */
.product-page main .africa-layout .piece-size-list,
.product-page main .africa-layout .piece-size-list li,
.product-page main .africa-layout .piece-size-list strong {font-size:17px;line-height:1.45}
.africa-layout .piece-thumbnails {scrollbar-width:thin;scrollbar-color:var(--brick) #efe3cd}
.africa-layout .piece-thumbnails::-webkit-scrollbar {height:6px}
.africa-layout .piece-thumbnails::-webkit-scrollbar-track {background:#efe3cd;border-radius:999px}
.africa-layout .piece-thumbnails::-webkit-scrollbar-thumb {background:var(--brick);border-radius:999px}
.africa-layout .piece-thumbnails::-webkit-scrollbar-button {display:none;width:0;height:0}

/* Custom rounded rail: independent of operating-system scrollbar buttons. */
.africa-layout .piece-thumbnails {scrollbar-width:none;padding-bottom:4px}
.africa-layout .piece-thumbnails::-webkit-scrollbar {display:none}
.africa-layout .piece-rail-slider {display:block;appearance:none;-webkit-appearance:none;box-sizing:border-box;width:100%;height:16px;margin:0;padding:0;border:0;outline-offset:3px;background:transparent;cursor:pointer}
.africa-layout .piece-rail-slider[hidden] {display:none}
.piece-rail-slider::-webkit-slider-runnable-track {height:6px;background:#efe3cd;border-radius:999px}
.piece-rail-slider::-moz-range-track {height:6px;background:#efe3cd;border-radius:999px}
.piece-rail-slider::-webkit-slider-thumb {appearance:none;-webkit-appearance:none;width:var(--slider-thumb-width,100px);height:6px;border:0;border-radius:999px;background:var(--brick)}
.piece-rail-slider::-moz-range-thumb {width:var(--slider-thumb-width,100px);height:6px;border:0;border-radius:999px;background:var(--brick)}
.africa-layout .piece-detail-actions>.piece-back,.africa-layout .piece-detail-actions>a:not(.piece-whatsapp) {flex:0 1 auto;padding-inline:10px}
.africa-layout .piece-detail-actions>.piece-whatsapp {flex:1 1 auto;font-size:14px;padding-inline:10px;gap:6px}

/* Equal content padding for the Africa action buttons. */
.africa-layout .piece-detail-actions {justify-content:center;gap:10px}
.africa-layout .piece-detail-actions>.button,
.africa-layout .piece-detail-actions>.piece-back,
.africa-layout .piece-detail-actions>a:not(.piece-whatsapp),
.africa-layout .piece-detail-actions>.piece-whatsapp {
 flex:0 0 auto;width:auto;padding:10px 14px;font-size:14px;line-height:1.3;min-height:42px;gap:8px;box-sizing:border-box;
}
@media(max-width:1500px) and (min-width:741px) {
 .africa-layout .piece-detail-actions {flex-wrap:wrap}
}
@media(max-width:740px) {
 .africa-layout .piece-detail-actions {flex-wrap:wrap}
}

/* Fill the options-panel width while sharing extra space equally. */
.africa-layout .piece-detail-actions {width:100%;justify-content:space-between;box-sizing:border-box}
.africa-layout .piece-detail-actions>.button,
.africa-layout .piece-detail-actions>.piece-back,
.africa-layout .piece-detail-actions>a:not(.piece-whatsapp),
.africa-layout .piece-detail-actions>.piece-whatsapp {
 flex:1 1 auto;padding:12px 14px;min-height:46px;
}
@media(min-width:1101px) {
 .africa-layout .piece-detail-actions {flex-wrap:nowrap}
}

/* Larger action labels with comfortable edge spacing. */
.africa-layout .piece-detail-actions>.button,
.africa-layout .piece-detail-actions>.piece-back,
.africa-layout .piece-detail-actions>a:not(.piece-whatsapp),
.africa-layout .piece-detail-actions>.piece-whatsapp {
 font-size:16px;line-height:1.3;padding:12px 14px;min-height:46px;
}
