/* =============================================================================
   tamm.online – Custom Cart Styles
   Add to: child-theme/assets/css/cart.css
   (or paste into child theme's main stylesheet / Woodmart custom CSS field)
   ============================================================================= */

/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
    --tc-green:        #2e7d32;
    --tc-green-light:  #43a047;
    --tc-green-bg:     #e8f5e9;
    --tc-border:       #e8e8e8;
    --tc-bg:           #f5f5f5;
    --tc-card-bg:      #ffffff;
    --tc-text:         #1a1a1a;
    --tc-text-muted:   #757575;
    --tc-chip-bg:      #f0f0f0;
    --tc-radius:       12px;
    --tc-radius-sm:    8px;
    --tc-shadow:       0 1px 4px rgba(0,0,0,.08);
}

/* ── Wrapper ─────────────────────────────────────────────────────────────────── */
.tc-cart-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 16px 64px;
    direction: rtl;
}

/* ── Page header ─────────────────────────────────────────────────────────────── */
.tc-cart-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: right;
    margin: 0 0 4px;
}

.tc-cart-subtitle {
    color: var(--tc-text-muted);
    font-size: .95rem;
    text-align: right;
    margin: 0 0 32px;
}

/* ── Layout: desktop 2-col ───────────────────────────────────────────────────── */
.tc-cart-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

/* ── Card base ───────────────────────────────────────────────────────────────── */
.tc-card {
    background: var(--tc-card-bg);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--tc-shadow);
}

.tc-card__top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

/* ── Product icon avatar ─────────────────────────────────────────────────────── */
.tc-card__icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: var(--tc-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tc-card__icon--bundle {
    background: var(--tc-green);
    color: #fff;
}

.tc-card__icon--simple {
    background: var(--tc-chip-bg);
    color: var(--tc-text-muted);
}

/* ── Card meta (title / badge / category) ────────────────────────────────────── */
.tc-card__meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tc-card__badge {
    font-size: .72rem;
    color: var(--tc-green);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.tc-card__category {
    font-size: .78rem;
    color: var(--tc-text-muted);
}

.tc-card__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

/* ── Remove (trash) button ───────────────────────────────────────────────────── */
.tc-card__remove {
    color: var(--tc-text-muted);
    text-decoration: none;
    line-height: 1;
    flex-shrink: 0;
    transition: color .2s;
}

.tc-card__remove:hover {
    color: #c62828;
}

/* ── Chips grid ──────────────────────────────────────────────────────────────── */
.tc-card__chips {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 16px;
}

.tc-chip {
    background: var(--tc-chip-bg);
    border-radius: var(--tc-radius-sm);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tc-chip__label {
    font-size: .7rem;
    color: var(--tc-text-muted);
}

.tc-chip__value {
    font-size: .85rem;
    font-weight: 600;
    color: var(--tc-text);
}

/* ── Card footer ─────────────────────────────────────────────────────────────── */
.tc-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.tc-card__price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tc-text);
}

.tc-card__price .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
}

.tc-card__price-label {
    font-size: .8rem;
    color: var(--tc-text-muted);
    font-weight: 400;
    margin-right: 6px;
}

/* ── Quantity stepper ────────────────────────────────────────────────────────── */
.tc-qty {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--tc-border);
    border-radius: 999px;
    overflow: hidden;
    background: var(--tc-card-bg);
}

.tc-qty__btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--tc-text);
    line-height: 1;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tc-qty__btn:hover {
    background: var(--tc-green-bg);
}

.tc-qty__value {
    min-width: 28px;
    text-align: center;
    font-size: .9rem;
    font-weight: 600;
}

/* ── Guarantee banner ────────────────────────────────────────────────────────── */
.tc-guarantee-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--tc-green-bg);
    border: 1px solid #c8e6c9;
    border-radius: var(--tc-radius);
    padding: 14px 18px;
    margin-top: 4px;
}

.tc-guarantee-banner__icon {
    color: var(--tc-green);
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.tc-guarantee-banner strong {
    display: block;
    font-size: .9rem;
    color: var(--tc-green);
    margin-bottom: 2px;
}

.tc-guarantee-banner p {
    margin: 0;
    font-size: .82rem;
    color: var(--tc-text-muted);
}

/* ── Order summary sidebar ───────────────────────────────────────────────────── */
.tc-cart-summary {
    background: var(--tc-card-bg);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    padding: 24px;
    box-shadow: var(--tc-shadow);
}

.tc-summary__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 20px;
    text-align: right;
}

.tc-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .9rem;
    color: var(--tc-text);
    padding: 8px 0;
    border-bottom: 1px solid var(--tc-border);
}

.tc-summary__row:last-of-type {
    border-bottom: none;
}

.tc-summary__row--total {
    font-weight: 700;
    font-size: 1rem;
    padding-top: 12px;
    margin-top: 4px;
}

.tc-summary__total-price {
    font-size: 1.25rem;
    color: var(--tc-green);
}

.tc-summary__total-price .woocommerce-Price-amount {
    font-size: inherit;
    color: inherit;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.tc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--tc-radius-sm);
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, border-color .2s;
    margin-top: 20px;
    border: 2px solid transparent;
}

.tc-btn--checkout {
    background: var(--tc-green);
    color: #fff;
}

.tc-btn--checkout:hover {
    background: var(--tc-green-light);
    color: #fff;
}

.tc-btn__arrow {
    font-size: 1.1rem;
    line-height: 1;
}

.tc-btn--outline {
    background: transparent;
    border-color: var(--tc-green);
    color: var(--tc-green);
}

.tc-btn--outline:hover {
    background: var(--tc-green-bg);
}

.tc-summary__continue {
    display: block;
    text-align: center;
    font-size: .85rem;
    color: var(--tc-text-muted);
    text-decoration: none;
    margin-top: 12px;
}

.tc-summary__continue:hover {
    color: var(--tc-text);
}

/* ── Empty cart ──────────────────────────────────────────────────────────────── */
.tc-empty-cart {
    background: var(--tc-card-bg);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    padding: 60px 40px;
    text-align: center;
    max-width: 540px;
    margin: 0 auto;
}

.tc-empty-cart__icon {
    color: #bdbdbd;
    margin-bottom: 20px;
}

.tc-empty-cart__heading {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.tc-empty-cart__text {
    color: var(--tc-text-muted);
    font-size: .9rem;
    margin: 0 0 28px;
}

.tc-empty-cart__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.tc-empty-cart__actions .tc-btn {
    margin-top: 0;
    width: auto;
    flex: 1;
    min-width: 160px;
}

/* ── Mini cart overrides ─────────────────────────────────────────────────────── */
.tc-minicart-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tc-minicart-items li,
.tc-minicart-items li .tc-card__chips {
    display: block !important;
}

.tc-minicart-items li .tc-card__chips .tc-chip {
    margin-bottom: 10px;
}

.tc-card--mini {
    margin-bottom: 10px;
}

.tc-minicart-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--tc-text-muted);
}

.tc-minicart-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 0 4px;
    font-weight: 700;
    font-size: 1rem;
    border-top: 1px solid var(--tc-border);
    margin-top: 8px;
}

.tc-minicart-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 0;
}

.tc-minicart-buttons .tc-btn {
    margin-top: 0;
}

/* ── Responsive: Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {

    .tc-cart-layout {
        grid-template-columns: 1fr;
    }

    /* Chips: 2×2 grid on mobile */
    .tc-card__chips {
        grid-template-columns: repeat(2, 1fr);
    }

    .tc-cart-title {
        font-size: 1.5rem;
    }

    .tc-empty-cart {
        padding: 40px 20px;
    }

    .tc-empty-cart__actions {
        flex-direction: column;
    }

    .tc-empty-cart__actions .tc-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .tc-card {
        padding: 16px;
    }

    .tc-cart-summary {
        padding: 18px;
    }
}
