/* Photographic plain oak shelving with an open back and a continuous pair of uprights. */
:root{
  --pantry-wall:
    linear-gradient(110deg,#ebe5dc26,#e5ded21f 65%,#a79b8a26),
    #e8e1d5 url('/assets/pantry/pantry-aged-plaster.webp') center top/920px auto repeat;
}
/* The wall belongs to the room, including the space outside the wooden uprights. */
#main:has(.catalog-section){background:var(--pantry-wall)}
.related{background:var(--pantry-wall);padding:24px}
.pantry-rack{
  --shelf-height:270px;
  --rack-side:34px;
  --shelf-depth:46px;
  --shelf-edge:18px;
  --rack-cap:30px;
  --bracket-width:28px;
  --bracket-height:38px;
  display:block;
  position:relative;
  isolation:isolate;
  padding:var(--rack-cap) 0 50px;
  background:transparent;
  border:0;
  box-shadow:none;
}
/* Continuous uprights keep a constant, fine wood-grain scale at any catalog height. */
.pantry-rack::before,.pantry-rack::after{
  content:'';
  position:absolute;
  inset-block:0;
  width:var(--rack-side);
  z-index:2;
  pointer-events:none;
  background:linear-gradient(90deg,#e5c79c18,transparent 65%,#2d1c1033),url('/assets/pantry/pantry-aged-oak.webp') 24% top/500px auto repeat;
}
.pantry-rack::before{left:0;border-radius:1px 1px 0 0;box-shadow:inset 1px 0 #dfbd8f35,4px 3px 7px #3c2b1b29}
.pantry-rack::after{right:0;border-radius:1px 1px 0 0;background-position:0 0,76% top;box-shadow:inset 1px 0 #dfbd8f2b,4px 3px 7px #3c2b1b29;filter:brightness(.94)}
/* Plain nailed rails close the frame; short legs remain visible below the bottom rail. */
.rack-crossbar{
  position:absolute;
  inset:0 0 auto;
  height:var(--rack-cap);
  z-index:3;
  pointer-events:none;
  background:url('/assets/pantry/ordinary-oak-rack.webp') center 95%/110% 1220% no-repeat;
  box-shadow:inset 0 1px #e0bf8c50,0 3px 5px #35231736;
}
.rack-crossbar-bottom{top:auto;bottom:16px;height:calc(var(--rack-cap) - 4px);background-position:center 93%}
.rack-crossbar::before,.rack-crossbar::after{
  content:'';
  position:absolute;
  top:calc(50% - 2px);
  left:calc(var(--rack-side) / 2 - 2px);
  width:4px;
  height:4px;
  border-radius:50%;
  background:linear-gradient(145deg,#7b6d5e 40%,#302b24 43% 56%,#615443 60%);
  box-shadow:0 1px 1px #281a0f88,0 -1px #d3b68a55;
}
.rack-crossbar::after{left:auto;right:calc(var(--rack-side) / 2 - 2px)}
.pantry-shelf-row{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  position:relative;
  z-index:1;
  padding:0 var(--rack-side) 24px;
  margin:0;
}
.pantry-shelf-row:last-child{padding-bottom:0}
.pantry-shelf-pair{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  position:relative;
  min-width:0;
}
.pantry-shelf-pair::before{display:none}
/* Crop out the source photo's uprights; each board joins the shared posts just behind their edges. */
.shelf-backdrop{
  position:absolute;
  top:calc(var(--shelf-height) - var(--shelf-depth) - var(--shelf-edge));
  left:calc(var(--rack-side) - 1px);
  right:calc(var(--rack-side) - 1px);
  height:calc(var(--shelf-depth) + var(--shelf-edge));
  z-index:0;
  pointer-events:none;
  background:url('/assets/pantry/ordinary-oak-rack.webp') center 95%/110% 510% no-repeat;
  box-shadow:0 9px 12px -8px #34271eb3;
}
/* Small load-bearing timber blocks make the shelf-to-post joints legible. */
.shelf-backdrop::before,.shelf-backdrop::after{
  content:'';
  display:block;
  position:absolute;
  top:calc(100% - 1px);
  left:0;
  width:var(--bracket-width);
  height:var(--bracket-height);
  background:
    radial-gradient(circle at 5px 5px,#34291dcc 0 1.2px,transparent 1.6px),
    linear-gradient(#30211338,transparent 9px),
    url('/assets/pantry/pantry-aged-oak.webp') 40% 20%/190px auto;
  clip-path:polygon(0 0,100% 0,0 100%);
}
.shelf-backdrop::after{left:auto;right:0;transform:scaleX(-1);filter:brightness(.93)}
.pantry-shelf-pair>.shelf-backdrop{display:none}
.pantry-rack .shelf-product{
  --tag-tilt:-.15deg;
  --tag-drop:13px;
  --contact-width:36%;
  padding:0 13px;
  z-index:1;
}
.pantry-shelf-pair>.shelf-product:last-child{--tag-tilt:.1deg;--tag-drop:16px}
.pantry-shelf-pair:nth-child(3)>.shelf-product:first-of-type{--tag-tilt:-.1deg;--tag-drop:15px}
.pantry-shelf-pair:nth-child(3)>.shelf-product:last-child{--tag-tilt:.2deg;--tag-drop:12px}
.pantry-shelf-row:nth-child(even) .shelf-product{--tag-tilt:.1deg;--tag-drop:14px}
.pantry-shelf-row:nth-child(even) .shelf-product:last-child{--tag-tilt:-.15deg;--tag-drop:12px}
.pantry-rack .product-stage{height:var(--shelf-height)}
.pantry-rack .product-stage::after{display:none}
.pantry-rack .product-photo{
  position:relative;
  padding:28px 16px calc(var(--shelf-edge) + 16px);
  isolation:isolate;
}
.pantry-rack .product-photo::before,.pantry-rack .product-photo::after{
  content:'';
  position:absolute;
  z-index:-1;
  left:calc(50% - var(--contact-width) / 2);
  width:var(--contact-width);
  height:9px;
  bottom:calc(var(--shelf-edge) + 14px);
  background:radial-gradient(ellipse,#29190e70,transparent 72%);
  border-radius:50%;
  filter:blur(1.5px);
  pointer-events:none;
}
.pantry-rack .product-photo::after{
  transform:translate(7px,2px) scaleX(1.2);
  opacity:.65;
  filter:blur(4px);
}
.pantry-rack .product-photo img{
  filter:drop-shadow(3px 4px 3px #301b0f40);
  transition:transform .25s;
  transform-origin:center bottom;
}
.pantry-rack .product-photo:hover img,
.pantry-rack .product-photo:focus-visible img{transform:translateY(-5px) rotate(-1deg)}
.pantry-rack .tray-product .product-photo{padding-bottom:calc(var(--shelf-edge) - 1px)}
.pantry-rack .tray-product{--contact-width:68%}
.pantry-rack .save-product{top:25px;right:0}
/* Separate paper tags hang from the shelf, leaving the shared timber visible. */
.pantry-rack .product-ticket{
  margin:var(--tag-drop) 0 0;
  padding:16px 15px 14px;
  transform:rotate(var(--tag-tilt));
  transform-origin:50% 0;
  background:#fcf8ee;
  border-color:#e4cfaa;
  border-radius:1px 0 2px 1px;
  box-shadow:1px 3px 5px #3d261c24;
}
.pantry-rack .product-ticket::before{
  top:calc(-1 * var(--tag-drop) - 1px);
  width:1px;
  height:calc(var(--tag-drop) + 6px);
  border-radius:0;
  background:#b99564;
  box-shadow:1px 0 #fff0c64d;
}
.pantry-rack .product-ticket::after{
  content:'';
  position:absolute;
  top:4px;
  left:calc(50% - 2px);
  width:5px;
  height:5px;
  border-radius:50%;
  background:#846c48;
  box-shadow:0 1px #fff8df;
}
.pantry-rack .product-ticket h3{min-height:56px}
.related .pantry-rack{--shelf-height:250px}
@media(min-width:1600px){.pantry-rack{--shelf-height:290px;--rack-side:34px}}
@media(max-width:1150px) and (min-width:761px){
  .pantry-rack{--shelf-height:245px;--rack-side:26px}
  .pantry-rack .shelf-product{padding-inline:9px}
  .pantry-rack .product-photo{padding-inline:8px}
  .pantry-rack .product-ticket{padding-inline:12px}
  .pantry-rack .product-ticket h3{min-height:72px}
}
@media(max-width:760px){
  .related{padding:18px 10px}
  .pantry-rack{
    --shelf-height:218px;
    --rack-side:16px;
    --shelf-depth:32px;
    --shelf-edge:13px;
    --rack-cap:22px;
    --bracket-width:16px;
    --bracket-height:26px;
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:0;
    padding:var(--rack-cap) 0 38px;
  }
  .pantry-shelf-row{display:contents}
  .rack-crossbar-bottom{bottom:12px}
  .pantry-shelf-row>.shelf-backdrop,.pantry-shelf-row::before{display:none}
  .pantry-shelf-pair{padding:0 var(--rack-side) 22px;z-index:1}
  .pantry-shelf-row:last-child .pantry-shelf-pair:last-child{padding-bottom:0}
  .pantry-shelf-pair>.shelf-backdrop{display:block}
  .pantry-rack .shelf-product{padding-inline:7px}
  .pantry-rack .product-photo{padding:23px 5px calc(var(--shelf-edge) + 10px)}
  .pantry-rack .product-photo::before,.pantry-rack .product-photo::after{bottom:calc(var(--shelf-edge) + 8px)}
  .pantry-rack .product-ticket{padding:14px 10px 12px;transform:rotate(calc(var(--tag-tilt) * .5))}
  .pantry-rack .product-ticket h3{min-height:87px}
  .pantry-rack .save-product{top:17px;right:0}
  .related .pantry-rack{--shelf-height:205px}
}
@media(max-width:365px){
  .pantry-rack{--shelf-height:200px;--rack-side:13px}
  .pantry-rack .shelf-product{padding-inline:5px}
  .pantry-rack .product-ticket{padding-inline:8px}
}
@media(prefers-reduced-motion:reduce){
  .pantry-rack .product-photo img{transition:none}
  .pantry-rack .product-photo:hover img,.pantry-rack .product-photo:focus-visible img{transform:none}
}
