.catalog-toolbar { display: flex; gap: 20px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 15px; margin-bottom: 24px; }
.book-tabs { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.book-tabs button { flex-shrink: 0; border: 1px solid transparent; color: #b4b4b7; background: transparent; border-radius: 6px; padding: 9px 14px; font-size: 10px; }
.book-tabs button:hover { color: var(--accent-light); }
.book-tabs button.active { background: var(--action); color: #ffffff; font-weight: 600; }
.sort-control { display: flex; align-items: center; gap: 7px; color: #a3a3a6; flex-shrink: 0; }
.sort-control i { font-size: 12px; }
.sort-control select { background: transparent; border: 0; color: #c0c0c3; font-size: 10px; max-width: 180px; padding: 7px 0; cursor: pointer; }
.sort-control option { background: var(--surface); color: var(--text); }
.product-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 17px; }
.product-card { min-width: 0; background: #191919; border: 1px solid #333333; border-radius: 9px; overflow: hidden; transition: border-color .2s, transform .2s; display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-5px); border-color: #c63950; }
.product-visual { position: relative; display: flex; justify-content: center; align-items: center; min-height: 223px; padding: 29px 25px 23px; background: radial-gradient(ellipse at 50% 80%, #4545456e, #222222 75%); }
.book-cover-button { display: block; background: transparent; border: 0; padding: 0; width: 100%; }
.product-cover { width: 100%; height: 165px; object-fit: contain; filter: drop-shadow(8px 9px 5px #0007); transform: perspective(750px) rotateY(-8deg) rotateZ(-2deg); transition: transform .25s; }
.product-card:hover .product-cover { transform: perspective(750px) rotateY(0) rotateZ(0); }
.product-badge { position: absolute; top: 9px; left: 9px; z-index: 2; padding: 3px 5px; border: 1px solid #74303f; background: #32191f; color: #ff9aad; border-radius: 3px; font-size: 7px; }
.favorite-button { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #ffffff1a; border-radius: 50%; background: #181818e6; color: #b7b7ba; z-index: 2; font-size: 12px; }
.favorite-button[aria-pressed="true"] { color: #ff7187; background: #381b23; border-color: #b6334a; }
.product-card-body { display: flex; flex-direction: column; flex: 1; padding: 14px 13px 13px; border-top: 1px solid #ffffff05; }
.product-category { font-size: 7px; color: #ff8093; letter-spacing: 1px; text-transform: uppercase; }
.book-title { display: block; padding: 0; border: 0; background: transparent; text-align: left; color: #f5f5f5; font-size: 12px; font-weight: 600; line-height: 1.4; margin: 7px 0 6px; min-height: 34px; }
.book-author { font-size: 9px; color: #a7a7aa; margin: 0 0 17px; min-height: 27px; }
.product-card-bottom { display: flex; gap: 5px; align-items: flex-end; justify-content: space-between; margin-top: auto; }
.price { display: block; color: #ffffff; font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -.7px; white-space: nowrap; }
.old-price { font-size: 9px; color: #a1a1a4; text-decoration: line-through; }
.discount { font-size: 9px; padding: 2px 4px; color: #ff99aa; background: #3d1c25; border-radius: 3px; margin-left: 5px; }
.add-to-cart { display: grid; place-items: center; width: 32px; height: 33px; flex-shrink: 0; border: 1px solid #7c2c3c; border-radius: 6px; background: #321a21; color: var(--accent); font-size: 12px; }
.add-to-cart:hover { background: var(--accent); color: #101010; }
.catalog-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; gap: 15px; }
.catalog-bottom > span { color: #a3a3a6; font-size: 9px; }
.pagination { display: flex; gap: 6px; }
.pagination button { min-width: 31px; height: 31px; border: 1px solid var(--line); background: transparent; color: #b9b9bc; font-size: 10px; border-radius: 5px; }
.pagination button[aria-current="page"] { background: #361c24; color: var(--accent); border-color: #ae3048; }
.active-search { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 13px; background: #252525; border: 1px solid #4a4a4a; border-radius: 7px; margin-bottom: 18px; font-size: 11px; }
.active-search button { border: 0; background: transparent; color: var(--accent-light); font-size: 10px; flex-shrink: 0; }
.shop-dialog { color: var(--text); width: min(850px, calc(100% - 32px)); max-height: min(85vh, 860px); padding: 24px; border: 1px solid #555555; border-radius: 16px; background: #1b1b1b; box-shadow: var(--shadow); }
.shop-dialog::backdrop { background: #080808c9; backdrop-filter: blur(7px); }
.shop-dialog.drawer { width: min(510px, 100%); margin: 0 0 0 auto; min-height: 100dvh; max-height: 100dvh; border-radius: 16px 0 0 16px; border-right: 0; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.dialog-head .icon-button { display: grid; }
.dialog-heading { font: 500 30px 'Playfair Display', Georgia, serif; margin-bottom: 9px; }
.dialog-description { font-size: 11px; }
.detail-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; padding-block: 8px 15px; }
.detail-cover { padding: 25px 35px; background: #2a2a2a; border-radius: 10px; display: flex; align-items: center; }
.detail-cover img { width: 100%; max-height: 370px; filter: drop-shadow(12px 12px 12px #0007); }
.detail-info h2 { margin: 10px 0; font: 500 34px/1.2 'Playfair Display', Georgia, serif; }
.detail-author { color: var(--accent-light); font-size: 13px; }
.detail-description { font-size: 12px; line-height: 1.9; margin-top: 20px; }
.book-specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; padding: 14px 0; border-block: 1px solid var(--line); margin: 19px 0; }
.book-specs dt { font-size: 9px; color: var(--muted); } .book-specs dd { margin: 6px 0 0; font-size: 11px; }
.detail-price .price { font-size: 28px; display: inline-block; margin-right: 10px; }
.detail-actions { display: flex; gap: 8px; margin-top: 19px; }
.detail-actions .btn-primary { flex: 1; }
.detail-note { font-size: 9px; color: var(--muted); margin-top: 12px; }
.saved-list { display: grid; gap: 14px; margin-top: 22px; }
.saved-item { display: grid; grid-template-columns: 58px 1fr auto; gap: 15px; border-bottom: 1px solid var(--line); padding-bottom: 18px; align-items: center; }
.saved-item img { width: 58px; height: 86px; object-fit: contain; }
.saved-item h3 { font-size: 12px; margin: 0 0 4px; }
.saved-item p { font-size: 10px; margin: 0 0 7px; }
.saved-item .price { font-size: 14px; }
.saved-item .remove-item { width: 30px; height: 30px; border: 0; background: transparent; color: #bcbcbf; align-self: flex-start; }
.quantity-control { display: flex; align-items: center; gap: 14px; margin-top: 11px; }
.quantity-control button { width: 26px; height: 26px; background: #2b2b2b; border: 1px solid #4d4d4d; border-radius: 5px; }
.quantity-control span { font-size: 11px; }
.cart-summary { margin-top: 22px; background: #2a1b20; padding: 18px; border-radius: 9px; border: 1px solid #69313f; }
.cart-summary > div { display: flex; justify-content: space-between; align-items: center; }
.cart-summary p { font-size: 10px; margin: 13px 0 0; color: #c9bec2; }
.cart-summary .btn { width: 100%; margin-top: 15px; }
@media (max-width: 1150px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-visual { min-height: 245px; } .product-cover { height: 191px; }
  .product-card-body { padding: 16px; } .book-title { min-height: 20px; font-size: 13px; }
  .book-author { min-height: 16px; }
  .catalog-toolbar { gap: 10px; } .book-tabs button { padding-inline: 10px; }
}
@media (max-width: 760px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .catalog-toolbar { flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 12px; }
  .book-tabs { width: 100%; gap: 4px; padding-bottom: 4px; scrollbar-width: none; }
  .book-tabs button { padding: 9px 12px; font-size: 9px; }
  .sort-control { margin-left: auto; }
  .product-visual { min-height: 213px; padding: 31px 24px 20px; }
  .product-cover { height: 162px; }
  .product-card-body { padding: 13px 11px; }
  .book-title { font-size: 11px; min-height: 31px; } .book-author { font-size: 9px; min-height: 25px; margin-bottom: 10px; }
  .price { font-size: 16px; } .old-price { font-size: 8px; } .discount { font-size: 8px; }
  .product-badge { font-size: 6px; left: 7px; } .favorite-button { width: 30px; height: 30px; right: 6px; }
  .add-to-cart { width: 34px; height: 38px; }
  .catalog-bottom { flex-wrap: wrap; margin-top: 18px; } .sample-price-note { display: none; }
  .detail-layout { grid-template-columns: 1fr; gap: 20px; }
  .detail-cover { max-width: 180px; margin: 0 auto; padding: 17px; } .detail-cover img { max-height: 190px; }
  .detail-info h2 { font-size: 27px; } .shop-dialog { padding: 19px; }
  .active-search { align-items: flex-start; font-size: 10px; }
}
@media (max-width: 390px) {
  .product-grid { gap: 9px; }
  .product-visual { min-height: 187px; padding-inline: 17px; }
  .product-cover { height: 139px; }
  .product-card-body { padding: 11px 9px; }
  .price { font-size: 14px; } .discount { margin-left: 2px; font-size: 7px; }
  .add-to-cart { width: 30px; height: 36px; }
  .product-category { font-size: 6px; }
  .book-specs { gap: 5px; } .book-specs dd { font-size: 10px; }
}
