:root {
    --woo-psc-primary: #000;
    --woo-psc-bg: #fff;
    --woo-psc-border: #e9ecef;
    --woo-psc-active-border: #28a745;
    --woo-psc-badge-bg: #ffcc00;
    --woo-psc-badge-text: #000;
    --woo-psc-grey-text: #94a3b8;
    --woo-psc-bar-bg: #fff;
    --woo-psc-btn-bg: #28a745;
    /* Green from woo-ccd-checkout-btn */
    --woo-psc-btn-text: #ffffff;
    --woo-psc-btn-hover: #218838;
    --woo-psc-popular-border: #f59e0b;
    /* Amber for best-seller */
    --woo-psc-popular-bg: #fffbeb;
}

.woo-psc-container {
    max-width: 900px;
    margin: 30px auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #000;
}

/* ─── Header ─── */
.woo-psc-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.woo-psc-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 6px 0;
}

.woo-psc-subtitle {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}

/* ─── Progress Bar ─── */
.woo-psc-progress-wrap {
    margin-bottom: 16px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.woo-psc-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.woo-psc-progress-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.woo-psc-progress-label svg {
    color: #f59e0b;
    flex-shrink: 0;
}

.woo-psc-progress-pct {
    font-size: 12px;
    font-weight: 700;
    color: #e05c1c;
}

.woo-psc-progress-bar-track {
    background: #e2e8f0;
    border-radius: 100px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 6px;
}

.woo-psc-progress-bar-fill {
    height: 100%;
    border-radius: 100px;
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
    transition: width 1.2s ease;
}

.woo-psc-progress-note {
    font-size: 11px;
    color: #64748b;
    margin: 0;
    text-align: center;
}

/* ─── Urgency / Social Proof Bar ─── */
.woo-psc-urgency-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
    border: 1px solid #fed7aa;
    border-radius: 8px;
    padding: 9px 14px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #92400e;
    animation: woo-psc-pulse-border 2s ease-in-out infinite;
}

@keyframes woo-psc-pulse-border {

    0%,
    100% {
        border-color: #fed7aa;
    }

    50% {
        border-color: #f59e0b;
    }
}

.woo-psc-urgency-fire {
    font-size: 16px;
    flex-shrink: 0;
    animation: woo-psc-fire-shake 1.5s ease-in-out infinite;
}

@keyframes woo-psc-fire-shake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-8deg);
    }

    75% {
        transform: rotate(8deg);
    }
}

/* Grid — padding-top so the "En Popüler" badge (positioned at top:-50%) isn't clipped */
.woo-psc-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 32px;
    padding-top: 14px;
    /* room for the badge that protrudes above the card */
    overflow: visible;
}

/* ─── Card ─── */
.woo-psc-card {
    position: relative;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px 8px 15px 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    background: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 140px;
}

.woo-psc-card:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.woo-psc-card.active {
    border: 4px solid var(--woo-psc-active-border);
    padding: 22px 5px 12px 5px;
}

/* ─── Best-Seller / Most Popular Card ─── */
.woo-psc-card.best-seller {
    border: 2px solid var(--woo-psc-popular-border);
    background: var(--woo-psc-popular-bg);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.woo-psc-card.best-seller.active {
    border: 4px solid var(--woo-psc-active-border);
    padding: 22px 5px 12px 5px;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.woo-psc-popular-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 20px;
    white-space: nowrap;
    z-index: 11;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
    /* Prevent horizontal overflow outside the card */
    max-width: calc(100% - 8px);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Discount Badge ─── */
.woo-psc-badge {
    position: absolute;
    top: 0;
    left: 12px;
    transform: translateY(-50%);
    background: var(--woo-psc-badge-bg);
    color: var(--woo-psc-badge-text);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    z-index: 10;
}

/* Shift discount badge down if popular badge is also present */
.woo-psc-card.best-seller .woo-psc-badge {
    top: 22px;
    left: 4px;
    transform: none;
}

/* ─── Card Content ─── */
.woo-psc-quantity {
    font-size: 32px;
    font-weight: 800;
    color: #000;
    line-height: 1;
    margin-bottom: 2px;
}

.woo-psc-unit {
    font-size: 12px;
    color: var(--woo-psc-grey-text);
    font-weight: 500;
    margin-bottom: 12px;
}

.woo-psc-price {
    font-size: 18px;
    font-weight: 800;
    color: #000;
    margin-top: auto;
}

/* ─── Purchase Section ─── */
.woo-psc-purchase-section {
    border-top: 1px solid #f1f5f9;
    padding-top: 24px;
}

/* ─── Scarcity Bar ─── */
.woo-psc-scarcity-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 9px 14px;
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 600;
    color: #991b1b;
}

.woo-psc-scarcity-icon {
    font-size: 15px;
    animation: woo-psc-tick 1s step-end infinite;
}

@keyframes woo-psc-tick {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.woo-psc-scarcity-dots {
    display: flex;
    gap: 3px;
    margin-left: auto;
}

.woo-psc-scarcity-dots span {
    width: 5px;
    height: 5px;
    background: #ef4444;
    border-radius: 50%;
    display: inline-block;
    animation: woo-psc-dot-bounce 1.2s ease-in-out infinite;
}

.woo-psc-scarcity-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.woo-psc-scarcity-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes woo-psc-dot-bounce {

    0%,
    80%,
    100% {
        transform: scale(0.7);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.woo-psc-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.woo-psc-summary-label {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.woo-psc-summary-amount {
    font-size: 28px;
    font-weight: 800;
    color: #333;
}

/* ─── Main Button ─── */
.woo-psc-checkout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: var(--woo-psc-btn-bg);
    color: var(--woo-psc-btn-text) !important;
    padding: 16px;
    border-radius: 12px;
    text-decoration: none !important;
    font-size: 18px;
    font-weight: 700;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 4px 14px rgba(40, 167, 69, 0.35);
}

.woo-psc-checkout-button:hover {
    background: var(--woo-psc-btn-hover);
    transform: translateY(-1px);
}

.woo-psc-checkout-button:active {
    transform: scale(0.98);
}

.woo-psc-btn-icon {
    margin-right: 12px;
}

.woo-psc-btn-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.woo-psc-btn-arrow {
    margin-left: 15px;
    font-size: 20px;
}

/* ─── Delivery Guarantee ─── */
.woo-psc-delivery-guarantee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #2d6a4f;
}

.woo-psc-delivery-guarantee svg {
    color: #27ae60;
    flex-shrink: 0;
}

/* ─── Trust Badges (matches woo-custom-cart-design) ─── */
.woo-psc-trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(60, 60, 67, .18);
}

.woo-psc-trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #000;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.woo-psc-trust-badge svg {
    width: 16px;
    height: 16px;
    color: #000;
    stroke: #000;
    flex-shrink: 0;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .woo-psc-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .woo-psc-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .woo-psc-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .woo-psc-trust-badges {
        gap: 4px;
    }

    .woo-psc-trust-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* ─── Sticky Bar (Mobile Only — ≤768px) ─── */
.woo-psc-sticky-bar {
    display: none !important;
}

@media (max-width: 768px) {
    .woo-psc-sticky-bar {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        padding: 12px 16px;
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
        z-index: 99999;
        border-top: 1px solid #e9ecef;
    }

    .woo-psc-sticky-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        max-width: 600px;
        margin: 0 auto;
    }

    .woo-psc-sticky-info {
        display: flex;
        flex-direction: column;
        line-height: 1.2;
    }

    .woo-psc-sticky-label {
        font-size: 11px;
        color: #94a3b8;
        font-weight: 500;
    }

    .woo-psc-sticky-amount {
        font-size: 20px;
        font-weight: 800;
        color: #000;
    }

    .woo-psc-sticky-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background: #28a745;
        color: #fff !important;
        text-decoration: none !important;
        font-size: 15px;
        font-weight: 700;
        padding: 12px 22px;
        border-radius: 10px;
        white-space: nowrap;
        transition: background 0.2s, transform 0.15s;
        box-shadow: 0 3px 10px rgba(40, 167, 69, 0.35);
    }

    .woo-psc-sticky-btn::after {
        content: '';
        width: 18px;
        display: block;
    }

    .woo-psc-sticky-btn:hover {
        background: #218838;
    }

    .woo-psc-sticky-btn:active {
        transform: scale(0.97);
    }

    .woo-psc-sticky-btn .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }

    .woo-psc-container {
        padding-bottom: 90px;
    }
}