/**
 * Purely Herbal Hub - Cart & Checkout Styles
 */

/* ============================================
   CART ICON IN NAV
   ============================================ */
.cart-nav-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.cart-nav-btn:hover {
    color: var(--color-green-aloe);
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}

/* ============================================
   CART OVERLAY
   ============================================ */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.cart-overlay.show {
    opacity: 1;
    pointer-events: all;
}

/* ============================================
   CART DRAWER
   ============================================ */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-left: 1px solid rgba(141, 220, 143, 0.2);
    z-index: 999;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
}

.cart-drawer.open {
    right: 0;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(141, 220, 143, 0.15);
    background: rgba(141, 220, 143, 0.05);
}

.cart-header h3 {
    font-size: 1.2rem;
    color: var(--color-white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-header h3 i {
    color: var(--color-green-aloe);
}

.cart-close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
}

.cart-close-btn:hover {
    color: var(--color-white);
}

/* ============================================
   CART ITEMS
   ============================================ */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 16px;
    color: #64748b;
    text-align: center;
    padding: 40px;
}

.cart-empty i {
    font-size: 4rem;
    color: rgba(141, 220, 143, 0.3);
}

.cart-empty p {
    font-size: 1rem;
    color: #94a3b8;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(141, 220, 143, 0.1);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: background var(--transition-fast);
}

.cart-item:hover {
    background: rgba(141, 220, 143, 0.06);
}

.cart-item-image {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: rgba(141, 220, 143, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-image i {
    font-size: 1.5rem;
    color: var(--color-green-aloe);
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-info h4 {
    font-size: 0.9rem;
    color: var(--color-white);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    font-size: 0.9rem;
    color: var(--color-green-aloe);
    font-weight: 600;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(141, 220, 143, 0.3);
    background: rgba(141, 220, 143, 0.1);
    color: var(--color-green-aloe);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all var(--transition-fast);
}

.qty-btn:hover {
    background: var(--color-green-aloe);
    color: white;
}

.qty-btn.remove:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.qty-value {
    font-size: 0.9rem;
    color: var(--color-white);
    min-width: 20px;
    text-align: center;
    font-weight: 600;
}

/* ============================================
   CART FOOTER
   ============================================ */
.cart-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(141, 220, 143, 0.15);
    background: rgba(141, 220, 143, 0.03);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cart-total-label {
    font-size: 1rem;
    color: #94a3b8;
}

.cart-total-amount {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-green-aloe);
}

.cart-checkout-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6bbf59 0%, #8fdc8f 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition-fast);
}

.cart-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 191, 89, 0.4);
}

.cart-continue-btn {
    width: 100%;
    padding: 10px;
    background: none;
    color: #94a3b8;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 10px;
    transition: color var(--transition-fast);
}

.cart-continue-btn:hover {
    color: var(--color-white);
}

/* ============================================
   CHECKOUT MODAL
   ============================================ */
.checkout-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.checkout-modal.active {
    display: flex;
}

.checkout-content {
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(141, 220, 143, 0.2);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.checkout-header {
    padding: 24px;
    border-bottom: 1px solid rgba(141, 220, 143, 0.15);
    background: rgba(141, 220, 143, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-header h3 {
    font-size: 1.3rem;
    color: var(--color-white);
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-header h3 i {
    color: var(--color-green-aloe);
}

.checkout-body {
    padding: 28px;
}

.checkout-summary {
    background: rgba(141, 220, 143, 0.05);
    border: 1px solid rgba(141, 220, 143, 0.15);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.checkout-summary h4 {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkout-summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--color-white);
    padding: 4px 0;
}

.checkout-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-green-aloe);
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1px solid rgba(141, 220, 143, 0.2);
}

.checkout-form .form-group {
    margin-bottom: 18px;
}

.checkout-form label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 8px;
}

.checkout-form input,
.checkout-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(141, 220, 143, 0.3);
    border-radius: 10px;
    color: var(--color-white);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.checkout-form input:focus,
.checkout-form textarea:focus {
    outline: none;
    border-color: var(--color-green-aloe);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(141, 220, 143, 0.1);
}

.checkout-form input::placeholder,
.checkout-form textarea::placeholder {
    color: #64748b;
}

.pay-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6bbf59 0%, #8fdc8f 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    transition: all var(--transition-fast);
}

.pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(107, 191, 89, 0.4);
}

.pay-btn i {
    font-size: 1.2rem;
}

.payment-methods {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.payment-methods span {
    font-size: 0.8rem;
    color: #64748b;
}

.payment-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ============================================
   ORDER SUCCESS MODAL
   ============================================ */
.order-success-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.order-success-modal.active {
    display: flex;
}

.order-success-content {
    width: 100%;
    max-width: 440px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(34, 197, 94, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.5rem;
    color: #22c55e;
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.order-success-content h3 {
    font-size: 1.6rem;
    color: var(--color-white);
    margin-bottom: 12px;
}

.order-success-content p {
    color: #94a3b8;
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.order-ref {
    background: rgba(141, 220, 143, 0.1);
    border: 1px solid rgba(141, 220, 143, 0.2);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--color-green-aloe);
    font-family: monospace;
    margin: 16px 0;
    word-break: break-all;
}

.order-success-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6bbf59 0%, #8fdc8f 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: all var(--transition-fast);
}

.order-success-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(107, 191, 89, 0.4);
}

/* ============================================
   ADD TO CART BUTTON ON PRODUCT CARDS
   ============================================ */
.btn-cart {
    background: linear-gradient(135deg, #6bbf59 0%, #8fdc8f 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.btn-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 191, 89, 0.4);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
    .cart-drawer {
        width: 100vw;
        right: -100vw;
    }

    .checkout-content {
        border-radius: 16px;
    }

    .checkout-body {
        padding: 20px;
    }
}

/* ============================================
   CHECKOUT STEPS
   ============================================ */
.checkout-step {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(141, 220, 143, 0.1);
}

.checkout-step:last-of-type {
    border-bottom: none;
}

.step-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: 18px;
}

.step-num {
    width: 28px;
    height: 28px;
    background: var(--color-green-aloe);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ============================================
   NETWORK SELECTION
   ============================================ */
.network-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.network-option {
    cursor: pointer;
}

.network-option input[type="radio"] {
    display: none;
}

.network-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(141, 220, 143, 0.2);
    border-radius: 12px;
    transition: all var(--transition-fast);
    text-align: center;
}

.network-card span {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

.network-option input:checked + .network-card {
    border-color: var(--color-green-aloe);
    background: rgba(141, 220, 143, 0.1);
}

.network-option input:checked + .network-card span {
    color: var(--color-white);
}

.network-card:hover {
    border-color: var(--color-green-aloe);
    background: rgba(141, 220, 143, 0.08);
}

.network-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: white;
}

.network-icon.mtn {
    background: linear-gradient(135deg, #ffcc00, #ff9900);
    color: #000;
}

.network-icon.telecel {
    background: linear-gradient(135deg, #e60000, #cc0000);
}

.network-icon.airteltigo {
    background: linear-gradient(135deg, #e60000, #0066cc);
}

/* ============================================
   PHONE INPUT
   ============================================ */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(141, 220, 143, 0.3);
    border-radius: 10px;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.phone-input-wrapper:focus-within {
    border-color: var(--color-green-aloe);
    box-shadow: 0 0 0 3px rgba(141, 220, 143, 0.1);
}

.phone-prefix {
    padding: 12px 14px;
    background: rgba(141, 220, 143, 0.1);
    color: var(--color-green-aloe);
    font-weight: 600;
    font-size: 0.95rem;
    border-right: 1px solid rgba(141, 220, 143, 0.2);
    white-space: nowrap;
}

.phone-input-wrapper input {
    flex: 1;
    padding: 12px 14px;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 0.95rem;
    outline: none;
}

.phone-input-wrapper input::placeholder {
    color: #64748b;
}

/* ============================================
   MOMO INFO BOX
   ============================================ */
.momo-info-box {
    display: flex;
    gap: 12px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 14px;
    margin-top: 16px;
}

.momo-info-box i {
    color: #3b82f6;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.momo-info-box p {
    font-size: 0.88rem;
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
}

.momo-info-box strong {
    color: var(--color-white);
}

/* ============================================
   SECURE NOTE
   ============================================ */
.secure-note {
    text-align: center;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.secure-note i {
    color: var(--color-green-aloe);
}

/* WhatsApp Order Button */
.cart-whatsapp-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    transition: all var(--transition-fast);
}

.cart-whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

.cart-whatsapp-btn i {
    font-size: 1.2rem;
}
