/* ============================================================
   Titan Crafts — Mini Cart Dropdown
   Gebaseerd op werkelijke HTML-structuur van WC + WPO plugin
   ============================================================ */

/* --- Wrapper --- */
.tc-cart-dropdown {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.1rem;
    overflow: hidden;
    width: 360px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 13px;
    text-align: left;
}

/* --- Header balk --- */
.tc-cart-dropdown .cart-header {
    background: #272922;
    padding: 12px 16px;
}

.tc-cart-dropdown .cart-header h3 {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
}

/* --- Item lijst --- */
.tc-cart-dropdown .woocommerce-mini-cart.cart_list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 380px;
    overflow-y: auto;
}

/* ============================================================
   HOOFDPRODUCT  (.mini_cart_item zonder .wpo-addon)
   Structuur: <li> > <a.remove> + <a href>[img + naam]</a>
              + <dl.variation> + <span.quantity>
   ============================================================ */

.tc-cart-dropdown .mini_cart_item:not(.wpo-addon-mini_cart_item) {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 40px 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

/* Product link: img links, naam rechts */
.tc-cart-dropdown .mini_cart_item:not(.wpo-addon-mini_cart_item) > a:not(.remove) {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-decoration: none;
    color: #272922;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.tc-cart-dropdown .mini_cart_item:not(.wpo-addon-mini_cart_item) > a:not(.remove):hover {
    color: #939b80;
}

/* Thumbnail */
.tc-cart-dropdown .mini_cart_item:not(.wpo-addon-mini_cart_item) > a:not(.remove) img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 0.1rem;
    border: 1px solid #eee;
    display: block;
}

/* Variatie (Kamado-loch etc.) — verbergen op verzoek */
.tc-cart-dropdown dl.variation {
    display: none;
}

/* ar_cart_components is leeg, verbergen */
.tc-cart-dropdown .ar_cart_components {
    display: none;
}

/* Quantity — ingesprongen gelijk aan tekstpositie */
.tc-cart-dropdown .mini_cart_item:not(.wpo-addon-mini_cart_item) .quantity {
    padding-left: 62px; /* 52px img + 10px gap */
    font-size: 11px;
    font-weight: 400;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* ============================================================
   SUB-PRODUCTEN  (.wpo-addon-mini_cart_item)
   Twee varianten:
   A) Geen link: <li> > img + svg + "tekst" + quantity
   B) Met link:  <li> > <a href>[img + svg + tekst]</a> + quantity
   ============================================================ */

.tc-cart-dropdown .mini_cart_item.wpo-addon-mini_cart_item {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 6px;
    padding: 8px 40px 8px 24px;
    border-bottom: 1px dashed #ececec;
    background: #fafafa;
    position: relative;
    font-size: 12px;
    font-weight: 400;
    color: #555;
    text-align: left;
}

/* Directe img (variant A: geen link) */
.tc-cart-dropdown .mini_cart_item.wpo-addon-mini_cart_item > img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 0.1rem;
    border: 1px solid #eee;
    flex-shrink: 0;
}

/* Arrow SVG (directe child, variant A) */
.tc-cart-dropdown .mini_cart_item.wpo-addon-mini_cart_item > svg {
    width: 13px;
    height: 13px;
    color: #ccc;
    flex-shrink: 0;
}

/* Product link (variant B: met link) */
.tc-cart-dropdown .mini_cart_item.wpo-addon-mini_cart_item > a:not(.remove) {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: #555;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
}

.tc-cart-dropdown .mini_cart_item.wpo-addon-mini_cart_item > a:not(.remove):hover {
    color: #272922;
}

/* Img en svg BINNEN de link (variant B) */
.tc-cart-dropdown .mini_cart_item.wpo-addon-mini_cart_item > a:not(.remove) img {
    width: 28px;
    height: 28px;
    object-fit: cover;
    border-radius: 0.1rem;
    border: 1px solid #eee;
    flex-shrink: 0;
}

.tc-cart-dropdown .mini_cart_item.wpo-addon-mini_cart_item > a:not(.remove) svg {
    width: 13px;
    height: 13px;
    color: #ccc;
    flex-shrink: 0;
}

/* Quantity: volle breedte → wraps naar volgende rij */
.tc-cart-dropdown .mini_cart_item.wpo-addon-mini_cart_item .quantity {
    flex: 0 0 100%;
    padding-left: 46px; /* 28px img + 6px gap + 13px svg - 1px */
    font-size: 10px;
    color: #bbb;
    margin-top: 2px;
}

/* ============================================================
   GEDEELD: remove knop & "From" label
   ============================================================ */

/* Verwijder knop — absoluut rechts */
.tc-cart-dropdown a.remove.remove_from_cart_button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #bbb;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    transition: all 0.15s;
}

.tc-cart-dropdown a.remove.remove_from_cart_button:hover {
    border-color: #c00;
    color: #c00;
    background: #fff5f5;
}

/* Verberg "From" / "Vanaf" label overal in de mini cart */
.tc-cart-dropdown .from-price-label,
.woocommerce-mini-cart .from-price-label,
.mini-cart-price .from-price-label {
    display: none !important;
}

/* ============================================================
   SUBTOTAAL + KNOPPEN
   ============================================================ */

.tc-cart-dropdown .woocommerce-mini-cart__total.total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid #ececec;
    background: #f8f8f6;
    margin: 0;
}

.tc-cart-dropdown .woocommerce-mini-cart__total strong {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tc-cart-dropdown .woocommerce-mini-cart__total .woocommerce-Price-amount {
    font-size: 16px;
    font-weight: 600;
    color: #272922;
}

.tc-cart-dropdown .woocommerce-mini-cart__buttons.buttons {
    display: flex;
    gap: 8px;
    padding: 10px 16px 14px;
    background: #f8f8f6;
    margin: 0;
}

.tc-cart-dropdown .woocommerce-mini-cart__buttons.buttons a.button {
    flex: 1;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 0.1rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
    display: block;
    font-family: 'Montserrat', Arial, sans-serif;
}

/* Winkelwagen / View basket */
.tc-cart-dropdown .woocommerce-mini-cart__buttons a.wc-forward:not(.checkout) {
    background: #fff;
    border: 1px solid #272922;
    color: #272922;
}

.tc-cart-dropdown .woocommerce-mini-cart__buttons a.wc-forward:not(.checkout):hover {
    background: #272922;
    color: #fff;
}

/* Afrekenen / Checkout */
.tc-cart-dropdown .woocommerce-mini-cart__buttons a.checkout {
    background: #272922;
    color: #fff;
    border: 1px solid #272922;
}

.tc-cart-dropdown .woocommerce-mini-cart__buttons a.checkout:hover {
    background: #939b80;
    border-color: #939b80;
}

/* Lege winkelwagen */
.tc-cart-dropdown .woocommerce-mini-cart__empty-message {
    padding: 18px 16px;
    margin: 0;
    font-size: 12px;
    color: #999;
}
