/* ============================================================
   PRODUCT DETAILS PAGE — Shubham Creations
============================================================ */

.pd-page {
    background: #f8fafc;
    font-family: 'Poppins', Arial, sans-serif;
}

.pd-container {
    width: min(1200px, 94%);
    margin: 0 auto;
    min-width: 0;
}


/* ── Breadcrumb ── */
.pd-breadcrumb-bar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 0;
}

.pd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.pd-breadcrumb a {
    font-size: 13px;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}

.pd-breadcrumb a:hover { color: #1d4ed8; }

.pd-bc-sep {
    color: #9ca3af;
    display: flex;
    align-items: center;
}

.pd-bc-current {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ── Main 2-col layout ── */
.pd-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 36px 0 48px;
    align-items: start;
    min-width: 0;
}


/* ════════════════════════════════════════
   GALLERY
════════════════════════════════════════ */

.pd-gallery {
    position: sticky;
    top: 80px;
}

.pd-gallery-main {
    position: relative;
    background: #f0f7ff;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    margin-bottom: 12px;
}

.pd-gallery-zoom-wrap {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: zoom-in;
}

.pd-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease, opacity 0.2s ease;
}

.pd-gallery-img.is-switching { opacity: 0.45; }

/* Override the global responsive-image auto height inside this fixed gallery. */
#pd-main-img { height: 100% !important; max-height: 100%; object-fit: contain; }

.pd-gallery-zoom-wrap:hover .pd-gallery-img {
    transform: scale(1.08);
}

/* Badges on gallery */
.pd-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 3;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.pd-badge + .pd-badge { top: 44px; }
.pd-badge + .pd-badge + .pd-badge { top: 74px; }

.pd-badge--sale         { background: #fef3c7; color: #b45309; }
.pd-badge--new          { background: #dcfce7; color: #15803d; }
.pd-badge--bestseller   { background: #eff6ff; color: #1d4ed8; }
.pd-badge--refurbished  { background: #f3e8ff; color: #7c3aed; }
.pd-badge--outofstock   { background: #fee2e2; color: #b91c1c; }

/* Thumbnails */
.pd-gallery-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pd-thumb {
    width: 72px;
    height: 72px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #f0f7ff;
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s;
    flex-shrink: 0;
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pd-thumb:hover,
.pd-thumb.is-active {
    border-color: #2563eb;
}


/* ════════════════════════════════════════
   PRODUCT INFO
════════════════════════════════════════ */

.pd-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.pd-info-cat a {
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-decoration: none;
}

.pd-info-cat a:hover { color: #1d4ed8; }

.pd-info-name {
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
    letter-spacing: -0.4px;
    margin: 0;
}

/* Rating */
.pd-info-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pd-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.pd-rating-val {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.pd-rating-count {
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.pd-rating-count:hover { color: #2563eb; }

/* Short desc */
.pd-info-short-desc {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.7;
    border-left: 3px solid #2563eb;
    padding-left: 14px;
}

.pd-info-short-desc p { margin: 0 0 6px; }
.pd-info-short-desc p:last-child { margin: 0; }

/* Price */
.pd-info-price {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pd-price-current {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.5px;
}

.pd-price-current .woocommerce-Price-amount { font-size: inherit; font-weight: inherit; color: inherit; }

.pd-price-regular {
    font-size: 16px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 400;
}

.pd-price-badge {
    background: #dcfce7;
    color: #15803d;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
}

.pd-info-price .price,
.pd-info-price > .woocommerce-Price-amount,
.pd-info-price ins {
    color: #111827;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.pd-info-price del,
.pd-info-price del .woocommerce-Price-amount { color: #9ca3af; font-size: 16px; font-weight: 400; }
.pd-stock .stock { margin: 0; font: inherit; }

/* Stock */
.pd-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
}

/* .pd-stock--in  { background: #dcfce7; color: #15803d; }
.pd-stock--out { background: #fee2e2; color: #b91c1c; } */

/* SKU */
.pd-sku {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

.pd-sku span { color: #6b7280; font-weight: 500; }

/* Variations */
.pd-variations { display: flex; flex-direction: column; gap: 14px; }

.pd-variation-row { display: flex; flex-direction: column; gap: 8px; }

.pd-variation-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.pd-variation-chosen {
    font-weight: 700;
    color: #2563eb;
    margin-left: 4px;
}

.pd-variation-options { display: flex; gap: 8px; flex-wrap: wrap; }

.pd-var-btn {
    padding: 6px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.pd-var-btn:hover,
.pd-var-btn.is-selected {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.pd-variation-price {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    min-height: 28px;
}

.pd-variation-stock {
    font-size: 13px;
    font-weight: 600;
    min-height: 20px;
}

/* Quantity */
.pd-qty-row { display: flex; align-items: center; gap: 12px; }

.pd-qty-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.pd-qty-btn {
    width: 40px;
    height: 44px;
    background: none;
    border: none;
    font-size: 20px;
    font-weight: 400;
    color: #374151;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.pd-qty-btn:hover { background: #f1f5f9; color: #2563eb; }

.pd-qty-input {
    width: 52px;
    height: 44px;
    border: none;
    border-left: 1.5px solid #e5e7eb;
    border-right: 1.5px solid #e5e7eb;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    font-family: inherit;
    outline: none;
    -moz-appearance: textfield;
}

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

/* Actions */
.pd-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.pd-btn-cart {
    flex: 1;
    min-width: 160px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pd-btn-cart:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.pd-btn-buynow {
    flex: 1;
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background: #111827;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    font-family: inherit;
    transition: all 0.2s ease;
}

.pd-btn-buynow:hover {
    background: #1f2937;
    transform: translateY(-1px);
}

/* WooCommerce's native cart and variation markup, styled to match this page. */
.pd-native-cart form.cart {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
}

.pd-native-cart .quantity {
    flex: 0 0 auto;
}

.pd-native-cart .quantity .qty {
    width: 72px;
    min-height: 48px;
    padding: 0 8px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    color: #111827;
    font: 700 15px 'Poppins', Arial, sans-serif;
    text-align: center;
}

.pd-native-cart .single_add_to_cart_button {
    flex: 0 1 118px;
    width: 138px;
    flex: 1;
    min-height: 48px;
    padding: 12px 22px;
    border: 0;
    border-radius: 12px;
    background: #2563eb;
    color: #fff;
    font: 700 15px 'Poppins', Arial, sans-serif;
    cursor: pointer;
}

.pd-native-cart .single_add_to_cart_button:hover { background: #1d4ed8; }
.pd-native-cart .single_add_to_cart_button.disabled { cursor: not-allowed; opacity: .55; }
.pd-native-cart .pd-btn-buynow { min-height: 48px; border: 0; cursor: pointer; }
.pd-native-cart .added_to_cart { display: none !important; }

.pd-native-cart table.variations {
    width: 100%;
    margin: 0 0 14px;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.pd-native-cart table.variations th {
    width: 110px;
    color: #374151;
    font-size: 13px;
    text-align: left;
}

.pd-native-cart table.variations select {
    width: min(100%, 280px);
    min-height: 42px;
    padding: 8px 34px 8px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font: 500 14px 'Poppins', Arial, sans-serif;
}

.pd-native-cart .reset_variations { margin-left: 8px; color: #2563eb; font-size: 12px; }
.pd-native-cart .woocommerce-variation-description { margin: 0 0 8px; color: #4b5563; font-size: 13px; }
.pd-native-cart .woocommerce-variation-price { font-size: 22px; font-weight: 800; margin: 6px 0; }
.pd-native-cart .woocommerce-variation-availability { margin-bottom: 12px; font-size: 13px; }

.product-details-reviews .commentlist { list-style: none; margin: 0 0 32px; padding: 0; }
.product-details-reviews .comment { margin: 0 0 16px; padding: 20px; border: 1px solid #e5e7eb; border-radius: 12px; background: #f8fafc; }
.product-details-reviews .comment_container { display: grid; grid-template-columns: 44px 1fr; gap: 12px; }
.product-details-reviews .avatar { width: 44px; height: 44px; border-radius: 50%; }
.product-details-reviews .meta { color: #6b7280; font-size: 13px; }
.product-details-reviews .description { color: #4b5563; font-size: 14px; line-height: 1.7; }
.product-details-reviews .star-rating { color: #f59e0b; }
.product-details-reviews .comment-respond { border-top: 1px solid #e5e7eb; padding-top: 28px; }
.product-details-reviews input[type="text"], .product-details-reviews input[type="email"], .product-details-reviews textarea, .product-details-reviews select { width: 100%; padding: 10px 14px; border: 1.5px solid #e5e7eb; border-radius: 8px; font: 14px 'Poppins', Arial, sans-serif; }
.product-details-reviews .submit { padding: 12px 28px; border: 0; border-radius: 10px; background: #2563eb; color: #fff; font: 700 14px 'Poppins', Arial, sans-serif; cursor: pointer; }

/* Cart message */
.pd-cart-msg {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

.pd-cart-msg.is-success { background: #dcfce7; color: #15803d; }
.pd-cart-msg.is-error   { background: #fee2e2; color: #b91c1c; }

/* Out of stock message */
.pd-out-of-stock-msg {
    padding: 16px;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

/* Meta */
.pd-meta { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; border-top: 1px solid #f1f5f9; }

.pd-meta-row { display: flex; gap: 8px; font-size: 13px; }

.pd-meta-label { color: #9ca3af; font-weight: 500; min-width: 70px; }

.pd-meta-val { color: #374151; }

.pd-meta-val a { color: #2563eb; text-decoration: none; }

.pd-meta-val a:hover { color: #1d4ed8; }


/* ════════════════════════════════════════
   TABS
════════════════════════════════════════ */

.pd-tabs-section {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 0 48px;
    margin-bottom: 48px;
}

.pd-tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 32px;
    overflow-x: auto;
    scrollbar-width: none;
}

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

.pd-tab-btn {
    padding: 16px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    margin-bottom: -1px;
}

.pd-tab-btn:hover { color: #2563eb; }

.pd-tab-btn.is-active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.pd-tab-panel { display: none; }
.pd-tab-panel.is-active { display: block; }

/* Description */
.pd-description-content {
    font-size: 15px;
    color: #374151;
    line-height: 1.8;
    max-width: 800px;
}

.pd-description-content h2,
.pd-description-content h3 { color: #111827; margin: 20px 0 10px; }

.pd-description-content p { margin: 0 0 14px; }

.pd-description-content ul,
.pd-description-content ol { padding-left: 20px; margin: 0 0 14px; }

.pd-description-content li { margin-bottom: 6px; }

/* Attributes table */
.pd-attr-table {
    width: 100%;
    max-width: 600px;
    border-collapse: collapse;
    font-size: 14px;
}

.pd-attr-table tr { border-bottom: 1px solid #f1f5f9; }

.pd-attr-table th {
    text-align: left;
    padding: 12px 16px 12px 0;
    color: #6b7280;
    font-weight: 600;
    width: 40%;
}

.pd-attr-table td {
    padding: 12px 0;
    color: #111827;
    font-weight: 500;
}


/* ════════════════════════════════════════
   REVIEWS
════════════════════════════════════════ */

.pd-reviews-summary {
    display: flex;
    gap: 48px;
    align-items: flex-start;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.pd-reviews-avg {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.pd-reviews-avg-num {
    font-size: 52px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
    letter-spacing: -2px;
}

.pd-reviews-total {
    font-size: 13px;
    color: #6b7280;
}

.pd-reviews-breakdown {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pd-breakdown-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pd-breakdown-label {
    font-size: 12px;
    color: #6b7280;
    width: 30px;
    flex-shrink: 0;
}

.pd-breakdown-bar {
    flex: 1;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
}

.pd-breakdown-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.pd-breakdown-count {
    font-size: 12px;
    color: #9ca3af;
    width: 20px;
    text-align: right;
    flex-shrink: 0;
}

/* Review list */
.pd-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.pd-review-item {
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.pd-review-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.pd-avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.pd-review-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.pd-review-author {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.pd-review-date {
    font-size: 12px;
    color: #9ca3af;
}

.pd-review-body {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.7;
}

/* Review form */
.pd-review-form-wrap {
    border-top: 1px solid #e5e7eb;
    padding-top: 28px;
}

.pd-review-form-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 20px;
}

.pd-form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.pd-form-row label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.pd-form-row textarea,
.comment-form input[type="text"],
.comment-form input[type="email"] {
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #111827;
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
    resize: vertical;
}

.pd-form-row textarea:focus,
.comment-form input:focus { border-color: #2563eb; }

.pd-review-submit,
.comment-form .submit input {
    padding: 12px 28px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
}

.pd-review-submit:hover,
.comment-form .submit input:hover { background: #1d4ed8; }

.comment-form p { margin-bottom: 14px; }

.comment-form label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 5px;
}


/* ════════════════════════════════════════
   RELATED PRODUCTS
════════════════════════════════════════ */

.pd-related {
    padding: 0 0 56px;
}

.pd-section-title {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.3px;
    margin-bottom: 24px;
}

.pd-related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    min-width: 0;
}


/* ════════════════════════════════════════
   RECENTLY VIEWED
════════════════════════════════════════ */

.pd-recently-viewed {
    padding: 0 0 56px;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
    padding-top: 40px;
}

.pd-rv-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    min-width: 0;
}

.pd-rv-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.pd-rv-card:hover {
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
    transform: translateY(-3px);
}

.pd-rv-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: #f0f7ff;
}

.pd-rv-card-body {
    padding: 12px;
}

.pd-rv-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pd-rv-card-price {
    font-size: 13px;
    font-weight: 700;
    color: #2563eb;
}


/* ════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════ */

@media (max-width: 960px) {
    .pd-main {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 24px 0 36px;
    }

    .pd-gallery { position: static; }

    .pd-gallery-main { aspect-ratio: 4/3; }

    .pd-related-grid,
    .pd-rv-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .pd-info-name { font-size: 20px; }

    .pd-price-current { font-size: 22px; }

    .pd-actions { flex-direction: column; }

    .pd-btn-cart,
    .pd-btn-buynow { width: 100%; min-width: unset; }

    .pd-reviews-summary { flex-direction: column; gap: 20px; }

    .pd-related-grid,
    .pd-rv-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

    .pd-thumb { width: 56px; height: 56px; }

    .pd-tab-btn { padding: 12px 14px; font-size: 13px; }

    .pd-attr-table { font-size: 13px; }
    .pd-attr-table th, .pd-attr-table td { padding: 10px 8px 10px 0; }

    .pd-reviews-avg-num { font-size: 40px; }

    /* Stack variation labels and fields instead of making the product form scroll. */
    .pd-native-cart table.variations,
    .pd-native-cart table.variations tbody,
    .pd-native-cart table.variations tr,
    .pd-native-cart table.variations th,
    .pd-native-cart table.variations td {
        display: block;
        width: 100%;
    }

    .pd-native-cart table.variations {
        border-spacing: 0;
    }

    .pd-native-cart table.variations tr {
        margin-bottom: 12px;
    }

    .pd-native-cart table.variations th {
        padding: 0 0 6px;
    }

    .pd-native-cart table.variations select {
        width: 100%;
    }

    .pd-native-cart .reset_variations {
        display: inline-block;
        margin: 8px 0 0;
    }
}

@media (max-width: 400px) {
    .pd-related-grid,
    .pd-rv-grid { grid-template-columns: 1fr; }

    .pd-thumb { width: 52px; height: 52px; }

    .pd-gallery-thumbs { gap: 6px; }
}

/* Compact product information rhythm and CTA hierarchy. */
.pd-main {
    gap: 36px;
    padding: 28px 0 40px;
}

.pd-info { gap: 10px; }
.pd-info-name { font-size: clamp(20px, 2.6vw, 26px); line-height: 1.18; }
.pd-info-rating { gap: 6px; }
.pd-info-short-desc { line-height: 1.55; padding-left: 11px; }
.pd-info-short-desc p { margin-bottom: 4px; }
.pd-info-price { gap: 8px; }
.pd-stock { padding: 4px 10px; }
.pd-sku { margin: 0; }
.pd-meta { gap: 4px; padding-top: 8px; }

.pd-native-cart form.cart { gap: 10px; }
.pd-native-cart .quantity .qty { min-height: 46px; }

/* Secondary purchase action: intentionally softer than Buy Now. */
.pd-native-cart .single_add_to_cart_button {
    flex: 0 1 118px;
    width: 128px;
    min-height: 38px;
    padding: 8px 14px;
    background: #16a34a;
    color: #fff;
    border: 1px solid #16a34a;
    border-radius: 10px;
    font-size: 14px;
    box-shadow: none;
}

.pd-native-cart .single_add_to_cart_button:hover {
    background: #15803d;
    color: #fff;
}

/* Primary purchase action. */
.pd-native-cart .pd-btn-buynow {
    flex: 0 1 118px;
    width: 118px;
    min-height: 38px;
    padding: 8px 14px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.pd-native-cart .pd-btn-buynow:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
    transform: translateY(-1px);
}

@media (max-width: 960px) {
    .pd-main { gap: 24px; padding: 24px 0 32px; }
}

@media (max-width: 640px) {
    .pd-info { gap: 9px; }
    .pd-native-cart form.cart { gap: 9px; }
    .pd-native-cart .quantity { width: 100%; }
    .pd-native-cart .quantity .qty { width: 100%; }
    .pd-native-cart .single_add_to_cart_button,
    .pd-native-cart .pd-btn-buynow { flex: 1 1 100%; width: 100%; }
}

/* Keep the gallery proportional to the now-compact product information area. */
@media (min-width: 961px) {
    .pd-main { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }

    .pd-gallery-main {
        max-width: 460px;
        aspect-ratio: 4 / 3;
    }
}

/* Product-page AJAX cart feedback; scoped independently from WC notices. */
.pd-cart-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(340px, calc(100vw - 32px));
    padding: 12px 15px;
    border: 1px solid #d1fae5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
    color: #1f2937;
    font-family: 'Poppins', Arial, sans-serif;
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.pd-cart-toast.is-visible { opacity: 1; transform: translateY(0); }
.pd-cart-toast__icon { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #dcfce7; color: #15803d; font-size: 15px; font-weight: 800; flex: 0 0 auto; }
.pd-cart-toast strong, .pd-cart-toast small { display: block; }
.pd-cart-toast strong { font-size: 13px; font-weight: 700; line-height: 1.3; }
.pd-cart-toast small { margin-top: 2px; color: #6b7280; font-size: 12px; line-height: 1.3; }
.pd-cart-toast.is-error { border-color: #fecaca; }
.pd-cart-toast.is-error .pd-cart-toast__icon { background: #fee2e2; color: #b91c1c; }

@media (max-width: 640px) {
    .pd-cart-toast { right: 16px; bottom: 16px; }
}

/* Shared structure keeps WooCommerce Add to Cart and Buy Now exactly aligned. */
.pd-native-cart .single_add_to_cart_button,
.pd-native-cart .pd-btn-buynow {
    flex: 0 0 124px;
    box-sizing: border-box;
    width: 124px;
    min-width: 0;
    min-height: 40px;
    height: 40px;
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
    font-family: 'Poppins', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.pd-native-cart .single_add_to_cart_button {
    background: #16a34a !important;
    color: #fff !important;
    border: 1px solid #16a34a !important;
    box-shadow: none;
}

.pd-native-cart .single_add_to_cart_button:hover,
.pd-native-cart .single_add_to_cart_button:focus-visible {
    background: #15803d !important;
    color: #fff !important;
}

.pd-native-cart .pd-btn-buynow {
    background: #2563eb;
    color: #fff;
    border: 1px solid #2563eb;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.2);
}

.pd-native-cart .pd-btn-buynow:hover,
.pd-native-cart .pd-btn-buynow:focus-visible {
    background: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .pd-native-cart .single_add_to_cart_button,
    .pd-native-cart .pd-btn-buynow {
        flex: 1 1 calc((100% - 9px) / 2);
        width: calc((100% - 9px) / 2);
    }
}

.single_add_to_cart_button,
.pd-btn-buynow {
    border-radius: 10px !important;
}
