/* ==========================================================================
   TAILOR BAZAR - SHOPPING CART PAGE STYLESHEET
   ========================================================================== */

.cart-section {
    padding-top: 10.375rem;
    min-height: 60vh;
    background: #f8fafc;
}
.cart-header-wrapper {
    text-align: left;
    margin-bottom: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-continue-link {
    color: var(--emerald-600);
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.cart-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 3rem;
    align-items: start;
}
.cart-items-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.cart-item-row {
    background: white;
    border-radius: 1rem;
    border: 1px solid var(--slate-200);
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01);
}
.cart-item-img-box {
    width: 100px;
    height: 100px;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cart-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cart-item-details {
    flex: 1;
}
.cart-item-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.cart-item-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.15rem 0 0.5rem 0;
    color: var(--slate-900);
}
.cart-item-name-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.cart-item-name-link:hover .cart-item-name {
    color: var(--indigo-primary, #0062ac);
}
.cart-item-img-box a {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
}
.cart-item-img-box a:hover .cart-item-img {
    transform: scale(1.04);
    transition: transform 0.25s ease;
}
.cart-item-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
}
.pill-visit-date {
    background: #ecfdf5;
    color: #047857;
    padding: 0.2rem 0.5rem;
    border-radius: 0.35rem;
    font-weight: 700;
}
.pill-visit-time {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 0.2rem 0.5rem;
    border-radius: 0.35rem;
    font-weight: 700;
}
.pill-warning {
    background: #f1f5f9;
    color: #64748b;
    padding: 0.2rem 0.5rem;
    border-radius: 0.35rem;
    font-weight: 700;
}
.cart-item-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--slate-200);
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f8fafc;
    height: 2.5rem;
}
.cart-item-qty-control button {
    border: none;
    background: none;
    padding: 0 0.75rem;
    font-weight: bold;
    cursor: pointer;
    outline: none;
}
.cart-item-qty-value {
    width: 30px;
    text-align: center;
    font-weight: 700;
    color: var(--slate-900);
}
.cart-item-price-box {
    text-align: right;
    min-width: 100px;
}
.cart-item-subtotal {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--slate-900);
}
.cart-item-unitprice {
    font-size: 0.75rem;
    color: #64748b;
}
.cart-item-remove-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.5rem;
    transition: 0.2s;
    outline: none;
}
.cart-item-remove-btn:hover {
    color: #ef4444 !important;
}

/* Sidebar Summary Card */
.cart-summary-card {
    position: sticky;
    top: 7rem;
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--slate-200);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01);
}
.cart-summary-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--slate-900);
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1rem;
}
.cart-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 0.95rem;
    color: #475569;
    /* margin-bottom: 1.5rem; */
}
.cart-summary-row {
    display: flex;
    justify-content: space-between;
}
.cart-summary-row-val {
    font-weight: 600;
    color: var(--slate-900);
}
.cart-summary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    /* padding-top: 1.25rem; */
    /* margin-bottom: 2rem; */
}
.cart-summary-total-label {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--slate-900);
}
.cart-summary-total-val {
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--emerald-600);
}
.cart-checkout-btn-wrapper {
    margin-top: 1.5rem;
    width: 100%;
}
.cart-checkout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    height: 3.4rem;
    border-radius: 0.85rem;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    background-size: 200% 100%;
    border: none;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25), 0 2px 6px rgba(15, 23, 42, 0.15);
    transition: box-shadow 0.3s ease, transform 0.2s ease, background-position 0.5s ease;
}
.cart-checkout-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.12), transparent);
    transition: left 0.55s ease;
}
.cart-checkout-btn:hover::before {
    left: 160%;
}
.cart-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.3), 0 4px 10px rgba(15, 23, 42, 0.18);
    background-position: right center;
    color: #fff;
}
.cart-checkout-btn:active {
    transform: translateY(0);
}
.cart-checkout-btn .checkout-btn-arrow {
    display: inline-flex;
    align-items: center;
    transition: transform 0.25s ease;
}
.cart-checkout-btn:hover .checkout-btn-arrow {
    transform: translateX(4px);
}
.cart-checkout-btn .checkout-btn-lock {
    font-size: 0.85rem;
    opacity: 0.75;
}

/* Platform Commitments */
.cart-commitments-list {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #64748b;
    border-top: 1px solid #f1f5f9;
    padding-top: 1.25rem;
}
.cart-commitment-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.cart-commitment-item i {
    color: var(--emerald-500);
}

/* Empty State Card */
.cart-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 1.5rem;
    border: 1px solid var(--slate-200);
    max-width: 650px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.01);
}
.cart-empty-icon {
    font-size: 4.5rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}
.cart-empty-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--slate-900);
    margin-bottom: 0.75rem;
    margin-top: 0;
}
.cart-empty-text {
    color: #64748b;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto 2rem auto;
}
.cart-empty-btn {
    margin: 0 auto;
    justify-content: center;
    height: 3rem;
    border-radius: 0.75rem;
    font-weight: 700;
}

/* ── Cart Responsiveness Overhauls ───────────────────────────────────── */
@media (max-width: 991px) {
    .cart-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .cart-summary-card {
        position: static;
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    .cart-section {
        padding-top: 7.875rem;
        /* padding-bottom: 10.5rem; Clearance for sticky checkout btn + 60px bottom nav */
    }
    .cart-header-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 0.5rem;
    }
    .cart-header-wrapper h2 {
        font-size: 1.65rem !important;
    }
    .cart-header-wrapper p {
        font-size: 0.8rem;
    }
    .cart-continue-link {
        align-self: flex-start;
        font-size: 0.85rem;
    }
    .cart-summary-card {
        padding: 1.25rem;
        border-radius: 0.75rem;
    }
    .cart-summary-title {
        font-size: 1.2rem !important;
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
    }
    .cart-summary-rows {
        gap: 0.75rem;
    }
    .cart-summary-total-val {
        font-size: 1.4rem !important;
    }
    .cart-checkout-btn-wrapper {
        margin-top: 1.5rem;
        height: 3.4rem; /* Layout placeholder height */
        width: 100%;
        display: block;
    }
    .cart-checkout-btn {
        height: 3.4rem !important;
        font-size: 0.95rem !important;
        border-radius: 0.85rem;
        transition: box-shadow 0.3s ease, background-position 0.5s ease;
    }
    .cart-checkout-btn.fixed-sticky {
        position: fixed;
        bottom: calc(60px + 0.75rem);
        z-index: 999;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.3), 0 2px 8px rgba(15, 23, 42, 0.2);
    }
    .cart-commitments-list {
        margin-top: 0rem;
        padding-top: 1rem;
        gap: 0.6rem;
    }
}

@media (max-width: 640px) {
    .cart-item-row {
        display: grid;
        grid-template-columns: 85px 1fr;
        grid-template-rows: auto auto;
        gap: 0.5rem 1rem;
        align-items: center;
        padding: 1rem;
        border-radius: 1rem;
    }
    .cart-item-img-box {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 85px;
        height: 85px;
        border-radius: 0.75rem;
        align-self: center;
    }
    .cart-item-details {
        grid-column: 2;
        grid-row: 1;
        padding-right: 2rem;
    }
    .cart-item-category {
        font-size: 0.68rem !important;
    }
    .cart-item-name {
        font-size: 1rem !important;
        margin-top: 0.15rem;
        margin-bottom: 0.35rem;
        line-height: 1.3;
    }
    .cart-item-options {
        gap: 0.35rem;
        font-size: 0.68rem !important;
    }
    .cart-item-options span {
        padding: 0.2rem 0.45rem !important;
        border-radius: 0.35rem;
    }
    .cart-item-qty-control {
        grid-column: 2;
        grid-row: 2;
        justify-self: start;
        height: 2.2rem;
        margin-top: 0.35rem;
        border-radius: 0.5rem;
        background: #f8fafc;
        border: 1px solid var(--slate-200);
        display: flex;
        align-items: center;
    }
    .cart-item-qty-control button {
        height: 100%;
        padding: 0 0.75rem;
        font-size: 1rem;
        color: var(--slate-600);
        background: transparent;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.15s ease;
    }
    .cart-item-qty-control button:active {
        background: var(--slate-100);
    }
    .cart-item-qty-value {
        width: 28px;
        text-align: center;
        font-weight: 700;
        font-size: 0.9rem;
        color: var(--slate-900);
    }
    .cart-item-price-box {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        text-align: right;
        min-width: unset;
        margin-top: 0.35rem;
        align-self: center;
    }
    .cart-item-subtotal {
        font-size: 1.05rem !important;
        font-weight: 800;
        color: var(--slate-900);
        display: none;
    }
    .cart-item-unitprice {
        font-size: 0.7rem !important;
        color: #64748b;
        display: none;
    }
    .cart-item-remove-btn {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: #f1f5f9;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #64748b;
        padding: 0;
        transition: all 0.2s ease;
    }
    .cart-item-remove-btn i {
        font-size: 0.9rem;
    }
    .cart-item-remove-btn:active {
        background: #fee2e2;
        color: #ef4444;
    }
    .cart-empty-state {
        padding-bottom: 2rem;
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 0rem;
        border-radius: 1.25rem;
    }
    .cart-empty-icon {
        font-size: 3.5rem;
        margin-bottom: 1rem;
    }
    .cart-empty-title {
        font-size: 1.3rem !important;
    }
    .cart-empty-text {
        font-size: 0.85rem;
        margin-bottom: 1.5rem;
    }
}

/* Extracted layout styling classes from cart.blade.php */
.cart-header-title-custom {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}
.cart-header-desc-custom {
    margin: 0;
}
.cart-display-block {
    display: block;
}
.cart-indigo-subtotal {
    color: var(--indigo-600);
    font-weight: 700;
}
.cart-fees-display-contents {
    display: contents;
}
.cart-alerts-container-custom {
    font-size: 0.8rem;
    line-height: 1.4;
    color: var(--slate-600);
    border-top: 1px dashed var(--slate-200);
    padding-top: 0.75rem;
}
.cart-alert-item-custom {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}
.cart-alert-item-icon {
    color: var(--indigo-500);
    margin-top: 0.15rem;
}
.cart-summary-total-row-custom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}
.cart-summary-total-val-emerald {
    color: var(--emerald-600);
    font-size: 1.6rem;
    font-weight: 800;
}
.cart-summary-total-val-sub {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}
.cart-summary-note-custom {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1.4;
    border-top: 1px dashed var(--slate-200);
    padding-top: 0.5rem;
    margin-top: 0.25rem;
    text-align: left;
    display: block;
    width: 100%;
}
.cart-summary-note-hidden {
    display: none;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1.4;
    border-top: 1px dashed var(--slate-200);
    padding-top: 0.5rem;
    margin-top: 0.25rem;
    text-align: left;
    width: 100%;
}

/* Shimmer lazy images placeholder classes */
.skeleton-img-wrapper {
    position: relative;
    background: #e2e8f0;
    overflow: hidden;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 0.75rem;
}
.skeleton-img-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.25) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer-effect 1.5s infinite;
}
@keyframes shimmer-effect {
    100% {
        transform: translateX(100%);
    }
}
.skeleton-img-wrapper img {
    opacity: 0;
    transition: opacity 0.45s ease-in-out;
}
.skeleton-img-wrapper.loaded {
    background: transparent !important;
}
.skeleton-img-wrapper.loaded::after {
    display: none !important;
}
.skeleton-img-wrapper.loaded img {
    opacity: 1 !important;
}

.cart-unserviceable-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #78350f;
    font-size: 0.82rem;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
}
.cart-unserviceable-alert i {
    font-size: 1.1rem;
    color: #d97706;
    margin-top: 2px;
}
.cart-unserviceable-alert strong {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 2px;
}
.cart-unserviceable-alert p {
    margin: 0;
}
.cart-checkout-btn.disabled-btn:hover {
    background: #cbd5e1 !important;
    border-color: #cbd5e1 !important;
    color: #94a3b8 !important;
    transform: none !important;
    box-shadow: none !important;
}

