/* =====================================================================
 * porto-8-cart-drawer.css  (8 van 8)
 *
 * De off-canvas winkelmandlade. Stond eerst in header-footer.css, maar
 * dat bestand zit in de samengevoegde bundel en laadt dus vóór Porto's
 * eigen custom.css uit pub/media. Regels als padding, border en radius
 * op de regels in het mandje verloren daar, wat alleen met !important
 * te repareren viel. In deze laag winnen ze op volgorde.
 *
 * porto_design/header/header_minicart_popup_design staat op 2, waardoor
 * Porto de off-canvas variant rendert in plaats van het dropdownpaneel.
 * ===================================================================== */

/* ------------------------------------------------------------------
 * 11. Minicart als drawer
 *
 * porto_design/header/header_minicart_popup_design staat nu op 2, waardoor
 * Porto de off-canvas variant rendert in plaats van het dropdownpaneel dat
 * scheef onder het icoon hing.
 * ------------------------------------------------------------------ */

.minicart-wrapper.minicart-offcanvas .block-minicart {
    border: 0;
    box-shadow: -8px 0 28px rgba(16, 24, 40, 0.14);
}

.minicart-wrapper.minicart-offcanvas .block-minicart .block-title {
    padding: 18px 20px;
    border-bottom: 1px solid #e4e7ec;
    margin: 0;
}

.minicart-wrapper.minicart-offcanvas .block-content {
    padding: 0 20px 20px;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item {
    padding: 14px 0;
    border-bottom: 1px solid #eef0f3;
}

.minicart-wrapper.minicart-offcanvas .subtotal {
    padding-top: 14px;
}

/* Porto rendert deze in bijna-zwart (#222529) met radius 2px. Dezelfde groene
   CTA als "Place Order" in de checkout, zodat doorklikken naar afrekenen overal
   dezelfde kleur heeft. Op id gemikt omdat het thema `.action.primary` breed
   overschrijft. */
.minicart-wrapper .block-minicart #top-cart-btn-checkout,
.minicart-wrapper.minicart-offcanvas .actions .action.primary.checkout {
    background: #55ba29;
    border: 0;
    border-radius: 6px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: none;
    box-shadow: none;
    transition: background-color 0.15s ease;
}

.minicart-wrapper .block-minicart #top-cart-btn-checkout:hover,
.minicart-wrapper .block-minicart #top-cart-btn-checkout:focus,
.minicart-wrapper.minicart-offcanvas .actions .action.primary.checkout:hover {
    background: #4aa523;
    color: #fff;
}

.minicart-wrapper .block-minicart #top-cart-btn-checkout:active {
    background: #429120;
}

/* "View Cart" en "Share Cart" stonden er vetgedrukt naast als concurrenten van
   de hoofdactie; die mogen rustiger. */
.minicart-wrapper.minicart-offcanvas .block-content > .actions .action.viewcart,
.minicart-wrapper.minicart-offcanvas .block-content .action.sharecart {
    font-weight: 500;
    font-size: 13px;
    color: #667085;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.minicart-wrapper.minicart-offcanvas .block-content > .actions .action.viewcart:hover,
.minicart-wrapper.minicart-offcanvas .block-content .action.sharecart:hover {
    color: #007bb0;
}

/* Porto's off-canvas variant levert wel het paneel maar niet de opmaak van de
   regels erin: naam, prijs en verwijderknop schoten buiten de 320px breedte.
   Hier de regel als foto links, details rechts.
   
   Eerst een reset: theme custom.css bevat
   `li.item.product.product-item { flex: 0 0 calc(25% - 7.5px) !important }` —
   bedoeld voor de productgrid op categoriepagina's, maar die selector raakt ook
   de regels in het winkelmandje, die daardoor op een kwart breedte stonden. */
.minicart-wrapper .minicart-items li.item.product.product-item {
    display: block !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: none !important;
}
/* Het thema zet hier flex-direction: column en geeft de foto order 2, waardoor
   de afbeelding onder naam en prijs belandde. */
.minicart-wrapper.minicart-offcanvas .minicart-items .product-item > .product {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    position: relative;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-photo {
    order: 0 !important;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-details {
    order: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-name,
.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-name a {
    display: block;
    max-width: 100%;
    min-width: 0;
    white-space: normal !important;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}

/* Prijs en aantal naast elkaar, maar met ruimte om te wikkelen — de
   plus/min-stepper van Xigen is breder dan Porto's standaard veldje. */
.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-pricing {
    flex-wrap: wrap;
    row-gap: 6px;
    margin-top: 8px;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty {
    display: flex;
    align-items: center;
    gap: 4px;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty .qty-changer,
.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty button {
    width: 26px;
    min-width: 26px;
    height: 28px;
    padding: 0;
}

/* De bewerk- en verwijderlinks zijn van zichzelf ~20x21px en raken elkaar,
   waardoor Lighthouse ze als te dicht op elkaar liggende klikdoelen ziet.
   We geven ze een klikvlak van 40x40 met ruimte ertussen; het pictogram
   blijft even groot. */
.minicart-wrapper .minicart-items .product-item .secondary,
.minicart-wrapper .minicart-items .product-item-details .actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.minicart-wrapper .minicart-items .product-item a.action.delete,
.minicart-wrapper .minicart-items .product-item a.action.edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    height: 40px;
    margin: 0;
    border-radius: 8px;
}

.minicart-wrapper .minicart-items .product-item a.action.delete:hover,
.minicart-wrapper .minicart-items .product-item a.action.edit:hover {
    background: #f1f5f9;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty .item-qty {
    width: 38px;
    height: 28px;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-photo {
    flex: none;
    width: 68px;
    margin: 0;
    position: static;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-image-container,
.minicart-wrapper.minicart-offcanvas .minicart-items .product-image-wrapper {
    width: 68px !important;
    height: auto !important;
    padding: 0 !important;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-image-photo {
    position: static;
    width: 100%;
    height: auto;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-details {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 22px 0 0;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-name {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 1.35;
    white-space: normal;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-name a {
    color: #101828;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-pricing {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .price-container {
    font-size: 14px;
    font-weight: 600;
    color: #101828;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty {
    margin: 0;
    font-size: 12px;
    color: #667085;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty .item-qty {
    width: 44px;
    height: 30px;
    padding: 0 6px;
    text-align: center;
    border: 1px solid #e4e7ec;
    border-radius: 6px;
}

/* De verwijderknop stond absoluut over de productnaam heen. */
.minicart-wrapper.minicart-offcanvas .minicart-items .product.actions {
    position: static;
    margin: 0;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product.actions .secondary {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product.actions .primary {
    display: none;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .action.delete {
    color: #98a2b3;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .action.delete:hover {
    color: #c62828;
}

/* =====================================================================
 * Cart drawer, tweede ronde.
 *
 * Wat er mis was: Porto zet de verwijderknop absoluut rechtsboven in de
 * regel, terwijl de productnaam de volle breedte houdt -- die twee lagen
 * over elkaar heen. Daarnaast had elke regel zowel Porto's kader met
 * radius als mijn onderrand, stonden prijs en aantal onder elkaar in
 * plaats van naast elkaar, en waren de stappers klein en vlak.
 * ===================================================================== */

/* Eén kader per regel in plaats van kader plus streep. */
.minicart-wrapper.minicart-offcanvas .minicart-items .product-item {
    padding: 10px;
    margin-bottom: 8px;
    border: 1px solid #e4e7ec;
    border-bottom: 1px solid #e4e7ec;
    border-radius: 10px;
    background: #fff;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item:last-child {
    margin-bottom: 0;
}

/* Foto in een eigen kadertje, net als in de zoeksuggesties. */
.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-photo {
    width: 56px !important;
    flex: 0 0 56px !important;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-image-container,
.minicart-wrapper.minicart-offcanvas .minicart-items .product-image-wrapper {
    width: 56px !important;
    height: 56px !important;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-image-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

/* De rechtermarge houdt de naam weg van de absoluut geplaatste kruisje. */
.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-name {
    padding-right: 34px;
    margin: 0;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-name a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    color: #101828;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-name a:hover {
    color: #0099d8;
}

/* Aantal links, regelprijs rechts, op één lijn. De DOM heeft ze in de
   omgekeerde volgorde, vandaar order. */
.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-pricing {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 10px;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty {
    order: 1;
    gap: 0;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-pricing .price-container {
    order: 2;
    margin-left: auto;
    text-align: right;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .price-container .price {
    color: #101828;
    font-size: 15px;
    font-weight: 700;
}

/* Stapper als één samengesteld veldje in plaats van drie losse blokjes. */
.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty .qty-changer,
.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty button {
    width: 28px !important;
    min-width: 28px !important;
    height: 30px !important;
    padding: 0 !important;
    border: 1px solid #dbe6ee;
    background: #fff;
    color: #475569;
    font-size: 15px;
    line-height: 1;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty button:first-child,
.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty .qty-changer:first-child {
    border-radius: 6px 0 0 6px;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty button:last-child,
.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty .qty-changer:last-child {
    border-radius: 0 6px 6px 0;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty button:hover,
.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty .qty-changer:hover {
    background: #f5f9fc;
    color: #0099d8;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty .item-qty {
    width: 34px !important;
    height: 30px !important;
    margin: 0 -1px;
    border: 1px solid #dbe6ee;
    border-radius: 0;
    background: #fff;
    color: #101828;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

/* Verwijderknop: rond, rustig grijs, rood bij hover. */
.minicart-wrapper.minicart-offcanvas .minicart-items .product-item .secondary {
    position: absolute;
    top: 0;
    right: 0;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item a.action.delete {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    border-radius: 50%;
    color: #98a2b3;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item a.action.delete:hover {
    background: #fef3f2;
    color: #d92d20;
}

/* Kopregel: aantal links, de twee tekstlinks rechts naast elkaar. */
.minicart-wrapper.minicart-offcanvas .block-content .total-count {
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid #eef0f3;
    margin-bottom: 12px;
}

.minicart-wrapper.minicart-offcanvas .block-content .items-total {
    color: #475569;
    font-size: 13px;
}

.minicart-wrapper.minicart-offcanvas .block-content .items-total .count {
    color: #101828;
    font-weight: 700;
}

.minicart-wrapper.minicart-offcanvas .block-content .total-count .actions,
.minicart-wrapper.minicart-offcanvas .block-content .total-count .actions .secondary {
    display: flex;
    align-items: center;
    gap: 12px;
    width: auto;
}

/* Subtotaal duidelijker dan de regelprijzen erboven. */
.minicart-wrapper.minicart-offcanvas .subtotal {
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #eef0f3;
}

.minicart-wrapper.minicart-offcanvas .subtotal .label {
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
}

.minicart-wrapper.minicart-offcanvas .subtotal .amount .price {
    color: #101828;
    font-size: 19px;
    font-weight: 700;
}

/* --- Correcties na meten in de drawer -------------------------------
 * 1. .secondary was 20px breed terwijl de knop erin 32px is; die stak
 *    daardoor 12px buiten het kaartje uit.
 * 2. Het label "Qty" nam 25px van de 176px brede detailkolom in,
 *    waardoor prijs en stapper samen niet meer pasten en de prijs over
 *    de rechterrand liep. Het label blijft in de DOM voor schermlezers,
 *    maar is visueel verborgen.
 * ------------------------------------------------------------------ */

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item .secondary {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty > label.label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .details-qty {
    flex: 0 0 auto;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-pricing .price-container {
    flex: 0 0 auto;
}

/* --- Breder en meer lucht --------------------------------------------
 * Porto zet de lade op 320px. Daar past een productnaam niet op een
 * regel en botsen de kaartjes bijna tegen elkaar. 400px geeft de naam
 * ruim 260px, zodat afkappen de uitzondering wordt in plaats van de
 * regel. De lade verbergt zich met translateX(105%), dus meegroeien is
 * veilig -- alleen het sluitkruisje van de overlay stond op een vaste
 * afstand van 330px en moet mee.
 * ------------------------------------------------------------------ */

.minicart-wrapper.minicart-offcanvas .block-minicart {
    width: min(400px, 92vw);
}

.minicart-wrapper.minicart-offcanvas .minicart-overlay svg {
    right: calc(min(400px, 92vw) + 12px);
}

/* Meer ruimte tussen de kaartjes; 8px liet ze bijna aan elkaar plakken. */
.minicart-wrapper.minicart-offcanvas .minicart-items .product-item {
    margin-bottom: 12px;
}

/* Kopregel op één regel houden: "3 producten" links, de twee links
   rechts. Ze wikkelden alle drie over twee regels. */
.minicart-wrapper.minicart-offcanvas .block-content .total-count {
    flex-wrap: nowrap;
    gap: 12px;
}

.minicart-wrapper.minicart-offcanvas .block-content .items-total,
.minicart-wrapper.minicart-offcanvas .block-content .total-count .actions .action {
    white-space: nowrap;
}

/* Porto zet deze regel in hoofdletters. "BEKIJK WINKELWAGEN" en
   "WINKELWAGEN DELEN" passen daardoor niet naast het aantal; in gewone
   schrijfwijze schelen ze samen ruim 60px en past alles op één regel. */
.minicart-wrapper.minicart-offcanvas .block-content .total-count,
.minicart-wrapper.minicart-offcanvas .block-content .total-count .actions .action,
.minicart-wrapper.minicart-offcanvas .block-content .items-total,
.minicart-wrapper.minicart-offcanvas .block-content .items-total span {
    text-transform: none;
    letter-spacing: 0;
}

.minicart-wrapper.minicart-offcanvas .block-content > .actions .action.viewcart,
.minicart-wrapper.minicart-offcanvas .block-content .action.sharecart {
    font-size: 12px;
}

/* Meer ruimte voor de naam nu de lade breder is. */
.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-name a {
    font-size: 13.5px;
}

/* Subtotaal: Magento hangt een dubbele punt aan het label via :after,
   die door de flexverdeling los vóór het bedrag belandde. */
.minicart-wrapper.minicart-offcanvas .subtotal .label:after {
    content: none;
}

.minicart-wrapper.minicart-offcanvas .subtotal .label {
    white-space: nowrap;
}

/* Op een telefoon is de lade 92vw en past de kopregel net niet: 306px
   tekst plus 24px tussenruimte tegen 319px beschikbaar. Iets minder
   zijmarge, kleinere tussenruimte en 11,5px tekst lost dat op zonder
   terug te vallen op twee regels. */
@media only screen and (max-width: 767px) {
    .minicart-wrapper.minicart-offcanvas .block-content {
        padding-left: 14px;
        padding-right: 14px;
    }

    .minicart-wrapper.minicart-offcanvas .block-minicart .block-title {
        padding-left: 14px;
        padding-right: 14px;
    }

    .minicart-wrapper.minicart-offcanvas .block-content .total-count {
        gap: 8px;
    }

    .minicart-wrapper.minicart-offcanvas .block-content > .actions .action.viewcart,
    .minicart-wrapper.minicart-offcanvas .block-content .action.sharecart,
    .minicart-wrapper.minicart-offcanvas .block-content .items-total {
        font-size: 11.5px;
    }
}

/* --- Derde ronde: strepen in plaats van kaders, prullenbak, compacter --
 * Kaders om elke regel maakten de lade onrustig; één streep onder elk
 * product is rustiger. Het kruisje wordt een prullenbak, en de 10px
 * tussen naam en aantal mocht minder.
 * ------------------------------------------------------------------ */

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item {
    padding: 12px 0;
    margin-bottom: 0;
    border: 0;
    border-bottom: 1px solid #eef0f3;
    border-radius: 0;
    background: transparent;
}

.minicart-wrapper.minicart-offcanvas .minicart-items .product-item:last-child {
    border-bottom: 0;
    padding-bottom: 4px;
}

/* Minder lucht tussen de productnaam en de aantalregel. */
.minicart-wrapper.minicart-offcanvas .minicart-items .product-item-pricing {
    margin-top: 4px;
}

/* Porto tekent hier een kruisje uit zijn eigen icoonfont. Dat wordt een
   prullenbak: de glyph gaat uit en de vorm komt uit een masker, zodat
   de kleur gewoon meeloopt met `color` (grijs, rood bij hover). */
.minicart-wrapper.minicart-offcanvas .minicart-items .product-item a.action.delete:before {
    content: '';
    display: block;
    width: 17px;
    height: 17px;
    font-size: 0;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4.5A1.5 1.5 0 0 1 9.5 3h5A1.5 1.5 0 0 1 16 4.5V6'/%3E%3Cpath d='M6.5 6l.8 13.1A1.5 1.5 0 0 0 8.8 20.5h6.4a1.5 1.5 0 0 0 1.5-1.4L17.5 6'/%3E%3Cpath d='M10 10.5v6M14 10.5v6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4.5A1.5 1.5 0 0 1 9.5 3h5A1.5 1.5 0 0 1 16 4.5V6'/%3E%3Cpath d='M6.5 6l.8 13.1A1.5 1.5 0 0 0 8.8 20.5h6.4a1.5 1.5 0 0 0 1.5-1.4L17.5 6'/%3E%3Cpath d='M10 10.5v6M14 10.5v6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Porto maakt van .secondary een zwevend wit knopje met een stevige
   slagschaduw. Dat paste bij de kaders, maar staat vlekkerig boven een
   simpele streep. Alleen het pictogram blijft over. */
.minicart-wrapper.minicart-offcanvas .minicart-items .product-item .secondary {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}
