/* First-party cards retain the standard image, category, title and price slots.
   They omit the retailer model row and reserve no description or empty action. */
.owned-shelf{margin:44px 0}
.owned-shelf .section-heading{margin-bottom:12px}
.owned-shelf-intro{max-width:760px;margin:0 0 24px;color:var(--muted);line-height:1.6}
.owned-shelf-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
.shelf-card .catalog-photo{aspect-ratio:4 / 3}
.shelf-card .catalog-photo-image{object-fit:contain;opacity:1}
.shelf-card .shelf-price-main{font-size:28px;line-height:36px;font-weight:750;letter-spacing:-.045em}
.shelf-primary-action::after{display:none}
.shelf-card .shelf-price-detail{grid-column:1/-1;align-self:center;min-width:0;white-space:normal;font-size:11px;line-height:16px}
.shelf-card[data-owned-product="pass"] .shelf-price-main{gap:4px}
.shelf-card .shelf-price-qualifier{font-size:13px;font-weight:500;letter-spacing:0}
.shelf-card .shelf-primary-action{display:flex;width:100%;height:44px;min-height:44px;justify-content:center;text-align:center;padding:6px 8px;font-size:13px;line-height:16px;white-space:normal}
.shelf-card .shelf-secondary-action{display:block;align-self:center;margin-top:4px;font-size:12px;line-height:16px;text-decoration:underline;text-underline-offset:3px}
.owned-shelf-nav{white-space:nowrap;font-weight:700}
/* The dedicated page leads with the book's title, compact media and buy area.
   Source dimensions constrain this layout; viewport fit still needs browser QA. */
.owned-shelf-page{margin:0}
.owned-shelf-page .breadcrumbs{margin:0 0 12px}
.owned-book-hero{grid-template-columns:minmax(0,1fr);padding:0;margin:0;gap:16px}
.owned-book-hero .product-title-block{grid-column:1;grid-row:auto;margin:0}
.owned-book-hero .card-category{margin:0 0 4px;font-size:11px;line-height:16px;color:var(--muted)}
.owned-book-hero h1{margin:0;min-height:0;font-size:30px;line-height:1.12;letter-spacing:-.035em}
.owned-book-hero .product-media-stack{width:100%;max-width:320px;margin-inline:auto}
.owned-book-hero .product-media{padding:0}
.owned-book-hero .catalog-photo{height:220px;min-height:0;max-height:220px;aspect-ratio:auto;border-radius:12px;background:#fff}
.owned-book-hero .catalog-photo-image{inset:8px;width:calc(100% - 16px);height:calc(100% - 16px);object-fit:contain;opacity:1}
.owned-book-hero .product-intro{padding:0}
.owned-book-hero .shelf-price{display:grid;grid-template-rows:36px 18px;gap:0;margin:0 0 12px}
.owned-book-hero .shelf-price-main{font-size:28px;line-height:36px;font-weight:750;letter-spacing:-.045em}
.owned-book-hero .shelf-price-detail{font-size:12px;line-height:18px;color:var(--muted)}
.owned-book-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.owned-book-actions a{display:flex;align-items:center;justify-content:center;min-height:44px;margin:0;padding:10px 12px;border:1px solid #d6e0d0;border-radius:7px;font-size:14px;line-height:20px;font-weight:700;text-align:center;text-decoration:none}
.owned-book-actions .shelf-primary-action{background:#edf2e8;color:var(--navy)}
.owned-book-actions .shelf-secondary-action{background:#fff;border-color:#d6e0d0;color:var(--navy)}
.owned-book-hero .owned-book-description{margin:20px 0 0;max-width:60ch;font-size:15px;line-height:1.6;color:var(--muted)}
.owned-shelf-more{margin-top:36px}
@media(min-width:1024px){
  .owned-shelf-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .owned-book-hero{grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:40px;align-items:start}
  .owned-book-hero .product-title-block{grid-column:1/-1;grid-row:1}
  .owned-book-hero .product-media-stack{grid-column:1;grid-row:2;max-width:400px}
  .owned-book-hero .product-intro{grid-column:2;grid-row:2}
  .owned-book-hero .catalog-photo{height:300px;max-height:300px}
  .owned-book-hero h1{font-size:38px}
}
@media(max-width:639px){
  .owned-shelf{margin:32px 0}
  .owned-shelf:not(.owned-shelf-page) .owned-shelf-grid{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:clamp(220px,66%,310px);overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:1px;gap:14px;padding-bottom:12px;-webkit-overflow-scrolling:touch}
  .owned-shelf:not(.owned-shelf-page) .shelf-card{scroll-snap-align:start}
  .owned-shelf-page{margin:0}
  .owned-shelf-page .owned-shelf-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px}
}

@media(max-width:359px){
  .owned-shelf-page .owned-shelf-grid{grid-template-columns:minmax(0,1fr)}
}
