.checkout-page {
    min-height: 100vh;
    background: var(--bg-secondary);
}

.checkout-login-banner[hidden] {
    display: none !important;
}

.checkout-login-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    margin-bottom: 32px;
    border-radius: 16px;
    background: var(--bg-tertiary, #eeeef1);
    border: 1px solid var(--border-color, rgba(20, 22, 26, 0.12));
}

.checkout-login-banner > i {
    font-size: 1.5rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.checkout-login-banner-copy {
    flex: 1;
}

.checkout-login-banner-copy strong {
    display: block;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 4px;
}

.checkout-login-banner-copy p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

.checkout-login-banner-btn {
    flex-shrink: 0;
    padding: 10px 24px;
    border-radius: 999px;
    border: none;
    background: var(--accent-primary);
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.2s;
}

.checkout-login-banner-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .checkout-login-banner {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
}

.checkout-header {
    position: sticky;
    top: 0;
    z-index: 1100;
}

.checkout-nav-links {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    transform: none;
    background: transparent;
    flex-direction: row;
}

.checkout-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    font-family: var(--font-arabic, 'Tajawal', sans-serif);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.checkout-back-link:hover {
    background: #ffffff;
    color: #0d0e10 !important;
    border-color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.checkout-back-link i {
    color: #ffffff !important;
    font-size: 0.72rem;
    transition: all 0.2s ease;
}

.checkout-back-link:hover i {
    color: #0d0e10 !important;
}

.checkout-main {
    padding: 46px 0 80px;
}

.checkout-hero {
    padding: 36px 0 20px;
}

.checkout-breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.checkout-breadcrumbs a:hover {
    color: var(--accent-primary);
}

.checkout-hero-copy {
    max-width: 620px;
}

.checkout-hero-copy h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 900;
    margin: 14px 0 10px;
    color: var(--text-primary);
}

.checkout-hero-copy p {
    color: var(--text-secondary);
    font-size: 1.02rem;
}

.checkout-content {
    padding-top: 14px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.checkout-form-card,
.checkout-summary-card {
    background: #ffffff;
    border: 1px solid #e5e5e8;
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.checkout-form-card {
    padding: 26px;
}

.checkout-summary-card {
    position: sticky;
    top: 140px;
    padding: 24px;
}

.checkout-section-head {
    margin-bottom: 18px;
}

.checkout-section-head h2 {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.checkout-section-head p {
    color: var(--text-secondary);
    font-size: 0.93rem;
}

.checkout-shipping-notice {
    margin-bottom: 22px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid #e5e5e8;
    background: #f7f7f8;
    display: flex;
    align-items: center;
    gap: 14px;
}

.checkout-shipping-notice > i {
    font-size: 1.4rem;
    color: #14161a;
    flex-shrink: 0;
}

.checkout-shipping-notice-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checkout-shipping-notice-copy strong {
    color: #14161a;
    font-size: 0.96rem;
}

.checkout-fulfillment-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.fulfillment-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    border: 1.5px solid #e5e5e8;
    background: #f7f7f8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fulfillment-option:hover {
    border-color: #14161a;
    background: #ffffff;
}

.fulfillment-option.active {
    border-color: #14161a;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(20, 22, 26, 0.06);
}

.fulfillment-option input[type="radio"] {
    accent-color: #14161a;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.fo-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5e5e8;
    color: #14161a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.fulfillment-option.active .fo-icon {
    background: #14161a;
    color: #ffffff;
}

.fo-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.fo-details strong {
    font-size: 0.95rem;
    color: #14161a;
}

.fo-details span {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.checkout-pickup-notice {
    margin-bottom: 22px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(22, 163, 74, 0.3);
    background: rgba(22, 163, 74, 0.04);
}

.cpn-head {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #15803d;
}

.cpn-head i {
    font-size: 1.3rem;
}

.cpn-head strong {
    display: block;
    font-size: 0.95rem;
    color: #14161a;
}

.cpn-head span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cpn-badge {
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #15803d;
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 540px) {
    .checkout-fulfillment-options {
        grid-template-columns: 1fr;
    }
}

.checkout-shipping-notice-copy span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.checkout-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkout-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkout-field span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
}

.checkout-field em {
    color: #ff7a7a;
    font-style: normal;
}

.checkout-field small {
    color: var(--text-muted);
    font-weight: 500;
}

.checkout-field input,
.checkout-field select,
.checkout-field textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid #d8d8dc;
    background: #ffffff;
    color: #14161a;
    font-family: var(--font-arabic);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.checkout-field input::placeholder,
.checkout-field textarea::placeholder {
    color: #a8abb0;
}

.checkout-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #14161a 50%),
        linear-gradient(135deg, #14161a 50%, transparent 50%);
    background-position:
        calc(18px) calc(50% - 3px),
        calc(12px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-left: 34px;
}

.checkout-field select option {
    color: #111111;
    background: #ffffff;
}

.checkout-field input:focus,
.checkout-field select:focus,
.checkout-field textarea:focus {
    border-color: #14161a;
    box-shadow: 0 0 0 3px rgba(20, 22, 26, 0.08);
}

.checkout-field textarea {
    resize: vertical;
    min-height: 150px;
}

.checkout-method-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: #f7f7f8;
    border: 1px solid #e5e5e8;
}

.checkout-method-card h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.checkout-method-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.checkout-method-card span {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #14161a;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 1px solid #14161a;
}

.checkout-privacy-note {
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.9;
}

.checkout-discount-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #e8f5ee;
    color: #1f7a44;
    border: 1px solid #b8e0c8;
    font-size: 0.82rem;
    font-weight: 700;
}

.checkout-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

/* ===== Checkout Bundle Cards ===== */
.checkout-bundle-card {
    background: #ffffff;
    border: 1px solid rgba(139, 105, 20, 0.25);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.checkout-bundle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px dashed rgba(20, 22, 26, 0.12);
}

.checkout-bundle-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkout-bundle-badge {
    background: rgba(139, 105, 20, 0.1);
    color: #8B6914;
    border: 1px solid rgba(139, 105, 20, 0.25);
    font-weight: 800;
    font-size: 0.78rem;
    padding: 4px 12px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.checkout-bundle-title {
    font-size: 1rem;
    font-weight: 700;
    color: #14161a;
    margin: 0;
}

.checkout-bundle-header-side {
    display: flex;
    align-items: center;
    gap: 14px;
}

.checkout-bundle-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: #8B6914;
}

.checkout-remove-bundle {
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #dc2626;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all var(--transition-fast);
}

.checkout-remove-bundle:hover {
    background: #dc2626;
    color: #fff;
}

.checkout-bundle-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.checkout-bundle-subitem {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f7f7f8;
    border: 1px solid rgba(20, 22, 26, 0.08);
    padding: 8px 10px;
    border-radius: var(--radius-md);
}

.checkout-bundle-subitem-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: #ffffff;
    border: 1px solid rgba(20, 22, 26, 0.08);
    border-radius: 6px;
    padding: 2px;
    flex-shrink: 0;
}

.checkout-bundle-subitem-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.checkout-bundle-subitem-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: #14161a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkout-bundle-subitem-meta {
    font-size: 0.74rem;
    color: #6b6e73;
}

.checkout-item {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 14px;
    padding: 14px;
    border-radius: var(--radius-lg);
    background: #fafafa;
    border: 1px solid #e5e5e8;
}

.checkout-item-image {
    width: 72px;
    height: 72px;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1px solid #e5e5e8;
}

.checkout-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.checkout-item-copy {
    min-width: 0;
}

.checkout-item-copy h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.checkout-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.checkout-item-meta span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.checkout-item-price {
    color: #14161a;
    font-size: 0.95rem;
    font-weight: 800;
}

.checkout-item-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}

.checkout-remove-item {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fce8e8;
    color: #c62828;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.checkout-remove-item:hover {
    background: #c62828;
    color: #ffffff;
}

.checkout-item-qty {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #d8d8dc;
}

.checkout-item-qty button {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f2f4;
    color: #14161a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.checkout-item-qty button:hover {
    background: #14161a;
    color: #ffffff;
}

.checkout-item-qty span {
    min-width: 18px;
    text-align: center;
    font-weight: 800;
}

.checkout-empty-state {
    padding: 34px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    background: #f7f7f8;
    border: 1px dashed #d8d8dc;
}

.checkout-empty-state i {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.checkout-empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.checkout-empty-state p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.checkout-totals {
    padding-top: 18px;
    border-top: 1px solid #e5e5e8;
}

.checkout-total-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.checkout-total-line strong {
    color: var(--text-primary);
    font-size: 1rem;
}

.checkout-total-line-discount strong {
    color: #1f7a44;
}

.checkout-total-line-final {
    margin-top: 6px;
    padding-top: 16px;
    border-top: 1px solid #e5e5e8;
    color: #14161a;
    font-size: 1.04rem;
    font-weight: 800;
}

.checkout-total-line-final strong {
    color: #14161a;
    font-size: 1.18rem;
}

.checkout-submit-btn {
    width: 100%;
    margin-top: 20px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: #14161a;
    color: #ffffff;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-arabic, 'Tajawal', sans-serif);
    font-size: 1.02rem;
    font-weight: 800;
    box-shadow: 0 10px 28px rgba(20, 22, 26, 0.2);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checkout-submit-btn:hover {
    transform: translateY(-2px);
    background: #2c2f33;
    box-shadow: 0 14px 34px rgba(20, 22, 26, 0.3);
}

.checkout-submit-btn i {
    color: var(--warm-gold, #8B6914);
}

.checkout-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.checkout-footer {
    margin-top: 30px;
}

@media (max-width: 1024px) {
    .checkout-grid {
        display: flex;
        flex-direction: column;
    }

    .checkout-summary-card {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .checkout-header .header-top .container {
        justify-content: center;
    }

    .checkout-header .header-top span:last-child {
        display: none;
    }

    .checkout-nav-links {
        display: none;
    }

    .checkout-back-link {
        padding: 10px 14px;
        font-size: 0.82rem;
    }

    .checkout-main {
        padding: 28px 0 60px;
    }

    .checkout-hero {
        padding: 26px 0 10px;
    }

    .checkout-form-card,
    .checkout-summary-card {
        padding: 18px;
        border-radius: var(--radius-lg);
    }

    .checkout-free-shipping-copy,
    .checkout-form-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .checkout-item {
        display: grid;
        grid-template-columns: 60px 1fr auto;
        align-items: center;
        gap: 12px;
        padding: 12px;
    }

    .checkout-item-image {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }

    .checkout-item-side {
        align-items: flex-end;
        justify-content: space-between;
        gap: 8px;
    }

    .checkout-item-qty {
        width: fit-content;
    }
}

@media (max-width: 576px) {
    .checkout-bundle-card {
        padding: 14px 12px;
    }

    .checkout-bundle-header {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .checkout-bundle-title-wrap {
        justify-content: space-between;
        width: 100%;
    }

    .checkout-bundle-header-side {
        justify-content: space-between;
        width: 100%;
        padding-top: 4px;
    }

    .checkout-bundle-body {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .checkout-bundle-subitem {
        padding: 7px 10px;
    }
}

@media (max-width: 480px) {
    .checkout-item {
        grid-template-columns: 52px 1fr auto;
        gap: 10px;
        padding: 10px;
    }

    .checkout-item-image {
        width: 52px;
        height: 52px;
    }

    .checkout-hero-copy h1 {
        font-size: 1.8rem;
    }

    .checkout-form-card,
    .checkout-summary-card {
        padding: 16px;
    }

    .checkout-field input,
    .checkout-field select,
    .checkout-field textarea {
        padding: 13px 14px;
        border-radius: 16px;
    }

    .checkout-submit-btn {
        font-size: 0.94rem;
        padding: 14px 16px;
    }
}

/* Address Picker */
.checkout-address-picker {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    background: var(--bg-secondary, #f7f7f8);
    border: 1px solid var(--border-color, rgba(20,22,26,0.12));
    border-radius: 12px;
}

.checkout-address-picker select {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 1.5px solid var(--border-color, rgba(20,22,26,0.12));
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.9rem;
    background: #fff;
    margin-top: 0.4rem;
    transition: border-color 0.2s;
}

.checkout-address-picker select:focus {
    outline: none;
    border-color: #6E737A;
}

.checkout-address-picker .checkout-field span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary, #4a4d52);
}

.checkout-address-picker .checkout-field span i {
    margin-left: 0.3rem;
}
