/* =============================================
   CART ICON — HEADER
   ============================================= */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all .3s ease;
    padding: 0;
    line-height: 1;
}

.cart-icon-btn:hover {
    background: #ff6b00;
    border-color: #ff6b00;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 0, .35);
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: #ff6b00;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    border-radius: 50px;
    display: none;
    box-shadow: 0 2px 8px rgba(255, 107, 0, .5);
}

.cart-count.has-items,
.cart-count[data-count]:not([data-count="0"]) {
    display: block;
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
.ld-toast-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.ld-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: #111827;
    color: #fff;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 12px 35px rgba(0, 0, 0, .4);
    border-left: 4px solid #ff6b00;
    opacity: 0;
    transform: translateY(20px) scale(.95);
    transition: all .3s ease;
    pointer-events: auto;
}

.ld-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ld-toast i {
    color: #25d366;
    font-size: 18px;
}

/* =============================================
   MINI CART OVERLAY
   ============================================= */
.ld-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 99997;
    opacity: 0;
    pointer-events: none;
    transition: opacity .35s ease;
}

.ld-cart-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* =============================================
   MINI CART PANEL
   ============================================= */
.ld-mini-cart {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #111827;
    z-index: 99998;
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.4, 0, .2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: -10px 0 40px rgba(0, 0, 0, .5);
}

.ld-mini-cart.open {
    transform: translateX(0);
}

.ld-mini-cart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    flex-shrink: 0;
}

.ld-mini-cart-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.ld-mini-cart-title .cart-count {
    position: static;
    display: inline-flex;
    min-width: auto;
    height: auto;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1.4;
    box-shadow: none;
}

.ld-cart-close-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .06);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: all .3s ease;
    padding: 0;
}

.ld-cart-close-btn:hover {
    background: rgba(255, 107, 0, .15);
    color: #ff6b00;
}

.ld-mini-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    overscroll-behavior: contain;
}

.ld-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #999;
}

.ld-cart-empty i {
    font-size: 48px;
    color: rgba(255, 255, 255, .1);
    margin-bottom: 16px;
}

.ld-cart-empty p {
    font-size: 15px;
    color: #888;
    margin: 0;
}

/* =============================================
   MINI CART ITEM
   ============================================= */
.ld-cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.ld-cart-item:last-child {
    border-bottom: none;
}

.ld-cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1b2433;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ld-cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ld-cart-img-ph {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 22px;
}

.ld-cart-item-info {
    flex: 1;
    min-width: 0;
}

.ld-cart-item-name {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =============================================
   QUANTITY CONTROLS
   ============================================= */
.ld-cart-qty,
.ld-cart-row-qty {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, .04);
}

.ld-qty-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease;
    padding: 0;
    line-height: 1;
}

.ld-qty-btn:hover {
    background: #ff6b00;
}

.ld-qty-val {
    min-width: 32px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    padding: 0 4px;
}

/* =============================================
   REMOVE BUTTON
   ============================================= */
.ld-cart-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(220, 38, 38, .1);
    border: none;
    border-radius: 8px;
    color: #ef4444;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s ease;
    padding: 0;
    flex-shrink: 0;
}

.ld-cart-remove:hover {
    background: #ef4444;
    color: #fff;
}

/* =============================================
   MINI CART FOOTER
   ============================================= */
.ld-mini-cart-foot {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ld-cart-summary-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ld-cart-summary-count span {
    font-size: 14px;
    color: #999;
}

.ld-cart-summary-count strong {
    font-size: 16px;
    font-weight: 700;
    color: #ff6b00;
}

.ld-view-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    background: #ff6b00;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: all .3s ease;
}

.ld-view-cart-btn:hover {
    background: #e85d00;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 0, .35);
}

.ld-clear-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    color: #999;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .3s ease;
    width: 100%;
}

.ld-clear-cart:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(220, 38, 38, .06);
}

/* =============================================
   CART PAGE — FULL PAGE
   ============================================= */
.ld-cart-page-section {
    padding: 120px 0 80px;
    background: #f5f6f8;
    min-height: 60vh;
}

.ld-cart-page-container {
    max-width: 900px;
    margin: 0 auto;
}

.ld-cart-page-empty {
    text-align: center;
    padding: 80px 24px;
}

.ld-cart-page-empty i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.ld-cart-page-empty h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 24px;
}

/* Table-like layout */
.ld-cart-table-wrap {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, .08);
    overflow: hidden;
}

.ld-cart-table-head {
    display: grid;
    grid-template-columns: 1fr 160px 100px;
    align-items: center;
    padding: 18px 28px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ld-cart-row {
    display: grid;
    grid-template-columns: 1fr 160px 100px;
    align-items: center;
    padding: 20px 28px;
    border-bottom: 1px solid #f0f0f0;
    transition: background .2s ease;
}

.ld-cart-row:last-child {
    border-bottom: none;
}

.ld-cart-row:hover {
    background: #fafafa;
}

.ld-cart-row-product {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.ld-cart-row-img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f2f4f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ld-cart-row-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ld-cart-row-img.ld-cart-img-ph {
    color: #bbb;
    font-size: 24px;
}

.ld-cart-row-name {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ld-cart-row .ld-cart-row-qty {
    justify-self: center;
}

.ld-cart-row-remove {
    width: auto;
    height: auto;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    gap: 6px;
    justify-self: end;
}

.ld-cart-row-remove i {
    font-size: 12px;
}

/* Summary */
.ld-cart-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding: 20px 28px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(15, 23, 42, .08);
}

.ld-cart-summary .ld-cart-summary-count span {
    color: #555;
}

.ld-cart-summary .ld-cart-summary-count strong {
    color: #0f172a;
    font-size: 20px;
}

.ld-cart-summary .ld-clear-cart {
    width: auto;
    padding: 10px 20px;
}
