﻿/* ==================================================
   GLOBAL RESET
================================================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #000;
    color: #fff;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.checkout {
    max-width: 1250px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* ==================================================
   MAIN LAYOUT
================================================== */
.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 32px;
    align-items: start;
}

.order-details {
    width: 100%;
}

.payment-summary {
    position: sticky;
    top: 96px;
    height: fit-content;
}

/* ==================================================
   CARDS
================================================== */
.order-details,
.payment-summary {
    background: linear-gradient(180deg, #1b1b1b, #111);
    border-radius: 18px;
    padding: 26px;
}

/* ==================================================
   ORDER ITEMS
================================================== */
.checkout-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    background: #161616;
    border-radius: 14px;
    margin-bottom: 14px;
}

.checkout-thumb {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
}

.checkout-info {
    flex: 1;
}

.checkout-price {
    font-weight: 800;
    font-size: 18px;
    white-space: nowrap;
}

/* ==================================================
   QUANTITY CONTROLS
================================================== */
.checkout-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

    .checkout-controls button {
        width: 34px;
        height: 34px;
        border-radius: 999px;
        border: 1px solid #444;
        background: transparent;
        color: #fff;
        font-size: 18px;
        font-weight: 700;
        cursor: pointer;
    }

        .checkout-controls button:hover {
            background: rgba(255,255,255,0.08);
        }

/* ==================================================
   UPSELL
================================================== */
.upsell-section {
    margin-top: 28px;
}

.upsell-item {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #161616;
    border-radius: 14px;
    margin-bottom: 14px;
}

    .upsell-item img {
        width: 70px;
        height: 70px;
        border-radius: 10px;
        object-fit: cover;
    }

    .upsell-item button {
        background: #ffcc00;
        color: #000;
        border: none;
        border-radius: 999px;
        padding: 10px 18px;
        font-size: 14px;
        font-weight: 800;
        cursor: pointer;
    }

        .upsell-item button:hover {
            background: #ffd633;
        }

/* ==================================================
   CUSTOMER DETAILS
================================================== */
.customer-section {
    margin-top: 36px;
    margin-bottom: 48px;
}

.customer-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

    .customer-field label {
        font-size: 13px;
        font-weight: 600;
        color: #ccc;
    }

    .customer-field input,
    #locationInput {
        width: 100%;
        padding: 14px;
        border-radius: 12px;
        background: #222;
        border: 1px solid #333;
        color: #fff;
        font-family: inherit;
        font-size: 15px;
    }

        .customer-field input:focus,
        #locationInput:focus {
            outline: none;
            border-color: #ffcc00;
        }

/* ==================================================
   ✅ ADDRESS INPUT (FINAL – CLEAN)
================================================== */
#locationInput {
    resize: none;
    min-height: 52px;
    letter-spacing: normal;
    caret-color: #fff;
}

/* ==================================================
   SUCCESS / ERROR
================================================== */
.success-msg {
    margin-top: 14px;
    color: #4caf50;
    font-weight: 600;
}

.error-msg {
    margin-top: 14px;
    color: #ff4d4d;
    font-weight: 600;
}

/* ==================================================
   ORDER SUMMARY
================================================== */
.payment-summary .row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 800;
}

/* ==================================================
   CHECKOUT BUTTON
================================================== */
.checkout-btn {
    width: 100%;
    padding: 16px;
    font-size: 18px;
    border-radius: 14px;
    border: none;
    background: #c40000;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

    .checkout-btn:hover {
        background: #e00000;
    }

/* ==================================================
   GOOGLE AUTOCOMPLETE DROPDOWN
================================================== */
.pac-container {
    z-index: 99999 !important;
    background: #fff !important;
    color: #000 !important;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.pac-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
}

    .pac-item:hover {
        background: #f2f2f2;
    }

/* ==================================================
   RESPONSIVE
================================================== */
@media (max-width: 992px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .payment-summary {
        position: relative;
        margin-top: 32px;
    }
}
/* ==================================================
   MOBILE CHECKOUT FIX (SHOW BUTTON)
================================================== */
@media (max-width: 768px) {

    body {
        overflow-y: auto;
    }

    .checkout {
        padding-bottom: 140px; /* 🔥 space for button */
    }

    .customer-section {
        margin-bottom: 24px; /* reduce large gap */
    }

    .checkout-btn {
        position: sticky;
        bottom: 12px;
        z-index: 1000;
        width: 100%;
        margin-top: 20px;
    }
}
@media (max-width: 768px) {

    /* Reset upsell text coloring */
    .upsell-item .upsell-text {
        color: #ffffff !important;
    }

        /* Force price to white on mobile */
        .upsell-item .upsell-text .price {
            color: #ffffff !important;
            font-weight: 700;
            opacity: 1 !important;
            display: block;
            margin-top: 4px;
        }
}

/* =========================
   TIP SECTION
========================= */

.tip-section {
    margin-top: 14px;
}

    .tip-section label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 6px;
        color: rgba(255,255,255,0.9);
    }

.tip-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

    .tip-buttons button {
        flex: 1;
        padding: 6px 0;
        font-size: 13px;
        font-weight: 700;
        border-radius: 6px;
        border: 1px solid rgba(255,255,255,0.15);
        background: #1b1b1b;
        color: #fff;
        cursor: pointer;
        transition: all 0.2s ease;
    }

        .tip-buttons button:hover {
            background: #2a2a2a;
        }

        .tip-buttons button.active {
            background: #e60000;
            border-color: #e60000;
        }

/* Custom tip input */
#customTip {
    width: 100%;
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    background: #121212;
    color: #fff;
    font-size: 13px;
}

    #customTip::placeholder {
        color: rgba(255,255,255,0.5);
    }

/* =========================
   ORDER NOTES
========================= */

.notes-section {
    margin-top: 14px;
}

    .notes-section label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 6px;
        color: rgba(255,255,255,0.9);
    }

#orderNotes {
    width: 100%;
    min-height: 60px;
    resize: none;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.15);
    background: #121212;
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
}

    #orderNotes::placeholder {
        color: rgba(255,255,255,0.5);
    }

/* =========================
   MOBILE TWEAK
========================= */
@media (max-width: 768px) {
    .tip-buttons button {
        font-size: 12px;
        padding: 6px 0;
    }
}
.tip-btn {
    background: #222;
    color: #fff;
    border: 1px solid #444;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

    .tip-btn.active {
        background: #e60000;
        border-color: #e60000;
    }
