/* Shop: una sola estampa. El escenario conserva su encuadre completo. */
#view-shop.shop-arcana {
  --shop-scene-height: max(700px, 100svh);
  --table-tilt: 48deg;
  --angle-factor: .85;
  height: var(--shop-scene-height);
  min-height: 0;
  padding: 0;
  background: #b29b75 url('assets/shop-tarot/salon-estampa-horizontal-v3.webp') center / 100% 100% no-repeat;
}
#view-shop::before { background: linear-gradient(#f8eac308, #7950250b); opacity: 1; }
#view-shop::after { background: radial-gradient(ellipse 300px 240px at var(--light-x) var(--light-y), #ffebbb0d, transparent 75%); }
#view-shop .shop-palazzo-frame { background: radial-gradient(ellipse at 16% 34%, #ffc97b0c, transparent 26%); opacity: .6; }
#view-shop .shop-atmosphere { opacity: .28; }
#view-shop .shop-spread {
  position: absolute;
  top: 32%;
  left: 50%;
  width: 66%;
  max-width: 1100px;
  height: 34%;
  min-height: 0;
  margin: 0;
  translate: -50% 0;
  grid-template-columns: repeat(4,minmax(0,1fr));
  grid-template-rows: minmax(0,1fr);
  align-items: center;
  justify-items: center;
  gap: clamp(10px, 1.2vw, 22px);
  perspective: 1800px;
}
#view-shop .shop-card {
  --rest-angle: calc(var(--card-angle) * var(--angle-factor));
  width: 100%;
  max-width: 245px;
  min-height: 0;
  height: auto;
  aspect-ratio: 689/917;
  top: auto;
  transform: translateY(var(--rest-y)) rotateX(var(--table-tilt)) rotate(var(--rest-angle));
}
#view-shop .shop-card:nth-of-type(1) { --rest-y: 18px; }
#view-shop .shop-card:nth-of-type(2) { --rest-y: -6px; top: auto; }
#view-shop .shop-card:nth-of-type(3) { --rest-y: -6px; top: auto; }
#view-shop .shop-card:nth-of-type(4) { --rest-y: 18px; }
#view-shop .shop-card-front, #view-shop .shop-card-back {
  border-color: #8d714e;
  box-shadow: 1px 1px #dac4a2, 2px 3px #6b5031, 3px 6px 5px #46331d4d;
}
#view-shop .shop-card-front {
  background-color: #f0e3c6;
  background-image: radial-gradient(ellipse at 0 100%,#9473461c,transparent 62%), repeating-linear-gradient(83deg,transparent 0 4px,#8a6e3608 4px 5px);
  color: #3b3022;
}
#view-shop .shop-card-art svg { filter: none; mix-blend-mode: multiply; }
#view-shop .shop-card-numeral, #view-shop .shop-card-category, #view-shop .shop-card-status { color: #65513a; }
#view-shop .shop-card-name { font-size: clamp(25px,2.35vw,34px); }
#view-shop .shop-card--entradas .shop-card-name { font-size: clamp(23px,2.1vw,30px); }
#view-shop .shop-card-status { font-size: 9px; }
#view-shop .shop-card-front::before { background: linear-gradient(115deg, transparent 25%, #fff4cf26 48%, transparent 70%); }
#view-shop.shop-js:is([data-shop-state='stacked'],[data-shop-state='collecting']) .shop-card {
  width: min(29%, 250px);
  max-width: none;
  top: 50% !important;
  left: 50%;
  transform: translate(calc((var(--card-index) - 1.5)*3px),calc((var(--card-index) - 1.5)*-2px)) rotateX(var(--table-tilt)) rotate(calc((var(--card-index) - 1.5)*-2.4deg));
}
/* El control de recoger adopta la forma del pequeño mazo que queda en la mesa. */
#view-shop .shop-table-controls {
  position: absolute;
  top: 57%;
  left: 8%;
  width: 65px;
  height: 86px;
  min-height: 0;
  margin: 0;
  perspective: 1000px;
}
#view-shop .shop-deal, #view-shop[data-shop-state='dealt'] .shop-deal {
  position: relative;
  display: block;
  width: 64px;
  height: 85px;
  padding: 3px;
  border: 1px solid #8d714e;
  border-radius: 2px;
  background: #e9d7b5 url('assets/shop-tarot/paulina-carta-original.png') center / 89% 92% no-repeat;
  color: #423322;
  transform: rotateX(var(--table-tilt)) rotate(-12deg);
  box-shadow: 1px 2px #baa17a, 3px 4px #e3cba4, 4px 5px #785b37, 5px 8px 5px #2e201d55;
}
#view-shop .shop-deal > span[aria-hidden='true'] { display: none; }
#view-shop .shop-deal:hover { translate: 0 -3px; background-color: #f3e3c3; }
#view-shop .shop-deal:focus-visible { outline: 2px solid #fff4d5; outline-offset: 5px; }
@media (hover:hover) and (pointer:fine) {
  #view-shop[data-shop-state='dealt'] .shop-card:hover,
  #view-shop[data-shop-state='dealt'] .shop-card:focus-within {
    transform: translateY(var(--rest-y)) rotateX(var(--table-tilt)) rotate(var(--rest-angle));
    --lift: -6px;
  }
  #view-shop[data-shop-state='dealt'] .shop-card:is(:hover,:focus-within) .shop-card-front {
    box-shadow: 1px 1px #e7d5b7,2px 3px #735636,5px 11px 8px #3e2b204d;
  }
}
/* La ficha continúa la estampa; las reservas usan todo el ancho disponible. */
#view-shop .shop-reading .shop-reading-picture {
  background: linear-gradient(#e8dcc391,#e8dcc361), url('assets/shop-tarot/salon-estampa-vertical-v3.webp') center 45% / cover no-repeat;
}
#view-shop .shop-reading .shop-card-front { transform: rotate(-6deg); }
#view-shop .shop-reading[data-product='tarot'] { width: min(760px,calc(100% - 40px)); }
#view-shop .shop-reading[data-product='tarot'] .shop-reading-layout { grid-template-columns: minmax(0,1fr); min-height: 0; }
#view-shop .shop-reading[data-product='tarot'] .shop-reading-picture { display: none; }
#view-shop .shop-reading[data-product='tarot'] .shop-reading-copy { grid-column: 1; grid-row: 1; padding: 36px 45px; }
#view-shop .shop-reading[data-product='tarot'] .shop-reading-arcana { max-width: calc(100% - 45px); }
@media (min-width:701px) and (max-width:900px) {
  #view-shop.shop-arcana {
    --shop-scene-height: max(100svh, calc(100vw * 1.5));
    --table-tilt: 43deg;
    --angle-factor: .5;
    padding: 0;
    background-image: url('assets/shop-tarot/salon-estampa-tablet-v3.webp');
  }
  #view-shop .shop-spread { top: 33%; width: 58%; height: 38%; max-width: 480px; margin: 0; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 14px 22px; }
  #view-shop .shop-card { max-width: 205px; --rest-y: 0px !important; }
  #view-shop.shop-js:is([data-shop-state='stacked'],[data-shop-state='collecting']) .shop-spread { height: 38%; min-height: 0; margin: 0; }
  #view-shop.shop-js:is([data-shop-state='stacked'],[data-shop-state='collecting']) .shop-card { width: min(66%,235px); }
  #view-shop .shop-table-controls { left: 10%; top: 66%; }
}
@media (max-width:700px) {
  #view-shop.shop-arcana,
  #view-shop.shop-js:is([data-shop-state='stacked'],[data-shop-state='collecting']) {
    --shop-scene-height: max(760px,calc(100vw * 2.3));
    --table-tilt: 42deg;
    --angle-factor: .55;
    height: var(--shop-scene-height);
    min-height: 0;
    padding: 0;
    background-image: url('assets/shop-tarot/salon-estampa-vertical-v3.webp');
    background-size: 100% 100%;
  }
  #view-shop .shop-spread { top: 37.5%; width: 77%; height: 34%; max-width: none; margin: 0; grid-template-columns: repeat(2,minmax(0,1fr)); grid-template-rows: repeat(2,minmax(0,1fr)); gap: 5px 15px; }
  #view-shop .shop-card { width: 100%; max-width: none; aspect-ratio: 689/917; --rest-y: 0px !important; transform: rotateX(var(--table-tilt)) rotate(var(--rest-angle)); }
  #view-shop .shop-card-front { grid-template-rows: 9px minmax(0,1fr) 40px 29px 22px; padding: 9px 8px 6px; }
  #view-shop .shop-card-name { font-size: clamp(20px,5.5vw,26px); }
  #view-shop .shop-card--entradas .shop-card-name { font-size: clamp(17px,4.8vw,23px); }
  #view-shop .shop-spread .shop-card-category { display: none; }
  #view-shop .shop-spread .shop-card-status { font-size: 11.5px; line-height: 1.15; text-wrap: balance; }
  #view-shop .shop-spread .shop-card-explore { font-size: 11px; padding-top: 4px; }
  #view-shop.shop-js:is([data-shop-state='stacked'],[data-shop-state='collecting']) .shop-spread { height: 34%; min-height: 0; margin: 0; }
  #view-shop.shop-js:is([data-shop-state='stacked'],[data-shop-state='collecting']) .shop-card { width: min(68%,220px); aspect-ratio: 689/917; }
  #view-shop .shop-table-controls { left: 12%; top: 70.5%; width: 47px; height: 63px; }
  #view-shop .shop-deal, #view-shop[data-shop-state='dealt'] .shop-deal { width: 47px; height: 63px; }
  #view-shop .shop-reading[data-product='tarot'] { width: calc(100% - 24px); }
  #view-shop .shop-reading[data-product='tarot'] .shop-reading-copy { padding: 30px 23px 26px; }
}
@media (max-width:350px) {
  #view-shop .shop-spread { width: 77%; gap: 5px 12px; }
  #view-shop .shop-card-front { grid-template-rows: 8px minmax(0,1fr) 35px 26px 21px; padding: 8px 7px 5px; }
  #view-shop .shop-card-name { font-size: 18px; }
  #view-shop .shop-card--entradas .shop-card-name { font-size: 16px; }
  #view-shop .shop-spread .shop-card-status { font-size: 10px; }
  #view-shop .shop-reading[data-product='tarot'] .shop-reading-copy { padding-inline: 18px; }
}
