/* last_edited: 2026-02-12T00:00:00+00:00 */
/**
 * TLD Cart Flyout Content Styles
 *
 * Styles for cart items and totals displayed in the cart flyout.
 * Le Labo aesthetic: clean borders, minimal design, square corners.
 *
 * Works with WooCommerce fragment system for AJAX updates.
 */

/* ============================================================================
   CART ITEMS
   ============================================================================ */

.tld-cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    margin: 0;
}

.tld-cart-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--tld-gray-200, #eeeeee);
    border-radius: 0;
    background: var(--tld-white, #ffffff);
    transition: border-color 0.2s ease;
}

.tld-cart-item:hover {
    border-color: var(--tld-gray-300, #d4d4d4);
}

/* Product Image */
.tld-cart-item__image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.tld-cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.tld-cart-item__image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Product Details */
.tld-cart-item__details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.tld-cart-item__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--tld-black, #1a1a1a);
    line-height: 1.4;
    margin: 0;
}

.tld-cart-item__name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tld-cart-item__name a:hover {
    color: var(--tld-primary, #1a4a5e);
}

.tld-cart-item__meta {
    font-size: 11px;
    color: var(--tld-gray-500, #737373);
    line-height: 1.4;
}

.tld-cart-item__meta dl {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.tld-cart-item__meta dt,
.tld-cart-item__meta dd {
    display: inline;
    margin: 0;
}

.tld-cart-item__meta dt {
    font-weight: 500;
}

.tld-cart-item__meta dt::after {
    content: ':';
}

.tld-cart-item__quantity {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--tld-gray-600, #525252);
}

.tld-cart-item__quantity-label {
    font-weight: 500;
}

.tld-cart-item__quantity-value {
    font-weight: 600;
    color: var(--tld-black, #1a1a1a);
}

/* Actions Column */
.tld-cart-item__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    justify-content: space-between;
}

.tld-cart-item__price {
    font-size: 14px;
    font-weight: 700;
    color: var(--tld-black, #1a1a1a);
    white-space: nowrap;
}

.tld-cart-item__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--tld-gray-300, #d4d4d4);
    border-radius: 0;
    color: var(--tld-gray-600, #525252);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tld-cart-item__remove:hover {
    background: var(--tld-black, #1a1a1a);
    border-color: var(--tld-black, #1a1a1a);
    color: var(--tld-white, #ffffff);
}

.tld-cart-item__remove svg {
    width: 14px;
    height: 14px;
}

/* Empty Cart State */
.tld-cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.tld-cart-empty__icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    color: var(--tld-gray-400, #a3a3a3);
}

.tld-cart-empty__text {
    margin: 0 0 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--tld-gray-600, #525252);
}

.tld-cart-empty__link {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: var(--tld-black, #1a1a1a);
    border: 1px solid var(--tld-black, #1a1a1a);
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tld-white, #ffffff);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.tld-cart-empty__link:hover {
    background: var(--tld-white, #ffffff);
    color: var(--tld-black, #1a1a1a);
}

/* ============================================================================
   CART TOTALS
   ============================================================================ */

.tld-cart-totals {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid var(--tld-black, #1a1a1a);
}

.tld-cart-totals__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 13px;
    border-bottom: 1px solid var(--tld-gray-200, #eeeeee);
}

.tld-cart-totals__row:last-of-type {
    margin-bottom: 0;
}

.tld-cart-totals__label {
    font-weight: 500;
    color: var(--tld-gray-700, #404040);
}

.tld-cart-totals__value {
    font-weight: 600;
    color: var(--tld-black, #1a1a1a);
}

/* Total Row */
.tld-cart-totals__row--total {
    margin-top: 8px;
    padding: 16px 0;
    border-top: 1px solid var(--tld-black, #1a1a1a);
    border-bottom: none;
    font-size: 16px;
}

.tld-cart-totals__row--total .tld-cart-totals__label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tld-black, #1a1a1a);
}

.tld-cart-totals__row--total .tld-cart-totals__value {
    font-size: 18px;
    font-weight: 700;
}

/* Shipping Progress */
.tld-cart-totals__shipping-progress {
    margin: 16px 0;
    padding: 12px;
    background: var(--tld-cream, #f5f0e8);
    border: 1px solid var(--tld-gray-200, #eeeeee);
    border-radius: 0;
}

.tld-cart-totals__shipping-text {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--tld-gray-700, #404040);
}

.tld-cart-totals__shipping-bar {
    width: 100%;
    height: 6px;
    background: var(--tld-gray-200, #eeeeee);
    border-radius: 0;
    overflow: hidden;
}

.tld-cart-totals__shipping-fill {
    height: 100%;
    background: var(--tld-primary, #1a4a5e);
    transition: width 0.3s ease;
}

.tld-cart-totals__shipping-progress--complete {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #16a34a;
}

.tld-cart-totals__shipping-progress--complete svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Actions */
.tld-cart-totals__actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.tld-cart-totals__checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px;
    background: var(--tld-black, #1a1a1a);
    border: 1px solid var(--tld-black, #1a1a1a);
    border-radius: 0;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tld-white, #ffffff);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.tld-cart-totals__checkout:hover {
    background: var(--tld-white, #ffffff);
    color: var(--tld-black, #1a1a1a);
}

.tld-cart-totals__view-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 1px solid var(--tld-black, #1a1a1a);
    border-radius: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tld-black, #1a1a1a);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.tld-cart-totals__view-cart:hover {
    background: var(--tld-black, #1a1a1a);
    color: var(--tld-white, #ffffff);
}

/* Trust Badges */
.tld-cart-totals__trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--tld-gray-200, #eeeeee);
}

.tld-cart-totals__trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    color: var(--tld-gray-600, #525252);
}

.tld-cart-totals__trust-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--tld-gray-500, #737373);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

/* Mobile */
@media (max-width: 640px) {
    .tld-cart-item {
        grid-template-columns: 50px 1fr auto;
        gap: 10px;
        padding: 10px;
    }

    .tld-cart-item__image {
        width: 50px;
        height: 50px;
    }

    .tld-cart-item__name {
        font-size: 12px;
    }

    .tld-cart-item__meta {
        font-size: 10px;
    }

    .tld-cart-item__quantity {
        font-size: 11px;
    }

    .tld-cart-item__price {
        font-size: 13px;
    }

    .tld-cart-item__remove {
        width: 26px;
        height: 26px;
    }

    .tld-cart-totals__row {
        font-size: 12px;
    }

    .tld-cart-totals__row--total {
        font-size: 15px;
    }

    .tld-cart-totals__row--total .tld-cart-totals__value {
        font-size: 16px;
    }

    .tld-cart-totals__trust {
        flex-direction: column;
        gap: 12px;
    }

    .tld-cart-empty {
        padding: 32px 16px;
    }

    .tld-cart-empty__icon {
        width: 48px;
        height: 48px;
    }
}
