/* Bookstore discovery layer: clear hierarchy, editorial shelves and calm commerce. */
@media (prefers-reduced-motion: no-preference) {
  .ymm-slider__viewport { animation: ymm-showcase-fade .85s cubic-bezier(.2,.8,.2,1) both; }
  .ymm-slider .ymm-slide.is-active .ymm-slide__copy { animation: ymm-showcase-copy .8s .12s cubic-bezier(.2,.8,.2,1) both; }
  .ymm-slider .ymm-slide.is-active .ymm-slide__visual { animation: ymm-showcase-cover .95s .05s cubic-bezier(.2,.8,.2,1) both; }
  .ymm-home-categories .ymm-category-grid > a,
  .ymm-section--products .ymm-product-card { animation: ymm-showcase-rise .72s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--ymm-stagger, 0) * 70ms); }
  .ymm-home-categories .ymm-category-grid > a:nth-child(1), .ymm-section--products .ymm-product-card:nth-child(1) { --ymm-stagger: 1; }
  .ymm-home-categories .ymm-category-grid > a:nth-child(2), .ymm-section--products .ymm-product-card:nth-child(2) { --ymm-stagger: 2; }
  .ymm-home-categories .ymm-category-grid > a:nth-child(3), .ymm-section--products .ymm-product-card:nth-child(3) { --ymm-stagger: 3; }
  .ymm-home-categories .ymm-category-grid > a:nth-child(4), .ymm-section--products .ymm-product-card:nth-child(4) { --ymm-stagger: 4; }
  .ymm-home-categories .ymm-category-grid > a:nth-child(5), .ymm-section--products .ymm-product-card:nth-child(5) { --ymm-stagger: 5; }
  .ymm-section--products .ymm-product-card:nth-child(6) { --ymm-stagger: 6; }
  .ymm-category-grid > a:hover { transform: translateY(-6px); }
  .ymm-product-card:hover .ymm-product-card__media img { transform: scale(1.045) translateY(-3px); }
}
@keyframes ymm-showcase-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ymm-showcase-copy { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes ymm-showcase-cover { from { opacity: 0; transform: translateX(24px) rotate(2deg); } to { opacity: 1; transform: none; } }
@keyframes ymm-showcase-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.ymm-home-categories { position: relative; }
.ymm-home-categories::after { content: ''; position: absolute; width: 22rem; height: 22rem; border: 1px solid color-mix(in srgb, var(--ymm-accent) 22%, transparent); border-radius: 50%; inset-inline-start: -10rem; top: 18%; pointer-events: none; animation: ymm-orbit 18s linear infinite; opacity: .45; }
.ymm-slider::before, .ymm-slider::after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; z-index: 0; filter: blur(.2px); }
.ymm-slider::before { width: 34rem; height: 34rem; inset-inline-start: -14rem; top: 12%; border: 1px solid color-mix(in srgb, var(--ymm-accent) 24%, transparent); box-shadow: 0 0 0 60px color-mix(in srgb, var(--ymm-accent) 3%, transparent), 0 0 0 120px color-mix(in srgb, var(--ymm-accent) 2%, transparent); animation: ymm-orbit 24s linear infinite; }
.ymm-slider::after { width: 18rem; height: 18rem; inset-inline-end: -7rem; bottom: 6%; background: radial-gradient(circle, color-mix(in srgb, var(--ymm-accent) 16%, transparent), transparent 68%); animation: ymm-breathe 7s ease-in-out infinite; }
.ymm-home-categories::before {
  content: ''; display: block; width: 86px; height: 2px; margin: 0 0 24px auto;
  background: linear-gradient(90deg, transparent, var(--ymm-accent));
}
.ymm-category-grid > a { min-height: 188px; overflow: hidden; isolation: isolate; background: var(--ymm-panel) center/cover no-repeat; border-color: color-mix(in srgb, var(--ymm-accent) 20%, var(--ymm-line)); }
.ymm-category-grid { grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 12px; }
.ymm-category-grid > a { min-height: 230px; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px; border-radius: 14px; }
.ymm-category-grid > a::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(7,8,10,.12), rgba(7,8,10,.94) 82%); transition: background .35s ease; }
.ymm-category-grid > a:hover::before { background: linear-gradient(180deg, rgba(7,8,10,.02), rgba(7,8,10,.86) 78%); }
.ymm-category-card--1 { background-image: url('../images/categories/category-fiction.png') !important; }
.ymm-category-card--2 { background-image: url('../images/categories/category-philosophy.png') !important; }
.ymm-category-card--3 { background-image: url('../images/categories/category-psychology.png') !important; }
.ymm-category-card--4 { background-image: url('../images/categories/category-science.png') !important; }
.ymm-category-card--5 { background-image: url('../images/categories/category-young-readers.png') !important; }
.ymm-category-card__number { position: absolute; inset-inline-start: 16px; top: 12px; font-size: clamp(38px, 5vw, 70px); line-height: 1; color: rgba(242,236,223,.16); font-family: Georgia, serif; }
.ymm-category-grid > a i { position: absolute; inset-inline-end: 16px; top: 16px; color: var(--ymm-accent); font-style: normal; opacity: .8; transition: transform .25s ease; }
.ymm-category-grid > a:hover i { transform: translate(-4px, 4px); }
.ymm-category-grid > a b, .ymm-category-grid > a small { position: relative; z-index: 1; }
.ymm-product-card { position: relative; overflow: visible; }
.ymm-card-wishlist {
  position: absolute; z-index: 4; inset-inline-end: 12px; top: 12px; width: 38px; height: 38px; padding: 0;
  display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--ymm-line) 80%, transparent); border-radius: 50%;
  background: color-mix(in srgb, var(--ymm-panel) 86%, transparent); color: var(--ymm-muted); opacity: 0; transform: translateY(-5px); transition: opacity .22s, transform .22s, color .22s, background .22s;
}
.ymm-product-card:hover .ymm-card-wishlist, .ymm-card-wishlist:focus-visible, .ymm-card-wishlist.is-active { opacity: 1; transform: none; }
.ymm-card-wishlist.is-active { color: var(--ymm-accent); background: var(--ymm-paper); }
.ymm-card-wishlist svg { width: 17px; height: 17px; }
.ymm-section--products .ymm-products { align-items: stretch; }
.ymm-section--products .ymm-products { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 22px); }
.ymm-section--products .ymm-product-card__media { aspect-ratio: 3 / 4; }
.ymm-section--products .ymm-product-card__media img { transition: transform .45s cubic-bezier(.2,.75,.2,1); }
.ymm-section--products .ymm-product-card:hover .ymm-product-card__media img { transform: scale(1.045); }
.ymm-newsletter-v2 { position: relative; overflow: hidden; }
.ymm-newsletter-v2::before { content: '✦'; position: absolute; inset-inline-end: 8%; top: 18%; color: var(--ymm-accent); font-size: 80px; opacity: .18; }
.ymm-author-collection__portrait { position: relative; min-height: 360px; overflow: hidden; border-radius: var(--ymm-radius); border: 1px solid var(--ymm-line); }
.ymm-author-collection__portrait img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; filter: saturate(.72) contrast(1.05); }
.ymm-author-collection__portrait::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(7,8,10,.84)); pointer-events: none; }
.ymm-author-collection__portrait span { position: absolute; z-index: 1; inset-inline-start: 22px; bottom: 20px; color: var(--ymm-accent); font-size: 10px; letter-spacing: .2em; }
.ymm-magazine-v2 [data-reveal-group] { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
.ymm-magazine-v2 article { overflow: hidden; border: 1px solid var(--ymm-line); border-radius: var(--ymm-radius); background: var(--ymm-panel); }
.ymm-magazine-v2 article img { display: block; width: 100%; aspect-ratio: 1.45; object-fit: cover; filter: saturate(.72); transition: transform .5s ease; }
.ymm-magazine-v2 article:hover img { transform: scale(1.045); }
.ymm-magazine-v2 article > span, .ymm-magazine-v2 article > h3, .ymm-magazine-v2 article > p { display: block; margin-inline: 20px; }
.ymm-magazine-v2 article > span { margin-top: 20px; }
.ymm-magazine-v2 article > p { padding-bottom: 18px; }
.woocommerce.single-product div.product { position: relative; padding: clamp(20px, 4vw, 56px); border: 1px solid var(--ymm-line); border-radius: 18px; background: radial-gradient(circle at 15% 20%, color-mix(in srgb, var(--ymm-accent) 7%, transparent), transparent 34%), var(--ymm-panel); }
.woocommerce.single-product div.product .woocommerce-product-gallery { border-radius: 14px; overflow: hidden; background: #0c0d0f; }
.woocommerce.single-product div.product .woocommerce-product-gallery img { transition: transform .65s cubic-bezier(.2,.8,.2,1), filter .4s ease; }
.woocommerce.single-product div.product .woocommerce-product-gallery:hover img { transform: scale(1.035) rotate(-1deg); filter: brightness(1.06); }
.woocommerce.single-product div.product .summary { padding: clamp(18px, 3vw, 38px); border: 1px solid var(--ymm-line); border-radius: 14px; background: color-mix(in srgb, var(--ymm-panel) 88%, transparent); }
.woocommerce.single-product .single_add_to_cart_button { min-height: 54px; border-radius: 999px; padding-inline: 30px; }
.woocommerce-cart .cart-collaterals, .woocommerce-checkout #customer_details, .woocommerce-checkout #order_review { border: 1px solid var(--ymm-line); border-radius: 14px; background: var(--ymm-panel); padding: clamp(18px, 3vw, 32px); }
.woocommerce-checkout .ymm-checkout-steps { display: flex; justify-content: center; gap: 14px; margin-block: 12px 30px; color: var(--ymm-muted); }
.woocommerce-checkout .ymm-checkout-steps .is-current { color: var(--ymm-accent); }
@keyframes ymm-orbit { to { transform: rotate(360deg); } }
@keyframes ymm-breathe { 0%,100% { transform: scale(.92); opacity: .4; } 50% { transform: scale(1.12); opacity: .8; } }
.ymm-account-dashboard { padding-block: clamp(28px, 6vw, 84px); }
.ymm-account-hero { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: clamp(24px, 4vw, 56px); margin-bottom: 20px; border: 1px solid var(--ymm-line); border-radius: calc(var(--ymm-radius) + 8px); background: linear-gradient(135deg, var(--ymm-panel), color-mix(in srgb, var(--ymm-accent) 8%, var(--ymm-panel))); }
.ymm-account-hero h1 { max-width: 720px; margin: 12px 0; font-size: clamp(28px, 4vw, 56px); }
.ymm-account-avatar { width: 88px; height: 88px; display: grid; place-items: center; border-radius: 50%; background: var(--ymm-paper); color: var(--ymm-bg); font-size: 38px; font-weight: 700; flex-shrink: 0; }
.ymm-account-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; }
.ymm-account-quick a, .ymm-account-panel { border: 1px solid var(--ymm-line); border-radius: var(--ymm-radius); background: var(--ymm-panel); }
.ymm-account-quick a { padding: 20px; transition: transform .25s ease, border-color .25s ease; }
.ymm-account-quick a:hover { transform: translateY(-4px); border-color: var(--ymm-accent); }
.ymm-account-quick b, .ymm-account-quick small { display: block; }
.ymm-account-quick small { margin-top: 8px; color: var(--ymm-muted); }
.ymm-account-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); gap: 20px; }
.ymm-account-panel { padding: clamp(20px, 3vw, 34px); }
.ymm-account-panel > header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.ymm-account-panel > header span, .ymm-account-panel > span { color: var(--ymm-accent); font-size: 10px; letter-spacing: .2em; }
.ymm-account-orders { display: grid; gap: 10px; }
.ymm-account-orders a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 16px; border: 1px solid var(--ymm-line); border-radius: 10px; }
.ymm-account-orders span small { display: block; margin-top: 5px; color: var(--ymm-muted); }
.ymm-account-notices { background: linear-gradient(145deg, color-mix(in srgb, var(--ymm-accent) 14%, var(--ymm-panel)), var(--ymm-panel)); }
.ymm-account-notices h2, .ymm-account-support h2 { margin: 12px 0 8px; }
.ymm-account-support { margin-top: 20px; }
@media (max-width: 760px) { .ymm-account-hero { align-items: flex-start; } .ymm-account-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ymm-account-grid { grid-template-columns: 1fr; } .ymm-account-orders a { grid-template-columns: 1fr auto; } .ymm-account-orders a span { grid-column: 1 / -1; order: 3; } }
@media (max-width: 720px) {
  .ymm-card-wishlist { opacity: 1; transform: none; width: 34px; height: 34px; }
  .ymm-category-grid > a { min-height: 150px; }
  .ymm-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ymm-magazine-v2 [data-reveal-group] { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) { .ymm-section--products .ymm-products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .ymm-section--products .ymm-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
