/* =============================================================================
   ARO Mini Cart – Stylesheet
   UIkit 3 kompatibel – keine !important-Overrides ohne Begründung
   ============================================================================= */

/* ── Wrapper ─────────────────────────────────────────────────────────────────*/

/* Wenn in offcanvas */
.uk-offcanvas-bar .aro-mini-cart {
    margin-top: 10% !important;
    height: 90%;
}

.aro-mini-cart {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    position: relative;
}

.aro-mc-full-items .uk-first-column {
    width: 100%;
}

/* Lade-Zustand: pointer-events und opacity werden via JS gesetzt */


/* ── Header ──────────────────────────────────────────────────────────────────*/
.aro-mc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--uk-color-border, rgba(255, 255, 255, 0.1));
    margin-bottom: 4px;
}

.aro-mc-title {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.85;
    flex: 1;
}

.aro-mc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 20px;
    background: var(--uk-color-primary, #1e87f0);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}


/* ── Body / Scroll-Container ─────────────────────────────────────────────────*/
.aro-mc-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
    flex: 1;
    min-height: 0;
}


/* ── Artikelliste ────────────────────────────────────────────────────────────*/
.aro-mc-items {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    overscroll-behavior: contain;
    /* Subtiler Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.aro-mc-items::-webkit-scrollbar {
    width: 4px;
}

.aro-mc-items::-webkit-scrollbar-track {
    background: transparent;
}

.aro-mc-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}


/* ── Einzelner Artikel ───────────────────────────────────────────────────────*/
.aro-mc-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid var(--uk-color-border, rgba(255, 255, 255, 0.07));
    transition: opacity 0.2s ease;
}

.aro-mc-item:last-child {
    border-bottom: none;
}


/* Thumbnail */
.aro-mc-thumb {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.aro-mc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* Info-Block */
.aro-mc-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.aro-mc-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.15s;
}

.aro-mc-item-name:hover {
    opacity: 0.75;
}

.aro-mc-item-variant {
    font-size: 0.775rem;
    opacity: 0.55;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aro-mc-item-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
}

/* Kompakter Qty-Selector im Mini Cart */
.aro-mc-qty-select {
    height: 32px;
    gap: 6px;
}

.aro-mc-qty-select .aro-qty-btn {
    width: 22px;
    height: 22px;
    font-size: 13px;
}

.aro-mc-qty-select .aro-qty-input {
    width: 48px;
    height: 32px;
    font-size: 0.8rem;
}

.aro-mc-item-price {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.aro-mc-item-price bdi,
.aro-mc-item-price ins bdi {
    text-decoration: none;
}


/* Remove-Button */
.aro-mc-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    opacity: 0.4;
    transition: opacity 0.15s, background-color 0.15s;
    color: inherit;
    margin-top: 2px;
}

.aro-mc-remove:hover {
    opacity: 1;
    background: rgba(240, 80, 110, 0.18);
}


/* ── Leer-Zustand ────────────────────────────────────────────────────────────*/
.aro-mc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 16px;
    text-align: center;
    opacity: 0.5;
}

.aro-mc-empty-icon {
    display: block;
}

.aro-mc-empty p {
    margin: 0;
    font-size: 0.875rem;
}


/* ── Footer (Zwischensumme + Buttons) ───────────────────────────────────────*/
.aro-mc-footer {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex-shrink: 0;
}

/* ── Zwischensumme ───────────────────────────────────────────────────────────*/
.aro-mc-subtotal {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--juju-margin-small);
    padding: 12px 0 8px;
    border-top: 1px solid var(--uk-color-border, rgba(255, 255, 255, 0.1));
    margin-top: 4px;
}

.aro-mc-subtotal-label {
    font-size: 0.825rem;
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.aro-mc-subtotal-value {
    font-size: 0.95rem;
    font-weight: 700;
}

.aro-mc-subtotal-value bdi,
.aro-mc-subtotal-value ins bdi {
    text-decoration: none;
}


/* ── Aktions-Buttons ─────────────────────────────────────────────────────────*/
.aro-mc-actions {
    display: flex;
    gap: 8px;
    padding-top: 10px;
    flex-wrap: wrap;
}

.aro-mc-actions .uk-button {
    flex: 1;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    font-size: 0.8rem;
}

/* Cart-Button: etwas subtiler */
.aro-mc-btn-cart {
    opacity: 0.85;
}


/* ── Fly-to-Cart Animation ──────────────────────────────────────────────────*/
.aro-fly-thumb {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    transition: left 0.85s cubic-bezier(.64, 0, .32, 1),
        top 0.85s cubic-bezier(.64, 0, .32, 1),
        width 0.85s cubic-bezier(.64, 0, .32, 1),
        height 0.85s cubic-bezier(.64, 0, .32, 1),
        opacity 0.85s cubic-bezier(.64, 0, .32, 1),
        transform 0.85s cubic-bezier(.64, 0, .32, 1);
}

/* MC-Button Bounce bei Ankunft */
#juju-mc-button.aro-mc-btn-bounce {
    animation: aro-mc-btn-bounce 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes aro-mc-btn-bounce {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.28);
    }

    70% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}


/* =============================================================================
   ARO Mini Cart – VOLLANSICHT (.aro-mc-full)
   ============================================================================= */

/* ── Layout: flex-column, Summenblock unten bündig ──────────────────────────*/
.aro-mc-full {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

/* Grid-Layout wird via UIkit uk-grid / uk-child-width gesteuert */

/* Platzhalter-Slot: wächst und drückt den Summenblock nach unten */
.aro-mc-full-slot {
    flex: 1 1 auto;
    min-height: 0;
}

/* ── Layout: 2-Spalten ──────────────────────────*/
.aro-mc-full-left {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 15px;
    /* Platz für Scrollbar */
}

@media (min-width: 960px) {
    .aro-mc-full-left {
        max-height: 75vh;
    }
}

.aro-mc-full-right {
    /* Padding/Styling wenn nötig */
}

/* Platzhalter-Slot (Rosa Box im Mockup) */
.aro-mc-full-slot {
    width: 100%;
    min-height: 250px;
    background: #FAEEED;
    /* Placeholder pink */
    border-radius: 12px;
    margin-bottom: 24px;
}

.aro-mc-full-bottom {
    flex-shrink: 0;
}


/* ── Artikel-Karte ──────────────────────────────────────────────────────────*/
.aro-mc-full-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
    border-radius: 12px;
    background: var(--aro-card-bg, #f5f5f5);

    transition: box-shadow 0.2s ease;
}

/* ── Bild-Bereich ───────────────────────────────────────────────────────────*/
.aro-mc-full-item-image {
    position: relative;
    overflow: hidden;
    background: var(--aro-card-image-bg, #e0e0e0);
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.aro-mc-full-item-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.aro-mc-full-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.aro-mc-full-item:hover .aro-mc-full-item-image img {
    transform: scale(1.03);
}

/* Bildseitenverhältnisse */
.aro-mc-ratio-1-1 {
    aspect-ratio: 1 / 1;
}

.aro-mc-ratio-4-3 {
    aspect-ratio: 4 / 3;
}

.aro-mc-ratio-3-4 {
    aspect-ratio: 3 / 4;
}

.aro-mc-ratio-16-9 {
    aspect-ratio: 16 / 9;
}


/* ── Remove-Button (oben rechts auf der Karte) ───────────────────────────────*/
.aro-mc-full-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(220, 60, 60, 0.85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: 0.9;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 2;
}

.aro-mc-full-remove:hover {
    opacity: 1;
    transform: scale(1.1);
}


/* ── Body (Text + Controls) ─────────────────────────────────────────────────*/
.aro-mc-full-item-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 2px;
    padding: 14px 16px 16px;
}

.aro-mc-full-item-name a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.15s;
}

.aro-mc-full-item-name a:hover {
    opacity: 0.75;
}

.aro-mc-full-item-meta {
    font-size: 0.8rem;
    line-height: 1.4;
}


/* ── Footer: Qty + Preis ────────────────────────────────────────────────────*/
.aro-mc-full-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
}

.aro-mc-full-item-price {
    font-weight: 700;
    white-space: nowrap;
}

.aro-mc-full-item-price bdi,
.aro-mc-full-item-price ins bdi {
    text-decoration: none;
}

/* Qty-Select: konsistent mit B2B Table */
.aro-mc-full-qty-select {
    height: 36px;
    gap: 6px;
}

.aro-mc-full-qty-select .aro-qty-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
}

.aro-mc-full-qty-select .aro-qty-input {
    width: 56px;
    height: 36px;
    font-size: 0.85rem;
}


/* ── Summenzeile ────────────────────────────────────────────────────────────*/
.aro-mc-full-summary {
    display: flex;
    align-items: baseline;
    gap: var(--juju-margin-small, 12px);
    padding: 16px 0 4px;
}

.aro-mc-full-summary-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.aro-mc-full-summary-price bdi,
.aro-mc-full-summary-price ins bdi {
    text-decoration: none;
}

.aro-mc-full-tax-note {
    margin-top: 2px;
    margin-bottom: 0;
}


/* ── Aktionsbuttons ─────────────────────────────────────────────────────────*/
.aro-mc-full-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
}

.aro-mc-full-actions .uk-button {
    justify-content: center;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
}


/* ── Leer-Zustand (Vollansicht) ─────────────────────────────────────────────*/
.aro-mc-full .aro-mc-empty {
    padding: 48px 16px;
}

.aro-mc-full .aro-mc-empty-icon {
    opacity: 0.3;
}


/* ── Responsive (Desktop) ──────────────────────────────────────────────────*/
@media (min-width: 640px) {
    .aro-mc-full-item {
        flex-direction: row;
        align-items: stretch;
    }

    .aro-mc-full-item-image {
        width: 140px;
        border-radius: 12px 0 0 12px;
    }

    .aro-mc-full-item-body {
        padding: 16px 40px 16px 20px;
        /* Right padding for remove button */
    }
}

/* ── Responsive (Mobile) ───────────────────────────────────────────────────*/
@media (max-width: 639px) {
    .aro-mc-full-item-body {
        padding: 10px 12px 14px;
    }

    .aro-mc-full-item-footer {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .aro-mc-full-summary {
        justify-content: center;
        flex-direction: row;
        gap: 8px;
    }
}

/* Coupon Styles */
.aro-mc-full-subtotal,
.aro-mc-full-coupon {
    gap: 1em;
}