/**
 * RajaSkin Shopping Cart Styling - Clean Luxury Editorial
 */

/* ==========================================================================
   1. Wrapper & Breadcrumb
   ========================================================================== */
.rs-cart-page-wrap {
    padding-top: 1.25rem;
    padding-bottom: 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

.cart-breadcrumb {
    font-size: 0.825rem;
    color: #888888;
    margin: 0 0 1.25rem;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cart-breadcrumb a {
    color: #666666;
    text-decoration: none;
    transition: color 0.2s;
}

.cart-breadcrumb a:hover {
    color: #111111;
    text-decoration: underline;
}

.cart-breadcrumb .sep {
    color: #b8b8b8;
    font-size: 0.8rem;
    margin: 0 0.15rem;
}

.cart-breadcrumb .current {
    color: #333333;
    font-weight: 500;
}

/* ==========================================================================
   2. Page Header
   ========================================================================== */
.cart-header-intro {
    margin-bottom: 2.5rem;
}

.cart-page-title {
    font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
    font-size: 2.85rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.15;
    margin: 0 0 0.5rem 0;
    letter-spacing: -0.5px;
}

.cart-page-subtitle {
    font-size: 1rem;
    color: #666666;
    margin: 0;
    font-weight: 400;
}

/* Hide default WC title */
.woocommerce-cart .entry-title,
.woocommerce-cart .page-title {
    display: none !important;
}

/* ==========================================================================
   3. Cart Layout (2-Column)
   ========================================================================== */
.komerce-cart-form {
    width: 100%;
}

.cart-layout {
    display: flex;
    gap: 3.5rem;
    align-items: flex-start;
}

.cart-items-col {
    flex: 1;
    min-width: 0;
}

.cart-summary-col {
    flex: 0 0 350px;
    position: sticky;
    top: 6rem;
}

/* ==========================================================================
   4. Left Column: Selection Bar & Items
   ========================================================================== */
.cart-col-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1.25rem 0;
    font-family: var(--font-sans, 'Inter', sans-serif);
}

.cart-select-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0.25rem;
}

.select-all-wrap {
    display: flex;
    align-items: center;
}

.select-count-text {
    font-size: 0.85rem;
    color: #555555;
    font-weight: 500;
    margin-left: 0.65rem;
}

.cart-clear-all {
    color: #eb5757;
    font-size: 0.85rem;
    font-weight: 500;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.2s;
}

.cart-clear-all:hover {
    opacity: 0.75;
    text-decoration: underline;
}

/* Custom Checkboxes */
.cart-custom-checkbox {
    display: inline-flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.cart-custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.cart-checkmark {
    width: 18px;
    height: 18px;
    background-color: #ffffff;
    border: 1.5px solid #d0d0d0;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-sizing: border-box;
    flex-shrink: 0;
}

.cart-custom-checkbox:hover input ~ .cart-checkmark {
    border-color: #222222;
}

.cart-custom-checkbox input:checked ~ .cart-checkmark {
    background-color: #2e3131;
    border-color: #2e3131;
}

.cart-checkmark::after {
    content: "";
    display: none;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.cart-custom-checkbox input:checked ~ .cart-checkmark::after {
    display: block;
}

/* ==========================================================================
   5. Cart Item Rows
   ========================================================================== */
.cart-items-list {
    width: 100%;
}

.cart-item-row {
    display: flex;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid #f2f2f2;
    transition: opacity 0.25s ease;
    position: relative;
}

.cart-item-row.updating-item {
    opacity: 0.45;
    pointer-events: none;
}

.cart-item-row .item-checkbox {
    margin-right: 1.15rem;
}

.cart-item-thumb {
    width: 88px;
    height: 88px;
    border-radius: 14px;
    overflow: hidden;
    background: #fbf5f2;
    flex-shrink: 0;
    margin-right: 1.25rem;
}

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

.cart-item-thumb a {
    display: block;
    width: 100%;
    height: 100%;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cart-item-category {
    font-size: 0.72rem;
    font-weight: 700;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.cart-item-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.85rem 0;
    line-height: 1.3;
}

.cart-item-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.cart-item-name a:hover {
    color: #666666;
}

.cart-item-variant {
    font-size: 0.8rem;
    color: #777777;
    margin-bottom: 0.5rem;
}

/* Quantity Control Pill */
.cart-item-qty-wrap {
    display: flex;
    align-items: center;
}

.qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    height: 32px;
    padding: 0 4px;
}

.qty-minus,
.qty-plus {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
    border-radius: 4px;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}

.qty-minus:hover,
.qty-plus:hover {
    background: #f4f4f4;
    color: #111111;
}

.qty-control input.qty {
    width: 32px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    color: #222222;
    padding: 0;
    -moz-appearance: textfield;
    outline: none;
}

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

/* Right Side (Trash icon + Subtotal) */
.cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    align-self: stretch;
    padding: 0.15rem 0;
    margin-left: 1.5rem;
    flex-shrink: 0;
}

.cart-item-remove-btn {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #f27272;
    stroke: #f27272;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
    border-radius: 4px;
}

.cart-item-remove-btn:hover {
    color: #e04545;
    stroke: #e04545;
    transform: scale(1.1);
}

.cart-item-subtotal {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a1a;
    font-family: var(--font-sans, 'Inter', sans-serif);
}

/* ==========================================================================
   6. Right Column: Order Summary Card
   ========================================================================== */
.cart-summary-card {
    background: #ffffff;
    border: 1px solid #ebebeb;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.summary-title {
    font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: #222222;
    margin: 0 0 1.5rem 0;
}

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

.subtotal-row .summary-label {
    font-size: 0.85rem;
    color: #666666;
}

.subtotal-row .summary-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #222222;
}

.summary-divider {
    border-top: 1px solid #f0f0f0;
    margin: 1.25rem 0;
}

.total-row {
    align-items: baseline;
    margin-bottom: 1.75rem;
}

.total-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #666666;
}

.total-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: #1a1a1a;
    font-family: var(--font-sans, 'Inter', sans-serif);
}

.btn-cart-checkout {
    background: #2e3131;
    color: #ffffff;
    width: 100%;
    border-radius: 8px;
    padding: 13px 20px;
    font-weight: 600;
    font-size: 0.925rem;
    text-align: center;
    display: block;
    border: none;
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 0.65rem;
    transition: background 0.2s, transform 0.15s;
    box-sizing: border-box;
}

.btn-cart-checkout:hover {
    background: #181919;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-continue-shopping {
    background: #ffffff;
    color: #444444;
    border: 1px solid #e0e0e0;
    width: 100%;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 500;
    font-size: 0.9rem;
    text-align: center;
    display: block;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}

.btn-continue-shopping:hover {
    background: #f8f8f8;
    border-color: #cccccc;
    color: #111111;
}

/* ==========================================================================
   7. Empty Cart State
   ========================================================================== */
.rs-cart-empty-wrap {
    min-height: 60vh;
}

.cart-empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem 5rem;
    max-width: 780px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #ebebeb;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.02);
}

.empty-icon-wrap {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: linear-gradient(135deg, #faf7f2 0%, #f4ede3 100%);
    border: 1px solid #ebe2d5;
    color: #8c7355;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.75rem;
    box-shadow: 0 8px 20px rgba(140, 115, 85, 0.08);
    transition: transform 0.3s ease;
}

.cart-empty-state:hover .empty-icon-wrap {
    transform: scale(1.05);
}

.empty-cart-title {
    font-family: var(--font-serif, 'Playfair Display', Georgia, serif);
    font-size: 2.15rem;
    font-weight: 700;
    color: #111111;
    margin: 0 0 0.65rem;
    letter-spacing: -0.4px;
    line-height: 1.25;
}

.empty-cart-desc {
    font-size: 0.98rem;
    color: #666666;
    margin: 0 auto 2.25rem;
    max-width: 520px;
    line-height: 1.6;
}

.empty-cart-action {
    margin-bottom: 3rem;
}

.btn-return-shop {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #111111;
    color: #ffffff !important;
    padding: 14px 34px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.btn-return-shop:hover {
    background: #2b2b2b;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    color: #ffffff !important;
}

.btn-return-shop svg {
    transition: transform 0.2s ease;
}

.btn-return-shop:hover svg {
    transform: translateX(3px);
}

/* Trust & Benefit Perks in Empty Cart */
.cart-empty-perks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 2.25rem;
    border-top: 1px solid #f0f0f0;
    text-align: left;
}

.perk-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fafaf8;
    border: 1px solid #ebebeb;
    border-radius: 12px;
    transition: border-color 0.2s, background 0.2s;
}

.perk-item:hover {
    border-color: #111111;
    background: #ffffff;
}

.perk-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    color: #111111;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.perk-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.perk-text strong {
    font-size: 0.85rem;
    color: #111111;
    font-weight: 600;
    line-height: 1.25;
}

.perk-text span {
    font-size: 0.75rem;
    color: #777777;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .cart-empty-perks-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .empty-cart-title {
        font-size: 1.75rem;
    }

    .cart-empty-state {
        padding: 2.5rem 1.25rem 3rem;
    }
}

/* ==========================================================================
   8. Responsive Styles
   ========================================================================== */
@media (max-width: 992px) {
    .cart-layout {
        flex-direction: column;
        gap: 2.5rem;
    }

    .cart-summary-col {
        flex: none;
        width: 100%;
        position: static;
    }

    .cart-header-intro {
        margin-bottom: 2rem;
    }

    .cart-page-title {
        font-size: 2.25rem;
    }
}

@media (max-width: 600px) {
    .cart-item-row {
        align-items: flex-start;
        position: relative;
        padding: 1.25rem 0;
    }

    .cart-item-thumb {
        width: 72px;
        height: 72px;
        margin-right: 1rem;
    }

    .cart-item-name {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .cart-item-right {
        position: absolute;
        right: 0;
        top: 1.25rem;
        bottom: 1.25rem;
    }
}
