/* ============================================
   CHECKOUT PAGE STYLES
   Unified checkout for services and products
   ============================================ */

/* ── Page Banner (replaces hero slider) ──── */
.page-banner {
    background: linear-gradient(135deg, #1a5490 0%, #0f3a63 60%, #1a5490 100%);
    padding: 3.5rem 0 2.5rem;
    color: #fff;
    text-align: center;
    margin-top: 0; /* sits directly under sticky header */
}

.page-banner .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    opacity: 0.85;
}

.breadcrumb-nav a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s;
}

.breadcrumb-nav a:hover { opacity: 0.7; }

.breadcrumb-sep {
    font-size: 1rem;
    opacity: 0.7;
}

.page-banner-title {
    font-size: clamp(1.6rem, 5vw, 2.6rem);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.page-banner-sub {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    opacity: 0.85;
    margin: 0;
}

@media (max-width: 768px) {
    .page-banner {
        padding: 2.5rem 1rem 2rem;
    }
    .page-banner-title {
        font-size: 1.6rem;
    }
}

/* ── Hamburger lines fix for mobile ─────── */
.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}



.checkout-section {
    padding: 3rem 0;
    background: var(--bg-secondary, #f8f9fa);
    min-height: calc(100vh - 200px);
}

.checkout-header {
    text-align: center;
    margin-bottom: 3rem;
}

.checkout-header h1 {
    font-size: 2.5rem;
    color: var(--primary, #1a5490);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.checkout-header p {
    font-size: 1.1rem;
    color: var(--text-secondary, #4a4a4a);
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    align-items: start;
}

/* Order Summary Card */
.order-summary-card {
    background: var(--bg-primary, #ffffff);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
}

.order-summary-card h2 {
    font-size: 1.5rem;
    color: var(--primary, #1a5490);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color, #e0e0e0);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.order-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.order-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.item-details {
    flex: 1;
}

.item-name {
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.item-meta {
    font-size: 0.9rem;
    color: var(--text-secondary, #4a4a4a);
    margin-bottom: 0.5rem;
}

.item-quantity {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-primary, #ffffff);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Quantity Controls */
.item-quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-primary, #ffffff);
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.qty-decrease-btn,
.qty-increase-btn {
    background: white;
    color: var(--primary, #1a5490);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.65rem;
    padding: 0;
    line-height: 1;
}

.qty-decrease-btn:hover,
.qty-increase-btn:hover {
    background: var(--bg-secondary, #f8f9fa);
    border-color: var(--primary, #1a5490);
    color: var(--primary, #1a5490);
}

.qty-decrease-btn:active,
.qty-increase-btn:active {
    transform: scale(0.9);
    background: var(--primary, #1a5490);
    color: white;
}

.quantity-value {
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    min-width: 24px;
    text-align: center;
    font-size: 0.9rem;
}

.item-remove {
    background: none;
    border: none;
    color: var(--error, #dc3545);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.item-remove:hover {
    transform: scale(1.2);
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    color: var(--text-muted, #6b6b6b);
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-cart h3 {
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 0.5rem;
}

.empty-cart p {
    color: var(--text-secondary, #4a4a4a);
    margin-bottom: 2rem;
}

.empty-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Customer Details Card */
.customer-details-card {
    background: var(--bg-primary, #ffffff);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.customer-details-card h2 {
    font-size: 1.5rem;
    color: var(--primary, #1a5490);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color, #e0e0e0);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    padding: 1.5rem;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 12px;
}

.form-section h3 {
    font-size: 1.2rem;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.required {
    color: var(--error, #dc3545);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-primary, #ffffff);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary, #1a5490);
    box-shadow: 0 0 0 3px rgba(26, 84, 144, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color, #e0e0e0);
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary, #1a5490);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark, #0f3a63);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 84, 144, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary, #1a5490);
    border: 2px solid var(--primary, #1a5490);
}

.btn-secondary:hover {
    background: var(--primary, #1a5490);
    color: white;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-primary, #ffffff);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    text-align: center;
    padding: 2rem;
    border-bottom: 2px solid var(--border-color, #e0e0e0);
}

.success-icon {
    font-size: 4rem;
    color: var(--success, #28a745);
    margin-bottom: 1rem;
}

.modal-header h2 {
    color: var(--primary, #1a5490);
    margin: 0;
}

.modal-body {
    padding: 2rem;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.order-reference {
    background: var(--bg-secondary, #f8f9fa);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary, #1a5490);
}

.order-reference strong {
    font-size: 1.5rem;
    color: var(--primary, #1a5490);
}

.contact-info-box {
    background: var(--bg-secondary, #f8f9fa);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.contact-info-box h4 {
    color: var(--text-primary, #1a1a1a);
    margin-bottom: 1rem;
}

.contact-info-box p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.contact-info-box i {
    color: var(--primary, #1a5490);
    width: 20px;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    padding: 2rem;
    border-top: 2px solid var(--border-color, #e0e0e0);
}

.modal-footer .btn {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .checkout-content {
        grid-template-columns: 1fr;
    }

    .order-summary-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .checkout-header h1 {
        font-size: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .modal-content {
        margin: 1rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .order-item {
        flex-direction: column;
    }

    .item-image {
        width: 100%;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .checkout-section {
        padding: 2rem 0;
    }

    .checkout-header h1 {
        font-size: 1.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .order-summary-card,
    .customer-details-card {
        padding: 1.5rem;
    }

    .form-section {
        padding: 1rem;
    }
}


/* Add these responsive fixes to existing checkout.css */
/* Mobile-specific checkout fixes */
@media (max-width: 767px) {
    .checkout-section {
        padding: 1.5rem 0;
    }

    .checkout-header {
        padding: 0 1rem;
        margin-bottom: 2rem;
    }

    .checkout-header h1 {
        font-size: 1.75rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        text-align: center;
    }

    .checkout-header h1 i {
        font-size: 2rem;
    }

    .checkout-header p {
        font-size: 0.95rem;
        text-align: center;
    }

    .checkout-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .order-summary-card,
    .customer-details-card {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .order-summary-card h2,
    .customer-details-card h2 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .section-title {
        font-size: 1rem;
        padding-bottom: 0.5rem;
    }

    .order-item {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .item-image {
        width: 100%;
        height: 140px;
        object-fit: cover;
    }

    .item-details {
        width: 100%;
    }

    .item-name {
        font-size: 1rem;
    }

    .item-meta {
        font-size: 0.85rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .item-remove {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 50%;
        padding: 0.5rem;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .form-section {
        padding: 1rem;
        border-radius: 8px;
    }

    .form-section h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.875rem 1rem;
        font-size: 16px;
        /* Prevents iOS zoom */
    }

    .form-actions {
        flex-direction: column;
        gap: 1rem;
        padding-top: 1.5rem;
    }

    .form-actions .btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }

    .empty-cart {
        padding: 2rem 1rem;
    }

    .empty-icon {
        font-size: 3rem;
    }

    .empty-cart h3 {
        font-size: 1.25rem;
    }

    .empty-actions {
        flex-direction: column;
        width: 100%;
    }

    .empty-actions .btn {
        width: 100%;
    }

    /* Modal responsive */
    .modal {
        padding: 1rem;
        align-items: flex-end;
    }

    .modal-content {
        max-width: 100%;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 16px 16px 0 0;
    }

    .modal-header {
        padding: 1.5rem 1rem;
    }

    .success-icon {
        font-size: 3rem;
        margin-bottom: 0.75rem;
    }

    .modal-header h2 {
        font-size: 1.5rem;
    }

    .modal-body {
        padding: 1.5rem 1rem;
    }

    .order-reference {
        padding: 1rem;
        margin: 1rem 0;
    }

    .order-reference strong {
        font-size: 1.25rem;
        word-break: break-all;
    }

    .contact-info-box {
        padding: 1rem;
    }

    .contact-info-box h4 {
        font-size: 1rem;
    }

    .contact-info-box p {
        font-size: 0.875rem;
    }

    .modal-footer {
        flex-direction: column;
        padding: 1.5rem 1rem;
        gap: 0.75rem;
    }

    .modal-footer .btn {
        width: 100%;
    }
}

/* Landscape mode fixes for mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .checkout-header h1 {
        font-size: 1.5rem;
    }

    .modal {
        align-items: center;
    }

    .modal-content {
        max-height: 85vh;
    }
}

/* Small phones (< 375px) */
@media (max-width: 374px) {
    .checkout-header h1 {
        font-size: 1.5rem;
    }

    .order-summary-card,
    .customer-details-card {
        padding: 1rem;
    }

    .form-section {
        padding: 0.875rem;
    }

    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}