﻿/* Checkout Title */
.checkout-title {
    color: #705542;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Checkout Cards */
.checkout-card {
    background: white;
    border: 2px solid #d4c4b0;
    border-radius: 5px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(112, 85, 66, 0.1);
    overflow: hidden;
}

/* Sections inside the single right container */
.checkout-form-section {
    padding: 1rem 1.25rem;
}

.checkout-form-section textarea.form-control {
    width: 100%;
    box-sizing: border-box;
}

.checkout-form-section.border-bottom {
    border-bottom: 1px solid #e8e0d8 !important;
}

.checkout-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #705542;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

/* Payment Type Selection - COMPACT VERSION */
.payment-type-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.payment-type-card {
    position: relative;
}

.payment-type-card .btn-check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-type-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 0.65rem 0.85rem;
    border: 2px solid #d4c4b0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
    margin: 0;
    min-height: 64px;
    position: relative;
    overflow: hidden;
}

.payment-type-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #705542 0%, #8b6f47 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.payment-type-label:hover {
    border-color: #705542;
    background: #f9f6f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(112, 85, 66, 0.15);
}

.payment-type-label:hover::before {
    transform: scaleX(1);
}

.payment-type-card .btn-check:checked ~ .payment-type-label {
    border-color: #705542;
    background: linear-gradient(135deg, rgba(112, 85, 66, 0.05) 0%, rgba(139, 111, 71, 0.05) 100%);
    box-shadow: 0 4px 16px rgba(112, 85, 66, 0.2);
    transform: translateY(-2px);
}

.payment-type-card .btn-check:checked ~ .payment-type-label::before {
    transform: scaleX(1);
}

.payment-type-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    background: linear-gradient(135deg, rgba(112, 85, 66, 0.1) 0%, rgba(139, 111, 71, 0.1) 100%);
    margin-right: 0.65rem;
    transition: all 0.3s ease;
}

.payment-type-icon svg {
    width: 18px;
    height: 18px;
    color: #705542;
    transition: transform 0.3s ease;
}

.payment-type-label:hover .payment-type-icon {
    background: linear-gradient(135deg, rgba(112, 85, 66, 0.15) 0%, rgba(139, 111, 71, 0.15) 100%);
}

.payment-type-label:hover .payment-type-icon svg {
    transform: scale(1.1);
}

.payment-type-card .btn-check:checked ~ .payment-type-label .payment-type-icon {
    background: linear-gradient(135deg, #705542 0%, #8b6f47 100%);
    box-shadow: 0 4px 12px rgba(112, 85, 66, 0.3);
}

.payment-type-card .btn-check:checked ~ .payment-type-label .payment-type-icon svg {
    color: white;
    transform: scale(1.15);
}

.payment-type-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.payment-type-content h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #705542;
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.payment-type-content p {
    font-size: 0.75rem;
    color: #8b6f47;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-method-option {
    position: relative;
}

.payment-method-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid #d4c4b0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    width: 100%;
}

    .payment-method-label:hover {
        border-color: #705542;
        background: #f9f6f2;
    }

.payment-method-option input[type="radio"]:checked + .payment-method-label {
    border-color: #705542;
    background: linear-gradient(135deg, rgba(112, 85, 66, 0.05) 0%, rgba(139, 111, 71, 0.05) 100%);
}

.payment-method-name {
    font-weight: 700;
    color: #705542;
    margin-bottom: 0.25rem;
}

.payment-method-desc {
    font-size: 0.85rem;
    color: #8b6f47;
}

/* Order Summary */
.order-summary {
    background: white;
    border: 2px solid #d4c4b0;
    border-radius: 5px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(112, 85, 66, 0.1);
    top: 120px;
}

.order-summary-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #705542;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #d4c4b0;
}

.order-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1.25rem;
    padding: 0.25rem 0;
    background: transparent;
    border-radius: 5px;
}

/* ============================================
   SIMPLE PRODUCT STYLING - CLEAN & MINIMAL
   ============================================ */

/* Promotion Group - Simple container */
.cart-promotion-group {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: 5px;
    border: 1px solid #e8e0d5;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(112, 85, 66, 0.05);
}

.cart-promotion-group:hover {
    box-shadow: 0 3px 10px rgba(112, 85, 66, 0.12);
    border-color: #d4c4b0;
    transform: translateY(-1px);
}

.cart-promotion-group:last-child {
    margin-bottom: 0;
}

/* Promotion Header - Simple inline label */
.cart-promotion-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: #8b6f47;
}

.cart-promotion-label {
    font-weight: 500;
}

.cart-promotion-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem 0.45rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.cart-promotion-desc {
    font-size: 0.7rem;
    font-weight: 500;
    color: #6b5b50;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.cart-promotion-count {
    color: #8b6f47;
    font-weight: normal;
}

/* Regular items group (no promotion) */
.order-regular-items {
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid #e8e0d5;
}

.order-regular-items:last-child {
    border-bottom: none;
}

/* Simple Order Item */
.order-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-bottom: none;
}

.order-item:last-child {
    border-bottom: none;
}

/* Items within promotion group */
.cart-promotion-group .order-item {
    background: transparent;
    padding: 0.5rem;
    border: none;
    margin-bottom: 0;
}

.cart-promotion-group .order-item:last-child {
    margin-bottom: 0;
}

/* Items within regular group */
.order-regular-items .order-item {
    background: transparent;
    padding: 0.5rem;
    border: none;
    margin-bottom: 0;
}

.order-regular-items .order-item:last-child {
    margin-bottom: 0;
}

/* Gift items - identical to regular items, just white background */
.order-item-gift {
    background: white;
    padding: 0.5rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    border: none;
}

.order-regular-items .order-item-gift {
    background: white;
    padding: 0.5rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    border: none;
}

/* Simple product image */
.order-item-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #e8e0d5;
    flex-shrink: 0;
}

/* Product details */
.order-item-details {
    flex-grow: 1;
    min-width: 0;
}

.order-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #705542;
    margin-bottom: 0.15rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-item-qty {
    font-size: 0.75rem;
    color: #8b6f47;
}

/* Simple price display */
.order-item-price {
    font-weight: 600;
    color: #705542;
    white-space: nowrap;
    font-size: 0.9rem;
    text-align: right;
    flex-shrink: 0;
}

/* Free product price - styled like regular price but in green */
.order-item-gift .order-item-price {
    color: #22c55e;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 576px) {
    .order-item-img {
        width: 45px;
        height: 45px;
    }
    
    .order-item-name {
        font-size: 0.8rem;
    }
    
    .order-item-qty {
        font-size: 0.7rem;
    }
    
    .order-item-price {
        font-size: 0.85rem;
    }
    
    .cart-promotion-group .order-item {
        padding-left: 0.5rem;
    }
}

/* Order Totals */
.order-totals {
    border-top: 2px solid #d4c4b0;
    padding-top: 1rem;
    margin-bottom: 1.25rem;
}

.order-total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    color: #705542;
}

.shipping-notice {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    padding: 0.5rem;
    border-radius: 5px;
    font-size: 0.75rem;
    margin: 0.75rem 0;
    display: flex;
    align-items: center;
}

.order-total-final {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    margin-top: 0.75rem;
    border-top: 2px solid #705542;
    font-size: 1.25rem;
    font-weight: 700;
    color: #705542;
}

/* Finalize Button */
.btn-finalize-order {
    background: linear-gradient(135deg, #705542 0%, #8b6f47 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-finalize-order:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(112, 85, 66, 0.3);
        color: white;
    }

/* Security Badges */
.security-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.security-badge-small {
    font-size: 0.75rem;
    color: #8b6f47;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Confirmation Page */
.confirmation-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem;
}

.confirmation-icon {
    color: #22c55e;
    margin-bottom: 1.5rem;
}

.confirmation-title {
    font-size: 2rem;
    font-weight: 700;
    color: #705542;
    margin-bottom: 0.5rem;
}

.confirmation-subtitle {
    color: #8b6f47;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.confirmation-card {
    background: white;
    border: 2px solid #d4c4b0;
    border-radius: 5px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(112, 85, 66, 0.1);
    margin-bottom: 2rem;
}

.confirmation-order-number {
    background: linear-gradient(135deg, #705542 0%, #8b6f47 100%);
    color: white;
    padding: 1.25rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

.confirmation-details {
    margin-bottom: 1.5rem;
}

.confirmation-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #d4c4b0;
}

    .confirmation-detail-row:last-child {
        border-bottom: none;
    }

.detail-label {
    color: #8b6f47;
    font-weight: 600;
}

.detail-value {
    color: #705542;
}

.confirmation-message {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    padding: 1rem;
    border-radius: 5px;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirmation-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 991px) {
    .payment-type-selection {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .payment-type-label {
        min-height: 75px;
        padding: 0.875rem 1rem;
    }

    .payment-type-icon {
        width: 44px;
        height: 44px;
        min-width: 44px;
        margin-right: 0.875rem;
    }

    .payment-type-icon svg {
        width: 22px;
        height: 22px;
    }

    .payment-type-content h4 {
        font-size: 0.95rem;
    }

    .payment-type-content p {
        font-size: 0.75rem;
    }
}

@media (max-width: 767px) {
.order-summary {
        position: static !important;
        margin-top: 2rem;
    }

    .confirmation-actions {
        flex-direction: column;
    }

        .confirmation-actions .btn {
            width: 100%;
        }

    .payment-type-label {
        min-height: 160px;
        padding: 1.25rem 1rem;
    }

    .payment-type-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 0.875rem;
    }

        .payment-type-icon svg {
            width: 28px;
            height: 28px;
        }

    .payment-type-content h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .payment-type-content p {
        font-size: 0.8rem;
    }
}

/* Address Type Selection - Compact Version */
.address-type-selection {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.address-type-option {
    position: relative;
    flex: 1;
}

    .address-type-option .form-check-input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .address-type-option .form-check-label {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.4rem;
        padding: 0.45rem 0.75rem;
        border: 2px solid #d4c4b0;
        border-radius: 5px;
        cursor: pointer;
        transition: all 0.3s ease;
        background: white;
        width: 100%;
        margin: 0;
        font-weight: 500;
        color: #705542;
        font-size: 0.82rem;
    }

        .address-type-option .form-check-label:hover {
            border-color: #705542;
            background: #f9f6f2;
        }

    .address-type-option .form-check-input:checked ~ .form-check-label {
        border-color: #705542;
        background: linear-gradient(135deg, rgba(112, 85, 66, 0.05) 0%, rgba(139, 111, 71, 0.05) 100%);
        font-weight: 600;
        box-shadow: 0 2px 8px rgba(112, 85, 66, 0.15);
    }

    .address-type-option .form-check-label svg {
        color: #8b6f47;
        transition: color 0.3s ease;
        flex-shrink: 0;
    }

    .address-type-option .form-check-input:checked ~ .form-check-label svg {
        color: #705542;
    }

    .address-type-option .form-check-label span {
        white-space: nowrap;
    }

/* Store Address Selection Dropdown */
.store-select {
    border: 2px solid #d4c4b0;
    border-radius: 5px;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    color: #705542;
    transition: all 0.3s ease;
    background-color: white;
}

    .store-select:focus {
        border-color: #705542;
        box-shadow: 0 0 0 0.2rem rgba(112, 85, 66, 0.15);
        outline: none;
    }

    .store-select option {
        padding: 0.5rem;
        color: #705542;
    }

        .store-select option:hover {
            background-color: #f9f6f2;
        }

/* Form Label with Icon */
.form-label.fw-semibold {
    color: #705542;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

    .form-label.fw-semibold svg {
        color: #8b6f47;
    }

/* Store Address Preview Card */
#selectedStorePreview {
    animation: fadeIn 0.3s ease-in;
}

.store-preview-card {
    background: linear-gradient(135deg, rgba(112, 85, 66, 0.05) 0%, rgba(139, 111, 71, 0.05) 100%);
    border: 2px solid #d4c4b0;
    border-radius: 5px;
    padding: 0.6rem 0.85rem;
    box-shadow: 0 2px 6px rgba(112, 85, 66, 0.1);
}

.store-preview-header {
    color: #705542;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

    .store-preview-header svg {
        color: #22c55e;
        flex-shrink: 0;
    }

.store-preview-content {
    color: #705542;
    font-size: 0.82rem;
    line-height: 1.4;
}

    .store-preview-content p {
        margin: 0;
        padding: 0.25rem 0;
    }

        .store-preview-content p:first-child {
            font-weight: 600;
        }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive - Address Type Selection */
@media (max-width: 767px) {
    .address-type-selection {
        flex-direction: column;
        gap: 0.5rem;
    }

    .address-type-option .form-check-label {
        padding: 0.6rem 0.85rem;
        font-size: 0.85rem;
    }

        .address-type-option .form-check-label svg {
            width: 18px;
            height: 18px;
        }

    .store-select {
        font-size: 0.9rem;
        padding: 0.65rem 0.85rem;
    }

    .store-preview-card {
        padding: 0.875rem 1rem;
    }

    .store-preview-header {
        font-size: 0.9rem;
    }

    .store-preview-content {
        font-size: 0.85rem;
    }
}

/* Ensure proper z-index stacking for modals */
.modal-backdrop {
    z-index: 1040 !important;
}

.modal {
    z-index: 1050 !important;
}

.modal-dialog {
    z-index: 1060 !important;
}

/* Custom Credit Modal Styles - Simple & Professional */
.custom-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.custom-modal-backdrop.show {
    opacity: 1;
}

.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.custom-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.custom-modal-dialog {
    max-width: 420px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.2s ease;
}

.custom-modal.show .custom-modal-dialog {
    transform: translateY(0);
}

.custom-modal-content {
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.custom-modal-header {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e5e5;
}

.custom-modal-header.warning {
    background-color: #fffbeb;
    border-bottom-color: #fde68a;
}

.custom-modal-header.danger {
    background-color: #fef2f2;
    border-bottom-color: #fecaca;
}

.custom-modal-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
}

.custom-modal-header.warning .custom-modal-title {
    color: #92400e;
}

.custom-modal-header.danger .custom-modal-title {
    color: #991b1b;
}

.custom-modal-close {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.15s ease;
    padding: 0;
}

.custom-modal-close:hover {
    color: #374151;
}

.custom-modal-body {
    padding: 1.25rem;
}

.custom-modal-message {
    margin: 0 0 0.75rem 0;
    font-size: 0.938rem;
    color: #374151;
    line-height: 1.5;
}

.custom-modal-submessage {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
}

.custom-modal-footer {
    padding: 1rem 1.25rem;
    background-color: #f9fafb;
    display: flex;
    justify-content: flex-end;
}

/* Modal Buttons */
.btn-modal {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.btn-modal-warning {
    background-color: #f59e0b;
    color: #fff;
}

.btn-modal-warning:hover {
    background-color: #d97706;
}

.btn-modal-danger {
    background-color: #dc2626;
    color: #fff;
}

.btn-modal-danger:hover {
    background-color: #b91c1c;
    color: #fff;
}

/* ── Terms & Conditions Checkbox ── */
.checkout-terms-check {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.checkout-checkbox {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    border: 1.5px solid #c4b09a;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    outline: none;
}

.checkout-checkbox:checked {
    background-color: #705542;
    border-color: #705542;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3 8l3.5 3.5 6.5-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 11px;
}

.checkout-checkbox:focus,
.checkout-checkbox:focus-visible {
    outline: none;
    box-shadow: none;
}

.checkout-checkbox-label {
    font-size: 0.875rem;
    color: #5a4a3a;
    cursor: pointer;
    line-height: 1.5;
}

.checkout-checkbox-label a {
    color: #705542;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.checkout-checkbox-label a:hover {
    color: #4e3b2b;
}


