﻿* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Open Sans", Arial, sans-serif;
    background: #ffffff;
    color: #1f2933;
}

img {
    display: block;
    max-width: 100%;
}

.bulk-orders {
    min-height: 100vh;
    background: #ffffff;
}

.bulk-orders-container {
    /* max-width: 1200px; */
    margin: 0 auto;
    /* padding: 28px 24px 40px; */
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

/* Stepper and progress indicator. */
.stepper {
    background: #ffffff;
    border-radius: 12px;
    padding: 6px 0 14px;
}

.stepper-items {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    text-align: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 400;
    color: #000000;
    margin: 0 12rem;
}

.stepper-item {
    padding: 10px 6px;
    border: none;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.stepper-item.active {
    font-weight: 600;
}

.stepper-item.is-disabled {
    color: #9aa0a6;
    cursor: not-allowed;
}

.stepper-line {
    position: relative;
    height: 8px;
    background: #D9D9D9;
    /* border-radius: 999px; */
    width: 100%;
}

.stepper-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 10%;
    background: #ee7700;
    /* border-radius: 999px; */
    transition: left 0.2s ease, width 0.2s ease;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 22px 0 18px;
}

.bulk-orders-content {
    max-width: 1200px;
    margin: 0 auto;
}

.btn {
    padding: 10px 40px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: #ffffff;
}

.btn-back {
    border: 1px solid #0088CC;
    color: #0088CC;
}

.btn-next {
    border: 1px solid #ee7700;
    background: #ee7700;
    color: #ffffff;
}

.btn-next:disabled {
    border-color: #B3B3B3;
    background: #B3B3B3;
    color: #ffffff;
    cursor: not-allowed;
}

.content-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 0 0;
}

.content-header {
    padding: 0 6px 8px;
}

.content-header h1 {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 600;
}

.stepper-content.is-hidden {
    display: none;
}

.stepper-note {
    margin: 8px 0 0;
    font-size: 14px;
    color: #667085;
}

.step-error {
    margin: 6px 0 0;
    font-size: 13px;
    color: #d84315;
}

.step-error.is-hidden {
    display: none;
}

.quantity-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 36px;
    padding: 10px 6px 24px;
    align-items: start;
}

.quantity-left h1 {
    margin: 0 0 2rem;
    font-size: 28px;
    font-weight: 600;
}

.quantity-items {
    display: grid;
    gap: 18px;
}

.quantity-empty {
    margin: 8px 0 0;
    font-size: 14px;
    color: #667085;
}

.quantity-empty.is-hidden {
    display: none;
}

.quantity-item {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px;
    padding-bottom: 18px;
}

.quantity-item img {
   
}

.quantity-info {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 18px;
}

.quantity-info h2 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
}

.quantity-info .price {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.quantity-top {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}

.quantity-controls {
    margin-top: auto;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.quantity-controls select {
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
    background: #EEEEEE;
    border: 0px;
}

.stepper-input {
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    background: #EEEEEE;
    overflow: hidden;
}

.stepper-input button {
    border: none;
    background: #e5e5e5;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
}

.stepper-input span {
    display: inline-block;
    min-width: 40px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
}

.stepper-input .stepper-input-field {
    width: 40px;
    min-width: 40px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    border: none;
    background: transparent;
    padding: 0;
    outline: none;
}

.quotation-card {
    background: #f2f2f2;
    padding: 20px 22px;
    border-radius: 8px;
    font-size: 13px;
    align-self: start;
    width: 100%;
    min-width: 340px;
}

.quotation-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quotation-title {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

.quotation-item h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
}

.quotation-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
    font-size: 16px;
}

.quotation-divider {
    height: 1px;
    background: #c9c9c9;
    margin: 12px 0;
}

.quotation-summary .total {
    font-weight: 700;
    margin-top: 6px;
}

.payment-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 36px;
    padding: 10px 6px 24px;
    align-items: start;
}

.payment-summary h1 {
    margin: 0 0 16px;
    font-size: 28px;
    font-weight: 600;
}

.payment-summary-box {
    background: #F2F2F2;
    padding: 20px 22px;
    font-size: 13px;
    align-self: start;
    width: 100%;
    min-width: 340px;
}

.payment-items {
    display: grid;
    gap: 12px;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
    font-size: 16px;
}

.payment-item {
    padding: 12px 14px;
}

.payment-item h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
}

.payment-item .payment-row {
    font-size: 18px;
    font-size: 400;
}

.payment-divider {
    height: 1px;
    background: #ABABAB;
}

.payment-totals .total {
    font-weight: 700;
    margin-top: 6px;
}

.payment-totals {
    margin-top: 1rem;
}

.payment-details h2 {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 600;
}

.payment-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.payment-details-card {
    border: 1px solid #D9D9D9;
    border-radius: 5px;
    padding: 12px 14px;
    font-size: 13px;
    background: #ffffff;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.payment-details-card p {
    margin: 0 0 10px;
}

.payment-details-card p:last-child {
    margin-bottom: 0;
}

.payment-details-column h3 {
    margin: 0 0 1rem;
    font-size: 18px;
    font-weight: 600;
}

.payment-details-divider {
    width: 1px;
    background: #ABABAB;
    align-self: stretch;
}

.detail-label {
    font-weight: 600;
}

.payment-details .detail-label {
    font-size: 16px;
    font-weight: 600;
}

#paymentShipName,
#paymentShipAddress,
#paymentBillName,
#paymentBillEmail,
#paymentBillPhone {
    font-size: 16px;
    font-weight: 400;
    display: block;
}

.btn-pay {
    border: 1px solid #ee7700;
    background: #ee7700;
    color: #ffffff;
    margin-top: 16px;
    font-size: 16px;
    font-weight: 600;
    width: 50%;
}

.payment-empty {
    margin: 0;
    font-size: 14px;
    color: #667085;
}

.shipping-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    padding: 10px 6px 24px;
}

.shipping-column h2 {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 600;
}

.shipping-form {
    display: grid;
    gap: 12px;
}

.shipping-form label {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 16px;
    font-weight: 600;
    color: #000000;
}

.shipping-form label:not(.checkbox-field) > input,
.shipping-form label > .field-error,
.shipping-form label > .field-row {
    flex-basis: 100%;
    height: 41px;
}

.shipping-form input[type="text"],
.shipping-form input[type="tel"],
.shipping-form input[type="email"] {
    border: 1px solid #b3b3b3;
    border-radius: 3px;
    padding: 8px 10px;
    font-size: 14px;
}

.shipping-form input.is-invalid {
    border-color: #d84315;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.half-width {
    max-width: 60%;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    flex-wrap: nowrap;
}

.checkbox-field input {
    width: 18px;
    height: 18px;
    appearance: none;
    border: 1px solid #B3B3B3;
    background: #B3B3B3;
    position: relative;
    cursor: pointer;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.checkbox-field input:checked {
    background: #34A5E6;
}

.checkbox-field input:checked::after {
    content: "";
    width: 3px;
    height: 6px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-field .checkbox-text {
    white-space: nowrap;
}

.required {
    color: #ee7700;
}

.field-error {
    font-size: 12px;
    color: #d84315;
    display: none;
}

.field-error.is-visible {
    display: block;
}

.billing-fields.is-hidden {
    display: none;
}

.billing-fields {
    display: grid;
    gap: 12px;
}

/* Book category list layout. */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem 10rem;
    padding: 0 6px 24px;
}

.category-block {
    border-radius: 10px;
    padding: 6px 6px 12px;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.category-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.select-set {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #000000;
    cursor: pointer;
    position: relative;
}

.select-set input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.set-toggle-box {
    width: 18px;
    height: 18px;
    border: 0.65px solid #B3B3B3;
    background: #B3B3B3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.set-toggle-box::after {
    content: "";
    width: 3px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
}

.select-set input:checked + .set-toggle-box {
    background: #34A5E6;
    border-color: #34A5E6;
}

.select-set input:checked + .set-toggle-box::after {
    opacity: 1;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.books-grid .swiper-wrapper {
    display: contents;
}

.books-grid .swiper-slide {
    width: auto;
}

.book-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.book-image {
    padding: 4px;
    background: #ffffff;
}

.book-check {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 12px;
    color: #1f2933;
    cursor: pointer;
    position: relative;
}

.book-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.check-box {
    width: 18px;
    height: 18px;
    border: 1px solid #B3B3B3;
    background: #B3B3B3;
    margin-top: 2px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.check-box::after {
    content: "";
    width: 3px;
    height: 8px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
}

.book-check input:checked + .check-box {
    background: #34A5E6;
    border-color: #34A5E6;
}

.book-check input:checked + .check-box::after {
    opacity: 1;
}

.book-title {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.2;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 16px;
    border: 1px dashed #d8d8d8;
    border-radius: 12px;
}

.page-footer {
    background: #514F4F;
    color: #ffffff;
    text-align: center;
    padding: 16px 20px;
    font-size: 16px;
}

.page-footer p {
    margin: 0;
}

.sticky-next {
    display: none;
}

@media (max-width: 980px) {
    .category-grid {
        grid-template-columns: 1fr;
    }

    .books-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quantity-layout {
        grid-template-columns: 1fr;
    }

/* Shipping and billing form layout. */
.shipping-layout {
        grid-template-columns: 1fr;
    }

    .payment-layout {
        grid-template-columns: 1fr;
    }

    .payment-details-card {
        grid-template-columns: 1fr;
    }

    .payment-details-divider {
        display: none;
    }
}

@media (max-width: 640px) {
    .bulk-orders-container {
        padding: 20px 16px 32px;
    }

    .stepper-items {
        font-size: 12px;
    }

    .controls {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .books-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile-only layout adjustments. */
@media (max-width: 767.98px) {
    body,
    .bulk-orders {
        overflow-x: hidden;
    }

    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }

    .bulk-orders-header {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 6px 0 12px;
        gap: 8px;
    }

    .bulk-orders-header h1 {
        margin: 0;
        font-size: 24px;
        font-weight: 600;
        color: #000000;
    }

    .bulk-orders-back {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        border: none;
        background: transparent;
        width: 36px;
        height: 36px;
        padding: 0;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .bulk-orders-back::before,
    .bulk-orders-back::after {
        content: none;
    }

    .bulk-orders-back-icon {
        width: 16px;
        height: 16px;
        border-left: 4px solid #EE7700;
        border-bottom: 4px solid #EE7700;
        transform: rotate(45deg);
        margin-left: 2px;
    }

    .bulk-orders-close {
        position: absolute;
        right: 4px;
        top: 50%;
        transform: translateY(-50%);
        border: none;
        background: transparent;
        color: #ee7700;
        font-size: 20px;
        font-weight: 600;
        cursor: pointer;
        padding: 6px 8px;
        line-height: 1;
    }

    .stepper {
        display: none;
    }

    .content-header h1 {
        font-size: 18px;
    }

    .controls {
        display: none;
    }

    .select-set {
        display: inline-flex;
    }

    .page-footer {
        display: none;
    }

    .category-header {
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
        justify-content: space-between;
        max-width: 100%;
    }

    .category-header h2 {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 16px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .category-block {
        max-width: 100%;
        overflow: hidden;
    }

    .select-set {
        flex-shrink: 0;
    }

    .quantity-left h1 {
        font-size: 16px;
    }

    .quantity-info h2 {
        font-size: 16px;
    }

    .shipping-form label {
        display: block;
        font-size: 20px;
    }

    .shipping-form label:not(.checkbox-field) > input,
    .shipping-form label > .field-error,
    .shipping-form label > .field-row {
        width: 100%;
    }

    .shipping-form label:not(.checkbox-field) > input {
        display: block;
        margin-top: 6px;
    }

    .shipping-form input[type="text"],
    .shipping-form input[type="tel"],
    .shipping-form input[type="email"] {
        width: 100%;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .field-row label {
        width: 100%;
    }

    .half-width {
        max-width: 100%;
        width: 100%;
    }

    .bulk-orders {
        padding-bottom: 88px;
    }

    .sticky-next {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 12px 16px 18px;
        background: #ffffff;
        border-top: 1px solid #E2DFDF;
        z-index: 1000;
    }

    .sticky-next.mobile-only {
        display: flex;
        box-shadow: 0px 4px 10px 5px #00000040;
    }

    .sticky-next .btn {
        width: 100%;
        max-width: 520px;
        padding: 12px 24px;
        font-size: 14px;
        font-weight: 700;
    }

    .books-grid {
        display: block;
        overflow: hidden;
    }

    .books-grid .swiper-wrapper {
        display: flex;
    }

    .books-grid .swiper-slide {
        flex: 0 0 auto;
    }

    .book-card {
        min-width: 140px;
        max-width: 160px;
    }

    .book-title {
        font-size: 14px;
    }

    .book-image {
        aspect-ratio: 3 / 4;
        overflow: hidden;
    }

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

    .payment-item h3 {
        font-size: 16px;
    }
}
