/* ============================================================
   NEW THEME — Cart Drawer + Cart Page + Checkout Page
   Theme accent: var(--theme-color) (coral/pink)
   ============================================================ */

/* ----------------------------------------------------------
   1. CART DRAWER (mini / quick cart)
   ---------------------------------------------------------- */
.nt-cart-drawer-overlay {
    background: rgba(0, 0, 0, 0.55);
    bottom: 0;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: 10000;
}

.nt-cart-drawer {
    background: #ffffff;
    bottom: 0;
    box-shadow: -12px 0 32px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    max-width: 92vw;
    overflow: hidden;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    width: 400px;
    z-index: 10001;
}

body.nt-cart-drawer-open {
    overflow: hidden;
}

body.nt-cart-drawer-open .nt-cart-drawer-overlay {
    opacity: 1;
    pointer-events: auto;
}

body.nt-cart-drawer-open .nt-cart-drawer {
    transform: translateX(0);
}

/* RTL: slide from left */
html[dir="rtl"] .nt-cart-drawer {
    box-shadow: 12px 0 32px rgba(0, 0, 0, 0.16);
    left: 0;
    right: auto;
    transform: translateX(-100%);
}

html[dir="rtl"] body.nt-cart-drawer-open .nt-cart-drawer {
    transform: translateX(0);
}

/* --- Drawer header --- */
.nt-cart-drawer-header {
    align-items: center;
    border-bottom: 1px solid #eeeeee;
    display: flex;
    flex: 0 0 auto;
    justify-content: space-between;
    padding: 20px 24px;
}

.nt-cart-drawer-header h3 {
    color: #222222;
    font-family: 'Roboto Slab', serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
}

.nt-cart-drawer-header h3 .nt-cart-drawer-count {
    color: var(--theme-color);
    font-size: 16px;
    font-weight: 600;
}

.nt-cart-drawer-close {
    align-items: center;
    background: var(--theme-color);
    border: 1px solid var(--theme-color);
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    font-size: 16px;
    height: 36px;
    justify-content: center;
    padding: 0;
    transition: all 0.3s ease-in-out;
    width: 36px;
}

.nt-cart-drawer-close:hover {
    background: transparent;
    color: var(--theme-color);
}

/* --- Drawer body (scrollable items) --- */
.nt-cart-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 16px 24px;
}

.nt-cart-drawer-empty {
    align-items: center;
    color: #999999;
    display: flex;
    flex-direction: column;
    font-size: 15px;
    gap: 14px;
    justify-content: center;
    min-height: 180px;
    text-align: center;
}

.nt-cart-drawer-empty i {
    color: #dddddd;
    font-size: 48px;
}

/* --- Single cart item in drawer --- */
.nt-cart-drawer-item {
    align-items: flex-start;
    border-bottom: 1px solid #f2f2f2;
    display: flex;
    gap: 14px;
    padding: 14px 0;
    animation: ntCartFadeIn 0.25s ease;
}

@keyframes ntCartFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nt-cart-drawer-item:last-child {
    border-bottom: 0;
}

.nt-cart-drawer-item-img {
    border: 1px solid #eeeeee;
    flex: 0 0 72px;
    height: 72px;
    overflow: hidden;
    width: 72px;
}

.nt-cart-drawer-item-img img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.nt-cart-drawer-item-info {
    flex: 1 1 auto;
    min-width: 0;
}

.nt-cart-drawer-item-info h4 {
    color: #333333;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0 0 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nt-cart-drawer-item-info h4 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.nt-cart-drawer-item-info h4 a:hover {
    color: var(--theme-color);
}

.nt-cart-drawer-item-meta {
    align-items: center;
    color: #777777;
    display: flex;
    font-size: 13px;
    gap: 6px;
    line-height: 1;
}

.nt-cart-drawer-item-meta .nt-cd-qty {
    color: #555555;
    font-weight: 600;
}

.nt-cart-drawer-item-meta .nt-cd-price {
    color: var(--theme-color);
    font-weight: 700;
}

.nt-cd-qty-control {
    align-items: center;
    display: inline-flex;
    gap: 0;
    margin-top: 10px;
}

.nt-cd-qty-control button {
    align-items: center;
    background: #f7f7f7;
    border: 1px solid #e5e5e5;
    color: #555555;
    cursor: pointer;
    display: inline-flex;
    font-size: 11px;
    height: 26px;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    width: 26px;
}

.nt-cd-qty-control button:hover {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: #ffffff;
}

.nt-cd-qty-control > span {
    align-items: center;
    border-bottom: 1px solid #e5e5e5;
    border-top: 1px solid #e5e5e5;
    color: #333333;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    height: 26px;
    justify-content: center;
    min-width: 30px;
    padding: 0 8px;
}

.nt-cart-item-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 6px 0 8px;
}

.nt-cart-option-row {
    align-items: center;
    color: #777777;
    display: flex;
    flex-wrap: wrap;
    font-size: 12px;
    gap: 6px;
    line-height: 1.35;
}

.nt-cart-option-row strong {
    color: #333333;
    font-weight: 600;
}

.nt-cart-option-swatch {
    border: 1px solid #dddddd;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
    display: inline-block;
    flex: 0 0 auto;
    height: 14px;
    width: 14px;
}

.nt-cart-drawer-item-remove {
    background: none;
    border: none;
    color: #cccccc;
    cursor: pointer;
    flex: 0 0 auto;
    font-size: 16px;
    padding: 4px;
    transition: color 0.2s;
}

.nt-cart-drawer-item-remove:hover {
    color: var(--theme-color);
}

/* --- Drawer footer --- */
.nt-cart-drawer-footer {
    border-top: 1px solid #eeeeee;
    flex: 0 0 auto;
    padding: 20px 24px;
}

.nt-cart-drawer-subtotal {
    align-items: center;
    color: #222222;
    display: flex;
    font-size: 16px;
    font-weight: 700;
    justify-content: space-between;
    margin-bottom: 18px;
}

.nt-cart-drawer-subtotal .nt-cd-subtotal-value {
    color: var(--theme-color);
    font-family: 'Roboto Slab', serif;
    font-size: 18px;
}

.nt-cart-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nt-cart-drawer-actions .nt-cd-btn {
    border-radius: 0;
    cursor: pointer;
    display: block;
    font-family: 'Roboto Slab', serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1;
    padding: 14px 20px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease-in-out;
    width: 100%;
}

.nt-cd-btn-primary {
    background: var(--theme-color);
    border: 1px solid var(--theme-color);
    color: #ffffff;
}

.nt-cd-btn-primary:hover {
    background: transparent;
    color: var(--theme-color);
}

.nt-cd-btn-secondary {
    background: transparent;
    border: 1px solid #222222;
    color: #222222;
}

.nt-cd-btn-secondary:hover {
    background: #222222;
    color: #ffffff;
}

/* --- Cart icon trigger in header --- */
.nt-cart-trigger {
    cursor: pointer;
    position: relative;
}

@media (max-width: 767px) {
    .nt-cart-drawer {
        width: 340px;
    }
}

/* ----------------------------------------------------------
   2. CART PAGE
   ---------------------------------------------------------- */
.nt-cart-page {
    padding: 0;
}

.nt-cart-page .hm_bread_wrapper {
    margin-bottom: 0;
}

.nt-cart-section {
    background: #f9f9f9;
    padding: 60px 0 80px;
}

/* --- Cart table --- */
.nt-cart-table-wrap {
    background: #ffffff;
    border: 1px solid #eeeeee;
    margin-bottom: 30px;
    overflow-x: auto;
}

.nt-cart-table {
    border-collapse: collapse;
    margin: 0;
    width: 100%;
}

.nt-cart-table thead {
    background: var(--theme-color);
}

.nt-cart-table thead th {
    border: none;
    color: #ffffff;
    font-family: 'Roboto Slab', serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 16px 20px;
    text-transform: uppercase;
    white-space: nowrap;
}

.nt-cart-table tbody td {
    border-bottom: 1px solid #f2f2f2;
    color: #555555;
    font-size: 15px;
    padding: 18px 20px;
    vertical-align: middle;
}

.nt-cart-table tbody tr:last-child td {
    border-bottom: 0;
}

.nt-cart-table .nt-ct-img {
    width: 80px;
}

.nt-cart-table .nt-ct-img a {
    display: block;
}

.nt-cart-table .nt-ct-img img {
    border: 1px solid #eeeeee;
    display: block;
    height: 70px;
    object-fit: cover;
    width: 70px;
}

.nt-cart-table .nt-ct-name a {
    color: #333333;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.nt-cart-table .nt-ct-name a:hover {
    color: var(--theme-color);
}

.nt-cart-table .nt-ct-price {
    color: #555555;
    font-weight: 600;
    white-space: nowrap;
}

/* --- Quantity control --- */
.nt-qty-control {
    align-items: center;
    display: inline-flex;
    gap: 0;
}

.nt-qty-control button {
    align-items: center;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #555555;
    cursor: pointer;
    display: inline-flex;
    font-size: 16px;
    height: 36px;
    justify-content: center;
    transition: all 0.2s;
    width: 36px;
}

.nt-qty-control button:hover {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: #ffffff;
}

.nt-qty-control input {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-left: 0;
    border-right: 0;
    color: #333333;
    font-size: 14px;
    font-weight: 600;
    height: 36px;
    outline: none;
    text-align: center;
    width: 50px;
}

.nt-cart-table .nt-ct-total {
    color: var(--theme-color);
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    white-space: nowrap;
}

.nt-cart-table .nt-ct-remove {
    text-align: center;
}

.nt-ct-remove-btn {
    background: none;
    border: 1px solid #eeeeee;
    border-radius: 50%;
    color: #cccccc;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    height: 34px;
    transition: all 0.25s;
    width: 34px;
}

.nt-ct-remove-btn:hover {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: #ffffff;
}

/* --- Cart empty state --- */
.nt-cart-empty {
    align-items: center;
    background: #ffffff;
    border: 1px solid #eeeeee;
    display: flex;
    flex-direction: column;
    gap: 18px;
    justify-content: center;
    padding: 60px 30px;
    text-align: center;
}

.nt-cart-empty i {
    color: #dddddd;
    font-size: 56px;
}

.nt-cart-empty p {
    color: #999999;
    font-size: 17px;
    margin: 0;
}

.nt-cart-empty .hm_btn {
    margin-top: 8px;
}

/* --- Cart actions row --- */
.nt-cart-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
    margin-bottom: 30px;
}

/* --- Cart totals card --- */
.nt-cart-totals {
    background: #ffffff;
    border: 1px solid #eeeeee;
    padding: 30px;
}

.nt-cart-totals h3 {
    border-bottom: 2px solid var(--theme-color);
    color: #222222;
    font-family: 'Roboto Slab', serif;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 20px;
    padding-bottom: 14px;
}

.nt-cart-totals-list {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
}

.nt-cart-totals-list li {
    align-items: center;
    border-bottom: 1px solid #f2f2f2;
    color: #555555;
    display: flex;
    font-size: 15px;
    justify-content: space-between;
    padding: 12px 0;
}

.nt-cart-totals-list li:last-child {
    border-bottom: 0;
    color: #222222;
    font-size: 17px;
    font-weight: 700;
}

.nt-cart-totals-list li span {
    font-family: 'Roboto Slab', serif;
    font-weight: 600;
}

#nt-page-shipping-note {
    color: #777777;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.45;
    max-width: 220px;
    text-align: right;
}

html[dir="rtl"] #nt-page-shipping-note {
    text-align: left;
}

.nt-cart-totals-list li:last-child span {
    color: var(--theme-color);
    font-size: 20px;
}

.nt-cart-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nt-cart-summary-actions .hm_btn,
.nt-cart-summary-actions .nt-btn-outline {
    display: block;
    text-align: center;
    width: 100%;
}

/* ----------------------------------------------------------
   3. CHECKOUT PAGE
   ---------------------------------------------------------- */
.nt-checkout-page {
    padding: 0;
}

.nt-checkout-section {
    background: #f9f9f9;
    padding: 60px 0 80px;
}

/* --- Customer form card --- */
.nt-checkout-form-card {
    background: #ffffff;
    border: 1px solid #eeeeee;
    padding: 35px 30px;
}

.nt-checkout-form-card h4 {
    border-bottom: 2px solid var(--theme-color);
    color: #222222;
    font-family: 'Roboto Slab', serif;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 28px;
    padding-bottom: 14px;
}

.nt-co-field {
    margin-bottom: 22px;
}

.nt-co-field label {
    color: #333333;
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.nt-required-star {
    color: #e74c3c;
    font-weight: 700;
}

.nt-co-field input,
.nt-co-field select,
.nt-co-field textarea {
    appearance: none;
    -webkit-appearance: none;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    color: #333333;
    font-family: inherit;
    font-size: 15px;
    outline: none;
    padding: 12px 16px;
    transition: border-color 0.25s;
    width: 100%;
}

.nt-co-field input:focus,
.nt-co-field select:focus,
.nt-co-field textarea:focus {
    border-color: var(--theme-color);
}

.nt-co-field input.nt-field-invalid,
.nt-co-field select.nt-field-invalid,
.nt-co-field textarea.nt-field-invalid {
    border-color: #e74c3c;
}

.nt-co-field input.nt-field-invalid:focus,
.nt-co-field select.nt-field-invalid:focus,
.nt-co-field textarea.nt-field-invalid:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
}

.nt-co-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: right 16px center;
    background-repeat: no-repeat;
    cursor: pointer;
    padding-right: 40px;
}

html[dir="rtl"] .nt-co-field select {
    background-position: left 16px center;
    padding-left: 40px;
    padding-right: 16px;
}

.nt-co-field textarea {
    min-height: 100px;
    resize: vertical;
}

.nt-co-field .nt-co-error {
    color: #e74c3c;
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-top: 6px;
}

.nt-co-field .nt-client-error:empty {
    display: none;
}

.nt-co-shipping-note {
    background: rgba(var(--theme-color-rgb), 0.06);
    border-left: 3px solid var(--theme-color);
    color: #c0392b;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
    padding: 10px 14px;
}

html[dir="rtl"] .nt-co-shipping-note {
    border-left: 0;
    border-right: 3px solid var(--theme-color);
}

/* --- Order summary card --- */
.nt-order-summary {
    background: #ffffff;
    border: 1px solid #eeeeee;
    padding: 30px;
    position: sticky;
    top: 20px;
}

.nt-order-summary h4 {
    border-bottom: 2px solid var(--theme-color);
    color: #222222;
    font-family: 'Roboto Slab', serif;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 24px;
    padding-bottom: 14px;
}

.nt-order-summary-items {
    list-style: none;
    margin: 0 0 20px;
    max-height: 300px;
    overflow-y: auto;
    padding: 0;
}

.nt-order-summary-items li {
    align-items: center;
    border-bottom: 1px solid #f2f2f2;
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
}

.nt-order-summary-items li:last-child {
    border-bottom: 0;
}

.nt-osi-name {
    color: #333333;
    flex: 1 1 auto;
    font-size: 14px;
    font-weight: 600;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nt-osi-name .nt-cart-item-options {
    font-weight: 400;
    margin: 5px 0 0;
}

.nt-osi-detail {
    color: #777777;
    flex: 0 0 auto;
    font-size: 14px;
    padding-left: 12px;
    text-align: right;
    white-space: nowrap;
}

.nt-ost-note {
    color: #777777;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    max-width: 210px;
    white-space: normal;
}

html[dir="rtl"] .nt-osi-detail {
    padding-left: 0;
    padding-right: 12px;
    text-align: left;
}

.nt-order-summary-totals {
    border-top: 2px solid #eeeeee;
    margin: 0;
    padding-top: 16px;
}

.nt-order-summary-totals .nt-ost-row {
    align-items: center;
    display: flex;
    font-size: 15px;
    justify-content: space-between;
    padding: 8px 0;
}

.nt-ost-row.nt-ost-grand {
    border-top: 1px solid #f2f2f2;
    color: #222222;
    font-size: 18px;
    font-weight: 700;
    margin-top: 8px;
    padding-top: 16px;
}

.nt-ost-grand .nt-ost-value {
    color: var(--theme-color);
    font-family: 'Roboto Slab', serif;
    font-size: 22px;
}

.nt-order-empty {
    color: #999999;
    font-size: 15px;
    padding: 20px 0;
    text-align: center;
}

/* ----------------------------------------------------------
   4. SHARED BUTTON STYLES (new-theme scoped)
   ---------------------------------------------------------- */
.nt-cart-page .hm_btn,
.nt-checkout-page .hm_btn {
    font-family: 'Roboto Slab', serif;
    letter-spacing: 0.5px;
}

.nt-btn-outline {
    background: transparent;
    border: 1px solid #222222;
    color: #222222;
    cursor: pointer;
    display: inline-block;
    font-family: 'Roboto Slab', serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1;
    padding: 13px 28px;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.3s ease-in-out;
}

.nt-btn-outline:hover {
    background: #222222;
    color: #ffffff;
    text-decoration: none;
}

/* ----------------------------------------------------------
   5. RTL ADJUSTMENTS
   ---------------------------------------------------------- */
html[dir="rtl"] .nt-cart-page,
body.rtl .nt-cart-page,
html[dir="rtl"] .nt-checkout-page,
body.rtl .nt-checkout-page {
    text-align: right;
}

html[dir="rtl"] .nt-cart-drawer,
body.rtl .nt-cart-drawer {
    text-align: right;
}

html[dir="rtl"] .nt-cart-drawer-item-info h4,
body.rtl .nt-cart-drawer-item-info h4 {
    text-align: right;
}

/* ----------------------------------------------------------
   6. RESPONSIVE
   ---------------------------------------------------------- */
@media (max-width: 991px) {
    .nt-cart-section,
    .nt-checkout-section {
        padding: 40px 0 60px;
    }

    .nt-order-summary {
        margin-top: 30px;
        position: static;
    }
}

@media (max-width: 767px) {
    .nt-cart-table thead th {
        font-size: 12px;
        padding: 12px 14px;
    }

    .nt-cart-table tbody td {
        font-size: 13px;
        padding: 14px;
    }

    .nt-cart-table .nt-ct-img img {
        height: 55px;
        width: 55px;
    }

    .nt-qty-control button {
        height: 32px;
        width: 32px;
    }

    .nt-qty-control input {
        height: 32px;
        width: 42px;
    }

    .nt-cart-actions {
        flex-direction: column;
    }

    .nt-cart-actions .hm_btn,
    .nt-cart-actions .nt-btn-outline {
        width: 100%;
    }

    .nt-cart-totals,
    .nt-checkout-form-card,
    .nt-order-summary {
        padding: 22px 18px;
    }

    .nt-cart-drawer {
        width: 92vw;
    }

    .nt-cart-drawer-item-img {
        flex: 0 0 60px;
        height: 60px;
        width: 60px;
    }
}

/* ----------------------------------------------------------
   7. LOADING SKELETON
   ---------------------------------------------------------- */
.nt-cart-loading {
    align-items: center;
    color: #aaaaaa;
    display: flex;
    font-size: 15px;
    gap: 10px;
    justify-content: center;
    padding: 40px 20px;
}

.nt-cart-loading i {
    animation: ntCartSpin 1s linear infinite;
}

@keyframes ntCartSpin {
    to { transform: rotate(360deg); }
}
