﻿/* Living layer (31/10/2026), story layer: Product page (shop_product.php). Owner: product agent. */
/* Corpus: DEP-01 the product on the matte with one contact shadow, CMP-01 one break (phone: the product crosses the top edge of
   the buy card; wider: the edge of its photo panel toward the buy column), MOT-01 the main photo paints at once and never moves,
   MOT-04 the add answers within 200 ms, LIV-05 real stock, CMP-13 no sticky column on the phone. TRN-02 hook: data-lv-hero on
   the main photo (markup). Price, stock, delivery and « Ajouter au panier » stay on the grid, 16 px clear of the product. */

/* DEP-01 gallery: shop_product.php marks each slide .lv-object (cutout: packshot on white, multiplied onto the matte, its shadow
   under the product's base via --lv-shadow-*) or .lv-scene (a full photo, kept as it is in the plain frame). */
.ta-gallery-stage:has(>.ta-gallery-track>.lv-object){background:var(--lv-surface)}
.ta-gallery-thumbs .lv-object{background:var(--lv-surface)}
.ta-gallery-slide.lv-object::after{left:calc(var(--lv-cx,50) * 1% - var(--lv-shadow-width,58%) / 2)}
/* A scene photo fills its square like the card's (catalogue.css): the square thumbnail it loads over is that same centre crop,
   so it no longer shows as bands above and below a wide photo. Small originals keep their own size. */
.ta-gallery-slide.lv-scene img:not(.is-lowres){object-fit:cover}
/* A packshot whose product touches the edge of a non-square photo fills its square too (.lv-fill, set from its measured box): the
   cut then lies on the frame's edge instead of in the air on the matte. */
.ta-gallery-slide.lv-fill img{object-fit:cover}

/* The page's object (a single cutout photo, .is-lv-object): the slide is the product's square; the photo and its shadow are drawn at
   the object level and multiply onto what lies under them (matte, card or page), so the packshot's white never shows. The photo
   lets clicks through (it is not a control); the share button stays above it. */
.ta-pdp.is-lv-object .ta-gallery-stage,.ta-pdp.is-lv-object .ta-gallery-track{overflow:visible}
.ta-pdp.is-lv-object .ta-gallery-slide{flex:none;width:min(100%,var(--ta-natural,100%));margin:auto;isolation:auto;background:none}
.ta-pdp.is-lv-object .ta-gallery-slide img,.ta-pdp.is-lv-object .ta-gallery-slide img.is-lowres{z-index:var(--z-object);width:100%;height:100%;max-width:none;max-height:none;pointer-events:none}
.ta-pdp.is-lv-object .ta-gallery-slide::after{z-index:var(--z-object);mix-blend-mode:multiply}
.ta-pdp.is-lv-object .ta-share{z-index:var(--z-control)}
/* TRN-02 arrival (html.lv-from-card, only while the card photo travels here): the named slide is captured on its own, so it carries
   its matte (the panel's shape from 761 px) and the packshot's white never flashes. */
html.lv-from-card .ta-pdp.is-lv-object .ta-gallery-slide{background:var(--lv-surface)}
@media(min-width:761px){html.lv-from-card .ta-pdp.is-lv-object .ta-gallery-slide{background:linear-gradient(90deg,var(--lv-surface) calc(var(--lv-panel,100) * 1%),var(--ta-cream,#fbfaf6) 0)}}

/* CMP-01 on the phone (.is-lv-break-card): the photo panel is the full-width matte; the buy card (the page's cream, rounded top)
   rises over its lower part so that the product's base, 22 % of its height, stands on the card. The card's text starts 16 px
   under the product. Lengths follow the square: --lv-unit = 1 % of it (page width + the 2 × 15 px gutters, or a small photo's
   doubled size). Not when the product is cut by its photo's bottom edge: then it stands on the matte above the card. */
@media(max-width:760px){
.ta-pdp.is-lv-object{--lv-unit:min(1% + .3px,var(--lv-natural,9999px)/100)}
.ta-pdp.is-lv-object .ta-gallery-stage{background:var(--lv-surface)}
.ta-pdp.is-lv-object .ta-gallery-track{aspect-ratio:1}
.ta-pdp.is-lv-break-card .ta-pdp-info{position:relative;top:auto!important;margin:calc((var(--lv-sheet) - 50) * var(--lv-unit) - 50% - 31px) -15px 0;padding:calc((var(--lv-b) - var(--lv-sheet)) * var(--lv-unit) + 16px) 15px 0;border-radius:22px 22px 0 0;background:var(--ta-cream,#fbfaf6);box-shadow:0 -14px 24px -18px rgb(70 52 28/.35)}
.ta-pdp.is-lv-break-card .ta-shop-eyebrow a:focus-visible{position:relative;z-index:var(--z-control)}
}
/* CMP-01 wider (.is-lv-break-panel): the photo panel ends before the product does; the product crosses its edge toward the buy
   column by 22 % of its width (--lv-panel) and stays inside its own column. Without it the panel is the whole square. The square
   fits the first screen, so the object stands with its shadow in view. The stage is painted in the page colour: .page-wrapper is
   its own blending group, the multiply needs an opaque backdrop. */
@media(min-width:761px){
.ta-pdp.is-lv-object .ta-gallery-stage{border:0;background:var(--ta-cream,#fbfaf6)}
.ta-pdp.is-lv-object .ta-gallery-slide{width:min(100%,var(--ta-natural,100%),max(340px,100vh - 180px));margin:0}
.ta-pdp.is-lv-object .ta-gallery-slide::before{content:"";position:absolute;top:0;bottom:0;left:0;right:calc((100 - var(--lv-panel,100)) * 1%);border-radius:16px;background:var(--lv-surface);box-shadow:inset 0 0 0 1px rgb(70 52 28/.07)}
.ta-pdp.is-lv-object .ta-share{right:calc(100% - var(--lv-panel,100) * min(1%,var(--lv-natural,9999px)/100,max(340px,100vh - 180px)/100) + 12px)}
}

/* No photo yet: the team's placeholder label (css/living/catalogue.css sets .lv-ph-*): the department's tinted matte
   (ta_lv_tint) in a thin inset frame, the name's key word in large Cormorant italic (decorative, the name is the h1), the
   category, « Photo à venir ». Nothing is drawn that could pass for the product. The phone's media column is already full width. */
.ta-pdp-nophoto.lv-placeholder{gap:2px;border-color:rgb(61 51 38/.1)}
.ta-pdp-nophoto.lv-placeholder::before{content:"";position:absolute;inset:10px;border:1px solid rgb(61 51 38/.12);border-radius:10px;pointer-events:none}
.ta-pdp-nophoto .lv-ph-mark{margin:0 0 6px;line-height:1}
.ta-pdp-nophoto.lv-placeholder strong{color:#3d3326}
.ta-pdp-nophoto.lv-placeholder>span:last-child:not([class]){color:#5d5242;font-size:14px}
.ta-pdp-nophoto .ta-pdp-nophoto-tag{top:20px;left:20px;background:rgb(255 255 255/.8);color:#3d3326}
@media(max-width:760px){.ta-pdp-media .ta-pdp-nophoto{margin:0;padding:48px 24px 28px}.ta-pdp-nophoto.lv-placeholder strong{font-size:22px}}

/* Small product photos in the buy box and the share sheet: the same object look (cutouts), or the tinted label's key word. */
.ta-sub-photo,.ta-share-photo{display:block;flex:none;overflow:hidden;border:1px solid #e6e1d4;border-radius:8px;background:#fff}
.ta-sub-photo{width:56px;height:56px}.ta-share-photo{width:64px;height:64px}
.ta-sub-photo.lv-object,.ta-share-photo.lv-object{background:var(--lv-surface)}
.ta-substitutes .ta-sub-photo img,.ta-share-product .ta-share-photo img{display:block;width:100%;height:100%;border:0;border-radius:0;background:none;object-fit:contain}
.ta-substitutes .ta-sub-placeholder.lv-placeholder{display:flex;align-items:center;justify-content:center;overflow:hidden;border-color:rgb(61 51 38/.1)}
/* « Vous avez consulté » (built by teranga-shop.js): a packshot (.lv-cutout, set by js/living/product.js from the kind this page
   saves with the entry) stands on the same matte as in the mini cart; a full photo, or an entry saved before, stays plain. A plain
   matte instead of the drawn jar when there is no photo. */
.ta-pdp~.ta-recent .ta-recent-list a.lv-cutout{position:relative;isolation:isolate}
.ta-pdp~.ta-recent .ta-recent-list a.lv-cutout::before{content:"";position:absolute;z-index:-1;top:0;left:0;width:150px;height:150px;border-radius:10px;background:var(--lv-surface)}
.ta-pdp~.ta-recent .ta-recent-list a.lv-cutout img{background:none;mix-blend-mode:multiply}
.ta-pdp~.ta-recent .ta-recent-placeholder{background:#f1e7d6}

/* LIV-05: « Encore N en stock » (managed stock, 1 to 3 left) is availability: blue, a little firmer than « En stock ». */
.ta-pdp-info .ta-shop-stock.is-low{color:var(--ta-blue-800);font-weight:700}

/* MOT-04: after « Ajouter au panier » (or « Prévenez-moi ») the message answers within the respond token (the substitutes'
   « ✓ Ajouté » is the card's, catalogue.css). Reduced motion: the same text, at once. */
@media(prefers-reduced-motion:no-preference){.ta-product-buy .ta-shop-feedback:not(:empty),.ta-stock-alert .ta-shop-feedback:not(:empty){animation:lv-pdp-respond var(--motion-duration-respond) var(--motion-ease-out)}}
@keyframes lv-pdp-respond{from{opacity:0;translate:0 6px}}

/* The phone's fixed buy bar never covers the focused control (WCAG 2.4.11): the page scrolls it clear. */
@media(max-width:760px){html:has(>body.ta-pdp-buyable){scroll-padding-bottom:96px}}
/* Narrow phones (320 px): the bar's stepper and gaps give way so « Ajouter au panier » keeps two lines at most. */
@media(max-width:359px){.ta-pdp-buyable .ta-product-buy .ta-buy-row{gap:8px}.ta-pdp-buyable .ta-product-buy .ta-qty button{width:30px}.ta-shop-shell .ta-product-buy .ta-qty input{width:34px}.ta-pdp-buyable .ta-product-buy .ta-buy-button{padding-left:12px;padding-right:12px;font-size:15px!important}}
