/**
 * Pharmacy Product Showcase Widget - CSS (Dynamic Attribute Swatches & Global Site Colors)
 */

:root {
    --pps-primary: var(--e-global-color-primary, #111827);
    --pps-accent: var(--e-global-color-accent, #0066cc);
    --pps-text: var(--e-global-color-text, #374151);
    --pps-secondary: var(--e-global-color-secondary, #64748b);
}

.pps-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: var(--pps-text);
    box-sizing: border-box;
}

.pps-container *,
.pps-container *::before,
.pps-container *::after {
    box-sizing: border-box;
}

/* 2-Column Grid (Spacious Layout with Big Gallery) */
.pps-grid-main {
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 40px;
    align-items: start;
    margin-top: 10px;
}

/* Left Column - Gallery */
.pps-col-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pps-gallery-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pps-badge-bestseller {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: #007a55;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    text-transform: capitalize;
    z-index: 5;
    letter-spacing: 0.3px;
}

.pps-main-image-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    height: 420px;
    padding: 12px;
    background: #ffffff;
}

.pps-image-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pps-main-image {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

/* Bigger, prominent gallery navigation arrows */
.pps-gallery-nav {
    all: unset !important;
    box-sizing: border-box !important;
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 44px !important;
    height: 44px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 50% !important;
    color: #1e293b !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
    z-index: 10 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
    user-select: none !important;
}

.pps-gallery-nav:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    color: var(--pps-accent) !important;
    transform: translateY(-50%) scale(1.08) !important;
}

.pps-prev {
    left: 10px !important;
}

.pps-next {
    right: 10px !important;
}

/* Bigger Thumbnails */
.pps-thumbnails-wrap {
    display: flex;
    gap: 12px;
    margin-top: 22px;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 4px 2px;
    scrollbar-width: thin;
}

.pps-thumb-item {
    all: unset !important;
    box-sizing: border-box !important;
    width: 76px !important;
    height: 76px !important;
    min-width: 76px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 4px !important;
    background: #ffffff !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.pps-thumb-item img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    border-radius: 6px !important;
}

.pps-thumb-item:hover {
    border-color: #94a3b8 !important;
}

.pps-thumb-item.active {
    border-color: var(--pps-accent, #0066cc) !important;
    box-shadow: 0 0 0 2px var(--pps-accent, #0066cc) !important;
}

/* Prescription Card */
.pps-rx-card {
    background-color: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.pps-rx-icon {
    font-size: 28px;
    font-weight: 800;
    color: #e53e3e;
    font-family: Georgia, serif;
    line-height: 1;
}

.pps-rx-content {
    flex: 1;
}

.pps-rx-title {
    color: #c53030;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 3px 0;
}

.pps-rx-desc {
    color: #742a2a;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

/* Right Column - Product Header */
.pps-col-info {
    display: flex;
    flex-direction: column;
}

.pps-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.pps-product-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--pps-primary);
    margin: 0 0 8px 0;
    line-height: 1.25;
}

.pps-product-subtitle {
    font-size: 18px;
    color: var(--pps-secondary);
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

/* Rating & Trust Row */
.pps-trust-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
    font-size: 15px;
}

.pps-stars-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pps-stars {
    color: #f59e0b;
    font-size: 16px;
    letter-spacing: 2px;
}

.pps-rating-score {
    font-weight: 700;
    font-size: 15px;
    color: var(--pps-primary);
}

.pps-review-count {
    font-size: 14.5px;
    color: var(--pps-secondary);
}

.pps-stock-pill {
    background: #ecfdf5;
    color: #047857;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.pps-stock-pill.out-of-stock {
    background: #fef2f2;
    color: #b91c1c;
}

.pps-stock-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #047857;
}

.pps-stock-pill.out-of-stock .pps-stock-dot {
    background: #b91c1c;
}

.pps-customers-badge {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

/* Description */
.pps-description {
    margin-top: 18px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--pps-text);
}

.pps-description p {
    margin: 0;
}

/* Specifications Grid */
.pps-specs-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.pps-spec-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.pps-spec-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 6px;
    background: #f0fdf4;
    color: #007a55;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.pps-spec-icon i {
    font-size: 13px;
    line-height: 1;
}

.pps-spec-icon svg {
    width: 14px;
    height: 14px;
    max-width: 14px;
    max-height: 14px;
    display: block;
    fill: currentColor;
}

.pps-spec-info {
    overflow: hidden;
}

.pps-spec-label {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--pps-secondary);
    line-height: 1.25;
}

.pps-spec-value {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--pps-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* =============================================================
   DYNAMIC ATTRIBUTE BUTTONS (SPACIOUS, BEAUTIFUL, ISOLATED)
   ============================================================= */
.pps-swatches-area {
    margin-top: 28px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.pps-attribute-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}

.pps-attribute-label {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: var(--pps-primary);
    letter-spacing: 0.2px;
    text-transform: capitalize;
}

.pps-pills-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* Reset any theme button interference completely with !important overrides */
.pps-pill-btn {
    all: unset !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #ffffff !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: var(--pps-text) !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    line-height: 1.3 !important;
    margin: 0 !important;
    text-align: center !important;
    user-select: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.pps-pill-btn:hover {
    border-color: var(--pps-accent) !important;
    color: var(--pps-accent) !important;
    background-color: #f8fafc !important;
}

.pps-pill-btn.active {
    background-color: var(--pps-accent) !important;
    border-color: var(--pps-accent) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px);
}

/* =============================================================
   PROPERLY SPACED PURCHASE BOX (PRICE, STEPPER, ADD TO CART)
   ============================================================= */
.pps-purchase-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 24px 26px;
    margin-top: 12px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.pps-price-summary-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.pps-price-block {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.pps-live-price {
    font-size: 34px;
    font-weight: 800;
    color: var(--pps-primary);
    line-height: 1;
}

.pps-live-perpill {
    font-size: 16px;
    font-weight: 600;
    color: var(--pps-secondary);
}

.pps-save-badge {
    font-size: 14px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    background-color: #ecfdf5;
    color: #047857;
    white-space: nowrap;
}

.pps-purchase-action-row {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
}

/* Quantity Stepper */
.pps-quantity-stepper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    height: 52px;
    flex-shrink: 0;
}

.pps-qty-btn {
    all: unset !important;
    box-sizing: border-box !important;
    width: 46px !important;
    height: 52px !important;
    background: #ffffff !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background-color 0.15s, transform 0.1s !important;
    user-select: none !important;
    touch-action: manipulation !important;
    line-height: 1 !important;
}

.pps-qty-btn:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.pps-qty-btn:active {
    background: #e2e8f0 !important;
    transform: scale(0.94) !important;
}

.pps-qty-input {
    all: unset !important;
    box-sizing: border-box !important;
    width: 52px !important;
    height: 52px !important;
    text-align: center !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    background: #ffffff !important;
    border-left: 1px solid #e2e8f0 !important;
    border-right: 1px solid #e2e8f0 !important;
    padding: 0 !important;
    margin: 0 !important;
    -moz-appearance: textfield !important;
}

.pps-qty-input::-webkit-outer-spin-button,
.pps-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Main Add to Cart Button */
.pps-btn-cart-main {
    all: unset !important;
    box-sizing: border-box !important;
    flex: 1 !important;
    height: 52px !important;
    padding: 0 32px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    background-color: var(--pps-accent) !important;
    border: 1px solid var(--pps-accent) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    user-select: none !important;
}

.pps-btn-cart-main:hover {
    opacity: 0.92 !important;
    transform: translateY(-1px) !important;
}

.pps-btn-cart-main.loading {
    opacity: 0.7 !important;
    pointer-events: none !important;
}

.pps-btn-cart-main.success {
    background-color: #059669 !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

/* Action CTAs: WhatsApp & Bulk Inquiry */
.pps-actions-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-top: 8px;
}

.pps-btn-whatsapp {
    background-color: #007a55;
    color: #ffffff;
    padding: 15px 22px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.pps-btn-whatsapp:hover {
    background-color: #006042;
    color: #ffffff;
}

.pps-btn-inquiry {
    background-color: #ffffff;
    border: 1.5px solid var(--pps-accent);
    color: var(--pps-accent);
    padding: 15px 22px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pps-btn-inquiry:hover {
    background-color: #f0f7ff;
}

/* Bottom Trust Banner */
.pps-trust-banner {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    padding: 22px 26px;
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 22px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.pps-trust-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pps-trust-icon {
    font-size: 28px;
    color: var(--pps-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pps-trust-icon svg {
    width: 32px;
    height: 32px;
}

.pps-trust-headline {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--pps-primary);
    line-height: 1.25;
}

.pps-trust-subline {
    display: block;
    font-size: 13px;
    color: var(--pps-secondary);
    margin-top: 3px;
}

/* =============================================================
   RESPONSIVE DESIGN (TABLET & MOBILE OPTIMIZATIONS)
   ============================================================= */
@media (max-width: 1024px) {
    .pps-grid-main {
        grid-template-columns: 360px minmax(0, 1fr) !important;
        gap: 24px !important;
    }

    .pps-product-title {
        font-size: 30px;
    }

    .pps-product-subtitle {
        font-size: 16.5px;
    }

    .pps-live-price {
        font-size: 30px;
    }

    .pps-main-image-wrap {
        height: 340px !important;
        min-height: 340px !important;
    }

    .pps-main-image {
        max-height: 320px !important;
    }

    .pps-specs-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .pps-trust-banner {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
        padding: 18px 20px;
    }
}

@media (max-width: 768px) {
    .pps-container {
        padding: 0 4px;
    }

    /* Stack gallery and info columns on mobile */
    .pps-grid-main {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 100% !important;
        gap: 20px !important;
        width: 100% !important;
    }

    .pps-col-gallery,
    .pps-col-info {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* Mobile Gallery */
    .pps-gallery-card {
        padding: 14px !important;
        border-radius: 12px !important;
    }

    .pps-main-image-wrap {
        height: 290px !important;
        min-height: 290px !important;
        padding: 8px !important;
    }

    .pps-main-image {
        max-height: 270px !important;
    }

    .pps-gallery-nav {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }

    .pps-thumbnails-wrap {
        gap: 8px !important;
        margin-top: 14px !important;
        padding: 2px 0 6px 0 !important;
    }

    .pps-thumb-item {
        width: 58px !important;
        height: 58px !important;
        min-width: 58px !important;
        border-radius: 8px !important;
    }

    /* Mobile Header & Titles */
    .pps-header-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }

    .pps-product-title {
        font-size: 26px !important;
        line-height: 1.25 !important;
        margin-bottom: 4px !important;
    }

    .pps-product-subtitle {
        font-size: 15px !important;
    }

    .pps-trust-row {
        gap: 10px !important;
        margin-top: 12px !important;
        font-size: 13.5px !important;
    }

    .pps-stock-pill,
    .pps-customers-badge {
        font-size: 12px !important;
        padding: 4px 10px !important;
    }

    .pps-description {
        margin-top: 14px !important;
        font-size: 15px !important;
        line-height: 1.6 !important;
    }

    /* Mobile Specs Grid: 2 columns */
    .pps-specs-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        margin-top: 18px !important;
    }

    .pps-spec-card {
        padding: 8px 6px !important;
        gap: 6px !important;
        min-width: 0 !important;
    }

    .pps-spec-icon {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        font-size: 11px !important;
        border-radius: 5px !important;
    }

    .pps-spec-icon svg {
        width: 12px !important;
        height: 12px !important;
        max-width: 12px !important;
        max-height: 12px !important;
    }

    .pps-spec-label {
        font-size: 11px !important;
    }

    .pps-spec-value {
        font-size: 13px !important;
    }

    /* Mobile Attribute Buttons */
    .pps-swatches-area {
        margin-top: 20px !important;
        margin-bottom: 18px !important;
        gap: 16px !important;
    }

    .pps-attribute-label {
        font-size: 15px !important;
    }

    .pps-pills-row {
        gap: 8px !important;
    }

    .pps-pill-btn {
        font-size: 14px !important;
        padding: 10px 16px !important;
    }

    /* Mobile Purchase Box */
    .pps-purchase-box {
        padding: 18px 16px !important;
        margin-top: 8px !important;
        margin-bottom: 18px !important;
        gap: 14px !important;
        border-radius: 12px !important;
    }

    .pps-live-price {
        font-size: 28px !important;
    }

    .pps-live-perpill {
        font-size: 14.5px !important;
    }

    .pps-save-badge {
        font-size: 12.5px !important;
        padding: 4px 10px !important;
    }

    /* Mobile Purchase Actions: Stacked Stepper & Add to Cart */
    .pps-purchase-action-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 12px !important;
        box-sizing: border-box !important;
    }

    .pps-purchase-action-row .pps-quantity-stepper {
        width: 100% !important;
        height: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        box-sizing: border-box !important;
        flex: none !important;
        background: #ffffff !important;
    }

    .pps-purchase-action-row .pps-qty-btn {
        width: 54px !important;
        height: 50px !important;
        font-size: 20px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
    }

    .pps-purchase-action-row .pps-qty-input {
        flex: 1 !important;
        width: auto !important;
        height: 50px !important;
        font-size: 17px !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

    .pps-purchase-action-row .pps-btn-cart-main {
        width: 100% !important;
        height: 50px !important;
        padding: 0 20px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        box-sizing: border-box !important;
        flex: none !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    /* Side-by-side override if user specifically sets "Side by Side (Row)" in Elementor */
    .pps-purchase-action-row[style*="row"] {
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }

    .pps-purchase-action-row[style*="row"] .pps-quantity-stepper {
        width: 120px !important;
        min-width: 110px !important;
        max-width: 130px !important;
        flex: 0 0 120px !important;
        height: 48px !important;
    }

    .pps-purchase-action-row[style*="row"] .pps-qty-btn {
        width: 36px !important;
        height: 48px !important;
    }

    .pps-purchase-action-row[style*="row"] .pps-qty-input {
        width: 44px !important;
        height: 48px !important;
        flex: none !important;
    }

    .pps-purchase-action-row[style*="row"] .pps-btn-cart-main {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        height: 48px !important;
        padding: 0 14px !important;
        font-size: 14.5px !important;
    }

    /* Mobile Actions (WhatsApp & Inquiry) */
    .pps-actions-row {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .pps-btn-whatsapp,
    .pps-btn-inquiry {
        padding: 13px 16px !important;
        font-size: 15px !important;
        justify-content: center !important;
    }

    /* Mobile Trust Banner */
    .pps-trust-banner {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        padding: 16px 18px !important;
        margin-top: 24px !important;
        border-radius: 10px !important;
    }

    .pps-trust-card {
        gap: 12px !important;
    }

    .pps-trust-icon {
        font-size: 24px !important;
    }

    .pps-trust-icon svg {
        width: 26px !important;
        height: 26px !important;
    }

    .pps-trust-headline {
        font-size: 14px !important;
    }

    .pps-trust-subline {
        font-size: 12px !important;
    }
}

/* Very Small Mobile (< 460px) */
@media (max-width: 460px) {
    .pps-main-image-wrap {
        height: 250px !important;
        min-height: 250px !important;
    }

    .pps-main-image {
        max-height: 230px !important;
    }

    .pps-price-summary-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
    }
}

/* =============================================================
   PHARMACY PRODUCT TABS & REVIEWS WIDGET (DESCRIPTION & REVIEWS)
   ============================================================= */
.pps-tabs-wrapper {
    margin-top: 36px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--pps-text, #374151);
    box-sizing: border-box;
    width: 100%;
}

.pps-tabs-wrapper *,
.pps-tabs-wrapper *::before,
.pps-tabs-wrapper *::after {
    box-sizing: border-box;
}

@keyframes ppsTabFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tabs Navigation Bar */
.pps-tabs-nav-bar {
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 24px;
}

.pps-tabs-nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.pps-tab-btn {
    all: unset !important;
    box-sizing: border-box !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #6b7280 !important;
    padding: 12px 4px 14px 4px !important;
    cursor: pointer !important;
    position: relative !important;
    transition: color 0.2s ease !important;
    user-select: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.pps-tab-btn:hover {
    color: #111827 !important;
}

.pps-tab-btn.active {
    color: #111827 !important;
}

.pps-tab-btn.active::after {
    content: '' !important;
    position: absolute !important;
    bottom: -2px !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background-color: #111827 !important;
    border-radius: 2px 2px 0 0 !important;
}

.pps-tab-count {
    font-size: 14px;
    font-weight: 600;
    color: inherit;
    opacity: 0.75;
}

/* Tab Panels */
.pps-tab-panel {
    display: none;
}

.pps-tab-panel.active {
    display: block;
    animation: ppsTabFadeIn 0.22s ease-out;
}

/* =============================================================
   EDITORIAL & MEDICAL REVIEWERS BAR (WITH FLOATING POPOVER)
   ============================================================= */
.pps-editorial-meta-bar {
    margin-bottom: 24px;
}

.pps-last-updated-text {
    font-size: 14.5px;
    font-weight: 500;
    color: #4b5563;
    margin-bottom: 14px;
    letter-spacing: 0.2px;
}

.pps-editorial-pills-row {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
}

.pps-popover-trigger-wrap {
    position: relative;
    display: inline-block;
}

/* Badge Pill Buttons */
.pps-badge-pill {
    all: unset !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background-color: #ffffff !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 8px 18px !important;
    font-size: 15px !important;
    color: #1f2937 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

.pps-badge-pill:hover,
.pps-popover-trigger-wrap.is-open .pps-badge-pill {
    border-color: #cbd5e1 !important;
    background-color: #f8fafc !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.pps-badge-check-icon {
    color: #007a55;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pps-badge-check-icon svg {
    width: 16px;
    height: 16px;
}

.pps-badge-prefix {
    color: #1f2937;
    font-weight: 500;
}

.pps-badge-highlight {
    font-weight: 700;
    color: #007a55;
}

.pps-badge-highlight.reviewer {
    color: #007a55;
}

/* Floating Popover Profile Card */
.pps-floating-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 999;
    width: 350px;
    max-width: 90vw;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
    pointer-events: none;
}

/* Show on hover on Desktop or when clicked/tapped (class is-open) */
.pps-popover-trigger-wrap:hover .pps-floating-popover,
.pps-popover-trigger-wrap.is-open .pps-floating-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.pps-popover-inner {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.pps-popover-avatar-wrap {
    width: 70px;
    height: 70px;
    min-width: 70px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.pps-popover-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pps-popover-details {
    flex: 1;
    min-width: 0;
}

.pps-popover-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: #007a55;
    margin-bottom: 3px;
    line-height: 1.2;
}

.pps-popover-badge svg {
    width: 13px;
    height: 13px;
}

.pps-popover-name {
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 3px 0;
    line-height: 1.25;
}

.pps-popover-credentials {
    font-size: 12.5px;
    font-style: italic;
    color: #4b5563;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.pps-popover-link {
    font-size: 13px;
    font-weight: 700;
    color: #007a55;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s ease;
}

.pps-popover-link:hover {
    color: #00563b;
    text-decoration: underline;
}

/* =============================================================
   DESCRIPTION CONTENT AREA
   ============================================================= */
.pps-desc-content {
    font-size: 16px;
    line-height: 1.75;
    color: #374151;
    margin-top: 14px;
}

.pps-desc-content p {
    margin: 0 0 16px 0;
}

.pps-desc-content p:last-child {
    margin-bottom: 0;
}

.pps-desc-content a {
    color: #007a55;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 122, 85, 0.4);
    transition: border-color 0.15s ease;
}

.pps-desc-content a:hover {
    border-bottom-color: #007a55;
}

.pps-desc-content h2,
.pps-desc-content h3,
.pps-desc-content h4 {
    color: #111827;
    font-weight: 800;
    margin: 24px 0 12px 0;
    line-height: 1.3;
}

.pps-desc-content ul,
.pps-desc-content ol {
    margin: 0 0 16px 20px;
    padding: 0;
}

.pps-desc-content li {
    margin-bottom: 6px;
}

/* =============================================================
   REVIEWS CONTENT AREA (DYNAMIC WOOCOMMERCE REVIEWS)
   ============================================================= */
.pps-reviews-container {
    margin-top: 10px;
}

.pps-reviews-summary-card {
    display: flex;
    gap: 36px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px 30px;
    margin-bottom: 28px;
    align-items: center;
}

.pps-summary-score-col {
    text-align: center;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pps-summary-number {
    font-size: 46px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.pps-star-rating {
    font-size: 18px;
    color: #f59e0b;
    margin: 6px 0;
    letter-spacing: 2px;
}

.pps-summary-total {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.pps-summary-bars-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pps-rating-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.pps-bar-star-num {
    width: 32px;
    font-weight: 600;
    color: #475569;
}

.pps-bar-track {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.pps-bar-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: 4px;
}

.pps-bar-pct {
    width: 38px;
    text-align: right;
    font-weight: 600;
    color: #64748b;
    font-size: 12px;
}

/* Reviews Cards */
.pps-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pps-review-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 22px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.pps-review-author-wrap {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 12px;
}

.pps-review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.pps-review-avatar-letter {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #007a55;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pps-review-author-meta {
    flex: 1;
}

.pps-review-name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2px;
}

.pps-review-author-name {
    font-size: 15.5px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.pps-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 700;
    color: #007a55;
    background: #f0fdf4;
    padding: 2px 8px;
    border-radius: 12px;
}

.pps-review-stars-date {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.pps-review-stars {
    color: #f59e0b;
    letter-spacing: 2px;
}

.pps-review-date {
    color: #94a3b8;
}

.pps-review-body {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
}

.pps-review-body p {
    margin: 0;
}

/* Add Review Form Box */
.pps-add-review-box {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 26px 28px;
    background: #ffffff;
    margin-top: 32px;
}

.pps-form-title {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 4px 0;
}

.pps-form-subtitle {
    font-size: 13.5px;
    color: #64748b;
    margin: 0 0 20px 0;
}

.pps-form-group {
    margin-bottom: 16px;
}

.pps-field-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}

.pps-rating-select,
.pps-input,
.pps-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #1f2937;
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}

.pps-rating-select:focus,
.pps-input:focus,
.pps-textarea:focus {
    border-color: #007a55;
    box-shadow: 0 0 0 3px rgba(0, 122, 85, 0.12);
}

.pps-form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pps-submit-review-btn {
    all: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #007a55 !important;
    color: #ffffff !important;
    padding: 12px 28px !important;
    border-radius: 8px !important;
    font-size: 15.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.pps-submit-review-btn:hover {
    background-color: #006042 !important;
    transform: translateY(-1px);
}

/* Tabs Mobile Responsiveness */
@media (max-width: 768px) {
    .pps-tabs-nav {
        gap: 20px;
    }

    .pps-tab-btn {
        font-size: 16px !important;
        padding: 10px 2px 12px 2px !important;
    }

    .pps-editorial-pills-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .pps-popover-trigger-wrap {
        width: 100%;
    }

    .pps-badge-pill {
        width: 100% !important;
        justify-content: flex-start !important;
    }

    .pps-floating-popover {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        display: none;
    }

    .pps-popover-trigger-wrap.is-open .pps-floating-popover {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }

    .pps-reviews-summary-card {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .pps-form-row-2col {
        grid-template-columns: 1fr;
    }
}
