/* === AK Off-Canvas Mini-Warenkorb === */

/* --- Panel --- */
#ak-mini-cart .uk-offcanvas-bar.ak-mc-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
    width: 400px;
    max-width: 90vw;
    background: #fff;
    color: #1a1a1a;
}

/* --- Header --- */
.ak-mc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
}

.ak-mc-title {
    font-size: 17px;
    font-weight: 700;
}

.ak-mc-header-count {
    font-weight: 400;
    font-size: 14px;
    color: #888;
    margin-left: 6px;
}

.ak-mc-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0;
}

/* --- Shipping Bar --- */
.ak-mc-shipping {
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #555;
}

.ak-mc-shipping-msg {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.ak-mc-shipping-msg:empty {
    margin-bottom: 0;
}

.ak-mc-shipping-ok {
    color: #16a34a;
    font-weight: 600;
}

.ak-mc-shipping-bar-wrap {
    margin-top: 4px;
}

.ak-mc-shipping-track {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.ak-mc-shipping-fill {
    height: 100%;
    background: #1a1a1a;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.ak-mc-shipping-ok .ak-mc-shipping-fill,
.ak-mc-shipping[data-threshold] .ak-mc-shipping-fill {
    background: #16a34a;
}

.ak-mc-shipping-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* --- Body (Items) --- */
.ak-mc-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.ak-mc-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid #f2f2f2;
    position: relative;
    transition: opacity 0.2s ease;
}

.ak-mc-item.ak-mc-loading {
    opacity: 0.5;
    pointer-events: none;
}

.ak-mc-item.ak-mc-item-removing {
    overflow: hidden;
    max-height: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.2s ease;
}

.ak-mc-item-img {
    flex-shrink: 0;
}

.ak-mc-item-img img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
}

.ak-mc-item-info {
    flex: 1;
    min-width: 0;
}

.ak-mc-item-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ak-mc-item-name:hover {
    color: #555;
}

.ak-mc-item-price {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.ak-mc-item-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.ak-mc-qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: #f7f7f7;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease;
}

.ak-mc-qty-btn:hover {
    background: #eee;
}

.ak-mc-qty-val {
    width: 34px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    line-height: 30px;
}

.ak-mc-item-remove {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 20px;
    color: #bbb;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.ak-mc-item-remove:hover {
    color: #e53e3e;
}

/* --- Empty State --- */
.ak-mc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #999;
}

.ak-mc-empty svg {
    margin-bottom: 16px;
}

.ak-mc-empty p {
    font-size: 15px;
    margin: 0 0 20px;
}

/* --- Cross-Sells --- */
.ak-mc-cross-sells {
    border-top: 1px solid #eee;
}

.ak-mc-cross-sells:empty {
    display: none;
}

.ak-mc-cs-title {
    font-size: 14px;
    font-weight: 700;
    padding: 14px 20px 10px;
    color: #1e2d4a;
}

.ak-mc-cs-grid {
    display: flex;
    gap: 10px;
    padding: 0 20px 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.ak-mc-cs-grid::-webkit-scrollbar {
    display: none;
}

.ak-mc-cs-item {
    flex: 0 0 90px;
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.ak-mc-cs-item:hover {
    text-decoration: none;
    color: inherit;
}

.ak-mc-cs-item img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-bottom: 6px;
    display: block;
}

.ak-mc-cs-name {
    display: block;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 2px;
}

.ak-mc-cs-price {
    font-size: 11px;
    color: #666;
}

/* --- Coupon --- */
.ak-mc-coupon {
    padding: 0 20px 12px;
    border-bottom: 1px solid #eee;
}

.ak-mc-coupon:empty {
    display: none;
    padding: 0;
    border: none;
}

.ak-mc-coupon.ak-mc-loading {
    opacity: 0.5;
    pointer-events: none;
}

.ak-mc-coupon-form {
    display: flex;
    gap: 8px;
}

.ak-mc-coupon-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    background: #f9f9f9;
}

.ak-mc-coupon-input:focus {
    border-color: #1e2d4a;
    background: #fff;
}

.ak-mc-coupon-btn {
    padding: 8px 14px;
    background: #1e2d4a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.ak-mc-coupon-btn:hover {
    background: #2a3f5f;
}

.ak-mc-coupons-applied {
    margin-bottom: 8px;
}

.ak-mc-coupon-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e2e9ee;
    color: #1e2d4a;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin: 0 4px 4px 0;
}

.ak-mc-coupon-remove {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #1e2d4a;
    padding: 0;
    line-height: 1;
    opacity: 0.6;
}

.ak-mc-coupon-remove:hover {
    opacity: 1;
}

/* --- Footer --- */
.ak-mc-footer {
    padding: 16px 20px 20px;
    border-top: 1px solid #eee;
}

.ak-mc-totals {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    margin-bottom: 14px;
}

.ak-mc-totals strong {
    font-size: 17px;
}

/* --- Buttons --- */
.ak-mc-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
}

.ak-mc-btn-primary {
    background: #1a1a1a;
    color: #fff;
    margin-bottom: 8px;
}

.ak-mc-btn-primary:hover {
    background: #333;
    color: #fff;
}

.ak-mc-btn-outline {
    background: transparent;
    color: #1a1a1a;
    border: 1px solid #ddd;
}

.ak-mc-btn-outline:hover {
    background: #f7f7f7;
    color: #1a1a1a;
}

/* --- Badge --- */
.ak-mc-badge-li {
    position: relative;
}

.ak-mc-badge {
    display: none !important;
}

/* --- Add-to-cart Button States --- */
.single_add_to_cart_button.ak-mc-loading {
    opacity: 0.7;
    pointer-events: none;
}

.single_add_to_cart_button.ak-mc-added {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #fff !important;
}

/* --- Offcanvas z-index über Geschenkeberater --- */
#ak-mini-cart {
    z-index: 99999 !important;
}

/* --- Responsive --- */
@media (max-width: 480px) {
    #ak-mini-cart .uk-offcanvas-bar.ak-mc-panel {
        width: 100vw;
        max-width: 100vw;
    }
}
