.basket-page {
    font-family: 'Sora', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
}

.basket-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 1rem;
    margin-top: 1rem;
    justify-content: space-between;
    box-sizing: border-box;
    width: 100%;
}

.basket-products-area {
    display: block;
    flex: 1;
    min-width: 300px;
    padding: 1rem;
    margin: 10px 0 0;
    box-sizing: border-box;
}

.basket-products-area > .item-box + .item-box {
    margin-top: 2rem;
}

.basket-products-area.is-empty {
    text-align: center;
}

.order-summary-area {
    flex: 1;
    min-width: 300px;
    display: none;
    background: transparent;
    box-sizing: border-box;
}

.order-summary-area.is-visible {
    display: block;
}

#order-summary-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 250px;
    max-width: 440px;
    width: 100%;
    align-items: center;
    margin: 20px auto 0;
    background: linear-gradient(175deg, #fff 0%, #fdf7f1 100%);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    box-shadow: var(--shadow-soft);
    padding: 1rem;
    box-sizing: border-box;
}

#OrderSummaryTitle {
    padding-bottom: 10px;
}

.order-list {
    width: 100%;
}

.order-item {
    margin-bottom: 1rem;
}

.order-item-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.order-item-total {
    color: #333;
    text-align: right;
    font-weight: 700;
}

.order-item-size {
    font-size: 0.95rem;
    color: #6f5d4f;
}

.order-summary-total {
    margin-top: 1.5rem;
    text-align: right;
    font-weight: 700;
    font-size: 1.2rem;
    width: 100%;
}

.item-box {
    background: linear-gradient(170deg, #fff 0%, #fdf8f3 100%);
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    padding: 1rem;
    transition: transform 0.3s ease;
    display: flex;
    gap: 1rem;
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    min-width: 0;
}

.item-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.item-box img {
    height: 100px;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.item-box img:hover {
    transform: scale(1.05);
}

.basket-item-image-link {
    display: flex;
    flex-shrink: 0;
    text-decoration: none;
}

.right-side {
    flex-grow: 1;
    flex-basis: 0;
    min-width: 0;
}

.item-box .top-right-side {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    text-decoration: none;
    min-width: 0;
    flex: 1 1 auto;
}

.bottom-right-side {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.item-name {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 700;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.item-custom-size {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.item-price {
    font-size: 1.1rem;
    color: var(--brand-gold-deep);
    margin-bottom: 0.5rem;
    display: block;
    text-align: left;
    font-weight: 700;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.item-stock {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.basket-size-editor {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 12px;
    flex-wrap: wrap;
}

.basket-size-editor__input {
    max-width: 90px;
}

.basket-message-editor__input {
    max-width: 220px;
}

.basket-size-editor__select {
    max-width: 140px;
}

.basket-size-editor__save {
    padding: 0.35rem 0.7rem;
    font-size: 0.9rem;
}

.basket-page .quantity-icon-wrapper {
    margin-top: 20px;
    margin-left: auto;
}

.basket-size-modal {
    position: fixed;
    inset: 0;
    background: rgba(30, 20, 12, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.basket-size-modal__dialog {
    background: #fffdfa;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    min-width: 280px;
    max-width: 90vw;
}

.basket-size-modal__title {
    margin-top: 0;
}

.basket-size-modal__select {
    width: 100%;
    padding: 0.5rem;
    margin: 0.75rem 0 1rem;
}

.basket-size-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.order-summary-delivery-notes {
    margin-top: 1rem;
    width: 100%;
}

.order-summary-delivery-notes__label {
    display: block;
    margin-bottom: 0.5rem;
}

.order-summary-delivery-notes__input {
    width: 100%;
    padding: 0.5rem;
    box-sizing: border-box;
    min-height: 2.5em;
    max-width: 100%;
    font-size: 1rem;
    resize: vertical;
}

.paypal-button-container {
    align-content: center;
    text-align: center;
    margin: 1rem auto 0;
    width: 100%;
    min-height: 180px;
    overflow: visible;
}

.paypal-button-container > div,
.paypal-button-container iframe {
    min-height: 180px !important;
}

.checkout-uk-note {
    width: 100%;
    margin: 1rem auto 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid #e2c7ad;
    border-radius: 10px;
    background: #fff8f2;
    color: #6f5d4f;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    box-sizing: border-box;
}

#summaryContentOutput {
    width: 100%;
}

.paypal-fallback-message {
    border: 1px solid #e2c7ad;
    padding: 12px;
    border-radius: 10px;
    background: #fff8f2;
    color: #6f5d4f;
    font-weight: 600;
}

.sales-paused-message {
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid #e1b7b7;
    border-radius: 8px;
    background: #fff3f3;
    text-align: center;
}

.sales-paused-message__heading {
    font-weight: 700;
}

.result-message {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
}

.result-message:empty {
    display: none;
}

@media (max-width: 767px) {
    .basket-layout {
        flex-direction: column;
        gap: 1.25rem;
    }

    .basket-products-area {
        width: 100%;
        min-width: 0;
        padding: 0;
        margin-top: 0;
    }

    .order-summary-area {
        width: 100%;
        min-width: 0;
        flex: none;
        padding: 0;
    }

    #order-summary-container {
        width: 100%;
        max-width: none;
        min-width: 0;
        margin: 0;
    }
}

@media (max-width: 768px) {
    .item-box {
        gap: 0.75rem;
    }
}

@media (max-width: 420px) {
    .basket-layout {
        padding: 0.5rem;
        gap: 0.75rem;
    }

    .basket-products-area,
    .order-summary-area {
        padding: 0;
    }

    .bottom-right-side {
        flex-direction: column;
        align-items: flex-start;
    }

    .item-box {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.75rem;
    }

    .basket-item-image-link {
        align-self: center;
    }

    .item-box img {
        height: 84px;
        margin-bottom: 0.5rem;
    }

    .right-side,
    .item-box .top-right-side {
        width: 100%;
    }

    .item-stock,
    .basket-size-editor,
    .basket-page .quantity-icon-wrapper {
        margin-left: 0;
    }
}

@media (max-width: 220px) {
    .basket-layout {
        padding: 0.25rem;
    }

    .basket-products-area,
    .order-summary-area {
        padding: 0;
    }

    .item-box {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .item-box img {
        height: 64px;
    }

    .item-name {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }

    .item-custom-size,
    .item-price,
    .item-stock,
    .order-item-size,
    .order-summary-total,
    .order-summary-delivery-notes__input {
        font-size: 0.9rem;
    }

    .basket-size-editor {
        gap: 6px;
        margin-right: 0;
    }

    .basket-size-editor__input {
        max-width: 72px;
    }

    .basket-size-editor__select {
        max-width: 100%;
    }

    .basket-size-editor__save {
        width: 100%;
        padding: 0.3rem 0.55rem;
        font-size: 0.82rem;
    }

    #order-summary-container {
        padding: 0.75rem;
    }

    .order-item-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .order-item-total,
    .order-summary-total {
        text-align: left;
    }

    .checkout-uk-note {
        font-size: 0.88rem;
        padding: 0.65rem 0.75rem;
    }
}
