/* =====================================================
   HEALTH RE STORE – Cart Abandonment Reduction Styles
   ===================================================== */

/* ── 1. DELIVERY BANNER ───────────────────────────── */
.delivery-banner {
    background: linear-gradient(90deg, var(--green-dark) 0%, var(--green-main) 50%, var(--green-dark) 100%);
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
    z-index: 990;
}

.delivery-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        rgba(255,255,255,0.03) 0px,
        rgba(255,255,255,0.03) 1px,
        transparent 1px,
        transparent 60px
    );
    pointer-events: none;
}

.delivery-banner-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 20px;
    max-width: 1280px;
    margin: 0 auto;
}

.delivery-banner-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.delivery-banner-item i {
    font-size: 0.95rem;
    opacity: 0.9;
}

.delivery-banner-sep {
    opacity: 0.4;
    font-size: 0.75rem;
}

@media (max-width: 600px) {
    .delivery-banner {
        font-size: 0.78rem;
        padding: 8px 12px;
    }
    .delivery-banner-sep { display: none; }
    .delivery-banner-inner { gap: 4px 0; flex-direction: column; }
}


/* ── 2 & 7. PAYMENT TRUST BADGES ─────────────────── */
.payment-trust-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 16px 24px;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
}

/* Footer variant */
.footer-payment-trust {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.footer-payment-trust .payment-badge-icon,
.footer-payment-trust .secure-badge {
    color: rgba(255,255,255,0.75);
}

.footer-payment-trust .secure-badge {
    font-size: 0.8rem;
}

.payment-badge-icon {
    font-size: 2rem;
    color: var(--gray-600);
    line-height: 1;
    transition: color var(--transition);
}

.payment-badge-icon:hover { color: var(--green-main); }
.payment-badge-icon.fa-cc-visa:hover { color: #1a1f71; }
.payment-badge-icon.fa-cc-mastercard:hover { color: #eb001b; }

/* Text-based badges (PayFast, EFT) */
.payment-badge-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border: 2px solid currentColor;
    border-radius: 4px;
    line-height: 1;
    height: 32px;
}

.payment-badge-text.payfast { color: #0069f5; }
.payment-badge-text.eft { color: var(--green-dark); }

.footer-payment-trust .payment-badge-text {
    border-color: rgba(255,255,255,0.35);
    color: rgba(255,255,255,0.7);
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--green-dark);
    padding: 5px 14px;
    background: var(--green-pale);
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.secure-badge i { font-size: 0.8rem; color: var(--green-main); }


/* ── 3. PRODUCT PAGE TRUST BAR ────────────────────── */
.product-trust-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--green-pale);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: 18px;
    background: var(--green-xpale);
}

.product-trust-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 8px;
    text-align: center;
    border-right: 1px solid var(--green-pale);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--green-dark);
    transition: background var(--transition);
}

.product-trust-bar-item:last-child { border-right: none; }
.product-trust-bar-item:hover { background: var(--green-pale); }

.product-trust-bar-item span {
    font-size: 1.2rem;
    line-height: 1;
}

@media (max-width: 480px) {
    .product-trust-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    .product-trust-bar-item:nth-child(2) { border-right: none; }
    .product-trust-bar-item:nth-child(1),
    .product-trust-bar-item:nth-child(2) {
        border-bottom: 1px solid var(--green-pale);
    }
}


/* ── 4. GUEST CHECKOUT PROMPT ─────────────────────── */
.guest-checkout-prompt {
    background: linear-gradient(135deg, var(--green-xpale), #fff);
    border: 1px solid var(--green-pale);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    color: var(--green-dark);
    font-weight: 600;
}

.guest-checkout-prompt i {
    font-size: 1.4rem;
    color: var(--green-main);
    flex-shrink: 0;
}

.guest-checkout-prompt strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 2px;
}

.guest-checkout-prompt p {
    margin: 0;
    font-weight: 400;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Make "Continue as Guest" the most prominent option */
.woocommerce-account-fields .create-account,
body.woocommerce-checkout .woocommerce-form-login {
    opacity: 0.85;
}

/* Highlight guest option */
#ship-to-different-address, 
.woocommerce-additional-fields {
    /* no change needed */
}


/* ── 5. STOCK / URGENCY BADGES ────────────────────── */
.stock-badge-low {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff5e6;
    color: #b45309;
    border: 1px solid #fcd34d;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    white-space: nowrap;
    animation: pulse-badge 2.5s ease-in-out infinite;
}

.stock-badge-low i { font-size: 0.7rem; }

@keyframes pulse-badge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
    50% { box-shadow: 0 0 0 4px rgba(245,158,11,0.18); }
}

/* Inside product loop card */
.product-stock-indicator {
    margin-top: 6px;
    min-height: 22px;
}

/* Inside single product page */
.single-stock-urgency {
    margin-bottom: 16px;
}


/* ── 6. STICKY ADD-TO-CART BAR ────────────────────── */
.sticky-atc-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--white);
    border-top: 2px solid var(--green-pale);
    box-shadow: 0 -6px 30px rgba(0,0,0,0.10);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.sticky-atc-info {
    flex: 1;
    min-width: 0;
}

.sticky-atc-name {
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-atc-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--green-main);
    margin-top: 2px;
}

.sticky-atc-btn {
    background: var(--green-main);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    padding: 12px 26px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    transition: all var(--transition);
    flex-shrink: 0;
}

.sticky-atc-btn:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-green);
}

.sticky-atc-btn:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
    transform: none;
}

.sticky-atc-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--gray-100);
}

/* Hide on desktop if user prefers, show only on mobile */
@media (min-width: 769px) {
    .sticky-atc-bar {
        max-width: 680px;
        left: 50%;
        transform: translateX(-50%) translateY(100%);
        border-radius: var(--radius-md) var(--radius-md) 0 0;
        border: 2px solid var(--green-pale);
        border-bottom: none;
    }
    .sticky-atc-bar.visible {
        transform: translateX(-50%) translateY(0);
    }
}


/* ── 7. CART PAGE REASSURANCE ─────────────────────── */
.cart-reassurance-box {
    background: var(--green-xpale);
    border: 1px solid var(--green-pale);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-top: 20px;
    text-align: center;
}

.cart-reassurance-box .reassurance-msg {
    font-size: 0.88rem;
    color: var(--green-dark);
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.cart-reassurance-box .reassurance-msg i {
    font-size: 1rem;
    color: var(--green-main);
}

.cart-reassurance-box .payment-trust-bar {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 14px;
    justify-content: center;
}

.cart-whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #25d366;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 9px 20px;
    border-radius: var(--radius-full);
    transition: all var(--transition);
    margin-top: 4px;
}

.cart-whatsapp-link:hover {
    background: #128c7e;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37,211,102,0.35);
}

.cart-whatsapp-link i { font-size: 1rem; }

/* ── 8. BACK BUTTONS (product page, cart, checkout) ── */
.hr-back-btn-wrap {
    margin-bottom: 16px;
}

/* Product page — compact solid pill */
.hr-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--dark);
    color: var(--white);
    border: none;
    border-radius: var(--radius-full);
    padding: 9px 18px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    line-height: 1;
}

.hr-back-btn i {
    font-size: 0.78rem;
    transition: transform 0.2s ease;
}

.hr-back-btn:hover {
    background: var(--green-dark);
    transform: translateX(-3px);
}

.hr-back-btn:hover i {
    transform: translateX(-3px);
}

/* Cart / Checkout — outlined green pill */
.hr-back-btn.hr-back-btn--outlined {
    background: transparent;
    color: var(--green-dark);
    border: 2px solid var(--green-main);
}

.hr-back-btn.hr-back-btn--outlined:hover {
    background: var(--green-main);
    color: var(--white);
    border-color: var(--green-main);
    transform: translateX(-3px);
}

/* Checkout-page wrap — give it a bit more top breathing room */
.woocommerce-checkout .hr-back-btn-wrap,
.woocommerce-cart .hr-back-btn-wrap {
    margin-top: 4px;
    margin-bottom: 24px;
}

/* ── 9. TESTIMONIALS CAROUSEL ─────────────────────── */
.testimonials-section { background: var(--gray-50); }

/* Google score summary */
.testi-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.testi-summary-score {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 900;
    color: var(--dark);
    line-height: 1;
}

.testi-summary-right { display: flex; flex-direction: column; gap: 4px; }

.testi-summary-stars { color: #f59e0b; font-size: 1.1rem; display: flex; gap: 2px; }

.testi-summary-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.testi-google-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #4285f4;
    text-decoration: none;
    transition: opacity var(--transition);
}
.testi-google-link:hover { opacity: 0.75; }

/* Outer wrapper */
.testi-carousel-outer {
    position: relative;
    overflow: hidden;
    margin: 0 -8px;
}

/* Scrollable track */
.testi-track {
    display: flex;
    gap: 16px;
    padding: 8px 12px 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    transition: transform 0.4s ease;
}
.testi-track::-webkit-scrollbar { display: none; }
.testi-track.dragging { cursor: grabbing; scroll-snap-type: none; }

/* Individual card */
.testi-card {
    flex: 0 0 320px;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 22px 22px 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid var(--gray-100);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow var(--transition), transform var(--transition);
}

.testi-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    transform: translateY(-3px);
}

/* Card top row: avatar + name + google icon */
.testi-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.testi-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--font-heading);
}

.testi-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.testi-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.testi-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.testi-google-icon { flex-shrink: 0; margin-left: auto; }

/* Stars */
.testi-stars { color: #f59e0b; font-size: 0.8rem; display: flex; gap: 2px; }

/* Quote text */
.testi-text {
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-body);
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Arrow buttons */
.testi-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    color: var(--dark);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    opacity: 0;
}
.testi-carousel-outer:hover .testi-arrow { opacity: 1; }
.testi-arrow:hover { background: var(--green-main); color: var(--white); border-color: var(--green-main); }
.testi-prev { left: 8px; }
.testi-next { right: 8px; }

/* Dot nav */
.testi-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.testi-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-300);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all var(--transition);
}

.testi-dot.active {
    background: var(--green-main);
    width: 24px;
    border-radius: var(--radius-full);
}

@media (max-width: 640px) {
    .testi-card { flex: 0 0 280px; }
    .testi-summary-score { font-size: 3rem; }
    .testi-arrow { display: none; }
}
