/* ═══════════════════════════════════════════
   TIMILUC SRL — Shopping Cart (Coș)
   Cart items, quantity controls, order summary,
   empty state, WooCommerce resets.
   ═══════════════════════════════════════════ */


/* ─── WOOCOMMERCE RESETS ─── */
.woocommerce table.shop_table {
    border: none !important;
    border-collapse: collapse !important;
}

.woocommerce table.shop_table td,
.woocommerce table.shop_table th {
    border: none !important;
    padding: 0 !important;
}

.woocommerce .cart-collaterals,
.woocommerce-page .cart-collaterals {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
}

.woocommerce .cart-collaterals .cart_totals {
    float: none !important;
    width: 100% !important;
}

.woocommerce .col2-set,
.woocommerce-page .col2-set,
.woocommerce .col2-set .col-1,
.woocommerce .col2-set .col-2 {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
}


/* ─── PAGE WRAPPER ─── */
.tml-cart-page {
    background: var(--tml-bg);
    min-height: 100vh;
    padding-top: clamp(100px, 14vw, 140px);
}


/* ─── HERO ─── */
.tml-cart-hero {
    text-align: center;
    padding: 0 24px clamp(40px, 6vw, 60px);
}

.tml-cart-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--tml-gold);
    margin-bottom: 1rem;
}

.tml-cart-hero-tag::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--tml-gold-dim);
}

.tml-cart-hero h1 {
    font-family: var(--tml-font-serif);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--tml-white);
    line-height: 1.15;
}


/* ─── CART LAYOUT ─── */
.tml-cart-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px clamp(60px, 10vw, 120px);
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 768px) {
    .tml-cart-wrap {
        grid-template-columns: 1fr 360px;
        gap: 40px;
    }
}

@media (min-width: 1024px) {
    .tml-cart-wrap {
        grid-template-columns: 1fr 400px;
    }
}


/* ─── CART ITEMS ─── */
.tml-cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tml-cart-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 20px;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 20px;
    align-items: center;
    transition: border-color var(--tml-transition);
}

.tml-cart-item:hover {
    border-color: rgba(255, 255, 255, 0.08);
}

@media (min-width: 540px) {
    .tml-cart-item {
        grid-template-columns: 100px 1fr auto auto;
        gap: 24px;
    }
}


/* Image */
.tml-cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--tml-bg2);
    flex-shrink: 0;
}

@media (min-width: 540px) {
    .tml-cart-item-img {
        width: 100px;
        height: 100px;
    }
}

.tml-cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Details */
.tml-cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.tml-cart-item-cat {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--tml-cyan);
}

.tml-cart-item-title {
    font-family: var(--tml-font-serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--tml-white);
    line-height: 1.3;
}

.tml-cart-item-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--tml-transition);
}

.tml-cart-item-title a:hover {
    color: var(--tml-cyan);
}

.tml-cart-item-unit-price {
    font-size: 0.78rem;
    color: var(--tml-muted);
    font-weight: 400;
}

.tml-cart-item-meta {
    font-size: 0.7rem;
    color: var(--tml-muted);
    font-weight: 300;
}


/* Quantity Controls */
.tml-cart-item-qty {
    display: flex;
    align-items: center;
}

.tml-cart-qty-ctrl {
    display: flex;
    align-items: center;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.tml-cart-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--tml-txt);
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--tml-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--tml-font-sans);
}

.tml-cart-qty-btn:hover {
    background: rgba(0, 206, 209, 0.08);
    color: var(--tml-cyan);
}

.tml-cart-qty-input {
    width: 44px;
    height: 36px;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    color: var(--tml-white);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--tml-font-sans);
}

.tml-cart-qty-input:focus {
    outline: none;
}


/* Item subtotal + remove */
.tml-cart-item-end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.tml-cart-item-subtotal {
    font-family: var(--tml-font-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tml-gold);
    white-space: nowrap;
}

.tml-cart-item-remove {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--tml-muted);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: color var(--tml-transition);
    font-family: var(--tml-font-sans);
    padding: 4px 0;
}

.tml-cart-item-remove:hover {
    color: var(--tml-error);
}

.tml-cart-item-remove svg {
    width: 12px;
    height: 12px;
}


/* ─── ORDER SUMMARY SIDEBAR ─── */
.tml-cart-summary {
    position: relative;
}

@media (min-width: 768px) {
    .tml-cart-summary {
        position: sticky;
        top: var(--tml-header-offset, 108px);
        align-self: flex-start;
    }
}

.tml-cart-summary-inner {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    padding: 28px;
}

.tml-cart-summary-title {
    font-family: var(--tml-font-serif);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--tml-white);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tml-cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.tml-cart-summary-label {
    font-size: 0.82rem;
    color: var(--tml-muted);
    font-weight: 400;
}

.tml-cart-summary-value {
    font-size: 0.88rem;
    color: var(--tml-white);
    font-weight: 600;
}

.tml-cart-summary-divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.04);
    margin: 8px 0;
}

.tml-cart-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 0;
}

.tml-cart-summary-total-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--tml-white);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tml-cart-summary-total-price {
    font-family: var(--tml-font-serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--tml-gold);
}

/* Coupon */
.tml-cart-coupon {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.tml-cart-coupon-input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--tml-bg);
    color: var(--tml-white);
    font-size: 0.8rem;
    font-family: var(--tml-font-sans);
    transition: border-color var(--tml-transition);
}

.tml-cart-coupon-input:focus {
    outline: none;
    border-color: var(--tml-cyan);
}

.tml-cart-coupon-input::placeholder {
    color: var(--tml-muted);
}

.tml-cart-coupon-btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid rgba(0, 206, 209, 0.2);
    background: transparent;
    color: var(--tml-cyan);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all var(--tml-transition);
    font-family: var(--tml-font-sans);
    white-space: nowrap;
}

.tml-cart-coupon-btn:hover {
    background: var(--tml-cyan);
    border-color: var(--tml-cyan);
    color: var(--tml-bg);
}

/* Checkout button */
.tml-cart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 28px;
    border-radius: 12px;
    background: var(--tml-cyan);
    color: var(--tml-bg);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border: none;
    cursor: pointer;
    transition: all var(--tml-transition);
    font-family: var(--tml-font-sans);
    text-decoration: none;
    margin-top: 20px;
}

.tml-cart-checkout-btn:hover {
    background: var(--tml-cyan-dim);
    transform: translateY(-2px);
    box-shadow: 0 10px 35px rgba(0, 206, 209, 0.25);
}

.tml-cart-continue-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 0.75rem;
    color: var(--tml-muted);
    text-decoration: none;
    transition: color var(--tml-transition);
    font-weight: 500;
}

.tml-cart-continue-link:hover {
    color: var(--tml-cyan);
}


/* ─── EMPTY CART ─── */
.tml-cart-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 24px;
}

.tml-cart-empty-icon,
.tml-cart-empty-ico {
    color: var(--tml-muted);
    opacity: 0.2;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.tml-cart-empty-icon svg,
.tml-cart-empty-ico svg {
    width: 64px;
    height: 64px;
}

.tml-cart-empty h3 {
    font-family: var(--tml-font-serif);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--tml-white);
    margin-bottom: 0.75rem;
}

.tml-cart-empty p {
    font-size: 0.88rem;
    color: var(--tml-muted);
    font-weight: 300;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.tml-cart-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 60px;
    background: var(--tml-cyan);
    color: var(--tml-bg);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
    transition: all var(--tml-transition);
}

.tml-cart-empty-btn:hover {
    background: var(--tml-cyan-dim);
    transform: translateY(-2px);
    box-shadow: 0 10px 35px rgba(0, 206, 209, 0.25);
}


/* ─── UPDATE CART BUTTON ─── */
.tml-cart-update-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: var(--tml-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all var(--tml-transition);
    font-family: var(--tml-font-sans);
    margin-top: 16px;
}

.tml-cart-update-btn:hover {
    border-color: var(--tml-cyan);
    color: var(--tml-cyan);
}


/* ─── NOTICES ─── */
.tml-cart-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.tml-cart-notice--success {
    background: rgba(22, 163, 74, 0.08);
    border: 1px solid rgba(22, 163, 74, 0.15);
    color: var(--tml-success);
}

.tml-cart-notice--error {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.15);
    color: var(--tml-error);
}


/* ─── RESPONSIVE ─── */
@media (max-width: 539px) {
    .tml-cart-item {
        grid-template-columns: 70px 1fr;
        gap: 14px;
        padding: 16px;
    }

    .tml-cart-item-img {
        width: 70px;
        height: 70px;
    }

    .tml-cart-item-end {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.04);
    }

    .tml-cart-item-qty {
        grid-column: 1 / -1;
    }

    .tml-cart-summary-inner {
        padding: 20px;
    }
}
