/* ==============================
   ORDER PAGE
   ============================== */

/* --- Hero --- */
.order-hero {
    background: var(--main-yellow);
    padding: 30px 0 50px;
    position: relative;
}

.order-back-home {
    display: inline-block;
    font-family: 'poppins-m';
    font-size: 14px;
    color: var(--black);
    text-decoration: none;
    margin-bottom: 20px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.order-back-home:hover {
    opacity: 1;
}

.order-hero-inner {
    display: flex;
    align-items: center;
    gap: 50px;
}

.order-hero-img {
    width: 280px;
    height: 280px;
    border-radius: 24px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.order-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-promo-badge {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    font-family: 'poppins-sb';
    font-size: 12px;
    padding: 5px 16px;
    border-radius: 50px;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.order-price-display {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.order-price-original {
    font-family: 'didact-r';
    font-size: 18px;
    color: #999;
    text-decoration: line-through;
}

.order-price-promo {
    font-family: 'poppins-eb';
    font-size: 36px;
    color: var(--black);
    line-height: 1;
}

.order-price-label {
    font-family: 'didact-r';
    font-size: 16px;
    color: #555;
}

.order-delivery-note {
    font-family: 'didact-r';
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- Sections --- */
.order-section {
    padding: 50px 0;
}

.order-section-gray {
    background: #f8f8f8;
}

.order-step-header {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.order-step-number {
    width: 40px;
    height: 40px;
    background: var(--black);
    color: var(--white);
    font-family: 'poppins-eb';
    font-size: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.order-step-header h2 {
    margin-bottom: 4px;
}

.order-step-header p {
    color: #777;
}

/* --- Location detect --- */
.order-location-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.order-btn-detect {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--black);
    color: var(--white);
    font-family: 'poppins-m';
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.order-btn-detect:hover {
    background: #333;
    transform: scale(1.02);
}

.order-btn-detect:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.order-location-or {
    font-family: 'didact-r';
    font-size: 14px;
    color: #999;
}

.order-location-status {
    margin-top: 12px;
    padding: 12px 18px;
    border-radius: 12px;
    font-family: 'didact-r';
    font-size: 14px;
}

.order-location-status.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.order-location-status.error {
    background: #fff3e0;
    color: #e65100;
}

.order-location-status.loading {
    background: #e3f2fd;
    color: #1565c0;
}

/* --- Store list --- */
.order-store-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-store-option {
    cursor: pointer;
    display: block;
}

.order-store-option input[type="radio"] {
    display: none;
}

.order-store-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 2px solid #eee;
    border-radius: 16px;
    padding: 20px 24px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.order-store-option input:checked + .order-store-card {
    border-color: var(--main-yellow);
    box-shadow: 0 0 0 3px rgba(255,210,48,0.3);
    background: #fffdf5;
}

.order-store-card:hover {
    border-color: #ddd;
}

.order-store-info h3 {
    font-family: 'poppins-sb';
    font-size: 16px;
    margin-bottom: 4px;
}

.order-store-info p {
    font-family: 'didact-r';
    font-size: 13px;
    color: #888;
    line-height: 1.4;
}

.order-store-distance {
    font-family: 'poppins-sb';
    font-size: 14px;
    color: var(--black);
    white-space: nowrap;
    min-width: 70px;
    text-align: right;
}

.order-store-distance.recommended {
    color: #2e7d32;
}

.order-store-recommended-tag {
    display: inline-block;
    background: #2e7d32;
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 50px;
    margin-top: 4px;
    font-family: 'poppins-sb';
    letter-spacing: 0.3px;
}

/* --- Form --- */
.order-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.order-field {
    display: flex;
    flex-direction: column;
}

.order-field-full {
    grid-column: 1 / -1;
}

.order-field label {
    font-family: 'poppins-m';
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}

.order-field label span {
    color: #e74c3c;
}

.order-field input,
.order-field textarea {
    font-family: 'didact-r';
    font-size: 16px;
    padding: 14px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s;
    color: #333;
    background: #fff;
}

.order-field input:focus,
.order-field textarea:focus {
    border-color: var(--main-yellow);
}

.order-field textarea {
    resize: vertical;
}

/* --- Qty control --- */
.order-qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    width: fit-content;
}

.order-qty-btn {
    width: 48px;
    height: 48px;
    background: #f5f5f5;
    border: none;
    font-size: 22px;
    font-family: 'poppins-sb';
    cursor: pointer;
    color: var(--black);
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-qty-btn:hover {
    background: var(--main-yellow);
}

.order-qty-control input {
    width: 60px;
    text-align: center;
    border: none;
    font-family: 'poppins-sb';
    font-size: 18px;
    padding: 12px 0;
    -moz-appearance: textfield;
    outline: none;
}

.order-qty-control input::-webkit-inner-spin-button,
.order-qty-control input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* --- Summary --- */
.order-summary-box {
    background: #fff;
    border: 2px solid #eee;
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
}

.order-summary-store {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-summary-label {
    font-family: 'didact-r';
    font-size: 14px;
    color: #999;
}

.order-summary-value {
    font-family: 'poppins-sb';
    font-size: 14px;
    color: var(--black);
    text-align: right;
}

.order-summary-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 16px 0;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'didact-r';
    font-size: 15px;
    color: #333;
    padding: 4px 0;
}

.order-summary-row-promo {
    font-size: 13px;
    color: #999;
}

.order-price-strike {
    text-decoration: line-through;
}

.order-summary-delivery {
    color: #555;
}

.order-delivery-note-small {
    font-family: 'didact-r';
    font-size: 12px;
    color: #aaa;
    margin-top: 4px;
}

.order-summary-total {
    font-family: 'poppins-eb';
    font-size: 20px;
    color: var(--black);
    padding: 8px 0;
}

.order-summary-disclaimer {
    font-family: 'didact-r';
    font-size: 12px;
    color: #aaa;
    line-height: 1.5;
}

/* --- Confirm button --- */
.order-confirm-area {
    text-align: center;
}

.order-btn-confirm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25D366;
    color: #fff;
    font-family: 'poppins-sb';
    font-size: 17px;
    padding: 16px 40px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 400px;
}

.order-btn-confirm:hover:not(:disabled) {
    transform: scale(1.03);
    box-shadow: 0 6px 24px rgba(37,211,102,0.35);
}

.order-btn-confirm:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.order-confirm-hint {
    font-family: 'didact-r';
    font-size: 13px;
    color: #aaa;
    text-align: center;
}

/* --- Footer --- */
.order-footer {
    background: #fafafa;
    padding: 30px 0;
    border-top: 1px solid #eee;
}

.order-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.order-footer-logo {
    width: 70px;
}

.order-footer-inner p {
    color: #999;
}

/* ==============================
   RESPONSIVE
   ============================== */

@media screen and (max-width: 768px) {
    .order-hero-inner {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }

    .order-hero-img {
        width: 200px;
        height: 200px;
    }

    .order-price-display {
        justify-content: center;
    }

    .order-delivery-note {
        justify-content: center;
    }

    .order-price-promo {
        font-size: 28px;
    }

    .order-form-grid {
        grid-template-columns: 1fr;
    }

    .order-store-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .order-store-distance {
        text-align: left;
    }

    .order-summary-box {
        padding: 24px 18px;
    }

    .order-summary-total {
        font-size: 18px;
    }

    .order-btn-confirm {
        font-size: 15px;
        padding: 14px 30px;
    }

    .order-footer-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .order-location-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media screen and (max-width: 480px) {
    .order-hero {
        padding: 20px 0 35px;
    }

    .order-hero-img {
        width: 160px;
        height: 160px;
    }

    .order-section {
        padding: 35px 0;
    }
}
