/* ==========================================================================
   Advanced Vendor Card Widget (Single Product)
   ========================================================================== */
.pmv-vendor-card-widget {
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 20px;
    padding: 24px;
    margin: 40px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pmv-vendor-card-widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
}

.vendor-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 20px;
}

.vendor-avatar {
    flex-shrink: 0;
}

.vendor-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f8fafc;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.vendor-info {
    flex: 1;
}

.vendor-info .vendor-label {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 4px;
}

.vendor-info .vendor-name {
    display: block;
    font-size: 1.3rem;
    color: #0f172a;
    font-weight: 800;
    text-decoration: none;
    margin-bottom: 6px;
    transition: color 0.2s;
}

.vendor-info .vendor-name:hover {
    color: #4f46e5;
    /* Fallback to a purple if var is missing */
}

.vendor-rating {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.vendor-rating .stars {
    color: #f59e0b;
    letter-spacing: 2px;
}

.vendor-rating .rating-value {
    color: #475569;
    font-weight: 600;
}

.visit-store-btn {
    background: rgba(79, 70, 229, 0.08);
    color: #4f46e5;
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: 1px solid rgba(79, 70, 229, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}


.visit-store-btn:hover {
    background: #4f46e5;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.vendor-card-footer {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.vendor-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #475569;
    background: #f8fafc;
    padding: 6px 12px;
    border-radius: 100px;
    font-weight: 600;
}

.vendor-badge svg {
    width: 16px;
    height: 16px;
    color: #10b981;
}

/* ==========================================================================
   Trust Badges
   ========================================================================== */
.product-trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px dashed #e2e8f0;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.trust-item:hover {
    background: #f1f5f9;
    transform: translateY(-3px);
}

.trust-icon {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    color: #4f46e5;
}

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

.trust-text strong {
    display: block;
    font-size: 0.9rem;
    color: #1e293b;
    margin-bottom: 4px;
}

.trust-text span {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
}

@media (max-width: 768px) {
    .product-trust-badges {
        grid-template-columns: 1fr;
    }

    .vendor-card-header {
        flex-direction: column;
        text-align: center;
    }

    .vendor-card-footer {
        justify-content: center;
    }
}

/* ==========================================================================
   Buy Now Button
   ========================================================================== */
.single-product form.cart {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin: 30px 0;
}

.pmv-buy-now-btn {
    background: #10b981 !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    padding: 12px 28px !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.pmv-buy-now-btn:hover {
    background: #059669 !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
    transform: translateY(-2px);
}

.pmv-buy-now-btn:active {
    transform: translateY(0);
}

/* ==========================================================================
   Estimated Delivery
   ========================================================================== */
.pmv-estimated-delivery {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    padding: 14px 20px;
    border-radius: 16px;
    margin: 25px 0;
    border: 1px solid #edf2f7;
    transition: all 0.3s ease;
}

.pmv-estimated-delivery:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.pmv-estimated-delivery .delivery-icon {
    color: #4f46e5;
    display: flex;
    align-items: center;
    background: #ffffff;
    padding: 8px;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pmv-estimated-delivery .delivery-icon svg {
    width: 20px;
    height: 20px;
}

.pmv-estimated-delivery .delivery-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pmv-estimated-delivery .delivery-text span {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pmv-estimated-delivery .delivery-text strong {
    font-size: 1rem;
    color: #0f172a;
    font-weight: 700;
}

/* ==========================================================================
   Stock Scarcity Bar
   ========================================================================== */
.pmv-stock-scarcity {
    margin: 20px 0;
}

.pmv-stock-scarcity .scarcity-text {
    font-size: 0.9rem;
    color: #e11d48;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pmv-stock-scarcity .scarcity-text::before {
    content: '🔥';
    /* Fire emoji for urgency */
    font-size: 1rem;
}

.pmv-stock-scarcity .scarcity-bar {
    width: 100%;
    height: 8px;
    background: #ffe4e6;
    border-radius: 4px;
    overflow: hidden;
}

.pmv-stock-scarcity .scarcity-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #f43f5e 0%, #e11d48 100%);
    border-radius: 4px;
    transition: width 0.8s ease;
}

/* ==========================================================================
   Reviews Summary (Star Breakdown)
   ========================================================================== */
.pmv-reviews-summary {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    background: #f8fafc;
    padding: 24px;
    border-radius: 20px;
    margin-bottom: 40px;
    border: 1px solid #edf2f7;
}

.pmv-reviews-summary .summary-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-right: 1px solid #e2e8f0;
    padding-right: 30px;
}

.pmv-reviews-summary .average-rating {
    font-size: 3rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.pmv-reviews-summary .stars {
    color: #f59e0b;
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin: 10px 0;
}

.pmv-reviews-summary .total-reviews {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
}

.pmv-reviews-summary .summary-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}

.pmv-reviews-summary .breakdown-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pmv-reviews-summary .star-label {
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
    width: 50px;
}

.pmv-reviews-summary .bar-bg {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

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

.pmv-reviews-summary .count-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
    width: 40px;
    text-align: right;
}

@media (max-width: 600px) {
    .pmv-reviews-summary {
        grid-template-columns: 1fr;
    }

    .pmv-reviews-summary .summary-left {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding-right: 0;
        padding-bottom: 20px;
    }
}

/* ==========================================================================
   Sticky Add to Cart Bar
   ========================================================================== */
.pmv-sticky-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    padding: 15px 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pmv-sticky-cart-bar.visible {
    transform: translateY(0);
}

.pmv-sticky-cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.sticky-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sticky-thumb img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.sticky-text {
    display: flex;
    flex-direction: column;
}

.sticky-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.sticky-price {
    font-size: 0.9rem;
    color: #4f46e5;
    font-weight: 600;
}

.sticky-actions {
    display: flex;
    gap: 10px;
}

.pmv-sticky-atc-btn,
.pmv-sticky-buy-btn {
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
    border-radius: 8px !important;
    cursor: pointer;
    font-weight: 600 !important;
}

.pmv-sticky-atc-btn {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
}

.pmv-sticky-atc-btn:hover {
    background: #e2e8f0 !important;
}

.pmv-sticky-buy-btn {
    background: #10b981 !important;
    color: #ffffff !important;
    border: none !important;
}

.pmv-sticky-buy-btn:hover {
    background: #059669 !important;
}

@media (max-width: 768px) {
    .pmv-sticky-cart-container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .sticky-product-info {
        justify-content: center;
    }

    .sticky-actions {
        width: 100%;
        justify-content: center;
    }

    .pmv-sticky-atc-btn,
    .pmv-sticky-buy-btn {
        flex: 1;
    }
}

/* ==========================================================================
   Sales Countdown Timer
   ========================================================================== */
.pmv-sales-countdown {
    background: #fff1f2;
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
    border: 1px solid #ffe4e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.pmv-sales-countdown .countdown-text span {
    font-size: 0.9rem;
    font-weight: 700;
    color: #e11d48;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pmv-sales-countdown .countdown-timer {
    display: flex;
    gap: 10px;
}

.pmv-sales-countdown .timer-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    padding: 6px 10px;
    border-radius: 8px;
    min-width: 45px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #ffe4e6;
}

.pmv-sales-countdown .number {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
}

.pmv-sales-countdown .label {
    font-size: 0.65rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
}

/* ==========================================================================
   Accordion for WooCommerce Tabs
   ========================================================================== */
.woocommerce-tabs .pmv-accordion-header {
    background: #ffffff;
    padding: 15px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.woocommerce-tabs .pmv-accordion-header:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.woocommerce-tabs .pmv-accordion-header.active {
    border-color: #4f46e5;
    background: #eef2ff;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
}

.woocommerce-tabs .pmv-accordion-header span {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.woocommerce-tabs .pmv-accordion-header.active span {
    color: #4f46e5;
}

.woocommerce-tabs .pmv-accordion-header svg {
    width: 20px;
    height: 20px;
    color: #64748b;
    transition: transform 0.3s;
}

.woocommerce-tabs .pmv-accordion-header.active svg {
    transform: rotate(180deg);
    color: #4f46e5;
}

.woocommerce-tabs .woocommerce-Tabs-panel {
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-bottom: 15px;
    background: #ffffff;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
}

.woocommerce-tabs .woocommerce-Tabs-panel.active {
    padding-top: 20px;
    padding-bottom: 20px;
}