.product-top{display:grid;grid-template-columns:minmax(0,50%) minmax(0,50%);gap:44px;align-items:start;margin-bottom:64px}.product-gallery{width:100%;min-width:0}.main-image-wrap{background:#e8f5fb;border-radius:12px;padding:28px 24px;display:flex;align-items:center;justify-content:center;margin-bottom:20px;min-height:400px;width:100%;box-sizing:border-box}.main-image-wrap img{width:280px;height:368px;max-width:100%;aspect-ratio:8/10.5;object-fit:contain;object-position:center;border-radius:10px;display:block;cursor:pointer;background:transparent}.thumbnails{display:flex;flex-wrap:wrap;gap:14px}.thumb{width:128px;height:106px;border-radius:8px;overflow:hidden;border:2px solid #dde3ef;cursor:pointer;transition:border-color .2s;flex-shrink:0}.thumb.active,.thumb:hover{border-color:#3ab8b8}.thumb img{width:100%;height:100%;aspect-ratio:6/5;object-fit:contain;object-position:center;display:block;background:transparent}.product-info h1,.product-info .product-title{font-family:'Montserrat',sans-serif;font-weight:800;font-size:2.85rem;color:#1a3a8f;margin:0 0 14px;line-height:1.2}
.product-meta-tags{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-start;
  align-content:flex-start;
  gap:10px;
  margin:0 0 28px;
  width:100%;
  max-width:100%;
  min-width:0;
}
.product-meta-tag{
  display:inline-flex;
  flex:0 1 auto;
  flex-wrap:nowrap;
  align-items:center;
  gap:0;
  padding:6px 12px;
  border-radius:6px;
  border:1px solid transparent;
  font-size:.68rem;
  line-height:1.25;
  box-sizing:border-box;
  max-width:100%;
  min-width:0;
}
.product-meta-tag .meta-label{
  display:none;
}
.product-meta-tag a,
.product-meta-tag .meta-value{
  font-family:'Montserrat',sans-serif;
  font-weight:600;
  font-size:.68rem;
  line-height:1.25;
  text-decoration:none;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
  min-width:0;
}
/* Type scale: price (largest) > title > tags (smallest) */
.product-info h1,
.product-info .product-title{
  font-size:2.85rem;
  line-height:1.12;
}
.product-info .product-title-kn{
  font-size:1.2rem;
  color:#555;
  margin:-6px 0 20px;
}
.product-meta-tag--author{
  background:#eaf5fb;
  border-color:#3ab8b8;
}
.product-meta-tag--author a{
  color:#2a9d9d;
}
.product-meta-tag--author a:hover{
  color:#1a3a8f;
  text-decoration:underline;
}
.product-meta-tag--category{
  background:#fff8e8;
  border-color:#f5a800;
}
.product-meta-tag--category a{
  color:#c87800;
}
.product-meta-tag--category a:hover{
  color:#1a3a8f;
  text-decoration:underline;
}
.product-meta-tag--publisher{
  background:#eef2fb;
  border-color:#1a3a8f;
}
.product-meta-tag--publisher .meta-value{
  color:#1a3a8f;
}
.product-meta-tag--language{
  background:#f0faf4;
  border-color:#2d9a5f;
}
.product-meta-tag--language .meta-value{
  color:#1d6b42;
}
@media(max-width:767px){
  .product-info h1,
  .product-info .product-title{
    font-size:2.4rem;
    line-height:1.15;
    margin:0 0 12px;
  }
  .product-info .product-title-kn{
    font-size:1.12rem!important;
    margin:-4px 0 16px!important;
    line-height:1.35;
  }
  .product-price-now{
    font-size:3.15rem;
    letter-spacing:-.03em;
  }
  .product-price-was{
    font-size:.85rem;
  }
  .product-meta-tags{
    gap:8px;
    margin:0 0 22px;
  }
  .product-meta-tag{
    padding:3px 7px;
    border-radius:4px;
    border-width:1px;
    font-size:.6rem;
    line-height:1.2;
  }
  .product-meta-tag a,
  .product-meta-tag .meta-value{
    font-size:.6rem;
    font-weight:600;
    line-height:1.2;
  }
}
.product-desc{font-size:.92rem;color:#4a5a7a;line-height:1.8;margin-bottom:28px}
.product-buy-area{
  display:flex;
  flex-direction:column;
  gap:24px;
  margin:0 0 32px;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}
.product-price-wrap{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:12px;
  width:100%;
  max-width:100%;
  min-width:0;
}
.product-buy-area .product-price-wrap{
  margin:0;
}
.product-buy-area .product-price-block{
  margin:0;
  width:100%;
  max-width:100%;
}
.product-shipping-note{
  margin:2px 0 0;
  padding:0;
  font-family:'Open Sans',sans-serif;
  font-size:.82rem;
  font-weight:400;
  color:#4a5a7a;
  line-height:1.4;
}
@media(max-width:767px){
  .product-shipping-note{
    font-size:.75rem;
  }
}
.product-buy-area .product-actions-line{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
  gap:18px;
  width:100%;
  min-width:0;
}
.product-buy-area .product-actions-line .info-rows--qty{
  margin:0;
  flex:0 0 auto;
}
.product-buy-area .product-actions-line .book-detail-actions{
  flex:1 1 auto;
  min-width:0;
  margin-top:0;
  padding:0;
}
/* Small screens: price in content; qty + buttons in fixed bottom bar */
@media(max-width:767px){
  .product-buy-area{
    flex-direction:column;
    align-items:stretch;
    gap:20px;
    margin-bottom:20px;
  }
  .product-buy-area .product-price-block{
    flex:none;
    width:100%;
  }
  .product-buy-area .product-actions-line{
    display:flex;
    flex-direction:row;
    flex-wrap:nowrap;
    align-items:center;
    gap:12px;
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    z-index:500;
    margin:0;
    width:100%;
    max-width:100vw;
    padding:10px 12px;
    padding-bottom:calc(10px + env(safe-area-inset-bottom,0px));
    background:#fff;
    border-top:1.5px solid #dde3ef;
    box-shadow:0 -6px 24px rgba(26,58,143,.12);
    box-sizing:border-box;
  }
  .product-buy-area .product-actions-line .info-rows--qty{
    flex:0 0 auto;
    width:max-content;
    max-width:max-content;
    margin:0;
    height:46px;
    min-height:46px;
    display:inline-flex!important;
    align-items:center;
    border-radius:10px;
  }
  .product-buy-area .product-actions-line .info-rows--qty .info-row{
    height:100%;
    min-height:46px;
    padding:0 6px;
    gap:0;
    align-items:center;
    justify-content:center;
  }
  .product-buy-area .product-actions-line .info-rows--qty .info-label{
    display:none;
  }
  .product-buy-area .product-actions-line .info-rows--qty .qty-input{
    width:40px;
    height:40px;
    line-height:40px;
    font-size:.9rem;
    border-radius:8px;
  }
  .product-buy-area .product-actions-line .book-detail-actions.book-card-actions{
    flex:1 1 auto;
    min-width:0;
    display:flex;
    flex-direction:row;
    flex-wrap:nowrap;
    gap:12px;
    padding:0;
    margin:0;
    position:static;
    width:auto;
  }
  .product-buy-area .product-actions-line .btn-add-cart,
  .product-buy-area .product-actions-line .btn-buy-now{
    flex:1 1 0;
    min-width:0;
    min-height:46px;
    height:46px;
    padding:12px 10px;
    font-size:.85rem;
    border-radius:10px;
  }
}
@media(min-width:768px){
  .product-buy-area .product-actions-line{
    display:grid;
    grid-template-columns:minmax(0,max-content) minmax(0,1fr);
    gap:18px;
    align-items:stretch;
  }
  .product-buy-area .product-actions-line .info-rows--qty{
    grid-column:1;
    flex:none;
    width:max-content;
    max-width:max-content;
    min-width:0;
    margin:0;
    display:inline-flex!important;
    align-items:center;
    align-self:stretch;
    height:60px;
    min-height:60px;
    box-sizing:border-box;
    border-radius:10px;
  }
  .product-buy-area .product-actions-line .info-rows--qty .info-row{
    height:100%;
    min-height:60px;
    padding:0 12px;
    gap:8px;
    align-items:center;
    width:max-content;
    box-sizing:border-box;
  }
  .product-buy-area .product-actions-line .info-rows--qty .info-label{
    font-size:.8rem;
    min-width:0;
    padding:0;
  }
  .product-buy-area .product-actions-line .info-rows--qty .info-value{
    flex:0 0 auto;
    width:auto;
    align-items:center;
  }
  .product-buy-area .product-actions-line .info-rows--qty .qty-input{
    width:36px;
    height:36px;
    line-height:36px;
    font-size:.88rem;
    border-radius:8px;
  }
  .product-buy-area .product-actions-line .book-detail-actions.book-card-actions{
    grid-column:2;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
    flex:none;
    width:100%;
    min-width:0;
    padding:0;
    margin:0;
    align-items:stretch;
  }
  .product-buy-area .product-actions-line .btn-add-cart,
  .product-buy-area .product-actions-line .btn-buy-now{
    flex:none;
    width:100%;
    min-width:0;
    max-width:none;
    min-height:60px;
    height:60px;
    padding:18px 32px;
    font-family:'Montserrat',sans-serif;
    font-size:1.15rem;
    font-weight:800;
    letter-spacing:.02em;
    text-transform:none;
    white-space:nowrap;
    line-height:1.2;
    border-radius:10px;
  }
}
.product-price-block{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
  justify-content:flex-start;
  gap:16px 20px;
  margin:0;
  padding:0;
  background:none;
  border:none;
  min-width:0;
  box-sizing:border-box;
}
.product-price-was{
  font-family:'Montserrat',sans-serif;
  font-size:1.15rem;
  font-weight:600;
  color:#94a3b8;
  text-decoration:line-through;
  text-decoration-thickness:2px;
  line-height:1;
  flex-shrink:0;
  white-space:nowrap;
}
.product-price-now{
  font-family:'Montserrat',sans-serif;
  font-size:3.5rem;
  font-weight:800;
  color:#1a3a8f;
  line-height:1;
  letter-spacing:-.02em;
  flex-shrink:0;
  white-space:nowrap;
}
.product-price-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:5px 12px;
  font-family:'Montserrat',sans-serif;
  font-size:.75rem;
  font-weight:700;
  color:#fff;
  background:linear-gradient(135deg,#f5a800 0%,#e09800 100%);
  border-radius:20px;
  line-height:1.2;
  flex-shrink:0;
  white-space:nowrap;
}.info-rows{display:flex;flex-direction:column;gap:0;border:1.5px solid #dde3ef;border-radius:10px;overflow:hidden;margin-bottom:24px}.info-row{display:flex;align-items:center;padding:16px 22px;border-bottom:1px solid #eaecf4}.info-row:last-child{border-bottom:none}.info-label{font-family:'Montserrat',sans-serif;font-weight:700;font-size:.9rem;color:#1a3a8f;min-width:110px}.info-value{font-size:.9rem;color:#4a5a7a;flex:1}.price-value{font-family:'Montserrat',sans-serif;font-weight:800;font-size:1.1rem;color:#1a3a8f}.stars{display:flex;align-items:center;gap:4px}.stars span.star{color:#f5a800;font-size:1rem}.stars span.reviews{font-size:.88rem;color:#4a5a7a;margin-left:4px}.qty-input{width:72px;border:1.5px solid #dde3ef;border-radius:6px;padding:8px 12px;font-size:.9rem;color:#1a3a8f;font-family:'Open Sans',sans-serif;text-align:center;outline:none;transition:border-color .2s}.qty-input:focus{border-color:#3ab8b8}.product-info .book-detail-actions{margin-top:4px;padding:14px 0 18px;width:100%;box-sizing:border-box}
.detail-page .product-detail-tabs{
  width:100%;
  margin:48px 0 0;
  min-width:0;
}
.detail-page .product-detail-tabs .tab-buttons{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-bottom:0;
  padding:0 0 16px;
  border-bottom:1px solid #dde3ef;
}
.detail-page .product-detail-tabs .tab-btn{
  border:none;
  border-radius:8px;
  margin:0;
  padding:14px 32px;
  font-family:'Montserrat',sans-serif;
  font-weight:700;
  font-size:.92rem;
  line-height:1.2;
  cursor:pointer;
  transition:background .2s,color .2s;
}
.detail-page .product-detail-tabs .tab-btn.active{
  background:#1a3a8f;
  color:#fff;
}
.detail-page .product-detail-tabs .tab-btn:not(.active){
  background:#eaf5fb;
  color:#1a3a8f;
}
.detail-page .product-detail-tabs .tab-btn:not(.active):hover{
  background:#d4edf5;
}
.detail-page .product-detail-tabs .tab-divider{
  display:none;
}
.detail-page .product-detail-tabs .tab-content{
  padding:28px 4px 0;
}
.detail-page .product-detail-tabs .tab-empty-msg{font-size:.93rem;color:#4a5a7a;line-height:1.7;margin:0;padding:4px 0}
.detail-page .product-detail-tabs .info-rows--meta{
  display:grid!important;
  grid-template-columns:1fr;
  margin-bottom:0;
  max-width:100%;
}
@media(min-width:768px){
  .detail-page .product-detail-tabs .info-rows--meta{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .detail-page .product-detail-tabs .info-rows--meta .info-row{
    border-bottom:1px solid #eaecf4;
    border-right:1px solid #eaecf4;
  }
  .detail-page .product-detail-tabs .info-rows--meta .info-row:nth-child(2n){
    border-right:none;
  }
  .detail-page .product-detail-tabs .info-rows--meta .info-row:nth-last-child(-n+2){
    border-bottom:none;
  }
}
.product-info .info-rows--qty{
  margin-bottom:0;
  background:#fff;
  border:1px solid #dde3ef;
  border-radius:8px;
  overflow:visible;
  display:inline-flex!important;
  width:auto;
  max-width:max-content;
  min-width:0;
  flex:0 0 auto;
  vertical-align:top;
  grid-template-columns:unset!important;
}
.product-info .info-rows--qty .info-row{
  display:inline-flex;
  flex-direction:row!important;
  flex-wrap:nowrap!important;
  align-items:center;
  justify-content:flex-start;
  gap:4px;
  padding:4px 6px;
  border:none;
  border-right:none!important;
  min-height:0;
  width:auto;
  max-width:max-content;
  box-sizing:border-box;
}
.product-info .info-rows--qty .info-row:only-child{border-bottom:none}
.product-info .info-rows--qty .info-label{
  font-family:'Montserrat',sans-serif;
  font-weight:600;
  font-size:.88rem;
  color:#1a3a8f;
  min-width:auto;
  padding:0;
  margin:0;
  line-height:1;
  flex-shrink:0;
  align-self:center;
  white-space:nowrap;
}
.product-info .info-rows--qty .info-value{
  flex:0 0 auto;
  min-width:0;
  display:flex;
  align-items:center;
  line-height:1;
}
.product-info .info-rows--qty .qty-input{
  width:44px;
  height:44px;
  padding:0;
  margin:0;
  border:none;
  border-radius:8px;
  background:#eaf5fb;
  font-family:'Montserrat',sans-serif;
  font-size:.95rem;
  font-weight:600;
  color:#1a3a8f;
  text-align:center;
  line-height:44px;
  vertical-align:middle;
  -moz-appearance:textfield;
  appearance:textfield;
  box-sizing:border-box;
}
.product-info .info-rows--qty .qty-input::-webkit-outer-spin-button,
.product-info .info-rows--qty .qty-input::-webkit-inner-spin-button{
  -webkit-appearance:none;
  margin:0;
}
.product-info .info-rows--qty .qty-input:focus{
  outline:2px solid #3ab8b8;
  outline-offset:2px;
  background:#dff3f8;
}
.tabs-section{margin-top:64px}.tab-buttons{display:flex;gap:8px;margin-bottom:16px}.tab-btn{padding:16px 40px;border:none;border-radius:8px 8px 0 0;font-family:'Montserrat',sans-serif;font-weight:700;font-size:.92rem;cursor:pointer;transition:background .2s,color .2s}.tab-btn.active{background:#1a3a8f;color:#fff}.tab-btn:not(.active){background:#eaf5fb;color:#1a3a8f}.tab-btn:not(.active):hover{background:#d4edf5}.tab-divider{height:1.5px;background:#dde3ef;margin-bottom:48px}.tab-content{display:none;padding:0 8px}.tab-content.active{display:block}.tab-content p{font-size:.93rem;color:#4a5a7a;line-height:1.9;margin-bottom:22px}.tab-content p:last-child{margin-bottom:0}.related-heading{font-family:'Montserrat',sans-serif;font-weight:800;font-size:2rem;color:#1a3a8f;text-align:center;margin:72px 0 28px}.book-cards-grid{display:grid;grid-template-columns:repeat(4,1fr);column-gap:24px;row-gap:32px;margin:0 auto;padding-top:40px;align-items:start}.book-card-link{text-decoration:none;display:flex;flex-direction:column}.book-card-link:hover .book-title{color:#3ab8b8}.book-card{background:url('../images/card.svg') center/cover no-repeat;border-radius:14px;padding:28px 20px 28px;display:flex;flex-direction:column;align-items:center;text-align:center;transition:transform .2s,box-shadow .2s;flex:1}.book-card-link:hover .book-card{transform:translateY(-6px);box-shadow:0 14px 36px rgba(26,58,143,.12)}.book-wrap{position:relative;width:160px;height:220px;margin-top:-20px;margin-bottom:20px;flex-shrink:0;}.book-cover{width:100%;height:100%;aspect-ratio:2/3;object-fit:cover;border-radius:8px;display:block;box-shadow:0 8px 24px rgba(0,0,0,.18);position:relative;z-index:2}.book-wrap::before{display:none}.book-wrap::after{display:none}.book-title{font-family:'Montserrat',sans-serif;font-weight:800;font-size:1rem;color:#1a3a8f;margin-bottom:10px;transition:color .2s}.book-desc{font-size:.85rem;color:#4a5a7a;line-height:1.65;margin-bottom:20px;flex:1}.detail-layout{display:grid;grid-template-columns:1fr 300px;gap:40px;align-items:start}.detail-sidebar .search-box{display:flex;align-items:center;border-radius:10px;background:#fff;border:1.5px solid #dde3ef;padding:6px 6px 6px 16px;gap:8px;margin-bottom:40px}.detail-sidebar .search-box input{border:none;outline:none;flex:1;font-size:.92rem;color:#555;font-family:'Open Sans',sans-serif;background:transparent}.detail-sidebar .search-box input::placeholder{color:#aab0c0}.detail-sidebar .search-box button{background:#f5a800;border:none;width:44px;height:44px;border-radius:8px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .2s}.detail-sidebar .search-box button:hover{background:#e09800}.detail-sidebar .search-box button svg{width:18px;height:18px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.detail-sidebar .sidebar-heading{font-family:'Montserrat',sans-serif;font-weight:800;font-size:1.25rem;color:#1a3a8f;margin-bottom:18px}.detail-sidebar .category-list{display:flex;flex-direction:column;gap:12px;margin-bottom:44px}.detail-sidebar .category-item{display:flex;align-items:center;justify-content:space-between;border:1.5px solid #dde3ef;border-radius:8px;padding:13px 18px;text-decoration:none;font-size:.92rem;color:#4a5a7a;transition:border-color .2s,color .2s,background .2s}.detail-sidebar .category-item:hover,.detail-sidebar .category-item.active{border-color:#3ab8b8;color:#1a3a8f;background:#f0fbfc}.detail-sidebar .category-item.active{font-weight:700}.detail-sidebar .category-item svg{width:14px;height:14px;stroke:#aab;fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.detail-sidebar .category-item:hover svg,.detail-sidebar .category-item.active svg{stroke:#3ab8b8}.detail-sidebar .sidebar-books{display:flex;flex-direction:column;gap:12px;margin-bottom:44px}.detail-sidebar .sidebar-book{display:flex;align-items:center;gap:14px;text-decoration:none;background:#eaf5fb;border-radius:10px;padding:12px 14px;transition:background .2s,transform .2s}.detail-sidebar .sidebar-book:hover{background:#d8eef8;transform:translateX(4px)}.detail-sidebar .sidebar-book img{width:52px;height:70px;aspect-ratio:2/3;border-radius:6px;object-fit:cover;flex-shrink:0;box-shadow:0 3px 8px rgba(0,0,0,.15)}.detail-sidebar .sidebar-book-info h4{font-family:'Montserrat',sans-serif;font-weight:700;font-size:.85rem;color:#1a3a8f;margin-bottom:6px;line-height:1.35;transition:color .2s}.detail-sidebar .sidebar-book:hover .sidebar-book-info h4{color:#3ab8b8}.detail-sidebar .sidebar-book-info span{font-size:.8rem;color:#f5a800;font-family:'Montserrat',sans-serif;font-weight:700}.detail-sidebar .tags-grid{display:flex;flex-wrap:wrap;gap:10px}.detail-sidebar .tag-pill{border:1.5px solid #dde3ef;border-radius:6px;padding:10px 20px;font-size:.88rem;color:#4a5a7a;text-decoration:none;transition:border-color .2s,color .2s,background .2s}.detail-sidebar .tag-pill:hover{border-color:#3ab8b8;color:#1a3a8f;background:#f0fbfc}@media(max-width:1100px){.detail-layout{grid-template-columns:1fr 260px;gap:28px}.detail-related-full .book-cards-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:860px){.detail-layout{grid-template-columns:1fr;gap:48px}.product-top{grid-template-columns:1fr;gap:32px}.product-info h1,.product-info .product-title{font-size:1.6rem}.main-image-wrap img{width:260px;height:342px;max-width:min(100%,260px)}.detail-related-full .book-cards-grid{grid-template-columns:repeat(2,1fr)}.detail-sidebar{display:grid;grid-template-columns:1fr 1fr;gap:24px 32px}.detail-sidebar .search-box{grid-column:1/-1}.detail-sidebar .sidebar-books{grid-column:1/-1}}@media(max-width:560px){.detail-related-full .book-cards-grid{grid-template-columns:1fr}.detail-sidebar{grid-template-columns:1fr}}
@media(max-width:640px){.product-top{gap:24px;margin-bottom:40px}.main-image-wrap{min-height:0;padding:18px 16px}.main-image-wrap img{width:min(280px,88vw);height:auto;max-height:400px}.thumbnails{flex-wrap:wrap;justify-content:center;gap:10px}.thumb{width:min(100px,30vw);height:auto;aspect-ratio:6/5}.tab-buttons{flex-wrap:wrap;gap:6px}.tab-btn{padding:12px 14px;font-size:.82rem;flex:1 1 auto;min-width:0;text-align:center}.related-heading{font-size:1.45rem;margin:48px 0 20px}.tabs-section{margin-top:40px}.info-row{flex-direction:column;align-items:flex-start;gap:6px;padding:14px 16px}.info-label{min-width:0}.product-info .info-rows--qty .info-row{flex-direction:row!important;flex-wrap:nowrap!important;align-items:center;padding:8px 10px;gap:8px}.product-info .info-rows--qty .info-label{white-space:nowrap}.product-info .info-rows--qty .qty-input{width:40px;height:40px;line-height:40px;font-size:.9rem}}

/* ── Layout stability (overflow + product grid + rich content + related cards) ── */
.detail-wrap{min-width:0;overflow-x:clip;max-width:100%;box-sizing:border-box}
@media(max-width:430px){.detail-sidebar{min-width:0}}
.detail-page{min-width:0;width:100%;max-width:1200px;margin:0 auto;display:flex;flex-direction:column;gap:0}
.detail-related-full{width:100%;min-width:0;max-width:100%}
.detail-related-full .related-heading{
  margin-top: 56px;
  margin-bottom: 12px;
}
.detail-related-full .book-cards-grid{
  padding-top: 0;
}
.detail-main{min-width:0}
@media(min-width:861px){
  .product-top{
    grid-template-columns:minmax(0,54%) minmax(0,46%);
    gap:48px;
    align-items:start;
  }
  .main-image-wrap{
    min-height:420px;
    padding:32px 28px;
  }
  .main-image-wrap img{
    width:300px;
    height:394px;
    max-width:min(100%,300px);
  }
}
@media(min-width:1100px){
  .product-top{
    grid-template-columns:minmax(0,56%) minmax(0,44%);
  }
  .main-image-wrap img{
    width:320px;
    height:420px;
    max-width:min(100%,320px);
  }
}
.main-image-wrap{position:relative}
.btn-share-image{
  position:absolute;
  top:12px;
  right:12px;
  z-index:2;
  width:40px;
  height:40px;
  padding:0;
  margin:0;
  border:none;
  border-radius:50%;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#1a3a8f;
  font-size:1rem;
  background:rgba(255,255,255,.96);
  box-shadow:0 1px 4px rgba(0,0,0,.14),0 2px 12px rgba(0,0,0,.08);
  border:1px solid rgba(26,58,143,.12);
  transition:background .2s,box-shadow .2s,color .2s,transform .15s;
}
.btn-share-image:hover{
  background:#fff;
  color:#3ab8b8;
  box-shadow:0 2px 8px rgba(0,0,0,.18);
  transform:scale(1.05);
}
.btn-share-image:focus-visible{
  outline:2px solid #3ab8b8;
  outline-offset:2px;
}
@media(max-width:640px){
  .detail-related-full .related-heading{
    margin-top: 40px;
    margin-bottom: 10px;
  }
}
.product-info h1,.product-info .product-title{word-break:break-word;overflow-wrap:anywhere}
/* Admin HTML in details tab: never stretch past viewport */
.tabs-section{min-width:0;overflow-wrap:anywhere}
.tabs-section img,.tabs-section video,.tabs-section iframe,.tabs-section svg{max-width:100%;height:auto!important}
.tabs-section table{max-width:100%;display:block;overflow-x:auto;-webkit-overflow-scrolling:touch}
.tabs-section pre{max-width:100%;overflow-x:auto}
/* Related books: full-width row under main + sidebar; equal card heights */
.detail-related-full .book-cards-grid{align-items:stretch}
.detail-related-full .book-card{
  height:100%;
  box-sizing:border-box;
}
.detail-related-full .book-card-link{
  flex:1;
  display:flex;
  flex-direction:column;
  min-height:0;
  min-width:0;
}
.detail-related-full .book-card .book-title{
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.35;
}
.detail-related-full .book-card .book-desc{
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.65;
  margin-bottom:0;
}

/* Product meta rows: tag lists and long values wrap to new lines (flex min-width fix) */
.product-info .info-rows:not(.info-rows--qty) .info-row{
  align-items:flex-start;
  gap:8px 16px;
}
.product-info .info-rows:not(.info-rows--qty) .info-value{
  min-width:0;
  flex:1 1 auto;
  overflow-wrap:anywhere;
  word-break:break-word;
  line-height:1.55;
}
.product-info .info-rows:not(.info-rows--qty) .info-label{
  flex-shrink:0;
  padding-top:2px;
}

/* Product specs: 1 column on small screens, 2 per row on large (not quantity box) */
.product-info .info-rows:not(.info-rows--qty){
  display:grid!important;
  grid-template-columns:1fr;
  flex-direction:unset;
}
.product-info .info-rows:not(.info-rows--qty) .info-row{
  border-bottom:1px solid #eaecf4;
  min-width:0;
}
.product-info .info-rows:not(.info-rows--qty) .info-row:last-child{
  border-bottom:none;
}
@media(min-width:768px){
  .product-info .info-rows:not(.info-rows--qty){
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .product-info .info-rows:not(.info-rows--qty) .info-row{
    border-bottom:1px solid #eaecf4;
    border-right:1px solid #eaecf4;
  }
  .product-info .info-rows:not(.info-rows--qty) .info-row:nth-child(2n){
    border-right:none;
  }
  .product-info .info-rows:not(.info-rows--qty) .info-row:last-child{
    border-bottom:1px solid #eaecf4;
  }
  .product-info .info-rows:not(.info-rows--qty) .info-row:nth-last-child(-n+2){
    border-bottom:none;
  }
  .product-info .info-rows:not(.info-rows--qty) .info-label{
    min-width:96px;
  }
}

@media(max-width:640px){
  .product-buy-area{
    margin-bottom:22px;
  }
  .product-price-block{
    padding:0;
    margin-bottom:0;
    gap:10px 12px;
    flex-wrap:nowrap;
  }
}
/* Book detail: single-column page (no sidebar) */
.detail-wrap .detail-page{
  display:flex;
  flex-direction:column;
  max-width:1200px;
  margin:0 auto;
  width:100%;
}
.detail-wrap .detail-main{
  width:100%;
}
.detail-wrap .product-top{
  width:100%;
}
.detail-wrap .product-info .product-price-block{
  justify-content:flex-start;
  flex-wrap:nowrap;
  align-items:center;
}
@media(max-width:640px){
  .product-buy-area{
    gap:18px;
  }
}
@media(max-width:400px){
  .product-info h1,
  .product-info .product-title{
    font-size:2.15rem;
  }
  .product-info .product-title-kn{
    font-size:1.05rem!important;
  }
  .product-info .product-price-block{
    gap:8px 10px;
  }
  .product-info .product-price-now{
    font-size:2.95rem;
  }
  .product-info .product-price-was{
    font-size:.82rem;
  }
  .product-info .product-price-badge{
    font-size:.68rem;
    padding:4px 10px;
  }
}
.detail-wrap .detail-related-full{
  grid-column:unset;
  width:100%;
  margin-top:8px;
}
/* Override legacy two-column .detail-layout rules if class is still present */
.detail-wrap .detail-layout{
  display:flex!important;
  flex-direction:column!important;
  grid-template-columns:1fr!important;
  gap:0!important;
  max-width:1200px;
  margin:0 auto;
  width:100%;
}
@media(max-width:1100px){
  .detail-wrap .detail-layout{
    grid-template-columns:1fr!important;
    gap:0!important;
  }
  .detail-wrap .detail-related-full .book-cards-grid{
    grid-template-columns:repeat(3,1fr);
  }
}
@media(max-width:860px){
  .detail-wrap .detail-layout{
    grid-template-columns:1fr!important;
    gap:32px!important;
  }
  .detail-wrap .detail-related-full .book-cards-grid{
    grid-template-columns:repeat(2,1fr);
  }
}
@media(max-width:560px){
  .detail-wrap .detail-related-full .book-cards-grid{
    grid-template-columns:1fr;
  }
}

/* Share row below purchase buttons (matches site Montserrat + teal/navy) */
.product-buy-area .product-share-bar{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  align-items:center;
  gap:14px;
  width:100%;
  margin:28px 0 0;
  padding:18px 0;
  border-top:1.5px solid #eaecf4;
  border-bottom:1.5px solid #eaecf4;
  box-sizing:border-box;
}
.product-share-icons{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  align-items:center;
  gap:12px;
}
.product-share-label{
  font-family:'Montserrat',sans-serif;
  font-size:.88rem;
  font-weight:700;
  color:#1a3a8f;
  margin:0;
  flex-shrink:0;
  line-height:1;
  letter-spacing:.01em;
}
.product-share-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  padding:0;
  border:none;
  border-radius:50%;
  background:#eaf5fb;
  color:#1a3a8f;
  font-size:.9rem;
  line-height:1;
  cursor:pointer;
  text-decoration:none;
  transition:background .2s,color .2s,transform .15s;
}
.product-share-icon:hover{
  background:#3ab8b8;
  color:#fff;
  transform:translateY(-1px);
}
.product-share-icon--native{
  font-size:.88rem;
}
@media(max-width:767px){
  .product-buy-area .product-share-bar{
    margin:20px 0 0;
    padding:14px 0;
    gap:12px;
  }
  .product-share-icons{
    gap:10px;
  }
  .product-share-label{
    font-size:.82rem;
  }
  .product-share-icon{
    width:32px;
    height:32px;
    font-size:.85rem;
  }
}

/* Trust benefits: icon + text rows (site theme) */
.product-info .product-trust-list{
  list-style:none;
  margin:0;
  padding:20px 0 0;
  width:100%;
  display:flex;
  flex-direction:column;
  gap:18px;
  border-top:none;
  box-sizing:border-box;
}
.product-info .product-trust-list li{
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  gap:14px;
  margin:0;
  padding:0;
}
.product-info .product-trust-list-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 36px;
  width:36px;
  height:36px;
  border-radius:50%;
  background:#eaf5fb;
  color:#1a3a8f;
  font-size:.95rem;
  line-height:1;
}
.product-info .product-trust-list-text{
  flex:1 1 auto;
  min-width:0;
  padding-top:6px;
  font-family:'Open Sans',sans-serif;
  font-size:.9rem;
  font-weight:400;
  color:#4a5a7a;
  line-height:1.5;
  letter-spacing:0;
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* Product page: Add to Cart + Buy Now (no icons) */
.product-info .book-detail-actions.book-card-actions{
  padding:0;
}
.product-info .book-detail-actions{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
  gap:12px;
  align-items:stretch;
}
@media(max-width:400px){
  .product-info .book-detail-actions.book-card-actions{
    flex-direction:row;
    flex-wrap:nowrap;
  }
}
.product-info .book-detail-actions .btn-add-cart,
.product-info .book-detail-actions .btn-buy-now{
  flex:1 1 140px;
  min-height:48px;
  padding:12px 20px;
  font-family:'Montserrat',sans-serif;
  font-weight:700;
  font-size:.92rem;
  letter-spacing:.02em;
  text-transform:none;
  border-radius:8px;
  border:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:background .2s,transform .15s,box-shadow .2s;
  box-sizing:border-box;
}
/* Override book.css card button sizing on product detail */
.product-info .book-detail-actions .btn-add-cart,
.product-info .book-detail-actions .btn-buy-now{
  font-size:.92rem;
  letter-spacing:.02em;
  text-transform:none;
  box-shadow:none;
}
.product-info .book-detail-actions .btn-add-cart{
  box-shadow:0 2px 8px rgba(245,168,0,.35);
}
.product-info .book-detail-actions .btn-add-cart{
  background:linear-gradient(135deg,#f5a800 0%,#e09800 100%);
  color:#fff;
  border:none;
  box-shadow:0 2px 8px rgba(245,168,0,.35);
}
.product-info .book-detail-actions .btn-add-cart:hover{
  background:linear-gradient(135deg,#e09800 0%,#cc8800 100%);
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(224,152,0,.45);
}
.product-info .book-detail-actions .btn-buy-now{
  background:#fff;
  color:#1a3a8f;
  border:2px solid #1a3a8f;
  box-shadow:none;
}
.product-info .book-detail-actions .btn-buy-now:hover{
  background:#eaf5fb;
  transform:translateY(-1px);
  box-shadow:0 3px 10px rgba(26,58,143,.12);
}
.product-info .book-detail-actions .btn-add-cart:active,
.product-info .book-detail-actions .btn-buy-now:active{
  transform:translateY(0);
}
/* Mobile: fixed Add to Cart / Buy Now bar at bottom */
.book-detail-actions-spacer{
  display:none;
}
@media(max-width:767px){
  /* Buttons are fixed — no in-flow spacer (was causing a large gap) */
  .book-detail-actions-spacer{
    display:none;
    height:0;
    margin:0;
    padding:0;
  }
  .detail-wrap .product-top{
    margin-bottom:16px!important;
  }
  .detail-page .product-detail-tabs{
    margin-top:32px;
  }
  .detail-page .product-detail-tabs .tab-buttons{
    gap:8px;
    padding-bottom:12px;
  }
  .detail-page .product-detail-tabs .tab-btn{
    padding:12px 18px;
    font-size:.82rem;
    flex:1 1 auto;
    min-width:0;
    text-align:center;
  }
  .detail-page .product-detail-tabs .tab-content{
    padding-top:22px;
  }
  .detail-related-full .related-heading{
    margin-top:40px;
  }
  body.page-inner main#main-content,
  body.page-inner .detail-wrap{
    padding-bottom:calc(72px + env(safe-area-inset-bottom,0px));
  }
  .product-info .product-trust-list{
    margin-top:0;
    padding-top:16px;
    gap:12px;
  }
  .product-info .product-trust-list-icon{
    flex:0 0 32px;
    width:32px;
    height:32px;
    font-size:.88rem;
  }
  .product-info .product-trust-list-text{
    padding-top:4px;
    font-size:.85rem;
    line-height:1.5;
  }
}