/**
 * TOPSOT Cart & Checkout Styles
 * Modern, responsive, high-contrast, optimized for culinary brand aesthetics.
 */

:root {
    --ts-primary: #e04b1e;
    --ts-primary-dark: #c4380e;
    --ts-primary-light: #fff2ed;
    --ts-dark: #2b1e16;
    --ts-gray-bg: #f8f6f3;
    --ts-border: #e7e2dc;
    --ts-text: #333333;
    --ts-muted: #736b63;
    --ts-success: #059669;
    --ts-radius-sm: 6px;
    --ts-radius-md: 10px;
    --ts-radius-lg: 16px;
    --ts-shadow: 0 4px 20px rgba(43, 30, 22, 0.08);
}

/* ==========================================================================
   Header Action Buttons (User Account & Shopping Cart)
   ========================================================================== */
.topsot-header__actions {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    z-index: 35;
}

.topsot-header__icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    outline: none;
    line-height: 1;
}

.topsot-header__icon-btn:hover {
    background: #e04b1e;
    color: #ffffff;
    border-color: #e04b1e;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(224, 75, 30, 0.35);
}

.topsot-header__icon-btn:active {
    transform: translateY(0);
}

.topsot-user-btn__inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.topsot-header__user-btn.is-authenticated {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.topsot-avatar-btn-content {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5px;
    background: linear-gradient(135deg, #e04b1e 0%, #ff7a45 100%);
    box-shadow: 0 2px 10px rgba(224, 75, 30, 0.35);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.topsot-header__user-btn:hover .topsot-avatar-btn-content {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(224, 75, 30, 0.5);
}

.topsot-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
    display: block;
}

.topsot-avatar-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    background: #10b981;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(16, 185, 129, 0.6);
}

.topsot-header.is-scrolled .topsot-header__icon-btn {
    color: #2b1e16;
    background: #f4f2ee;
    border-color: #e2ded9;
}

.topsot-header.is-scrolled .topsot-header__icon-btn:hover {
    background: #e04b1e;
    color: #ffffff;
    border-color: #e04b1e;
}

.topsot-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: #e04b1e;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    border-radius: 10px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    justify-content: center;
    animation: ts-badge-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes ts-badge-pop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

/* User dropdown trigger wrapper */
.topsot-header__user-wrapper {
    position: relative;
}

/* User dropdown menu */
.topsot-user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 260px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(43, 30, 22, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.06);
    padding: 12px 0 8px;
    display: none;
    z-index: 99999 !important;
    transform-origin: top right;
    animation: ts-drop-fade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.topsot-user-dropdown.is-open {
    display: block !important;
}

@keyframes ts-drop-fade {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.topsot-user-dropdown__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px 14px;
    border-bottom: 1px solid #f2eee8;
}

.topsot-user-dropdown__avatar-box {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 1.5px;
    background: linear-gradient(135deg, #e04b1e 0%, #ff7a45 100%);
    flex-shrink: 0;
}

.topsot-user-dropdown__avatar-box img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
    display: block;
}

.topsot-user-dropdown__info {
    flex: 1;
    min-width: 0;
}

.topsot-user-dropdown__title {
    font-size: 14.5px;
    font-weight: 700;
    color: #2b1e16;
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topsot-user-dropdown__subtitle {
    font-size: 12px;
    color: #887d75;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topsot-user-dropdown__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 700;
    color: #e04b1e;
    background: #fff3ee;
    padding: 2px 7px;
    border-radius: 12px;
}

.topsot-user-dropdown__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 500;
    color: #44352b;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
}

.topsot-user-dropdown__item:hover {
    background: #fbf7f2;
    color: #e04b1e;
}

.topsot-user-dropdown__item svg {
    color: #887d75;
    transition: color 0.15s;
}

.topsot-user-dropdown__item:hover svg {
    color: #e04b1e;
}

.topsot-user-dropdown__divider {
    height: 1px;
    background: #f0ece6;
    margin: 6px 0;
}

@media (max-width: 1024px) {
    .topsot-header__actions {
        right: 15px;
        gap: 8px;
    }
    .topsot-header__icon-btn {
        width: 38px;
        height: 38px;
    }
}

/* ==========================================================================
   Quantity Stepper
   ========================================================================== */
/* ==========================================================================
   Quantity Stepper
   ========================================================================== */
.ts-qty-stepper {
    display: inline-flex !important;
    align-items: stretch !important;
    background: #f7f5f2 !important;
    border: 1.5px solid #ded7cd !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    width: 126px !important;
    min-width: 126px !important;
    max-width: 126px !important;
    box-sizing: border-box !important;
    user-select: none !important;
    flex: 0 0 126px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.ts-qty-stepper:hover {
    border-color: #c7beaf !important;
}

.ts-qty-stepper .ts-qty-btn,
button.ts-qty-btn {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 45px !important;
    min-height: unset !important;
    max-height: 45px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: #403025 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.18s, color 0.18s, transform 0.1s !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    user-select: none !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    vertical-align: middle !important;
}

.ts-qty-stepper .ts-qty-btn:hover {
    background: #eae2d5 !important;
    color: #e04b1e !important;
}

.ts-qty-stepper .ts-qty-btn:active {
    background: #ded4c5 !important;
    transform: scale(0.92) !important;
}

.ts-qty-stepper .ts-qty-btn svg {
    display: block !important;
    pointer-events: none !important;
    margin: 0 !important;
}

.ts-qty-stepper .ts-qty-input,
.ts-qty-stepper input[type="number"].ts-qty-input,
.ts-qty-stepper input[type="number"],
input.ts-qty-input {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 45px !important;
    min-height: unset !important;
    max-height: 45px !important;
    line-height: 45px !important;
    border: none !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    background: transparent !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #2b1e16 !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-shadow: none !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}

.ts-qty-stepper .ts-qty-input:focus,
.ts-qty-stepper input[type="number"]:focus {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background-color: transparent !important;
    background: transparent !important;
}

.ts-qty-input::-webkit-outer-spin-button,
.ts-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* ==========================================================================
   Product Detail Actions
   ========================================================================== */
.ts-product-purchase-box {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 18px 0 20px !important;
}

.ts-retail-action-wrap {
    margin: 18px 0 20px !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.ts-retail-action-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ts-btn-add-cart,
button.ts-btn-add-cart {
    background: #e04b1e !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0 22px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    line-height: 48px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 14px rgba(224, 75, 30, 0.28) !important;
    flex: 1 1 auto !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.ts-btn-add-cart:hover,
button.ts-btn-add-cart:hover {
    background: #c4380e !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(224, 75, 30, 0.38) !important;
    color: #fff !important;
}

.ts-btn-buy-now {
    background: #2b1e16 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0 20px !important;
    height: 46px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    flex: 1 1 160px !important;
    text-decoration: none !important;
}

.ts-btn-buy-now:hover {
    background: #19110c !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
    color: #fff !important;
}

.ts-b2b-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 18px 0 14px;
    color: #9c8e82;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ts-b2b-divider::before,
.ts-b2b-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px dashed #dcd5cc;
}

.ts-b2b-divider span {
    padding: 0 12px;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.ts-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    bottom: auto;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    width: calc(100vw - 32px);
    pointer-events: none;
}

/* SweetAlert2 TOPSOT Toast Styling */
.swal2-container.swal2-top-end {
    z-index: 1000000 !important;
    top: 20px !important;
    right: 20px !important;
}
.swal2-popup.topsot-swal-toast {
    background: #ffffff !important;
    border: 1px solid #e7e2dc !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(43, 30, 22, 0.16) !important;
    padding: 12px 18px !important;
    font-family: inherit !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}
.swal2-popup.topsot-swal-toast .swal2-title {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #2b1e16 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}
.swal2-popup.topsot-swal-toast .swal2-html-container {
    font-size: 12.5px !important;
    color: #666666 !important;
    margin: 3px 0 0 0 !important;
    line-height: 1.35 !important;
}
.swal2-popup.topsot-swal-toast .swal2-timer-progress-bar {
    background: #e04b1e !important;
    height: 3px !important;
}

.ts-toast {
    pointer-events: auto;
    background: #ffffff;
    border: 1px solid #e7e2dc;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(43, 30, 22, 0.16);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(0);
    opacity: 1;
}

.ts-toast--enter {
    transform: translateY(30px);
    opacity: 0;
}

.ts-toast--exit {
    transform: translateY(20px);
    opacity: 0;
}

.ts-toast__icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff2ed;
    color: #e04b1e;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ts-toast__body {
    flex: 1;
    min-width: 0;
}

.ts-toast__title {
    font-size: 13.5px;
    font-weight: 700;
    color: #2b1e16;
    margin-bottom: 2px;
}

.ts-toast__msg {
    font-size: 12.5px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ts-toast__action {
    background: #e04b1e;
    color: #fff !important;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.ts-toast__close {
    background: transparent;
    border: none;
    font-size: 18px;
    color: #aaa;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.ts-toast__close:hover {
    color: #333;
}

/* ==========================================================================
   Checkout & Cart Step Indicator
   ========================================================================== */
.ts-steps-tracker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 25px 0 35px;
}

.ts-step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #999;
}

.ts-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #eee;
    color: #777;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.ts-step-item.is-active {
    color: #e04b1e;
    font-weight: 700;
}

.ts-step-item.is-active .ts-step-num {
    background: #e04b1e;
    color: #fff;
    box-shadow: 0 2px 8px rgba(224, 75, 30, 0.35);
}

.ts-step-item.is-completed {
    color: #059669;
}

.ts-step-item.is-completed .ts-step-num {
    background: #059669;
    color: #fff;
}

.ts-step-line {
    width: 40px;
    height: 2px;
    background: #e2ded9;
}

.ts-step-line.is-active {
    background: #e04b1e;
}

/* ==========================================================================
   Cart Page Layout
   ========================================================================== */
.ts-cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px 70px;
}

.ts-cart-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

.ts-cart-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #ebe5dd;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.ts-cart-header {
    padding: 16px 22px;
    background: #faf8f5;
    border-bottom: 1px solid #ebe5dd;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ts-cart-header h2 {
    font-size: 17px;
    font-weight: 700;
    color: #2b1e16;
    margin: 0;
}

.ts-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.ts-cart-table th {
    background: #fdfcfb;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 700;
    color: #736b63;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #eee;
}

.ts-cart-table td {
    padding: 18px;
    border-bottom: 1px solid #f0ece6;
    vertical-align: middle;
}

.ts-cart-item-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ts-cart-thumb {
    width: 74px;
    height: 74px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #ebe5dd;
    background: #fdfbf9;
    flex-shrink: 0;
}

.ts-cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ts-cart-name {
    font-size: 15px;
    font-weight: 700;
    color: #2b1e16;
    text-decoration: none;
    line-height: 1.4;
    display: block;
    margin-bottom: 4px;
}

.ts-cart-name:hover {
    color: #e04b1e;
}

.ts-cart-spec {
    font-size: 12.5px;
    color: #888;
}

.ts-cart-price {
    font-size: 15px;
    font-weight: 600;
    color: #2b1e16;
}

.ts-cart-subtotal {
    font-size: 16px;
    font-weight: 800;
    color: #e04b1e;
}

.ts-btn-remove {
    background: transparent;
    border: none;
    color: #bbb;
    cursor: pointer;
    font-size: 16px;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
}

.ts-btn-remove:hover {
    color: #dc2626;
    background: #fee2e2;
}

/* Free Shipping Meter */
.ts-shipping-meter {
    background: #fcf9f5;
    border: 1px solid #f2ece4;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.ts-meter-label {
    font-size: 13px;
    font-weight: 600;
    color: #4b3e34;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ts-meter-bar {
    width: 100%;
    height: 8px;
    background: #e8e2d8;
    border-radius: 4px;
    overflow: hidden;
}

.ts-meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #e04b1e, #ff7a45);
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* Order Summary Box */
.ts-summary-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #ebe5dd;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    padding: 22px;
    position: sticky;
    top: 90px;
}

.ts-summary-title {
    font-size: 18px;
    font-weight: 800;
    color: #2b1e16;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0ece6;
}

.ts-summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: #555;
}

.ts-summary-line.is-total {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 2px dashed #ebe5dd;
    font-size: 16px;
    font-weight: 800;
    color: #2b1e16;
}

.ts-summary-line.is-total .ts-total-val {
    font-size: 22px;
    color: #e04b1e;
    font-weight: 900;
}

.ts-voucher-box {
    margin: 16px 0;
    display: flex;
    gap: 8px;
}

.ts-voucher-input {
    flex: 1;
    height: 42px;
    border: 1.5px solid #e0dbd3;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13.5px;
    text-transform: uppercase;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s;
}

.ts-voucher-input:focus {
    border-color: #e04b1e;
}

.ts-btn-voucher {
    height: 42px;
    padding: 0 16px;
    background: #2b1e16;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.ts-btn-voucher:hover {
    background: #e04b1e;
}

.ts-btn-checkout {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 50px !important;
    background: #e04b1e !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 4px 16px rgba(224, 75, 30, 0.35) !important;
    margin-top: 16px !important;
}

.ts-btn-checkout:hover {
    background: #c4380e !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(224, 75, 30, 0.45) !important;
    color: #fff !important;
}

/* Empty State */
.ts-cart-empty {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #ebe5dd;
    max-width: 650px;
    margin: 40px auto;
}

.ts-cart-empty__icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #fff2ed;
    color: #e04b1e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ts-cart-empty h3 {
    font-size: 22px;
    font-weight: 800;
    color: #2b1e16;
    margin-bottom: 10px;
}

.ts-cart-empty p {
    color: #666;
    font-size: 14.5px;
    max-width: 440px;
    margin: 0 auto 25px;
    line-height: 1.6;
}

/* ==========================================================================
   Checkout Page Styles
   ========================================================================== */
.ts-checkout-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 30px;
    align-items: start;
}

.ts-checkout-section {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #ebe5dd;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    padding: 24px;
    margin-bottom: 24px;
}

.ts-checkout-sec-title {
    font-size: 17px;
    font-weight: 800;
    color: #2b1e16;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ts-form-group {
    margin-bottom: 16px;
}

.ts-form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}

.ts-form-label .req {
    color: #dc2626;
}

.ts-form-control {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid #ded8cf;
    border-radius: 8px;
    font-size: 14px;
    color: #2b1e16;
    outline: none;
    transition: all 0.2s;
    background: #fff;
    box-sizing: border-box;
}

.ts-form-control:focus {
    border-color: #e04b1e;
    box-shadow: 0 0 0 3px rgba(224, 75, 30, 0.12);
}

textarea.ts-form-control {
    height: auto;
    padding: 10px 14px;
    min-height: 75px;
    resize: vertical;
}

/* Payment Selector Radio Cards */
.ts-payment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ts-payment-card {
    border: 1.5px solid #e2ded9;
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    position: relative;
}

.ts-payment-card:hover {
    border-color: #e04b1e;
    background: #fdfaf8;
}

.ts-payment-card.is-selected {
    border-color: #e04b1e;
    background: #fff9f6;
    box-shadow: 0 0 0 2px rgba(224, 75, 30, 0.15);
}

.ts-payment-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ts-payment-radio {
    accent-color: #e04b1e;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.ts-payment-card-body {
    flex: 1;
}

.ts-payment-card-name {
    font-size: 14.5px;
    font-weight: 700;
    color: #2b1e16;
}

.ts-payment-card-desc {
    font-size: 12.5px;
    color: #777;
    margin-top: 2px;
    line-height: 1.4;
}

.ts-payment-extra {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e8e2d8;
    font-size: 13px;
    color: #4b3e34;
    display: none;
}

.ts-payment-card.is-selected .ts-payment-extra {
    display: block;
}

/* ==========================================================================
   Order Success Page Styles
   ========================================================================== */
.ts-success-card {
    max-width: 780px;
    margin: 30px auto 60px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #ebe5dd;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.06);
    padding: 40px 30px;
    text-align: center;
}

.ts-success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #059669;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: ts-scale-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes ts-scale-in {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.ts-success-title {
    font-size: 26px;
    font-weight: 800;
    color: #2b1e16;
    margin-bottom: 8px;
}

.ts-success-code {
    display: inline-block;
    background: #f7f5f2;
    border: 1px solid #e5e0d8;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 800;
    color: #e04b1e;
    margin: 10px 0 20px;
    letter-spacing: 0.5px;
}

.ts-order-details-box {
    text-align: left;
    background: #faf8f5;
    border-radius: 12px;
    border: 1px solid #ede8e1;
    padding: 20px;
    margin: 25px 0;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 992px) {
    .ts-cart-grid,
    .ts-checkout-grid {
        grid-template-columns: 1fr;
    }

    .ts-summary-card {
        position: static;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .ts-cart-table thead {
        display: none;
    }

    .ts-cart-table, 
    .ts-cart-table tbody, 
    .ts-cart-table tr, 
    .ts-cart-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .ts-cart-table tr {
        border-bottom: 1.5px solid #eee;
        padding: 16px 12px;
        position: relative;
    }

    .ts-cart-table td {
        padding: 6px 0;
        border: none;
    }

    .ts-btn-remove {
        position: absolute;
        top: 14px;
        right: 12px;
    }

    .ts-steps-tracker {
        font-size: 12px;
        gap: 6px;
    }

    .ts-step-line {
        width: 20px;
    }

    .ts-step-item span {
        display: none;
    }

    .ts-step-item.is-active span {
        display: inline;
    }
}

/* ==========================================================================
   Customer Auth Modal (Đăng nhập & Đăng ký)
   ========================================================================== */
.topsot-auth-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 2147483647 !important;
    display: none;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px 16px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.topsot-auth-modal.is-open {
    display: flex !important;
}

.topsot-auth-modal__backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(18, 12, 8, 0.72) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    animation: ts-backdrop-fade 0.25s ease !important;
}

@keyframes ts-backdrop-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.topsot-auth-modal__dialog {
    position: relative !important;
    width: 100% !important;
    max-width: 410px !important;
    margin: auto !important;
    background: #ffffff !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
    padding: 22px 24px 18px !important;
    box-sizing: border-box !important;
    z-index: 2 !important;
    overflow: visible !important;
    animation: ts-modal-pop 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes ts-modal-pop {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.topsot-auth-modal__close {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: #f4efe9 !important;
    border: none !important;
    color: #665c54 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    z-index: 20 !important;
    touch-action: manipulation !important;
}

.topsot-auth-modal__close:hover {
    background: #e04b1e !important;
    color: #fff !important;
}

.topsot-auth-modal__close svg {
    width: 13px !important;
    height: 13px !important;
    stroke: currentColor !important;
    pointer-events: none !important;
}

.topsot-auth-modal__header {
    text-align: center !important;
    margin-bottom: 12px !important;
    padding-top: 0 !important;
}

.topsot-auth-modal__logo {
    display: block !important;
    margin: 0 auto 5px !important;
    height: 28px !important;
    max-height: 28px !important;
    width: auto !important;
    object-fit: contain !important;
}

.topsot-auth-modal__title {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #2b1e16 !important;
    margin: 0 0 2px !important;
    line-height: 1.25 !important;
}

.topsot-auth-modal__subtitle {
    font-size: 12px !important;
    color: #786e66 !important;
    margin: 0 !important;
    line-height: 1.35 !important;
}

.topsot-auth-modal__tabs {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 4px !important;
    background: #f1ebe3 !important;
    border-radius: 10px !important;
    padding: 4px !important;
    margin-bottom: 14px !important;
    box-sizing: border-box !important;
}

.topsot-auth-tab {
    width: 100% !important;
    height: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    border: none !important;
    background: transparent !important;
    border-radius: 8px !important;
    color: #6d6156 !important;
    cursor: pointer !important;
    text-align: center !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.topsot-auth-tab:hover {
    color: #2b1e16 !important;
    background: rgba(255, 255, 255, 0.5) !important;
}

.topsot-auth-tab.is-active {
    background: #ffffff !important;
    color: #e04b1e !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.topsot-auth-tab-content {
    display: none;
}

.topsot-auth-tab-content.is-active {
    display: block;
    animation: ts-tab-fade 0.18s ease;
}

@keyframes ts-tab-fade {
    from { opacity: 0; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
}

.topsot-auth-alert {
    background: #fde8e4 !important;
    border: 1px solid #f9c0b5 !important;
    color: #c4380e !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 7px 10px !important;
    border-radius: 6px !important;
    margin-bottom: 9px !important;
    line-height: 1.3 !important;
}

.topsot-form-group {
    margin-bottom: 9px !important;
}

.topsot-form-label {
    display: block !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #3b2c22 !important;
    margin-bottom: 3px !important;
    line-height: 1.25 !important;
}

.topsot-input-with-icon {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.topsot-input-with-icon > svg {
    position: absolute !important;
    left: 11px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 16px !important;
    height: 16px !important;
    color: #9c8e82 !important;
    pointer-events: none !important;
    z-index: 3 !important;
}

.topsot-modal-input {
    width: 100% !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    line-height: 38px !important;
    border: 1.5px solid #ded7cd !important;
    border-radius: 7px !important;
    background: #ffffff !important;
    padding: 0 34px 0 34px !important;
    font-size: 13.5px !important;
    color: #2b1e16 !important;
    outline: none !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    box-shadow: none !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.topsot-modal-input:focus {
    border-color: #e04b1e !important;
    box-shadow: 0 0 0 3px rgba(224, 75, 30, 0.12) !important;
    background: #ffffff !important;
}

.topsot-modal-input:-webkit-autofill,
.topsot-modal-input:-webkit-autofill:hover, 
.topsot-modal-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    -webkit-text-fill-color: #2b1e16 !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

.topsot-modal-input::-ms-reveal,
.topsot-modal-input::-ms-clear {
    display: none !important;
}

.topsot-pw-toggle {
    position: absolute !important;
    right: 6px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 26px !important;
    height: 26px !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    color: #8c7f75 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 3 !important;
}

.topsot-pw-toggle:hover {
    color: #e04b1e !important;
}

.topsot-pw-toggle svg {
    position: static !important;
    transform: none !important;
    width: 16px !important;
    height: 16px !important;
    pointer-events: none !important;
}

.topsot-modal-submit-btn {
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    background: #e04b1e !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 7px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    margin-top: 8px !important;
    padding: 0 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 3px 10px rgba(224, 75, 30, 0.24) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.topsot-modal-submit-btn:hover {
    background: #c4380e !important;
    box-shadow: 0 5px 14px rgba(224, 75, 30, 0.32) !important;
    transform: translateY(-1px) !important;
}

.topsot-modal-submit-btn:disabled {
    background: #a89c93 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.topsot-auth-modal__footer-links {
    margin-top: 10px !important;
    text-align: center !important;
    font-size: 12px !important;
    color: #786e66 !important;
    line-height: 1.35 !important;
}


/* --- Topsot Cart UX Polish --- */
.ts-btn-clear-cart {
    background: transparent !important;
    border: 1px solid #e2dad1 !important;
    color: #786e65 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    line-height: 1 !important;
}

.ts-btn-clear-cart:hover {
    color: #dc2626 !important;
    background: #fef2f2 !important;
    border-color: #fecaca !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08) !important;
}

.ts-cart-table .ts-qty-stepper {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    border-radius: 8px !important;
    background: #f7f5f2 !important;
    border: 1px solid #ded7cd !important;
}

.ts-cart-table .ts-qty-stepper .ts-qty-btn {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 36px !important;
    max-height: 36px !important;
    font-size: 16px !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ts-cart-table .ts-qty-stepper .ts-qty-input {
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 36px !important;
    max-height: 36px !important;
    line-height: 36px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}
