/* --- Box Interiors Mini Cart --- */
.box-mini-cart {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    z-index: 999999;
    pointer-events: none; /* Let clicks pass through when closed */
    font-family: var(--e-global-typography-primary-font-family), "AeonikPro", Sans-serif;
}

/* Backdrop */
.box-cart-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s;
}

/* The Panel */
.box-cart-panel {
    position: absolute;
    top: 0;
    right: -500px; /* Hidden */
    width: 100%;
    max-width: 480px; /* Matches the wide look */
    height: 100%;
    background: #ECECEC; /* Light Grey background from screenshot */
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: auto;
    box-shadow: -5px 0 20px rgba(0,0,0,0.05);
}
.svg[Attributes="true"] {
    
    stroke: none;
}
/* OPEN STATE */
.box-mini-cart.open { pointer-events: auto; }
.box-mini-cart.open .box-cart-backdrop { opacity: 1; }
.box-mini-cart.open .box-cart-panel { right: 0; }

/* --- HEADER --- */
.box-cart-header {
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-title {
    font-size: 16px;
    text-transform: uppercase;
    color: black;
}
.cart-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}
.print-trigger {
    font-size: 12px;
    text-transform: uppercase;
    color: black;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
.print-trigger:hover { border-color: black; }
.close-cart {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* --- ITEMS --- */
.box-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.box-cart-item {
    background: #f4f4f4; /* Grey Card */
    border: 1px solid #D1D1D1; /* Grey Border */
    display: flex;
    padding: 0;
    min-height: 150px;
    height: auto !important;
    align-items: stretch !important;
}

.item-image {
    width: 150px;
    flex: 0 0 150px;
    border-right: 1px solid #D1D1D1;
    display: flex;
    align-items: center;
    justify-content: center;
    
}
svg[Attributes],button { color:#000; stroke:#000;}

.item-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

.item-details {
    flex: 1 1 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    height: auto !important;
    min-height: 150px;
    box-sizing: border-box;
}

/* Top Row: Title + Price */
.item-row-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 12px;
}
.item-title {
    font-weight: 400;
    font-size: 14px;
    text-transform: uppercase;
    color: black;
    text-decoration: none;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.item-price {
    font-size: 14px;
    color: black;
    flex-shrink: 0;
    text-align: right;
}

/* Meta: Attributes + Delivery */
.item-meta {
    font-size: 11px;
    text-transform: uppercase;
    color: #555;
    line-height: 1.4;
    margin-bottom: 15px;
    overflow-wrap: anywhere;
    word-break: normal;
}
.item-attrs,
.item-delivery {
    overflow-wrap: anywhere;
}

/* Bottom: Qty + Remove */
.item-row-bot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    position: static !important;
    width: 100%;
}
.qty-selector {
    display: flex;
    gap: 10px;
    font-size: 14px;
    color: black;
    font-weight: 400;
}
.qty-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 0 5px;
    color: #888;
}
.qty-btn:hover { color: black; }

.item-remove {
    font-size: 11px;
    text-transform: uppercase;
    color: #666;
    text-decoration: none;
    flex-shrink: 0;
}
.item-remove:hover { color: black; }


/* --- FOOTER --- */
.box-cart-footer {
    padding: 30px 40px;
    background: #EBEBEB;
    border-top: 1px solid #D1D1D1;
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.btn-checkout {
    display: block;
    width: 100%;
    background: black;
    color: white!important;
    text-align: center;
    padding: 15px 0;
    text-transform: uppercase;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid black;
    border-radius: 0;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.box-mini-cart .btn-checkout:hover,
.box-mini-cart .btn-checkout:focus {
    background-color: #ECECEC !important;
    border: 1px solid #000 !important;
    color: black !important;
    opacity: 1;
}

.elementor-menu-cart__footer-buttons .elementor-button--checkout {
    background-color: #000 !important;
    color: #fff !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.elementor-menu-cart__footer-buttons .elementor-button--checkout:hover,
.elementor-menu-cart__footer-buttons .elementor-button--checkout:focus,
.box-mini-cart .elementor-button--checkout:hover,
.box-mini-cart .elementor-button--checkout:focus {
    background-color: #ECECEC !important;
    border: 1px solid #000 !important;
    color: #000 !important;
    opacity: 1 !important;
}

.elementor-menu-cart__footer-buttons .elementor-button--checkout:hover .elementor-button-text,
.elementor-menu-cart__footer-buttons .elementor-button--checkout:focus .elementor-button-text {
    color: #000 !important;
}

/* Empty state */
.empty-cart-msg {
    text-align: center;
    margin-top: 50px;
    font-size: 14px;
    text-transform: uppercase;
}

/* Mobile */
@media (max-width: 480px) {
    .box-cart-panel { max-width: 100%; }
    .box-cart-header, .box-cart-items, .box-cart-footer { padding-left: 20px; padding-right: 20px; }
    .box-cart-item { min-height: auto; }
    .item-image { width: 100px; flex-basis: 100px; }
}


/* =======================================================
   CART PRINT PREVIEW LIGHTBOX
   ======================================================= */

body.cart-print-open { overflow: hidden; }

/* Full-screen black overlay – shown via .active class */
#cart-lightbox {
    display: flex;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s, visibility 0.25s;
    position: fixed;
    inset: 0;
    z-index: 9999999;
    background: #000;
    overflow: hidden;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 40px 20px;
}

#cart-lightbox.active {
    visibility: visible;
    opacity: 1;
}

/* A4 page stack wrapper – sized to fill viewport height at A4 ratio (210:297) */
#lightbox-wrapper {
    position: relative;
    flex-shrink: 0;
    height: calc(100vh - 100px);
    width: calc((100vh - 100px) * 0.7071);
    max-height: 840px;
    max-width: 594px;
}

/* Each printed page – absolutely fills the wrapper */
.lightbox-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    padding: 5.5% 7%;
    box-sizing: border-box;
    font-family: var(--e-global-typography-primary-font-family), "AeonikPro", Arial, sans-serif;
    font-size: 1.4vh;
    color: #000;
    overflow: hidden;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.6);
}

/* ---- PRINT HEADER ---- */
.print-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.5%;
    border-bottom: 1px solid #000;
    margin-bottom: 0;
}

.pr-header-logo img {
    display: block;
    height: 2.2vh;
    max-height: 22px;
    width: auto;
}

.pr-header-address h2 {
    font-size: 1.4vh;
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.3px;
    color: #000;
}

/* ---- PRINT ITEMS ---- */
.print-items { /* no extra styles needed */ }

.print-cart-item {
    border-bottom: 1px solid #d8d8d8;
    padding: 1.8% 0 0 0;
	margin-bottom:20px;
}

.print-col1 {
    display: flex;
    align-items: flex-end;
    gap: 0;
}

.print-image {
    width: 19%;
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-right: 2%;
}

.print-image .image-div {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    line-height: 0;
    border-left: 1px solid #d8d8d8;
	 border-right: 1px solid #d8d8d8;
	 border-top: 1px solid #d8d8d8;
}

.print-image .image-div img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.print-product-details-row {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 0;
}

.print-product-col1 {
    flex: 1;
    padding-right: 2%;
}

.print-product-name {
    font-size: 1.2vh;
    font-weight: 400;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 0.6%;
    line-height: 1.3;
}

.print-product-qty {
    font-size: 1.2vh;
    text-transform: uppercase;
    color: #000;
}

.print-product-details {
    flex: 1.6;
    padding: 0 2%;
    font-size: 1.2vh;
    text-transform: uppercase;
    color: #555;
    line-height: 1.7;
}

.print-product-variations { margin-bottom: 0.5%; }

.print-product-totals {
    padding-left: 2%;
    text-align: right;
    font-size: 1.2vh;
    text-transform: uppercase;
    color: #000;
    line-height: 1.9;
    white-space: nowrap;
    min-width: 18%;
}

/* ---- PRINT FOOTER ---- */
.print-footer {
    position: absolute;
    bottom: 5.5%;
    left: 7%;
    right: 7%;
    padding-bottom: 1.5%;
    border-bottom: 1px solid #d8d8d8;
    font-size: 1.1vh;
    text-transform: uppercase;
    color: #555;
    line-height: 1.3;
}

/* ---- NAVIGATION ARROWS ---- */
#pr-arrow-left,
#pr-arrow-right {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 12px;
    opacity: 0.45;
    transition: opacity 0.2s;
    flex-shrink: 0;
    line-height: 1;
    font-family: Arial, sans-serif;
}

#pr-arrow-left:hover,
#pr-arrow-right:hover { opacity: 1; }

/* ---- RIGHT PANEL (arrow + controls) ---- */
#lightbox-right-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-shrink: 0;
    width: 180px;
    height: calc(100vh - 100px);
    max-height: 840px;
}

#pr-arrow-right {
    flex: 1;
    display: flex;
    align-items: center;
}

/* ---- LIGHTBOX CONTROLS ---- */
.lightbox-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: auto;
}

.lightbox-controls button {
    border: none !important;
    border-radius: 0 !important;
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 14px 16px !important;
    cursor: pointer;
    font-family: var(--e-global-typography-primary-font-family), "AeonikPro", Arial, sans-serif;
    transition: background 0.2s;
    text-align: left;
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

#save-pdf {
    background: #e8e4dc !important;
    color: #000 !important;
}

#save-pdf:hover {
    background: #ddd9d0 !important;
}

#close-lightbox {
    background: #d8d4cb !important;
    color: #000 !important;
}

#close-lightbox:hover {
    background: #cec9c0 !important;
}

#save-pdf:disabled {
    opacity: 0.6;
    cursor: wait;
}

@media (max-width: 700px) {
    #cart-lightbox {
        flex-direction: column;
        gap: 16px;
        padding: 20px 10px;
    }
    #lightbox-wrapper {
        height: auto;
        width: calc(100vw - 40px);
        max-width: none;
        max-height: none;
        aspect-ratio: 210 / 297;
    }
    .lightbox-content {
        font-size: 3vw;
    }
    #pr-arrow-left { display: none !important; }
    #lightbox-right-panel {
        flex-direction: row;
        width: 100%;
        justify-content: center;
    }
    .lightbox-controls {
        flex-direction: row;
    }
    .print-footer {
        position: static;
        margin-top: 2%;
    }
}
