/* Checkout Page Styles */
.page-navigation {
    max-width: 1000px;
    margin: 0 auto 1rem auto;
    padding: 0 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: #a05426;
    font-weight: 600;
    font-size: 0.95rem;
    gap: 0.6em;
    padding: 0.5em 1em;
    border-radius: 0.5em;
    background: #f1e4d6;
    box-shadow: 0 1px 3px rgba(111, 78, 55, 0.1);
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
}

.back-link:hover {
    background: #d9b99b;
    box-shadow: 0 2px 5px rgba(111, 78, 55, 0.15);
    transform: translateY(-1px);
}

.checkout-container {
    max-width: 1000px;
    margin: 2rem auto 3rem;
    background: #fff;
    border-radius: 1.2rem;
    box-shadow: 0 2px 16px rgba(111, 78, 55, 0.08);
    padding: 2rem;
    animation: fadeSlideIn 0.4s ease-out;
}

.checkout-title {
    text-align: center;
    color: #a05426;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.checkout-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f7f5;
    border-radius: 1rem;
    box-shadow: 0 1px 8px rgba(111, 78, 55, 0.05);
}

.section-title {
    color: #8b4513;
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: #a05426;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.order-table th,
.order-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid #d9b99b;
}

.order-table th {
    color: #a05426;
    font-weight: 600;
    font-size: 1.05rem;
}

.price-col {
    text-align: right;
}

.item-name {
    font-weight: 600;
    color: #a05426;
}

.item-price {
    text-align: right;
    font-weight: 600;
    color: #a05426;
}

.options-list {
    margin: 0;
    padding-left: 1.2em;
    font-size: 0.95rem;
}

.no-options {
    color: #aaa;
    font-style: italic;
}

.checkout-special-instructions {
    margin-top: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: #f8f6f4;
    border-radius: 0.4rem;
    border-left: 3px solid #a05426;
    font-size: 0.85rem;
    color: #7a3b1c;
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.checkout-special-instructions i {
    color: #a05426;
    margin-top: 0.1rem;
    font-size: 0.8rem;
}

.checkout-special-instructions .instruction-text {
    flex: 1;
    line-height: 1.3;
}

.total-row {
    font-weight: 700;
    color: #8b4513;
    font-size: 1.1rem;
}

.total-row td {
    padding-top: 1rem;
}

.total-label {
    text-align: right;
}

.total-value {
    text-align: right;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #8b4513;
    font-weight: 600;
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #d9b99b;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    border-color: #a05426;
    outline: none;
}

.payment-message {
    background: #f1e4d6;
    padding: 1rem 1.5rem;
    border-radius: 0.7rem;
    border-left: 4px solid #a05426;
}

.payment-message p {
    margin: 0;
    color: #8b4513;
    font-weight: 500;
}

.form-actions {
    text-align: center;
    margin-top: 2rem;
}

.place-order-btn {
    background: #a05426;
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.place-order-btn:hover {
    background: #8b4513;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(111, 78, 55, 0.2);
}

.empty-checkout {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-icon {
    font-size: 3.5rem;
    color: #a05426;
    margin-bottom: 1rem;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #a05426;
    margin-bottom: 0.5rem;
}

.empty-subtitle {
    color: #a05426;
    margin-bottom: 1.5rem;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: #a05426;
    color: white;
    text-decoration: none;
    border-radius: 2rem;
    font-weight: 600;
    transition: background 0.2s;
}

.cta-button:hover {
    background: #8b4513;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive styles for mobile devices */
@media screen and (max-width: 768px) {
    .checkout-container {
        margin: 1rem auto 2rem;
        padding: clamp(1rem, 4vw, 2rem);
        border-radius: 1rem;
    }

    .checkout-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .checkout-section {
        padding: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    /* Optimize order-type section specifically */
    .checkout-section.order-type {
        padding: 1.25rem 1rem;
    }

    .section-title {
        font-size: 1.2rem;
        margin-bottom: 1.25rem;
    }
    
    .order-type .section-title {
        margin-bottom: 0.75rem;
    }

    .order-table {
        display: block;
    }

    .order-table thead {
        display: none;
    }

    .order-table tbody {
        display: block;
    }

    .order-table tr {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 0.5rem;
        padding: 1rem 0;
        border-bottom: 1px solid #d9b99b;
    }

    .order-table td {
        display: block;
        border: none;
        padding: 0.3rem 0;
    }

    .item-name {
        grid-column: 1;
        font-size: 1.1rem;
        margin-bottom: 0.2rem;
        font-weight: 600;
    }

    .item-qty {
        grid-column: 1;
        font-size: 0.9rem;
        color: #666;
        margin-top: 0.2rem;
    }

    .item-options {
        grid-column: 1;
        font-size: 0.9rem;
        margin-top: 0.3rem;
    }

    .item-price {
        grid-column: 2;
        grid-row: 1 / span 3;
        font-size: 1.1rem;
        font-weight: 600;
        color: #a05426;
        align-self: center;
        text-align: right;
    }

    .total-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 0;
    }

    .total-label {
        text-align: left;
    }

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

    .payment-message {
        padding: 1rem;
    }

    .place-order-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
    }

    .back-link {
        flex: 1;
        justify-content: center;
        margin: 0;
    }

    .page-navigation {
        padding: 0 1rem;
        margin-bottom: 1.5rem;
    }

    .cta-button {
        width: 100%;
        padding: 0.9rem 1rem;
        font-size: 1rem;
        text-align: center;
        border-radius: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .checkout-container {
        margin: 0.5rem;
        padding: 1rem;
    }

    .checkout-title {
        font-size: 1.5rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        padding: 0.7rem;
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .section-title {
        font-size: 1.1rem;
    }
    
    .order-type .section-title {
        font-size: 1.05rem;
        margin-bottom: 0.75rem;
    }
    
    .checkout-section.order-type {
        padding: 1rem 0.875rem;
    }

    .payment-message p {
        font-size: 0.95rem;
    }

    .cta-button {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
        border-radius: 1.2rem;
    }

    .back-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        gap: 0.5rem;
    }
}

/* Add smooth touch scrolling for iOS devices */
@supports (-webkit-overflow-scrolling: touch) {
    .checkout-container {
        -webkit-overflow-scrolling: touch;
    }
}

/* Order Type Toggle Styles */
.order-type-toggle {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.order-type-option {
    position: relative;
}

.order-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.order-type-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    height: 120px;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

.order-type-label:hover {
    border-color: #a05426;
    background: #fdf6f1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(160, 84, 38, 0.15);
}

.order-type-option input[type="radio"]:checked + .order-type-label {
    border-color: #a05426;
    background: linear-gradient(135deg, #fdf6f1 0%, #f1e4d6 100%);
    box-shadow: 0 6px 20px rgba(160, 84, 38, 0.2);
    transform: translateY(-2px);
}

.order-type-label i {
    font-size: 2rem;
    color: #a05426;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.order-type-label span {
    font-weight: 600;
    color: #6d4c2b;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.order-type-label small {
    color: #8b7355;
    font-size: 0.9rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Disabled Order Type Styles */
.order-type-disabled .order-type-label {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #ddd;
    position: relative;
}

.order-type-disabled .order-type-label:hover {
    border-color: #ddd;
    background: #f5f5f5;
    transform: none;
    box-shadow: none;
}

.order-type-disabled .order-type-label i {
    color: #999;
}

.order-type-disabled .order-type-label span {
    color: #999;
}

.order-type-disabled .order-type-label small {
    color: #aaa;
}

/* Coming Soon Badge */
.coming-soon-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    z-index: 10;
    white-space: nowrap;
    max-width: calc(100% - 16px);
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

/* Payment Method Toggle Styles */
.payment-method-toggle {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.payment-method-option {
    position: relative;
}

.payment-method-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-method-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    border: 3px solid #e9ecef;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    height: 140px;
    justify-content: center;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.payment-method-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(160, 84, 38, 0.05) 0%, rgba(160, 84, 38, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.payment-method-label:hover {
    border-color: #a05426;
    background: #fdf6f1;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(160, 84, 38, 0.2);
}

.payment-method-label:hover::before {
    opacity: 1;
}

.payment-method-option input[type="radio"]:checked + .payment-method-label {
    border-color: #a05426;
    background: linear-gradient(135deg, #fdf6f1 0%, #f1e4d6 100%);
    box-shadow: 0 8px 25px rgba(160, 84, 38, 0.25);
    transform: translateY(-3px);
}

.payment-method-option input[type="radio"]:checked + .payment-method-label::before {
    opacity: 1;
}

.payment-method-label i {
    font-size: 2.5rem;
    color: #a05426;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.payment-method-label span {
    font-weight: 700;
    color: #6d4c2b;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.payment-method-label small {
    color: #8b7355;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

/* Form Help Text */
.form-help {
    display: block;
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Table Selection Styles */
#table {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Mobile Responsive for Order Type Toggle */
@media screen and (max-width: 768px) {
    .order-type-toggle {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.25rem;
    }
    
    .order-type-label {
        padding: 1.25rem 1rem;
        min-height: 110px;
        height: auto;
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
        text-align: left;
        gap: 1rem;
        border-radius: 14px;
        border-width: 2.5px;
        position: relative;
        overflow: hidden;
        box-sizing: border-box;
        flex-wrap: wrap;
    }
    
    .order-type-label i {
        font-size: 2rem;
        margin-bottom: 0;
        flex-shrink: 0;
        width: 48px;
        min-width: 48px;
        text-align: center;
        margin-top: 0.25rem;
        color: #a05426;
        align-self: flex-start;
    }
    
    /* Text content container - spans after icon, make them stack */
    .order-type-label i ~ span:not(.coming-soon-badge) {
        font-size: 1.1rem;
        margin-bottom: 0.35rem;
        line-height: 1.3;
        display: block;
        font-weight: 600;
        color: #6d4c2b;
        word-wrap: break-word;
        overflow-wrap: break-word;
        flex: 1 1 100%;
        min-width: 0;
        max-width: calc(100% - 48px - 1rem);
        box-sizing: border-box;
        width: calc(100% - 48px - 1rem);
    }
    
    .order-type-label i ~ small {
        font-size: 0.875rem;
        margin-top: 0;
        margin-bottom: 0;
        line-height: 1.4;
        display: block;
        color: #8b7355;
        word-wrap: break-word;
        overflow-wrap: break-word;
        flex: 1 1 100%;
        min-width: 0;
        max-width: calc(100% - 48px - 1rem);
        box-sizing: border-box;
        width: calc(100% - 48px - 1rem);
    }
    
    .coming-soon-badge {
        top: 8px;
        right: 8px;
        padding: 0.35rem 0.7rem;
        font-size: 0.7rem;
        border-radius: 14px;
        position: absolute;
        white-space: nowrap;
        max-width: calc(100% - 16px);
        overflow: hidden;
        text-overflow: ellipsis;
        box-sizing: border-box;
        z-index: 2;
    }
    
    /* Ensure text doesn't overlap badge - reduce width when badge exists */
    .order-type-disabled .order-type-label i ~ span:not(.coming-soon-badge),
    .order-type-disabled .order-type-label i ~ small {
        max-width: calc(100% - 48px - 1rem - 90px);
        width: calc(100% - 48px - 1rem - 90px);
        padding-right: 0.5rem;
    }
    
    .order-type-option input[type="radio"]:checked + .order-type-label {
        border-width: 3px;
        transform: translateY(-1px);
        box-shadow: 0 4px 16px rgba(160, 84, 38, 0.25);
    }
    
    .order-type-label:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Ensure disabled states work on mobile */
    .order-type-disabled .order-type-label:active {
        transform: none;
    }
    
    /* Improve visual hierarchy on mobile */
    .order-type-label {
        -webkit-tap-highlight-color: rgba(160, 84, 38, 0.1);
    }
    
    .payment-method-toggle {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .payment-method-label {
        padding: 1.5rem 1rem;
        height: 120px;
    }
    
    .payment-method-label i {
        font-size: 2rem;
    }
    
    .payment-method-label span {
        font-size: 1.1rem;
    }
    
    .payment-method-label small {
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .order-type-toggle {
        gap: 0.875rem;
        margin-top: 1rem;
    }
    
    .order-type-label {
        padding: 1.125rem 0.875rem;
        min-height: 100px;
        gap: 0.875rem;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .order-type-label i {
        font-size: 1.75rem;
        width: 44px;
        min-width: 44px;
        margin-top: 0.2rem;
    }
    
    .order-type-label i ~ span:not(.coming-soon-badge) {
        font-size: 1.05rem;
        margin-bottom: 0.3rem;
        max-width: calc(100% - 44px - 0.875rem);
        width: calc(100% - 44px - 0.875rem);
    }
    
    .order-type-label i ~ small {
        font-size: 0.8rem;
        max-width: calc(100% - 44px - 0.875rem);
        width: calc(100% - 44px - 0.875rem);
    }
    
    .coming-soon-badge {
        top: 6px;
        right: 6px;
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
        border-radius: 12px;
        max-width: calc(100% - 12px);
    }
    
    /* Ensure text content doesn't overlap with badge on small screens */
    .order-type-disabled .order-type-label i ~ span:not(.coming-soon-badge),
    .order-type-disabled .order-type-label i ~ small {
        max-width: calc(100% - 44px - 0.875rem - 80px);
        width: calc(100% - 44px - 0.875rem - 80px);
        padding-right: 0.5rem;
    }
    
    /* Improve touch targets for disabled options */
    .order-type-disabled .order-type-label {
        min-height: 100px;
    }
    
    .payment-method-toggle {
        gap: 0.875rem;
    }
    
    .payment-method-label {
        padding: 1.25rem 0.875rem;
        height: 110px;
    }
    
    .payment-method-label i {
        font-size: 1.75rem;
    }
}

/* Loading Overlay Styles */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in;
}

.loading-content {
    text-align: center;
    background: #fff;
    padding: 3rem 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    animation: slideUp 0.4s ease-out;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #a05426;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.loading-title {
    color: #a05426;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
}

.loading-message {
    color: #6c757d;
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive for Loading Overlay */
@media screen and (max-width: 480px) {
    .loading-content {
        padding: 2rem 1.5rem;
        max-width: 90%;
    }
    
    .loading-spinner {
        width: 50px;
        height: 50px;
        border-width: 4px;
    }
    
    .loading-title {
        font-size: 1.3rem;
    }
    
    .loading-message {
        font-size: 0.95rem;
    }
}
/* Payment step (Stripe Payment Request + Payment Element) */
.payment-subtitle {
    text-align: center;
    color: #6a4a3c;
    margin-top: -0.5rem;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.payment-step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.payment-order-items {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
}

.payment-order-item {
    border-bottom: 1px solid #f1e7df;
    padding: 0.75rem 0;
}

.payment-item-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: #4a2c18;
}

.payment-order-item .item-price {
    font-size: 0.95rem;
    color: #7a624f;
    margin-top: 0.35rem;
}

.customer-details {
    margin-top: 1.25rem;
    padding: 1rem;
    background: #f7f3f0;
    border-radius: 12px;
    color: #5b3926;
    font-size: 0.95rem;
}

.payment-form-section .divider {
    margin: 1.5rem 0;
}

.payment-request-button {
    margin-top: 0.75rem;
    min-height: 48px;
}

.payment-request-unavailable {
    margin-top: 0.65rem;
    font-size: 0.9rem;
    color: #7a624f;
}

.payment-status {
    margin-top: 1.25rem;
    min-height: 1.25rem;
    color: #2e7d32;
    font-weight: 600;
}

.payment-security-note {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: #f7f3f0;
    color: #6a4a3c;
    font-size: 0.9rem;
}

.saved-card-btn {
    width: 100%;
    margin-top: 0.5rem;
}

.digital-wallets-section {
    margin-bottom: 1rem;
}

.digital-wallets-title {
    font-size: 1rem;
    font-weight: 600;
    color: #5b3926;
}

.checkout-tip-section .tip-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.checkout-tip-section .tip-option {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 2px solid #e8d9c8;
    background: #fdfaf7;
    cursor: pointer;
    font-size: 0.9rem;
    color: #5b3926;
    transition: border-color 0.2s, background 0.2s;
}

.checkout-tip-section .tip-option input {
    margin: 0;
}

.checkout-tip-section .tip-custom-wrap {
    margin-top: 0.5rem;
}

.order-table .tip-row .tip-label {
    color: #6d4c2b;
}

.order-table .tip-row .tip-value {
    font-weight: 600;
    color: #a05426;
}

@media (max-width: 768px) {
    .payment-step-grid {
        grid-template-columns: 1fr;
    }
}

/* —— Compact checkout layout (two-column + sticky summary) —— */
.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 1.25rem 1.5rem;
    align-items: start;
}

.checkout-layout__main {
    min-width: 0;
}

.checkout-layout__summary {
    min-width: 0;
}

.checkout-section--sticky {
    position: sticky;
    top: 0.75rem;
    z-index: 1;
}

.checkout-section--tight {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
}

.section-title--compact {
    font-size: 1.05rem;
    margin-bottom: 0.65rem;
}

.order-table--compact th,
.order-table--compact td {
    padding: 0.45rem 0.5rem;
    font-size: 0.92rem;
}

.order-table--compact th {
    font-size: 0.88rem;
    padding-top: 0.35rem;
    padding-bottom: 0.45rem;
}

.order-table--compact .options-list {
    font-size: 0.82rem;
}

.order-table--compact .total-row td {
    padding-top: 0.65rem;
}

.payment-message--compact {
    padding: 0.65rem 0.85rem;
    margin: 0;
}

.payment-message--compact p {
    margin: 0;
    font-size: 0.92rem;
}

.table-pay-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.table-pay-option {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.92rem;
    line-height: 1.35;
}

.table-pay-option input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.checkout-banner {
    background: linear-gradient(135deg, #fdf6f1 0%, #f1e4d6 100%);
    border: 2px solid #e8d9c8;
    border-radius: 0.85rem;
    padding: 0.85rem 1rem;
}

.checkout-banner--table {
    text-align: center;
}

.checkout-banner--inline {
    text-align: left;
}

.checkout-banner__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #6d4c2b;
    margin: 0 0 0.25rem 0;
}

.checkout-banner__title--sm {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.checkout-banner__sub {
    font-size: 0.9rem;
    color: #8b7355;
    margin: 0;
}

.checkout-form-actions {
    margin-top: 0.5rem;
}

/* Native <details> accordions — tip / promo / note */
.checkout-accordion {
    margin-bottom: 0.75rem;
    border: 1px solid #e8d9c8;
    border-radius: 0.85rem;
    background: #fcfaf8;
    overflow: hidden;
}

.checkout-accordion__summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    font-weight: 600;
    color: #6d4c2b;
    font-size: 0.95rem;
    user-select: none;
}

.checkout-accordion__summary::-webkit-details-marker {
    display: none;
}

.checkout-accordion__summary::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.65rem;
    color: #a05426;
    opacity: 0.75;
    transition: transform 0.2s ease;
}

.checkout-accordion[open] > .checkout-accordion__summary::after {
    transform: rotate(180deg);
}

.checkout-accordion__title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.checkout-accordion__title i {
    color: #a05426;
}

.checkout-accordion__hint {
    font-size: 0.78rem;
    font-weight: 500;
    color: #8b7355;
}

.checkout-accordion__body {
    border-top: 1px solid #efe5dc;
    padding: 0.75rem 0.9rem;
    background: #f9f7f5;
}

.checkout-accordion__body.checkout-section {
    box-shadow: none;
    margin-bottom: 0;
    padding: 0;
    background: transparent;
}

.checkout-accordion .checkout-tip-section .tip-options {
    margin-bottom: 0;
}

@media screen and (max-width: 960px) {
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .checkout-layout__summary {
        order: -1;
    }

    .checkout-section--sticky {
        position: static;
    }
}

@media screen and (min-width: 961px) {
    .form-actions.checkout-form-actions {
        grid-column: 1 / -1;
    }
}

@media screen and (max-width: 960px) {
    .form-actions.checkout-form-actions {
        width: 100%;
    }
}
