/* Fragmentos: an editorial gallery, using the existing room shell and palette. */
#fragmentos-room [hidden] { display:none!important; }
.fragmentos-hero::before { background:linear-gradient(90deg,#080807b8,#08080765 55%,#08080718),linear-gradient(0deg,#0d0d0c,transparent 30%); }
.fragmentos-welcome { left:12%; top:23%; max-width:660px; }
.fragmentos-welcome>p:not(.fragmentos-kicker) { font-size:clamp(1.15rem,1.65vw,1.65rem); line-height:1.7; color:#eee0ca; }
.fragmentos-kicker { font: .7rem/1.7 var(--body-font); letter-spacing:.22em; color:#dec7a4; margin-bottom:22px; }
.fragmentos-editorial { max-width:1240px; margin:auto; padding:60px 48px 90px; }
.fragmentos-opening { max-width:740px; margin:0 0 48px; }
.fragmentos-opening h2 { font-weight:400; font-size:clamp(2rem,3.5vw,3.4rem); line-height:1.2; margin:20px 0; }
.fragmentos-opening>p:last-child { font:1rem/1.85 var(--body-font); color:#c5baa9; }
.fragmentos-collections,#fragmentos-products { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:38px; }
.fragmentos-product-image { width:100%; aspect-ratio: .65; background-image:url('assets/fragmentos-piezas.png'); background-size:300% auto; background-repeat:no-repeat; background-color:#15120f; }
.piece-libro { background-position:0 0; }
.piece-cuaderno { background-position:50% 0; }
.piece-medallon { background-position:100% 0; }
.fragmentos-collection .fragmentos-product-image { aspect-ratio:1.08; background-position-y:34%; }
.fragmentos-collection h3,.fragmentos-card h3 { font-size:1.65rem; line-height:1.3; font-weight:400; margin:24px 0 16px; }
.fragmentos-collection>p,.fragmentos-card-description { font: .9375rem/1.85 var(--body-font); color:#c5baa9; }
.fragmentos-text-link { display:inline-block; color:#e3c499; padding:14px 0; font:1rem/1.5 var(--title-font); text-align:left; border-bottom:1px solid #95774f; }
#fragmentos-catalog { border-top:1px solid #b9925940; margin-top:85px; padding-top:70px; }
#fragmentos-filters { display:flex; flex-wrap:wrap; gap:8px 25px; margin-bottom:22px; }
#fragmentos-filters button,#fragmentos-views button { padding:12px 0; min-height:44px; color:#c0b3a0; font:.875rem/1.6 var(--body-font); border-bottom:1px solid transparent; }
#fragmentos-filters button[aria-pressed=true],#fragmentos-views button[aria-pressed=true] { color:#f0d4ab; border-bottom-color:#d2ad75; }
.fragmentos-note { font:.8125rem/1.8 var(--body-font); color:#bcb09f; }
#fragmentos-count { margin-bottom:35px; }
.fragmentos-card { min-width:0; }
.fragmentos-card .eyebrow { margin-top:24px; }
.fragmentos-card h3 { margin-top:14px; }
.fragmentos-state { color:#d6bd98; font:.8125rem/1.7 var(--body-font); margin:24px 0 10px; }
#fragmentos-detail { max-width:1250px; margin:auto; padding:30px 48px 90px; }
.fragmentos-detail-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:70px; margin-top:42px; }
.fragmentos-detail-copy h1 { font-size:clamp(2.3rem,3.5vw,3.8rem); font-weight:400; line-height:1.15; margin:20px 0 28px; }
.fragmentos-detail-copy>p:not(.eyebrow):not(.fragmentos-state):not(.fragmentos-note) { font:1rem/1.85 var(--body-font); color:#d1c5b4; }
.fragmentos-detail-copy h2 { font-size:1.6rem; font-weight:400; margin:38px 0 25px; }
#fragmentos-detail-specs { font:.9375rem/1.7 var(--body-font); }
#fragmentos-detail-specs dt { border-top:1px solid #b992593b; padding-top:18px; color:#dec39b; }
#fragmentos-detail-specs dd { margin:7px 0 20px; color:#c5baa9; }
#fragmentos-views { display:flex; flex-wrap:wrap; gap:26px; margin:12px 0; }
#fragmentos-detail-image.is-close { background-size:450% auto; background-position-y:35%; }
#fragmentos-detail-image.piece-libro.is-close { background-position-x:3%; }
#fragmentos-detail-image.piece-cuaderno.is-close { background-position-x:50%; }
#fragmentos-detail-image.piece-medallon.is-close { background-position-x:98%; }
#fragmentos-room :is(section,h1):focus { outline:none; }
@media(max-width:800px) {
 .fragmentos-editorial { padding:40px 26px 60px; }
 .fragmentos-collections,#fragmentos-products { grid-template-columns:1fr; gap:55px; }
 .fragmentos-collection,.fragmentos-card { max-width:480px; width:100%; margin:auto; }
 .fragmentos-collection .fragmentos-product-image { aspect-ratio:1.1; }
 .fragmentos-detail-grid { grid-template-columns:1fr; gap:32px; }
 #fragmentos-detail { padding:24px 26px 60px; }
 #fragmentos-detail-image { max-width:480px; margin:auto; }
 .fragmentos-welcome { left:8%; right:8%; top:20%; }
 .fragmentos-welcome h1 { font-size:clamp(2.85rem,11vw,4.5rem); }
 .fragmentos-welcome>p:not(.fragmentos-kicker) { font-size:1.2rem; }
 #fragmentos-catalog { margin-top:60px; padding-top:45px; }
}
/* Permanent shop: compact browsing, configurable catalog and order views. */
.fragmentos-shopbar { position:sticky; top:var(--fragmentos-header-height,105px); z-index:4; display:flex; justify-content:space-between; align-items:center; gap:16px; padding:8px max(26px,calc((100% - 1144px)/2)); background:#12110ff5; border-bottom:1px solid #b9925929; }
.fragmentos-shopbar>span { font:.7rem/1.5 var(--body-font); letter-spacing:.15em; color:#c6a36d; }
.fragmentos-shopbar nav { display:flex; gap:24px; }
.fragmentos-shopbar button { min-height:44px; font:.875rem/1.5 var(--body-font); color:#e0d1b9; }
#fragmentos-cart-count { padding-left:5px; color:#d6ae71; }
.fragmentos-editorial { padding-top:40px; padding-bottom:55px; }
.fragmentos-opening { margin-bottom:28px; }
.fragmentos-opening h2 { font-size:clamp(2rem,3vw,2.8rem); }
.fragmentos-collections { gap:28px; }
.fragmentos-collection .fragmentos-product-image { aspect-ratio:1.65; }
.fragmentos-collection h3 { font-size:1.4rem; margin:18px 0 10px; }
.fragmentos-collection>p { margin:0 0 8px; }
#fragmentos-catalog { margin-top:48px; padding-top:42px; }
#fragmentos-products { grid-template-columns:repeat(3,minmax(0,1fr)); gap:42px 28px; }
.fragmentos-card { display:flex; flex-direction:column; margin:0; max-width:none; }
.fragmentos-card h3 { font-size:1.4rem; margin:12px 0; }
.fragmentos-card .eyebrow { margin:18px 0 0; }
.fragmentos-card-description { margin:0 0 12px; }
.fragmentos-card-meta { display:flex; justify-content:space-between; gap:16px; align-items:baseline; margin-top:auto; }
.fragmentos-card-meta .fragmentos-state { margin:0; }
.fragmentos-card>.fragmentos-text-link { align-self:flex-start; }
.fragmentos-picture-link { display:block; width:100%; text-align:left; }
.fragmentos-search { display:grid; grid-template-columns:2fr 1fr 1fr; gap:18px; margin:24px 0; }
#fragmentos-room :is(input,select) { color-scheme:dark; background:#181714; border:1px solid #73644f; border-radius:0; color:#f0e2ce; min-height:44px; padding:10px 12px; font:1rem/1.4 var(--body-font); min-width:0; }
#fragmentos-room label { display:flex; flex-direction:column; gap:8px; font:.8125rem/1.5 var(--body-font); color:#c7b9a4; }
.fragmentos-price { font:1.15rem/1.5 var(--body-font); color:#eee0c9; }
.fragmentos-empty { grid-column:1/-1; padding:35px 0; color:#c7b9a4; font:1rem/1.8 var(--body-font); }
.fragmentos-empty h3 { font:1.6rem/1.4 var(--title-font); }
.fragmentos-detail-grid { grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); gap:50px; margin-top:28px; }
#fragmentos-detail { padding-bottom:50px; }
#fragmentos-detail-image { max-width:420px; margin:0 auto; }
#fragmentos-views { justify-content:center; }
#fragmentos-detail-purchase { padding:8px 0 24px; border-bottom:1px solid #b992593b; }
#fragmentos-detail-purchase .fragmentos-state { margin-top:12px; }
.fragmentos-primary { display:inline-block; background:#d1b182; color:#1f1f1d; min-height:46px; padding:13px 23px; font:1rem/1.5 var(--body-font); text-align:center; }
.fragmentos-primary:disabled { background:#433d33; color:#bfb4a2; cursor:not-allowed; }
#fragmentos-room .fragmentos-quantity { margin:12px 0; max-width:180px; }
.fragmentos-quantity input { width:86px; }
.fragmentos-commerce { max-width:1080px; margin:auto; padding:28px 40px 60px; }
.fragmentos-commerce h1 { font:clamp(2.2rem,4vw,3.2rem)/1.2 var(--title-font); margin:30px 0; }
.fragmentos-cart-line { display:grid; grid-template-columns:110px minmax(0,1fr) auto; align-items:start; gap:24px; padding:24px 0; border-bottom:1px solid #b992593b; }
.fragmentos-cart-line h2 { font:1.4rem/1.3 var(--title-font); margin:0 0 10px; }
.fragmentos-cart-line .fragmentos-product-image { aspect-ratio:.65; }
.fragmentos-line-total { white-space:nowrap; font:1rem/1.5 var(--body-font); }
#fragmentos-cart-summary { max-width:430px; margin:30px 0 0 auto; }
.fragmentos-subtotal { font:1.5rem/1.6 var(--title-font); }
.fragmentos-order-list { padding:0; list-style:none; }
.fragmentos-order-list li { padding:18px 0; border-bottom:1px solid #b992593b; font:1rem/1.8 var(--body-font); }
.fragmentos-checkout-notice { max-width:680px; margin:30px 0; border-left:2px solid #b99259; padding-left:24px; }
.fragmentos-checkout-notice h2 { font-weight:400; }
.fragmentos-checkout-notice p,#fragmentos-checkout-status { font:.9375rem/1.8 var(--body-font); color:#c5baa9; }
#fragmentos-review-tools { padding:18px 26px; border-bottom:1px solid #95774f; background:#29231c; }
#fragmentos-review-tools summary { cursor:pointer; padding:10px 0; }
.fragmentos-review-form { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:16px; margin:20px 0; }
.fragmentos-review-form .fragmentos-note { grid-column:1/-1; }
#fragmentos-review-tools fieldset { border:1px solid #73644f; display:flex; flex-wrap:wrap; gap:20px; }
#fragmentos-review-tools fieldset label { flex-direction:row; align-items:center; }
#fragmentos-review-tools input[type=checkbox] { width:20px; min-height:20px; }
@media (max-width:900px) and (min-width:601px) {
 #fragmentos-products { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .fragmentos-detail-grid { grid-template-columns:1fr 1fr; gap:25px; }
 .fragmentos-search { grid-template-columns:1fr 1fr; }
 .fragmentos-search label:first-child { grid-column:1/-1; }
}
@media(max-width:600px) {
 .fragmentos-shopbar { top:var(--fragmentos-header-height,86px); padding:5px 18px; }
 .fragmentos-shopbar>span { display:none; }
 .fragmentos-shopbar nav { justify-content:space-between; width:100%; gap:12px; }
 .fragmentos-shopbar button { font-size:.8125rem; }
 .fragmentos-editorial { padding:30px 22px 40px; }
 .fragmentos-collections { gap:30px; }
 .fragmentos-collection { max-width:none; }
 .fragmentos-collection .fragmentos-product-image { aspect-ratio:1.7; }
 #fragmentos-products { grid-template-columns:1fr; gap:32px; }
 .fragmentos-card { max-width:390px; margin:auto; width:100%; }
 .fragmentos-card .fragmentos-product-image { aspect-ratio:.75; }
 .fragmentos-search,.fragmentos-review-form { grid-template-columns:1fr; gap:14px; }
 #fragmentos-filters { gap:4px 18px; }
 #fragmentos-count { margin-bottom:22px; }
 .fragmentos-detail-grid { grid-template-columns:1fr; gap:24px; }
 #fragmentos-detail { padding:20px 22px 40px; }
 .fragmentos-commerce { padding:20px 22px 40px; }
 .fragmentos-cart-line { grid-template-columns:70px minmax(0,1fr); gap:16px; }
 .fragmentos-line-total { grid-column:2; margin:0; }
 .fragmentos-primary { width:100%; }
}
@media(prefers-reduced-motion:no-preference) {
 #fragmentos-detail:not([hidden]),#fragmentos-cart:not([hidden]),#fragmentos-order:not([hidden]) { animation:fragmentos-panel .35s ease both; }
 @keyframes fragmentos-panel { from {opacity:0} to {opacity:1} }
}
.fragmentos-detail-heading { max-width:850px; margin-top:24px; }
.fragmentos-detail-heading h1 { font:clamp(2.1rem,3.5vw,3.4rem)/1.15 var(--title-font); margin:12px 0 26px; }
.fragmentos-detail-copy>p:first-child { margin-top:0; }
@media(max-width:600px) {
 .fragmentos-review-mode .fragmentos-shopbar { flex-wrap:wrap; gap:0; }
 .fragmentos-review-mode .fragmentos-shopbar>span { display:block; width:100%; font-size:.6rem; }
 .fragmentos-detail-heading h1 { font-size:2.15rem; }
}
/* Demo gallery and checkout; all styling remains scoped to Fragmentos. */
.fragmentos-demo-banner { margin:0; padding:12px 26px; text-align:center; font:.8125rem/1.6 var(--body-font); color:#ead7b8; background:#272018; border-bottom:1px solid #6e583c; }
.fragmentos-demo-mode .fragmentos-shopbar>span { display:block; white-space:nowrap; font-size:.65rem; }
.fragmentos-demo-mode .fragmentos-shopbar { flex-wrap:wrap; }
.fragmentos-product-image.has-photo { background:none!important; position:relative; overflow:hidden; }
.fragmentos-product-image.has-photo img { display:block; width:100%; height:100%; object-fit:cover; }
.fragmentos-main-image { display:block; width:100%; max-width:520px!important; margin:0 auto; cursor:zoom-in; touch-action:pan-y; }
.fragmentos-main-image .fragmentos-product-image { aspect-ratio:1; }
.fragmentos-main-image .fragmentos-product-image img { object-fit:contain; background:#12100e; }
.fragmentos-gallery-controls { display:flex; align-items:center; justify-content:space-between; gap:15px; max-width:560px; margin:8px auto; }
.fragmentos-gallery-controls button { min-width:44px; min-height:44px; text-align:center; }
.fragmentos-gallery-controls p { text-align:center; }
#fragmentos-views { justify-content:flex-start; gap:10px; overflow-x:auto; padding:7px 3px 12px; flex-wrap:nowrap; scrollbar-color:#8d704a #161310; }
#fragmentos-views .fragmentos-thumbnail { flex:0 0 82px; min-width:0; border:1px solid #615139; padding:4px; display:flex; flex-direction:column; gap:5px; font:.68rem/1.35 var(--body-font); }
.fragmentos-thumbnail img { width:72px; height:72px; object-fit:cover; }
#fragmentos-views .fragmentos-thumbnail[aria-pressed=true] { border:2px solid #d1b182; padding:3px; background:#31271c; }
.fragmentos-lightbox { padding:18px; border:1px solid #8d704a; color:#ead8ba; background:#100f0d; width:min(95vw,1000px); height:min(94dvh,1100px); max-height:94dvh; }
.fragmentos-lightbox::backdrop { background:#000d; }
.fragmentos-lightbox[open] { display:flex; flex-direction:column; align-items:center; }
.fragmentos-lightbox>img { display:block; flex:1; min-height:0; max-width:100%; width:100%; object-fit:contain; touch-action:pan-y; }
.fragmentos-lightbox-close { align-self:flex-end; padding:10px 16px; min-height:44px; color:#ead8ba; border:1px solid #8d704a; margin-bottom:12px; }
.fragmentos-lightbox .fragmentos-note { color:#cbbb9f; font: .875rem/1.4 Arial,sans-serif; margin:10px 0 0; }
.fragmentos-lightbox .fragmentos-gallery-controls { flex-shrink:0; width:100%; margin:0; }
.fragmentos-lightbox button:focus-visible { outline:2px solid #d1b182; outline-offset:3px; }
.fragmentos-demo-form { max-width:600px; display:grid; gap:24px; margin:25px 0; }
#fragmentos-room .fragmentos-demo-consent { display:flex; flex-direction:row; align-items:flex-start; gap:15px; font:1rem/1.7 var(--body-font); }
.fragmentos-demo-consent input { min-height:22px!important; width:22px; height:22px; flex-shrink:0; margin-top:3px; }
.fragmentos-demo-reference { font:1.5rem/1.5 var(--body-font); color:#edd2a8; letter-spacing:.08em; padding:20px 0; border-block:1px solid #73644f; }
#fragmentos-detail-purchase>.fragmentos-text-link { display:block; width:max-content; max-width:100%; margin-top:8px; }
#fragmentos-reset { font:.8125rem/1.5 var(--body-font); padding:6px 0 10px; }
#fragmentos-products .fragmentos-card .fragmentos-product-image { aspect-ratio:1; }
#fragmentos-products .fragmentos-card .fragmentos-product-image img { object-fit:cover; }
.fragmentos-collection .fragmentos-product-image.has-photo img { object-position:50% 38%; }
@media(max-width:600px) {
 .fragmentos-demo-mode .fragmentos-shopbar>span { width:100%; font-size:.6rem; }
 .fragmentos-demo-mode .fragmentos-shopbar { gap:0; }
 .fragmentos-demo-banner { text-align:left; padding:12px 22px; }
 #fragmentos-views .fragmentos-thumbnail { flex-basis:70px; }
 .fragmentos-thumbnail img { width:60px; height:60px; }
 .fragmentos-gallery-controls { gap:7px; }
 .fragmentos-lightbox { padding:10px; }
 .fragmentos-lightbox-close { margin-bottom:8px; }
 .fragmentos-demo-reference { font-size:1.2rem; }
}

/* Warm, diffuse wall light. Scoped to the Fragmentos footer only. */
#fragmentos-room .world-footer {
 position:relative;
 isolation:isolate;
 overflow:hidden;
 border:0;
 padding:96px 24px 42px;
 background:
  linear-gradient(180deg,#0d0d0c 0%,#0d0d0c00 42%),
  radial-gradient(ellipse at 23% 108%,#90603730,transparent 65%),
  radial-gradient(ellipse at 76% 82%,#b6844228,transparent 58%),
  radial-gradient(ellipse at 46% 130%,#71482740,transparent 75%),
  #100f0d;
}
/* Reuse the approved paper's physical grain, inverted into warm bronze.
   Screen removes its dark substrate; edge masks leave the center untouched. */
#fragmentos-room .world-footer::before {
 content:'';
 position:absolute;
 inset:0;
 z-index:-1;
 pointer-events:none;
 background:url('assets/paper-antique.png') center bottom / 100% 100% no-repeat;
 filter:invert(1) grayscale(1) sepia(1) saturate(.85) brightness(1.65);
 mix-blend-mode:screen;
 opacity:.52;
 mask-image:linear-gradient(transparent 15%,#0006 58%,#000 100%);
}
@media(max-width:600px) {
 #fragmentos-room .world-footer::before { opacity:.42; }
}
#fragmentos-room .world-footer p { color:#eee0ca; }
#fragmentos-room .world-footer button { color:#e8c796; }
#fragmentos-room .world-footer>span { color:#cdbda6; }
#fragmentos-room .world-footer button:hover { color:#fff0d6; }
#fragmentos-room .world-footer button:focus-visible { outline:2px solid #e8c796!important; outline-offset:5px; }
@media(max-width:600px) {
 #fragmentos-room .world-footer { padding:76px 24px 36px; }
 #fragmentos-room .world-footer p { max-width:28ch; margin-left:auto; margin-right:auto; }
}
