/**
 * Shop-spezifische Styles
 * Warenkorb-Badge, Warenkorb-Tabelle, Shop-Layout
 */

/* ============================================
   Warenkorb-Badge im Header (Icon + kleine Zahl oben rechts)
   ============================================ */
.cart-badge-link {
    text-decoration: none !important;
    line-height: 1;
    padding: 0.4rem 0.5rem !important;
}
.cart-badge-link .cart-badge-count {
    font-size: 0.6rem !important;
    font-weight: 600;
    min-width: 1.2em;
    padding: 0.15em 0.4em !important;
    line-height: 1.2;
    top: -4px !important;
    right: -4px !important;
    left: auto !important;
    transform: none !important;
}

/* ============================================
   Warenkorb-Tabelle
   ============================================ */
.shop-cart-table {
    margin-bottom: 0;
}
.shop-cart-table thead th {
    background: var(--color-sidebar-bg, #f8f9fa);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--color-border, #dee2e6);
}
.shop-cart-table tbody tr {
    border-bottom: 1px solid var(--color-border, #dee2e6);
    transition: background-color 0.2s ease;
}
.shop-cart-table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.04);
}
.shop-cart-table tbody td {
    padding: 1rem;
    vertical-align: middle;
}
.shop-cart-table .cart-item-product {
    min-width: 220px;
}
.shop-cart-table .cart-item-thumb {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    background: var(--color-sidebar-bg, #f8f9fa);
    border-radius: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-secondary, #6c757d);
}
.shop-cart-table .cart-item-name {
    font-weight: 600;
    color: inherit;
}
.shop-cart-table .cart-item-name:hover {
    color: var(--color-primary, #007bff);
}
.shop-cart-table .cart-col-price {
    min-width: 100px;
}
.shop-cart-table .cart-item-price,
.shop-cart-table .cart-item-subtotal {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.shop-cart-table .cart-item-subtotal {
    font-weight: 600;
    color: var(--color-primary, #007bff);
}
.shop-cart-table .quantity-input-wrap {
    max-width: 110px;
}
.shop-cart-table .btn-remove-item {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
.shop-cart-table .btn-remove-item:hover {
    opacity: 1;
}

/* Responsive: Warenkorb als Karten auf Mobile */
@media (max-width: 991.98px) {
    .shop-cart-table thead {
        display: none;
    }
    .shop-cart-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        padding: 1rem;
        background: var(--color-sidebar-bg, #f8f9fa);
        border-radius: 0.5rem;
        border: 1px solid var(--color-border, #dee2e6);
    }
    .shop-cart-table tbody tr:hover {
        background-color: var(--color-sidebar-bg, #f8f9fa);
    }
    .shop-cart-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
    }
    .shop-cart-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.8rem;
        color: var(--color-secondary, #6c757d);
    }
    .shop-cart-table .cart-item-product {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .shop-cart-table .cart-item-product::before {
        display: none;
    }
    .shop-cart-table .cart-item-product .d-flex {
        width: 100%;
    }
    .shop-cart-table .cart-item-subtotal {
        font-size: 1.1rem;
    }
    .shop-cart-table td[data-label="Aktionen"] {
        justify-content: flex-end;
        padding-top: 0.75rem;
        border-top: 1px dashed var(--color-border, #dee2e6);
    }
}
