/* ==========================================================================
   India Pet Shop — Product detail page
   Desktop: gallery + sticky buy box. Mobile: swipe gallery + sticky buy bar.
   Tokens, buttons and the product card come from ui-kit.css.
   ========================================================================== */

.ips-pd {
    font-family: var(--hm-font);
    color: var(--hm-ink);
    background: #f7f6fb;
    padding: calc(var(--hm-header-h, 120px) + 16px) 0 64px;
}

.ips-pd *,
.ips-pd *::before,
.ips-pd *::after {
    box-sizing: border-box;
}

.ips-pd :where(img) {
    max-width: 100%;
    display: block;
}

.ips-pd :where(a) {
    color: inherit;
    text-decoration: none;
}

.ips-pd :where(h1, h2, h3, p, ul, ol, fieldset) {
    margin: 0;
}

.ips-pd :where(ul, ol) {
    padding: 0;
    list-style: none;
}

.ips-pd :where(fieldset) {
    border: 0;
    padding: 0;
    min-width: 0;
}

.ips-pd :where(button, input, textarea) {
    font-family: inherit;
}

/* The theme's `main { overflow: hidden }` breaks position: sticky. */
main:has(.ips-pd),
body.pd-page main {
    overflow: visible;
    overflow-x: clip;
}

.pd-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Breadcrumb ---------- */

.pd-crumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--hm-muted);
    margin-bottom: 16px;
}

.pd-crumbs li + li::before {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 9px;
    margin-right: 6px;
    opacity: 0.6;
}

.pd-crumbs a:hover {
    color: var(--hm-primary);
}

.pd-crumbs [aria-current] {
    color: var(--hm-ink);
    font-weight: 500;
}

/* ---------- Top layout ---------- */

.pd-top {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}

/* ---------- Gallery ---------- */

.pd-gallery {
    position: sticky;
    top: calc(var(--sh-main-h, 74px) + 16px);
    display: flex;
    gap: 14px;
}

.pd-thumbs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 76px;
    flex-shrink: 0;
    max-height: 560px;
    overflow-y: auto;
    scrollbar-width: none;
}

.pd-thumbs::-webkit-scrollbar {
    display: none;
}

.pd-thumb {
    width: 76px;
    height: 76px;
    flex-shrink: 0;
    border-radius: 12px;
    border: 2px solid transparent;
    background: var(--hm-white);
    padding: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.pd-thumb.is-active,
.pd-thumb:hover {
    border-color: var(--hm-primary);
}

.pd-stage {
    position: relative;
    flex: 1;
    min-width: 0;
    background: var(--hm-white);
    border: 1px solid var(--hm-line);
    border-radius: 22px;
    overflow: hidden;
}

.pd-slides {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.pd-slides::-webkit-scrollbar {
    display: none;
}

.pd-slide {
    flex: 0 0 100%;
    aspect-ratio: 1;
    scroll-snap-align: center;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}

.pd-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 24px;
    transition: transform 0.2s ease;
}

.pd-slide.is-zoomed img {
    transform: scale(2);
}

.pd-off-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--hm-pink);
    color: var(--hm-white);
    font-weight: 700;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 999px;
}

.pd-off-badge[hidden] {
    display: none;
}

.pd-stage__actions {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pd-round-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0;
    background: var(--hm-white);
    color: var(--hm-ink);
    box-shadow: var(--hm-shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.pd-round-btn:hover {
    transform: scale(1.08);
}

.pd-dots {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: none;
    gap: 6px;
}

.pd-dots span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #d6d1e6;
    transition: width 0.25s ease, background-color 0.25s ease;
}

.pd-dots span.is-active {
    width: 20px;
    background: var(--hm-primary);
}

/* ---------- Buy box ---------- */

.pd-info {
    background: var(--hm-white);
    border: 1px solid var(--hm-line);
    border-radius: 22px;
    padding: 28px;
}

.pd-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.pd-brand {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hm-primary) !important;
    background: var(--hm-primary-soft);
    padding: 5px 12px;
    border-radius: 999px;
}

.pd-rating-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--hm-muted);
}

.pd-rating-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #138a52;
    color: var(--hm-white);
    font-weight: 700;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 6px;
}

.pd-rating-pill i {
    font-size: 10px;
}

.pd-title {
    font-size: clamp(20px, 2.2vw, 28px);
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 16px !important;
}

.pd-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
}

.pd-price strong {
    font-size: 32px;
    font-weight: 800;
    color: var(--hm-ink);
    line-height: 1;
}

.pd-price del {
    font-size: 17px;
    color: var(--hm-muted);
}

.pd-price__off {
    font-size: 15px;
    font-weight: 700;
    color: #138a52;
}

.pd-price [hidden],
.pd-mbar [hidden] {
    display: none;
}

.pd-tax {
    font-size: 12px;
    color: var(--hm-muted);
    margin-top: 6px !important;
}

.pd-stock {
    margin: 14px 0 4px !important;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pd-stock:empty {
    display: none;
}

.pd-stock::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.pd-stock.is-in { color: #138a52; }
.pd-stock.is-low { color: #e2501f; }
.pd-stock.is-out { color: #b42318; }

.pd-form {
    border-top: 1px solid var(--hm-line);
    margin-top: 18px;
    padding-top: 18px;
}

.pd-option {
    margin-bottom: 20px !important;
}

.pd-option legend {
    font-size: 14px;
    color: var(--hm-muted);
    margin-bottom: 10px;
    padding: 0;
    float: none;
    width: auto;
}

.pd-option legend b {
    color: var(--hm-ink);
}

.pd-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pd-pill {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 9px 14px;
    border: 1.5px solid var(--hm-line);
    border-radius: 12px;
    background: var(--hm-white);
    cursor: pointer;
    margin: 0;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.pd-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pd-pill__value {
    font-weight: 600;
    font-size: 14px;
}

.pd-pill__price {
    font-size: 11px;
    color: var(--hm-muted);
    margin-top: 2px;
}

.pd-pill:hover {
    border-color: var(--hm-primary);
}

.pd-pill:has(input:checked) {
    border-color: var(--hm-primary);
    background: var(--hm-primary-soft);
    box-shadow: 0 0 0 1px var(--hm-primary);
}

.pd-pill:has(input:checked) .pd-pill__value {
    color: var(--hm-primary);
}

.pd-pill:focus-within {
    outline: 2px solid var(--hm-primary);
    outline-offset: 2px;
}

.pd-pill.is-disabled {
    cursor: not-allowed;
    opacity: 0.55;
    background: repeating-linear-gradient(135deg, #fff, #fff 6px, #f4f2f9 6px, #f4f2f9 12px);
}

.pd-pill.is-disabled .pd-pill__value {
    text-decoration: line-through;
}

.pd-swatches {
    display: flex;
    gap: 12px;
}

.pd-swatch {
    position: relative;
    cursor: pointer;
    margin: 0;
}

.pd-swatch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pd-swatch span {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 3px solid var(--hm-white);
    box-shadow: 0 0 0 1px var(--hm-line);
    transition: box-shadow 0.15s ease;
}

.pd-swatch input:checked + span {
    box-shadow: 0 0 0 2px var(--hm-primary);
}

.pd-swatch input:focus-visible + span {
    outline: 2px solid var(--hm-primary);
    outline-offset: 3px;
}

.pd-personal {
    background: #fff8ec;
    border: 1px dashed #f4c06a !important;
    border-radius: 14px;
    padding: 14px 16px !important;
}

.pd-personal legend {
    color: #9a5b00;
    font-weight: 600;
    float: left;
    margin-bottom: 12px;
}

.pd-personal__grid {
    clear: both;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pd-personal label,
.pd-field {
    display: block;
    margin: 0;
}

.pd-personal label span,
.pd-field span {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--hm-muted);
    margin-bottom: 6px;
}

.pd-personal input,
.pd-field input,
.pd-field textarea {
    width: 100%;
    border: 1px solid var(--hm-line);
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 14px;
    background: var(--hm-white);
    outline: 0;
}

.pd-personal input:focus,
.pd-field input:focus,
.pd-field textarea:focus {
    border-color: var(--hm-primary);
}

/* Quantity + actions */

.pd-buy {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.pd-qty {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--hm-line);
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
}

.pd-qty button {
    width: 40px;
    height: 100%;
    min-height: 50px;
    border: 0;
    background: transparent;
    color: var(--hm-ink);
    cursor: pointer;
}

.pd-qty button:hover {
    background: #f3f1f9;
}

.pd-qty input {
    width: 42px;
    border: 0;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    outline: 0;
    -moz-appearance: textfield;
}

.pd-qty input::-webkit-outer-spin-button,
.pd-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.pd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.pd-btn:active:not(:disabled) {
    transform: scale(0.98);
}

.pd-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pd-btn.is-busy {
    opacity: 0.7;
    pointer-events: none;
}

.pd-buy .pd-btn {
    flex: 1;
}

.pd-btn--cart {
    background: var(--hm-primary-soft);
    color: var(--hm-primary) !important;
    border-color: var(--hm-primary-soft);
}

.pd-btn--cart:hover:not(:disabled) {
    border-color: var(--hm-primary);
}

.pd-btn--buy {
    background: var(--hm-primary);
    color: var(--hm-white) !important;
    box-shadow: 0 10px 24px rgba(91, 47, 214, 0.28);
}

.pd-btn--buy:hover:not(:disabled) {
    background: var(--hm-primary-dark);
}

.pd-btn--outline {
    border-color: var(--hm-primary);
    color: var(--hm-primary) !important;
    background: var(--hm-white);
    width: 100%;
}

.pd-btn--outline:hover {
    background: var(--hm-primary);
    color: var(--hm-white) !important;
}

.pd-btn--ghost {
    background: #f3f1f9;
    color: var(--hm-ink) !important;
}

.pd-btn--block {
    width: 100%;
}

/* Share */

.pd-share-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    font-size: 13px;
    color: var(--hm-muted);
}

.pd-share-row a,
.pd-share-row button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--hm-line);
    background: var(--hm-white);
    color: var(--hm-ink) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pd-share-row a:hover,
.pd-share-row button:hover {
    background: var(--hm-primary);
    color: var(--hm-white) !important;
}

/* Delivery */

.pd-delivery {
    margin-top: 20px;
    background: #f7f6fb;
    border-radius: 16px;
    padding: 16px;
}

.pd-delivery__head {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.pd-delivery__head i {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--hm-white);
    color: var(--hm-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pd-delivery__head strong {
    display: block;
    font-size: 14px;
}

.pd-delivery__head span {
    font-size: 12px;
    color: var(--hm-muted);
}

.pd-pincode {
    display: flex;
    background: var(--hm-white);
    border: 1px solid var(--hm-line);
    border-radius: 12px;
    overflow: hidden;
}

.pd-pincode input {
    flex: 1;
    min-width: 0;
    border: 0;
    padding: 11px 14px;
    font-size: 14px;
    outline: 0;
}

.pd-pincode button {
    border: 0;
    background: transparent;
    color: var(--hm-primary);
    font-weight: 700;
    padding: 0 18px;
    cursor: pointer;
}

.pd-pincode__msg {
    font-size: 13px;
    margin-top: 8px !important;
}

.pd-pincode__msg:empty {
    display: none;
}

.pd-pincode__msg.is-ok { color: #138a52; }
.pd-pincode__msg.is-error { color: #b42318; }

.pd-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 18px !important;
}

.pd-trust li {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    font-size: 12px;
    color: var(--hm-muted);
    line-height: 1.35;
}

.pd-trust i {
    font-size: 20px;
    color: var(--hm-primary);
}

/* ---------- Details tabs ---------- */

.pd-details {
    margin-top: 40px;
    background: var(--hm-white);
    border: 1px solid var(--hm-line);
    border-radius: 22px;
    overflow: hidden;
}

.pd-tabs {
    display: flex;
    gap: 6px;
    padding: 10px 14px 0;
    border-bottom: 1px solid var(--hm-line);
    overflow-x: auto;
    scrollbar-width: none;
}

.pd-tabs::-webkit-scrollbar {
    display: none;
}

.pd-tabs button {
    position: relative;
    flex-shrink: 0;
    border: 0;
    background: transparent;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    color: var(--hm-muted);
    cursor: pointer;
}

.pd-tabs button::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: -1px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--hm-primary);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.pd-tabs button.is-active {
    color: var(--hm-ink);
}

.pd-tabs button.is-active::after {
    transform: scaleX(1);
}

.pd-tabs__count {
    display: inline-block;
    min-width: 22px;
    font-size: 12px;
    background: #f3f1f9;
    border-radius: 999px;
    padding: 1px 7px;
    margin-left: 4px;
}

.pd-pane {
    display: none;
    padding: 28px;
}

.pd-pane.is-active {
    display: block;
}

/* Admin-written HTML: keep it readable and inside the box. */
.pd-richtext {
    font-size: 15px;
    line-height: 1.75;
    color: #3b3950;
    overflow-wrap: anywhere;
}

.pd-richtext img,
.pd-richtext video,
.pd-richtext iframe {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
}

.pd-richtext table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.pd-richtext td,
.pd-richtext th {
    border: 1px solid var(--hm-line);
    padding: 8px 12px;
}

.pd-richtext ul,
.pd-richtext ol {
    padding-left: 20px;
    list-style: revert;
    margin: 0 0 12px;
}

.pd-richtext p {
    margin-bottom: 12px;
}

/* ---------- Reviews ---------- */

.pd-reviews {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 36px;
    align-items: start;
}

.pd-reviews__score {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.pd-reviews__score > strong {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

.pd-reviews__score span {
    font-size: 13px;
    color: var(--hm-muted);
}

.pd-stars {
    color: #ffb400;
    font-size: 15px;
    display: flex;
    gap: 2px;
    margin-bottom: 4px;
}

.pd-stars--sm {
    font-size: 12px;
}

.pd-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px !important;
}

.pd-bars li {
    display: grid;
    grid-template-columns: 34px 1fr 28px;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.pd-bars li span i {
    font-size: 10px;
    color: #ffb400;
}

.pd-bars em {
    font-style: normal;
    color: var(--hm-muted);
    text-align: right;
}

.pd-bars__track {
    height: 8px;
    background: #f0edf8;
    border-radius: 8px;
    overflow: hidden;
}

.pd-bars__fill {
    height: 100%;
    background: #ffb400;
    border-radius: 8px;
}

.pd-review {
    display: flex;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid var(--hm-line);
}

.pd-review:first-child {
    padding-top: 0;
}

.pd-review.is-hidden {
    display: none;
}

.pd-review__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--hm-primary-soft);
    color: var(--hm-primary);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pd-review__body {
    flex: 1;
    min-width: 0;
}

.pd-review header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.pd-review header strong {
    font-size: 14px;
}

.pd-review time {
    font-size: 12px;
    color: var(--hm-muted);
}

.pd-review p {
    font-size: 14px;
    line-height: 1.65;
    color: #3b3950;
    margin-top: 6px !important;
    overflow-wrap: anywhere;
}

.pd-reviews__more {
    margin-top: 18px;
}

.pd-reviews__empty {
    text-align: center;
    color: var(--hm-muted);
    padding: 30px 10px;
}

.pd-reviews__empty i {
    font-size: 34px;
    color: var(--hm-primary);
    margin-bottom: 10px;
}

/* Review dialog */

.pd-dialog {
    width: min(480px, calc(100% - 24px));
    border: 0;
    border-radius: 22px;
    padding: 0;
    box-shadow: 0 30px 80px rgba(29, 27, 47, 0.35);
    font-family: var(--hm-font);
    color: var(--hm-ink);
}

.pd-dialog::backdrop {
    background: rgba(29, 27, 47, 0.5);
}

.pd-dialog__form {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pd-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pd-dialog__head h3 {
    font-size: 19px;
    font-weight: 700;
}

.pd-dialog__head .pd-round-btn {
    box-shadow: none;
    background: #f3f1f9;
    width: 36px;
    height: 36px;
}

.pd-dialog__errors {
    background: #fdecea;
    color: #b42318;
    border-radius: 10px;
    padding: 10px 14px 10px 30px;
    font-size: 13px;
    list-style: disc;
    margin: 0;
}

.pd-dialog__product {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f7f6fb;
    border-radius: 12px;
    padding: 10px;
    font-size: 13px;
    font-weight: 500;
}

.pd-dialog__product img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    background: var(--hm-white);
    border-radius: 8px;
}

.pd-starpick legend {
    font-size: 12px;
    font-weight: 600;
    color: var(--hm-muted);
    margin-bottom: 6px;
}

/* Stars are rendered 5→1 and reversed visually so CSS can fill the hovered star and those before it. */
.pd-starpick__stars {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 6px;
}

.pd-starpick__stars input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.pd-starpick__stars label {
    font-size: 30px;
    color: #ddd8ea;
    cursor: pointer;
    margin: 0;
    transition: color 0.15s ease, transform 0.15s ease;
}

.pd-starpick__stars label:hover,
.pd-starpick__stars label:hover ~ label,
.pd-starpick__stars input:checked ~ label {
    color: #ffb400;
}

.pd-starpick__stars input:focus-visible + label {
    outline: 2px solid var(--hm-primary);
    border-radius: 4px;
}

/* ---------- Related ---------- */

.pd-related {
    margin-top: 44px;
}

.pd-related__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.pd-related__head h2 {
    font-size: 24px;
    font-weight: 700;
}

.pd-related__head > div {
    display: flex;
    gap: 8px;
}

.pd-nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--hm-line);
    background: var(--hm-white);
    cursor: pointer;
}

.pd-nav:hover {
    background: var(--hm-primary);
    border-color: var(--hm-primary);
    color: var(--hm-white);
}

.pd-related__row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 3 * 18px) / 4);
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.pd-related__row::-webkit-scrollbar {
    display: none;
}

/* ---------- Toast ---------- */

.pd-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 10002;
    transform: translate(-50%, 20px);
    background: var(--hm-ink);
    color: var(--hm-white);
    font-size: 14px;
    font-weight: 500;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(29, 27, 47, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.pd-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.pd-toast.is-error {
    background: #b42318;
}

/* ---------- Mobile sticky bar (hidden on desktop) ---------- */

.pd-mbar {
    display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1199px) {
    .pd-related__row {
        grid-auto-columns: calc((100% - 2 * 18px) / 3);
    }
}

@media (max-width: 991px) {
    .ips-pd {
        padding: calc(var(--hm-header-h, 100px) + 8px) 0 calc(96px + env(safe-area-inset-bottom));
    }

    .pd-container {
        padding: 0 14px;
    }

    .pd-top {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .pd-gallery {
        position: static;
        margin: 0 -14px;
    }

    .pd-thumbs {
        display: none;
    }

    .pd-stage {
        border-radius: 0;
        border: 0;
    }

    .pd-slide {
        cursor: default;
    }

    .pd-slide img {
        padding: 16px;
    }

    .pd-dots {
        display: flex;
    }

    .pd-info {
        padding: 18px;
        border-radius: 18px;
    }

    .pd-price strong {
        font-size: 26px;
    }

    .pd-personal__grid {
        grid-template-columns: 1fr;
    }

    /* The sticky bar carries the main actions on mobile. */
    .pd-buy .pd-btn {
        display: none;
    }

    .pd-details {
        margin-top: 20px;
        border-radius: 18px;
    }

    .pd-pane {
        padding: 18px;
    }

    .pd-reviews {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .pd-related__head .pd-nav {
        display: none;
    }

    .pd-related__head h2 {
        font-size: 20px;
    }

    .pd-related__row {
        grid-auto-columns: 46%;
        gap: 12px;
    }

    .pd-mbar {
        display: flex;
        align-items: center;
        gap: 10px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9990;
        background: var(--hm-white);
        padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        box-shadow: 0 -8px 30px rgba(29, 27, 47, 0.12);
    }

    .pd-mbar__price {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        line-height: 1.2;
    }

    .pd-mbar__price strong {
        font-size: 19px;
        font-weight: 800;
    }

    .pd-mbar__price del {
        font-size: 12px;
        color: var(--hm-muted);
    }

    .pd-mbar .pd-btn {
        padding: 13px 16px;
    }

    .pd-mbar .pd-btn--cart {
        width: 50px;
        padding: 13px 0;
    }

    .pd-mbar .pd-btn--buy {
        min-width: 130px;
    }

    .pd-toast {
        bottom: calc(84px + env(safe-area-inset-bottom));
    }

    body.pd-page .go-top,
    body.pd-page .whatsapp,
    body.pd-page .float {
        bottom: calc(86px + env(safe-area-inset-bottom)) !important;
    }

    .pd-dialog {
        width: 100%;
        max-width: 100%;
        margin: auto 0 0;
        border-radius: 22px 22px 0 0;
        max-height: 92vh;
    }
}

@media (max-width: 479px) {
    .pd-related__row {
        grid-auto-columns: 62%;
    }

    .pd-pill {
        min-width: 52px;
        padding: 8px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ips-pd *,
    .ips-pd *::before,
    .ips-pd *::after {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* The theme uppercases placeholders; keep them natural here. */
.ips-pd input::placeholder,
.ips-pd textarea::placeholder {
    text-transform: none;
}
