.bookshop-single-shell { padding-bottom: 96px; }

.bookshop-single-product {
    background: transparent;
    color: var(--bookshop-ink);
}

.bookshop-single-product__topbar {
    min-height: 54px;
    margin-bottom: 12px;
    padding: 8px 15px;
    border: 1px solid var(--bookshop-line);
    border-radius: 16px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    box-shadow: 0 4px 14px rgba(55,53,34,.035);
}
.bookshop-single-product__topbar > span { display: flex; align-items: center; gap: 7px; color: var(--bookshop-muted); font-size: 11px; }
.bookshop-single-product__topbar > span .bookshop-icon { width: 17px; height: 17px; color: var(--bookshop-secondary); }
.bookshop-single-product__topbar > span a { color: inherit; text-decoration: none; }
.bookshop-single-product__topbar > div { display: flex; gap: 7px; }

.bookshop-product-main-grid {
    display: grid;
    grid-template-columns: minmax(350px, .92fr) minmax(460px, 1.22fr) minmax(305px, .76fr);
    gap: 18px;
    align-items: start;
    direction: rtl;
}

.bookshop-product-gallery-column,
.bookshop-product-info-column,
.bookshop-purchase-column { min-width: 0; }

.bookshop-product-gallery-column,
.bookshop-product-info-column {
    background: #fff;
    border: 1px solid var(--bookshop-line);
    border-radius: 22px;
    box-shadow: 0 5px 18px rgba(55,53,34,.04);
}

.bookshop-product-gallery-column { min-height: 555px; padding: 18px; }
.bookshop-product-info-column { min-height: 625px; }
.bookshop-product-info-column { padding: 31px 31px 27px; }
.bookshop-purchase-column { position: sticky; top: 18px; }

.bookshop-gallery {
    display: grid;
    grid-template-columns: 68px minmax(0,1fr);
    gap: 13px;
    min-height: 518px;
}

.bookshop-gallery__rail {
    display: flex;
    flex-direction: column;
    gap: 9px;
    max-height: 502px;
    overflow: auto;
    scrollbar-width: thin;
}

.bookshop-gallery__thumb {
    appearance: none;
    flex: 0 0 67px;
    width: 67px;
    height: 67px;
    padding: 5px;
    border: 1px solid var(--bookshop-line);
    border-radius: 12px;
    background: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: var(--bookshop-transition);
}
.bookshop-gallery__thumb:hover,
.bookshop-gallery__thumb.is-active { border-color: var(--bookshop-secondary); box-shadow: 0 0 0 3px rgba(250,236,209,.8); }
.bookshop-gallery__thumb img { width: auto !important; height: 55px !important; max-width: 100% !important; object-fit: contain; margin: 0 !important; }

.bookshop-gallery__main {
    position: relative;
    min-height: 502px;
    border-radius: 18px;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 14%, rgba(255,255,255,.96), transparent 34%),
        linear-gradient(145deg, #fffbf3, #f0eee7);
    display: grid;
    place-items: center;
    isolation: isolate;
}
.bookshop-gallery__main::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 58%;
    height: 30px;
    bottom: 70px;
    border-radius: 50%;
    background: rgba(45,43,25,.18);
    filter: blur(18px);
}
.bookshop-gallery__paper { position: absolute; width: 70%; height: 74%; background: rgba(255,255,255,.28); border: 1px solid rgba(255,255,255,.5); border-radius: 55% 45% 46% 54%; transform: rotate(-9deg); filter: blur(.2px); }
.bookshop-gallery__main img { position: relative; z-index: 2; display: block; width: auto !important; height: auto !important; max-width: 76% !important; max-height: 385px !important; object-fit: contain; margin: 0 !important; filter: drop-shadow(0 24px 18px rgba(40,38,22,.21)); transition: opacity 160ms ease, transform 260ms ease; cursor: zoom-in; }
.bookshop-gallery__main:hover img { transform: translateY(-4px) scale(1.012); }
.bookshop-gallery__zoom { position: absolute; z-index: 4; left: 15px; bottom: 15px; width: 43px; height: 43px; border: 0; border-radius: 13px; background: rgba(255,255,255,.94); color: var(--bookshop-secondary); display: grid; place-items: center; cursor: pointer; box-shadow: var(--bookshop-shadow-sm); }

.bookshop-product-heading h1 { margin: 10px 0 5px !important; color: var(--bookshop-ink); font-size: clamp(24px, 2.25vw, 32px) !important; line-height: 1.8 !important; font-weight: 700 !important; letter-spacing: 0 !important; }
.bookshop-product-subtitle { margin: 0; color: #9a998e; font-size: 12px; text-align: right; direction: ltr; }

.bookshop-product-rating-line {
    min-height: 42px;
    margin: 16px 0 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bookshop-line);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px 14px;
    color: var(--bookshop-muted);
    font-size: 11px;
}
.bookshop-product-rating-line a { color: var(--bookshop-secondary-2); text-decoration: none; }
.bookshop-product-rating-line a:hover,
.bookshop-product-rating-line a:focus-visible { color: var(--bookshop-secondary); }
.bookshop-rating-score { display: inline-flex; align-items: center; gap: 4px; color: var(--bookshop-ink); font-weight: 700; }
.bookshop-rating-score b { color: var(--bookshop-warning); font-size: 17px; }
.bookshop-product-code { margin-right: auto; color: #9a998d; }

.bookshop-product-identity { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; margin-bottom: 18px; }
.bookshop-product-identity__item { min-width: 0; min-height: 70px; padding: 11px; border: 1px solid var(--bookshop-line); border-radius: 14px; background: #fff; display: flex; align-items: center; gap: 9px; }
.bookshop-product-identity__item > span { width: 35px; height: 35px; border-radius: 10px; background: var(--bookshop-primary); color: var(--bookshop-secondary); display: grid; place-items: center; }
.bookshop-product-identity__item > span .bookshop-icon { width: 17px; height: 17px; }
.bookshop-product-identity__item div { min-width: 0; }
.bookshop-product-identity__item small { display: block; color: var(--bookshop-muted); font-size: 9px; }
.bookshop-product-identity__item strong { display: block; color: var(--bookshop-secondary); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bookshop-quick-spec-card {
    margin: 0 0 20px;
    padding: 14px;
    border: 1px solid #e6ddc9;
    border-radius: 18px;
    background: linear-gradient(130deg, #fffaf0, #fff);
}
.bookshop-quick-spec-card__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.bookshop-quick-spec-card__header > div { display: flex; align-items: center; gap: 9px; }
.bookshop-quick-spec-card__header > div > span { width: 38px; height: 38px; border-radius: 11px; background: var(--bookshop-secondary); color: #fff; display: grid; place-items: center; }
.bookshop-quick-spec-card__header strong { display: block; font-size: 12px; }
.bookshop-quick-spec-card__header small { display: block; color: var(--bookshop-muted); font-size: 9px; }
.bookshop-quick-spec-card__header a { color: var(--bookshop-secondary); text-decoration: none; font-size: 10px; font-weight: 700; }
.bookshop-quick-spec-card__grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; }
.bookshop-quick-spec-card__grid > div { min-width: 0; min-height: 57px; padding: 8px 10px; border-radius: 11px; background: rgba(255,255,255,.75); border: 1px solid rgba(76,76,26,.07); }
.bookshop-quick-spec-card__grid small { display: block; color: var(--bookshop-muted); font-size: 9px; }
.bookshop-quick-spec-card__grid strong { display: block; color: var(--bookshop-ink); font-size: 11px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bookshop-short-description { margin-top: 18px; }
.bookshop-short-description h2 { margin: 0 0 5px; color: var(--bookshop-ink); font-size: 14px; }
.bookshop-short-description p { margin: 0; color: #606159; font-size: 12px; line-height: 2.05; }

.bookshop-product-benefits { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-top: 20px; padding-top: 17px; border-top: 1px dashed var(--bookshop-line); }
.bookshop-product-benefits > span { min-width: 0; display: grid; grid-template-columns: 28px minmax(0,1fr); grid-template-rows: auto auto; column-gap: 7px; align-items: center; }
.bookshop-product-benefits .bookshop-icon { grid-row: 1/3; width: 27px; height: 27px; color: var(--bookshop-secondary); background: var(--bookshop-primary); border-radius: 9px; padding: 6px; }
.bookshop-product-benefits b { font-size: 10px; line-height: 1.5; }
.bookshop-product-benefits small { color: var(--bookshop-muted); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.bookshop-purchase-card {
    background: #fff;
    border: 1px solid #ddd9cc;
    border-radius: 22px;
    padding: 18px;
    box-shadow: var(--bookshop-shadow);
}
.bookshop-seller-row { min-height: 57px; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 9px; align-items: center; padding-bottom: 13px; border-bottom: 1px solid var(--bookshop-line); }
.bookshop-seller-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--bookshop-primary); color: var(--bookshop-secondary); display: grid; place-items: center; }
.bookshop-seller-row small { display: block; color: var(--bookshop-muted); font-size: 9px; }
.bookshop-seller-row strong { display: block; color: var(--bookshop-ink); font-size: 12px; }
.bookshop-seller-badge { padding: 4px 8px; border-radius: 999px; background: #e8f6ef; color: var(--bookshop-success); font-size: 9px; font-weight: 700; }

.bookshop-delivery-row { min-height: 62px; display: grid; grid-template-columns: 31px minmax(0,1fr); gap: 9px; align-items: center; border-bottom: 1px solid var(--bookshop-line); }
.bookshop-delivery-row > .bookshop-icon { width: 27px; height: 27px; color: var(--bookshop-secondary); }
.bookshop-delivery-row strong { display: block; font-size: 10px; }
.bookshop-delivery-row small { display: block; color: var(--bookshop-muted); font-size: 8px; }

.bookshop-stock-row { min-height: 43px; display: flex; align-items: center; gap: 8px; font-size: 10px; }
.bookshop-stock-row span { width: 8px; height: 8px; border-radius: 50%; }
.bookshop-stock-row.is-in-stock { color: var(--bookshop-success); }
.bookshop-stock-row.is-in-stock span { background: var(--bookshop-success); box-shadow: 0 0 0 5px rgba(37,132,95,.1); }
.bookshop-stock-row.is-out-of-stock { color: var(--bookshop-danger); }
.bookshop-stock-row.is-out-of-stock span { background: var(--bookshop-danger); box-shadow: 0 0 0 5px rgba(216,74,74,.1); }

.bookshop-purchase-price { position: relative; padding: 14px 0 13px; border-top: 1px dashed var(--bookshop-line); text-align: left; }
.bookshop-purchase-price > small { display: block; color: var(--bookshop-muted); font-size: 9px; text-align: right; }
.bookshop-purchase-price > div,
.bookshop-purchase-price .price { color: var(--bookshop-secondary); font-size: 20px; font-weight: 700; line-height: 1.7; }
.bookshop-purchase-price .woocommerce-Price-currencySymbol { font-size: .64em; }
.bookshop-discount-pill { position: absolute; left: 0; top: 13px; padding: 4px 9px; border-radius: 999px; background: var(--bookshop-secondary); color: #fffaf0; font-size: 9px; font-weight: 700; box-shadow: 0 6px 14px rgba(76,76,26,.16); }

.bookshop-native-cart-form form.cart { margin: 0 !important; display: grid !important; gap: 10px; }
.bookshop-native-cart-form .quantity { float: none !important; width: 100%; margin: 0 !important; }
.bookshop-native-cart-form .quantity .qty { width: 100% !important; height: 45px; border: 1px solid var(--bookshop-line) !important; border-radius: 12px !important; background: #faf9f5 !important; padding: 7px 12px !important; text-align: center; color: var(--bookshop-ink); box-shadow: none !important; }
.bookshop-native-cart-form .single_add_to_cart_button,
.bookshop-native-cart-form button.single_add_to_cart_button {
    float: none !important;
    width: 100% !important;
    min-height: 49px !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 13px !important;
    background: var(--bookshop-secondary) !important;
    color: #fff !important;
    font-family: var(--bookshop-font) !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    box-shadow: 0 11px 24px rgba(76,76,26,.2) !important;
    transition: var(--bookshop-transition) !important;
}
.bookshop-native-cart-form .single_add_to_cart_button:hover { transform: translateY(-2px); background: #3f3f14 !important; }
.bookshop-native-cart-form .variations { width: 100%; margin: 0 0 8px !important; border: 0 !important; }
.bookshop-native-cart-form .variations tr { display: grid; grid-template-columns: 1fr; margin-bottom: 8px; }
.bookshop-native-cart-form .variations th,
.bookshop-native-cart-form .variations td { display: block; padding: 0 !important; border: 0 !important; }
.bookshop-native-cart-form .variations label { font-size: 10px; }
.bookshop-native-cart-form .variations select { width: 100%; height: 43px; border: 1px solid var(--bookshop-line); border-radius: 11px; background: #fff; padding: 7px 10px; }
.bookshop-native-cart-form .reset_variations { font-size: 9px; color: var(--bookshop-danger); }
.bookshop-native-cart-form .woocommerce-variation-price { margin-bottom: 8px; color: var(--bookshop-secondary); font-weight: 800; }
.bookshop-native-cart-form .stock { font-size: 10px !important; }

.bookshop-buy-now-btn { appearance: none; width: 100%; min-height: 47px; margin-top: 9px; border: 1px solid var(--bookshop-secondary); border-radius: 13px; background: var(--bookshop-primary); color: var(--bookshop-secondary); display: flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; font-weight: 800; font-size: 12px; transition: var(--bookshop-transition); }
.bookshop-buy-now-btn:hover { background: #fff7e6; transform: translateY(-1px); }
.bookshop-buy-now-btn .bookshop-icon { width: 18px; height: 18px; }

.bookshop-purchase-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
.bookshop-purchase-actions button { appearance: none; min-height: 39px; border: 1px solid var(--bookshop-line); border-radius: 11px; background: #fff; color: #66675d; display: flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; font-size: 9px; transition: var(--bookshop-transition); }
.bookshop-purchase-actions button:hover,
.bookshop-purchase-actions button.is-active { color: var(--bookshop-secondary); border-color: var(--bookshop-primary-deep); background: var(--bookshop-primary-soft); }
.bookshop-purchase-actions .bookshop-icon { width: 15px; height: 15px; }
.bookshop-purchase-actions button.is-active .bookshop-icon { fill: currentColor; }

.bookshop-purchase-notes { list-style: none !important; margin: 15px 0 0 !important; padding: 13px 0 0 !important; border-top: 1px dashed var(--bookshop-line); display: grid; gap: 8px; }
.bookshop-purchase-notes li { margin: 0 !important; padding: 0 !important; display: flex; align-items: center; gap: 7px; color: var(--bookshop-muted); font-size: 9px; }
.bookshop-purchase-notes .bookshop-icon { width: 15px; height: 15px; color: var(--bookshop-success); }
.bookshop-purchase-notes b { color: var(--bookshop-ink); }

.bookshop-product-details-card {
    margin-top: 22px;
    background: #fff;
    border: 1px solid var(--bookshop-line);
    border-radius: 22px;
    box-shadow: 0 5px 18px rgba(55,53,34,.04);
    overflow: hidden;
}
.bookshop-tabs-nav { min-height: 67px; padding: 0 24px; border-bottom: 1px solid var(--bookshop-line); display: flex; align-items: stretch; gap: 27px; overflow-x: auto; scrollbar-width: none; }
.bookshop-tabs-nav::-webkit-scrollbar { display: none; }
.bookshop-tab-btn { position: relative; flex: 0 0 auto; appearance: none; border: 0; background: transparent; color: var(--bookshop-muted); padding: 10px 0; cursor: pointer; font-size: 12px; font-weight: 700; }
.bookshop-tab-btn::after { content: ""; position: absolute; right: 0; left: 0; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.bookshop-tab-btn.is-active { color: var(--bookshop-secondary); }
.bookshop-tab-btn.is-active::after { background: var(--bookshop-secondary); }
.bookshop-tab-btn span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-right: 4px; border-radius: 999px; background: var(--bookshop-primary); color: var(--bookshop-secondary); font-size: 8px; }
.bookshop-tab-panels { padding: 28px 31px 36px; }
.bookshop-tab-panel { animation: bookshop-tab-in 230ms ease; }
@keyframes bookshop-tab-in { from { opacity: 0; transform: translateY(5px); } }
.bookshop-section-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.bookshop-section-heading > span { width: 4px; height: 38px; border-radius: 8px; background: var(--bookshop-secondary); }
.bookshop-section-heading h2 { margin: 0; color: var(--bookshop-ink); font-size: 18px; }
.bookshop-section-heading p { margin: 2px 0 0; color: var(--bookshop-muted); font-size: 10px; }
.bookshop-rich-content { max-width: 1050px; color: #55564e; font-size: 13px; line-height: 2.2; }
.bookshop-rich-content h2,
.bookshop-rich-content h3 { color: var(--bookshop-ink); margin: 28px 0 8px; }
.bookshop-rich-content img { max-width: 100%; height: auto; border-radius: 15px; }

.bookshop-spec-table { border: 1px solid var(--bookshop-line); border-radius: 16px; overflow: hidden; }
.bookshop-spec-row { min-height: 57px; display: grid; grid-template-columns: 35px minmax(150px, .35fr) minmax(0, .65fr); align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--bookshop-line); background: #fff; }
.bookshop-spec-row:last-child { border-bottom: 0; }
.bookshop-spec-row:nth-child(even) { background: #fbfaf7; }
.bookshop-spec-row__number { width: 26px; height: 26px; border-radius: 8px; background: var(--bookshop-primary); color: var(--bookshop-secondary); display: grid; place-items: center; font-size: 9px; font-weight: 700; }
.bookshop-spec-row__label { color: var(--bookshop-muted); font-size: 11px; font-weight: 400; }
.bookshop-spec-row__value { color: var(--bookshop-ink); font-size: 12px; font-weight: 600; line-height: 1.9; }
.bookshop-spec-extras {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 10px;
}
.bookshop-spec-extra {
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--bookshop-line);
    border-radius: 14px;
    background: #fff;
    transition: border-color var(--bookshop-transition), box-shadow var(--bookshop-transition), background var(--bookshop-transition);
}
.bookshop-spec-extra[open] {
    border-color: var(--bookshop-primary-deep);
    box-shadow: 0 9px 24px rgba(55,53,34,.06);
}
.bookshop-spec-extra summary {
    min-height: 58px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: 34px minmax(0,1fr) 21px;
    align-items: center;
    gap: 9px;
    list-style: none;
    cursor: pointer;
    background: #fff !important;
    color: var(--bookshop-ink) !important;
    user-select: none;
    transition: background var(--bookshop-transition), color var(--bookshop-transition);
}
.bookshop-spec-extra summary::-webkit-details-marker { display: none; }
.bookshop-spec-extra summary:hover,
.bookshop-spec-extra summary:focus-visible,
.bookshop-spec-extra[open] summary {
    background: var(--bookshop-primary-soft) !important;
    color: var(--bookshop-secondary) !important;
}
.bookshop-spec-extra summary:focus-visible {
    outline: 2px solid var(--bookshop-primary-deep);
    outline-offset: -2px;
}
.bookshop-spec-extra summary strong { font-size: 12px; font-weight: 700; }
.bookshop-spec-extra__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--bookshop-primary);
    color: var(--bookshop-secondary);
}
.bookshop-spec-extra__icon .bookshop-icon { width: 17px; height: 17px; }
.bookshop-spec-extra__chevron {
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    color: var(--bookshop-muted);
    transition: transform var(--bookshop-transition);
}
.bookshop-spec-extra__chevron .bookshop-icon { width: 15px; height: 15px; }
.bookshop-spec-extra[open] .bookshop-spec-extra__chevron { transform: rotate(180deg); color: var(--bookshop-secondary); }
.bookshop-spec-extra__content {
    padding: 13px 15px 15px;
    border-top: 1px solid var(--bookshop-line);
    color: #5d5e55;
    font-size: 12px;
    font-weight: 400;
    line-height: 2.15;
}
.bookshop-spec-extra__content > :first-child { margin-top: 0; }
.bookshop-spec-extra__content > :last-child { margin-bottom: 0; }
.bookshop-muted-text { color: var(--bookshop-muted); }

#bookshop-reviews #reviews { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(300px,.6fr); gap: 25px; }
#bookshop-reviews #comments { min-width: 0; }
#bookshop-reviews #comments > h2 { display: none; }
#bookshop-reviews .commentlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
#bookshop-reviews .comment { border: 1px solid var(--bookshop-line); border-radius: 15px; padding: 15px; }
#bookshop-reviews .comment_container { display: grid; grid-template-columns: 45px minmax(0,1fr); gap: 11px; }
#bookshop-reviews .avatar { width: 45px !important; height: 45px !important; border-radius: 50%; border: 0 !important; padding: 0 !important; position: static !important; }
#bookshop-reviews .comment-text { margin: 0 !important; padding: 0 !important; border: 0 !important; }
#bookshop-reviews .star-rating { color: var(--bookshop-warning); font-size: 11px; }
#bookshop-reviews .meta { color: var(--bookshop-muted); font-size: 10px; }
#bookshop-reviews .description { color: #5c5d54; font-size: 11px; line-height: 2; }
#bookshop-reviews #review_form_wrapper { padding: 19px; border-radius: 16px; background: var(--bookshop-warm); height: fit-content; }
#bookshop-reviews #reply-title { color: var(--bookshop-ink); font-size: 14px; }
#bookshop-reviews label { color: var(--bookshop-muted); font-size: 10px; }
#bookshop-reviews textarea,
#bookshop-reviews input[type="text"],
#bookshop-reviews input[type="email"] { width: 100%; border: 1px solid var(--bookshop-line); border-radius: 11px; background: #fff; padding: 9px 11px; outline: 0; }
#bookshop-reviews .submit { border: 0 !important; border-radius: 11px !important; background: var(--bookshop-secondary) !important; color: #fff !important; padding: 10px 18px !important; font-family: var(--bookshop-font) !important; }

.bookshop-related-section { margin-top: 30px; }
.bookshop-related-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.bookshop-related-heading h2 { margin: 7px 0 0; color: var(--bookshop-ink); font-size: 22px; }
.bookshop-related-heading > a { color: var(--bookshop-secondary); text-decoration: none; font-size: 11px; font-weight: 700; }
.bookshop-related-grid { --bookshop-columns: 5; }

.bookshop-image-lightbox { position: fixed; inset: 0; z-index: 999990; display: grid; place-items: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity 180ms ease; }
.bookshop-image-lightbox.is-open { opacity: 1; pointer-events: auto; }
.bookshop-lightbox-backdrop { position: absolute; inset: 0; border: 0; background: rgba(25,25,17,.72); backdrop-filter: blur(7px); cursor: zoom-out; }
.bookshop-lightbox-dialog { position: relative; z-index: 1; width: min(820px, 95vw); height: min(820px, 86vh); border-radius: 22px; background: #fff; display: grid; place-items: center; padding: 35px; box-shadow: 0 30px 90px rgba(0,0,0,.35); }
.bookshop-lightbox-dialog img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.bookshop-lightbox-close { position: absolute; left: 13px; top: 13px; width: 39px; height: 39px; border: 0; border-radius: 50%; background: var(--bookshop-warm); color: var(--bookshop-ink); display: grid; place-items: center; cursor: pointer; }

.bookshop-mobile-buybar { display: none; }

@media (max-width: 1350px) {
    .bookshop-product-main-grid { grid-template-columns: minmax(310px,.9fr) minmax(410px,1.2fr) minmax(285px,.8fr); gap: 14px; }
    .bookshop-product-info-column { padding: 25px; }
    .bookshop-gallery__main img { max-height: 355px !important; }
    .bookshop-related-grid { --bookshop-columns: 4; }
}

@media (max-width: 1100px) {
    .bookshop-product-main-grid { grid-template-columns: minmax(330px,.85fr) minmax(0,1.15fr); }
    .bookshop-purchase-column { grid-column: 1 / -1; position: static; }
    .bookshop-purchase-card { display: grid; grid-template-columns: minmax(220px,.8fr) minmax(280px,1.2fr); gap: 0 25px; }
    .bookshop-seller-row,
    .bookshop-delivery-row,
    .bookshop-stock-row,
    .bookshop-purchase-notes { grid-column: 1; }
    .bookshop-purchase-price,
    .bookshop-native-cart-form,
    .bookshop-buy-now-btn,
    .bookshop-purchase-actions { grid-column: 2; }
    .bookshop-purchase-price { grid-row: 1; }
    .bookshop-native-cart-form { grid-row: 2 / span 2; align-self: center; }
    .bookshop-buy-now-btn { grid-row: 4; }
    .bookshop-purchase-actions { grid-row: 5; }
    .bookshop-related-grid { --bookshop-columns: 3; }
}

@media (max-width: 820px) {
    .bookshop-product-main-grid { grid-template-columns: 1fr; }
    .bookshop-product-gallery-column,
    .bookshop-product-info-column { min-height: 0; }
    .bookshop-product-gallery-column { padding: 12px; }
    .bookshop-gallery { min-height: 470px; grid-template-columns: 58px minmax(0,1fr); gap: 8px; }
    .bookshop-gallery__rail { max-height: 450px; }
    .bookshop-gallery__thumb { width: 57px; height: 57px; flex-basis: 57px; }
    .bookshop-gallery__thumb img { height: 47px !important; }
    .bookshop-gallery__main { min-height: 450px; }
    .bookshop-gallery__main img { max-height: 330px !important; }
    .bookshop-purchase-card { display: block; }
    .bookshop-product-identity { grid-template-columns: repeat(3,1fr); }
    .bookshop-product-benefits { grid-template-columns: repeat(3,1fr); }
    #bookshop-reviews #reviews { grid-template-columns: 1fr; }
    .bookshop-related-grid { --bookshop-columns: 2; }
    .bookshop-mobile-buybar {
        position: fixed;
        z-index: 9990;
        right: 0;
        left: 0;
        bottom: 0;
        min-height: 68px;
        padding: 9px max(14px, env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
        border-top: 1px solid var(--bookshop-line);
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(12px);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        box-shadow: 0 -12px 30px rgba(50,48,30,.09);
    }
    .bookshop-mobile-buybar > div { color: var(--bookshop-secondary); font-size: 13px; font-weight: 800; }
    .bookshop-mobile-buybar small { display: block; color: var(--bookshop-muted); font-size: 8px; }
    .bookshop-mobile-buybar button { min-width: 170px; min-height: 46px; border: 0; border-radius: 12px; background: var(--bookshop-secondary); color: #fff; font-weight: 800; cursor: pointer; }
}

@media (max-width: 560px) {
    .bookshop-single-product__topbar { min-height: 48px; padding: 6px 10px; }
    .bookshop-product-gallery-column,
    .bookshop-product-info-column,
    .bookshop-purchase-card,
    .bookshop-product-details-card { border-radius: 17px; }
    .bookshop-product-gallery-column { padding: 8px; }
    .bookshop-gallery { min-height: 360px; grid-template-columns: 1fr; }
    .bookshop-gallery__rail { order: 2; max-height: none; flex-direction: row; overflow-x: auto; }
    .bookshop-gallery__main { min-height: 330px; }
    .bookshop-gallery__main img { max-height: 250px !important; max-width: 72% !important; }
    .bookshop-gallery__thumb { flex-basis: 54px; width: 54px; height: 54px; }
    .bookshop-product-info-column { padding: 20px 16px; }
    .bookshop-product-heading h1 { font-size: 23px !important; }
    .bookshop-product-code { width: 100%; margin-right: 0; }
    .bookshop-product-identity { grid-template-columns: 1fr; }
    .bookshop-product-identity__item { min-height: 59px; }
    .bookshop-quick-spec-card__grid { grid-template-columns: repeat(2,1fr); }
    .bookshop-product-benefits { grid-template-columns: 1fr; }
    .bookshop-purchase-card { padding: 15px; }
    .bookshop-tabs-nav { padding: 0 15px; gap: 19px; }
    .bookshop-tab-panels { padding: 21px 15px 27px; }
    .bookshop-spec-row { grid-template-columns: 29px minmax(90px,.42fr) minmax(0,.58fr); gap: 8px; padding: 9px; }
    .bookshop-spec-row__label,
    .bookshop-spec-row__value { font-size: 10px; }
    .bookshop-spec-extras { grid-template-columns: 1fr; }
    .bookshop-related-heading { align-items: flex-start; }
    .bookshop-related-heading h2 { font-size: 18px; }
    .bookshop-lightbox-dialog { height: 78vh; padding: 25px 12px; }
    .bookshop-mobile-buybar button { min-width: 150px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
    .bookshop-single-product *, .bookshop-image-lightbox * { animation: none !important; transition: none !important; }
}

.bookshop-native-cart-form .quantity.bookshop-quantity-ready {
    position: relative;
    display: grid !important;
    grid-template-columns: 43px minmax(0,1fr) 43px;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--bookshop-line);
    border-radius: 12px;
    background: #faf9f5;
}
.bookshop-native-cart-form .quantity.bookshop-quantity-ready .qty {
    grid-column: 2;
    border: 0 !important;
    border-right: 1px solid var(--bookshop-line) !important;
    border-left: 1px solid var(--bookshop-line) !important;
    border-radius: 0 !important;
    background: transparent !important;
}
.bookshop-qty-button {
    appearance: none;
    height: 43px;
    border: 0;
    background: transparent;
    color: var(--bookshop-secondary);
    cursor: pointer;
    font-size: 19px;
    font-weight: 700;
}
.bookshop-qty-button:hover { background: var(--bookshop-primary); }

/* Prevent global theme hover/focus colors from turning controls blue. */
body.bookshop-pro-product-page .bookshop-tab-btn,
body.bookshop-pro-product-page .bookshop-tab-btn:active {
    border: 0 !important;
    border-radius: 10px 10px 0 0 !important;
    background: transparent !important;
    color: var(--bookshop-muted) !important;
    box-shadow: none !important;
}
body.bookshop-pro-product-page .bookshop-tab-btn:hover,
body.bookshop-pro-product-page .bookshop-tab-btn:focus-visible {
    background: var(--bookshop-primary-soft) !important;
    color: var(--bookshop-secondary) !important;
}
body.bookshop-pro-product-page .bookshop-tab-btn.is-active,
body.bookshop-pro-product-page .bookshop-tab-btn.is-active:hover,
body.bookshop-pro-product-page .bookshop-tab-btn.is-active:focus-visible {
    background: rgba(250,236,209,.62) !important;
    color: var(--bookshop-secondary) !important;
}

body.bookshop-pro-product-page .bookshop-purchase-actions button:hover,
body.bookshop-pro-product-page .bookshop-purchase-actions button:focus-visible,
body.bookshop-pro-product-page .bookshop-gallery__thumb:hover,
body.bookshop-pro-product-page .bookshop-gallery__thumb:focus-visible,
body.bookshop-pro-product-page .bookshop-qty-button:hover,
body.bookshop-pro-product-page .bookshop-qty-button:focus-visible {
    border-color: var(--bookshop-primary-deep) !important;
    background: var(--bookshop-primary-soft) !important;
    color: var(--bookshop-secondary) !important;
    box-shadow: none !important;
}

body.bookshop-pro-product-page .bookshop-buy-now-btn:hover,
body.bookshop-pro-product-page .bookshop-buy-now-btn:focus-visible {
    border-color: var(--bookshop-secondary) !important;
    background: var(--bookshop-primary) !important;
    color: var(--bookshop-secondary) !important;
    box-shadow: none !important;
}
