/* =========================================================
   PREMIUM SHOPPING CART DRAWER
   Existing Blade Structure Supported
========================================================= */


/* =========================================================
   01. CART DRAWER
========================================================= */

.modal-shopping-cart {
    width: 430px !important;
    max-width: 100%;

    height: 100dvh;
    max-height: 100dvh;

    background: #fff;

    border: 0;

    overflow: hidden;

    z-index: 9999999 !important;
}


/* Bootstrap Offcanvas */

.modal-shopping-cart.offcanvas {
    width: 430px;
    max-width: 100%;

    height: 100dvh;
}


/* =========================================================
   02. CART HEADER
========================================================= */

.modal-shopping-cart .offcanvas-header {
    flex: 0 0 auto;

    min-height: 70px;

    padding: 16px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: #fff;

    border-bottom: 1px solid #ededed;
}


/* Title */

.modal-shopping-cart .offcanvas-title {
    margin: 0;

    font-size: 23px;
    line-height: 1.2;

    font-weight: 700;

    color: #111;

    letter-spacing: -0.5px;
}


/* Close button */

.modal-shopping-cart .cart-close {
    width: 44px;
    height: 44px;

    padding: 0;

    border: 0;
    outline: 0;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f5f5f5;

    color: #111;

    font-size: 21px;

    transition:
        background .25s ease,
        color .25s ease,
        transform .25s ease;
}


.modal-shopping-cart .cart-close:hover {
    background: #111;
    color: #fff;

    transform: rotate(90deg);
}


.modal-shopping-cart .cart-close:focus {
    outline: none;
    box-shadow: none;
}


/* =========================================================
   03. OFFCANVAS BODY
========================================================= */

.modal-shopping-cart .offcanvas-body {

    width: 100%;

    height: calc(100dvh - 70px);
    max-height: calc(100dvh - 70px);

    padding: 0 !important;

    display: flex;
    flex-direction: column;

    overflow: hidden !important;

    background: #fff;

    min-height: 0;
}


/* =========================================================
   04. MAIN WRAPPER

   Existing structure:

   .wrap
      #freeGiftSection
      .tf-mini-cart-wrap

========================================================= */

.modal-shopping-cart .wrap {

    width: 100%;
    height: 100%;

    min-height: 0;

    display: flex;
    flex-direction: column;

    flex: 1 1 auto;

    overflow: hidden;
}


/* =========================================================
   05. FREE GIFT SECTION

   IMPORTANT:
   We DO NOT move this from App.blade.php.

   It stays above the product scrolling area.
========================================================= */

.modal-shopping-cart #freeGiftSection {

    width: 100%;

    flex: 0 0 auto;

    background: #fff;

    position: relative;

    z-index: 2;
}


/* Remove accidental spacing */

.modal-shopping-cart #freeGiftSection>* {
    box-sizing: border-box;
}


/* =========================================================
   06. MINI CART WRAPPER

   This takes ALL remaining available height.
========================================================= */

.modal-shopping-cart .tf-mini-cart-wrap {

    width: 100%;

    flex: 1 1 auto;

    min-height: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;
}


/* =========================================================
   07. PRODUCT MAIN AREA

   This area receives remaining height.
========================================================= */

.modal-shopping-cart .tf-mini-cart-main {

    width: 100%;

    flex: 0 0 auto;

    min-height: 0;

    height: auto;

    overflow: visible;

    display: flex;
    flex-direction: column;
}


/* =========================================================
   08. PRODUCT SCROLL AREA

   ONLY PRODUCT LIST SCROLLS.
========================================================= */

.modal-shopping-cart .tf-mini-cart-sroll {
    width: 100%;

    flex: none;
    min-height: auto;
    height: auto;

    overflow: visible;

    padding: 6px 16px 24px;
}


/* =========================================================
   09. CUSTOM SCROLLBAR
========================================================= */

.modal-shopping-cart .tf-mini-cart-sroll::-webkit-scrollbar {
    width: 5px;
}


.modal-shopping-cart .tf-mini-cart-sroll::-webkit-scrollbar-track {
    background: transparent;
}


.modal-shopping-cart .tf-mini-cart-sroll::-webkit-scrollbar-thumb {

    background: #d0d0d0;

    border-radius: 50px;
}


.modal-shopping-cart .tf-mini-cart-sroll::-webkit-scrollbar-thumb:hover {

    background: #999;
}


/* =========================================================
   10. CART PRODUCT CARD
========================================================= */

.modal-shopping-cart .tf-mini-cart-item {

    width: 100%;

    display: flex;
    align-items: center;

    gap: 14px;

    padding: 13px;

    margin: 0 0 12px;

    background: #fff;

    border: 1px solid #e9e9e9;

    border-radius: 16px;

    box-sizing: border-box;

    transition:
        border-color .25s ease,
        box-shadow .25s ease,
        transform .25s ease;
}


/* Last product */

.modal-shopping-cart .tf-mini-cart-item:last-child {
    margin-bottom: 0;
}


/* Hover */

.modal-shopping-cart .tf-mini-cart-item:hover {

    border-color: #dcdcdc;

    box-shadow:
        0 8px 22px rgba(0, 0, 0, .055);

    transform: translateY(-1px);
}


/* =========================================================
   11. PRODUCT IMAGE
========================================================= */

.modal-shopping-cart .tf-mini-cart-image {

    width: 88px;
    height: 88px;

    flex: 0 0 88px;

    overflow: hidden;

    border-radius: 13px;

    background: #f7f7f7;

    border: 1px solid #eeeeee;
}


.modal-shopping-cart .tf-mini-cart-image img {

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .35s ease;
}


.modal-shopping-cart .tf-mini-cart-item:hover .tf-mini-cart-image img {

    transform: scale(1.05);
}


/* =========================================================
   12. PRODUCT INFORMATION
========================================================= */

.modal-shopping-cart .tf-mini-cart-info {

    flex: 1 1 auto;

    min-width: 0;

    width: 100%;
}


/* =========================================================
   13. PRODUCT TITLE
========================================================= */

.modal-shopping-cart .text-title {

    min-width: 0;

    margin: 0 0 7px;
}


.modal-shopping-cart .text-title .link {

    display: block;

    width: 100%;

    color: #111;

    font-size: 16px;

    line-height: 1.35;

    font-weight: 600;

    text-decoration: none;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    transition: color .2s ease;
}


.modal-shopping-cart .text-title .link:hover {

    color: #555;
}


/* =========================================================
   14. PRODUCT VARIANTS
========================================================= */

.modal-shopping-cart .text-secondary-2 {

    color: #777;

    font-size: 12px;

    line-height: 1.55;

    font-weight: 400;
}


.modal-shopping-cart .text-secondary-2>div {

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================================
   15. QUANTITY × PRICE
========================================================= */

.modal-shopping-cart .text-button {

    flex-shrink: 0;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 2px;

    min-height: 34px;

    padding: 6px 11px;

    background: #f7f7f7;

    border-radius: 30px;

    color: #111;

    font-size: 13px;

    font-weight: 600;

    line-height: 1;

    white-space: nowrap;
}


.modal-shopping-cart .text-button .qua {

    color: #111;

    font-weight: 700;
}


.modal-shopping-cart .text-button .price {

    color: #111;

    font-weight: 600;
}


/* =========================================================
   16. REMOVE BUTTON
========================================================= */

.modal-shopping-cart .remove-item {

    width: 30px;
    height: 30px;

    min-width: 30px;

    padding: 0 !important;

    margin: 0;

    border: 0;

    border-radius: 50%;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #dc3545;

    color: #fff;

    font-size: 13px;

    line-height: 1;

    transition:
        background .25s ease,
        transform .25s ease;
}


.modal-shopping-cart .remove-item:hover {

    background: #c82333;

    transform: rotate(90deg);
}


/* =========================================================
   17. FIX PRODUCT INFO ROWS
========================================================= */

.modal-shopping-cart .tf-mini-cart-info .d-flex {

    min-width: 0;
}


.modal-shopping-cart .tf-mini-cart-info .d-flex .text-title {

    min-width: 0;
}


/* =========================================================
   18. CART BOTTOM

   Fixed checkout section.
========================================================= */

.modal-shopping-cart .tf-mini-cart-bottom {

    width: 100%;

    flex: 0 0 auto;

    min-height: 0;

    margin: 0 !important;

    padding: 14px 16px 15px;

    background: #fff;

    border-top: 1px solid #ededed;

    box-shadow:
        0 -8px 25px rgba(0, 0, 0, .045);

    position: relative;

    z-index: 20;
}


/* =========================================================
   19. BOTTOM CONTENT
========================================================= */

.modal-shopping-cart .tf-mini-cart-bottom-wrap {

    width: 100%;

    display: flex;

    flex-direction: column;

    gap: 10px;
}


/* =========================================================
   20. SUBTOTAL
========================================================= */

.modal-shopping-cart .tf-cart-totals-discounts {

    width: 100%;

    min-height: 48px;

    padding: 11px 15px;

    margin: 0;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    background: #f7f7f7;

    border-radius: 13px;

    box-sizing: border-box;
}


.modal-shopping-cart .tf-cart-totals-discounts h5 {

    margin: 0;

    color: #111;

    font-size: 15px;

    line-height: 1.2;

    font-weight: 600;
}


.modal-shopping-cart .tf-cart-totals-discounts .tf-totals-total-value {

    font-size: 17px;

    font-weight: 700;

    white-space: nowrap;
}


/* =========================================================
   21. TERMS
========================================================= */

.modal-shopping-cart .tf-cart-checkbox {

    width: 100%;

    display: flex;

    align-items: flex-start;

    gap: 7px;

    margin: 0;

    color: #777;

    font-size: 12px;

    line-height: 1.5;
}


.modal-shopping-cart .tf-cart-checkbox label {

    margin: 0;

    cursor: pointer;

    color: #777;
}


.modal-shopping-cart .tf-cart-checkbox a {

    color: #111;

    font-weight: 600;

    text-decoration: none;
}


.modal-shopping-cart .tf-cart-checkbox a:hover {

    text-decoration: underline;
}


/* =========================================================
   22. BUTTON AREA
========================================================= */

.modal-shopping-cart .tf-mini-cart-view-checkout {

    width: 100%;

    display: flex;

    flex-direction: column;

    gap: 8px;
}


/* Both buttons */

.modal-shopping-cart .tf-mini-cart-view-checkout .tf-btn {

    width: 100%;

    min-height: 46px;

    height: 46px;

    padding: 0 15px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 11px;

    font-size: 14px;

    line-height: 1;

    font-weight: 600;

    text-decoration: none;

    box-sizing: border-box;

    transition:
        background .25s ease,
        color .25s ease,
        border-color .25s ease,
        transform .25s ease,
        box-shadow .25s ease;
}


/* =========================================================
   23. VIEW CART BUTTON
========================================================= */

.modal-shopping-cart .tf-mini-cart-view-checkout .btn-white {

    background: #fff !important;

    border: 1px solid #dcdcdc !important;

    color: #111 !important;
}


.modal-shopping-cart .tf-mini-cart-view-checkout .btn-white:hover {

    background: #f7f7f7 !important;

    border-color: #cfcfcf !important;

    color: #111 !important;

    transform: translateY(-1px);
}


/* =========================================================
   24. CHECKOUT BUTTON
========================================================= */

.modal-shopping-cart .tf-mini-cart-view-checkout .btn-fill {

    width: 100%;

    height: 50px;

    min-height: 50px;

    background: #111 !important;

    border: 1px solid #111 !important;

    color: #fff !important;

    border-radius: 11px;

    font-size: 15px;

    font-weight: 600;

    display: flex;

    align-items: center;

    justify-content: center;

    text-decoration: none;
}


.modal-shopping-cart .tf-mini-cart-view-checkout .btn-fill:hover {

    background: #000 !important;

    border-color: #000 !important;

    color: #fff !important;

    transform: translateY(-1px);

    box-shadow:
        0 7px 18px rgba(0, 0, 0, .13);
}


.modal-shopping-cart .tf-mini-cart-view-checkout .btn-fill .text {

    color: #fff !important;

    opacity: 1 !important;

    visibility: visible !important;
}


/* =========================================================
   25. CONTINUE SHOPPING
========================================================= */

.modal-shopping-cart .tf-mini-cart-bottom .text-center {

    width: 100%;

    margin: 0;

    padding: 1px 0 0;
}


.modal-shopping-cart .tf-mini-cart-bottom .text-center .link {

    display: inline-block;

    color: #777;

    font-size: 12px;

    line-height: 1.3;

    font-weight: 500;

    text-decoration: none;

    transition: color .2s ease;
}


.modal-shopping-cart .tf-mini-cart-bottom .text-center .link:hover {

    color: #111;
}


/* =========================================================
   26. EMPTY CART
========================================================= */

.modal-shopping-cart .empty-message {

    width: 100%;

    min-height: 300px;

    padding: 40px 20px !important;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    color: #777;

    font-size: 14px;

    line-height: 1.6;
}


.modal-shopping-cart .empty-message::before {

    content: "🛒";

    width: 72px;
    height: 72px;

    margin-bottom: 18px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f6f6f6;

    font-size: 32px;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, .04);
}


.modal-shopping-cart .empty-message .btn-line {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    margin-top: 18px;

    padding: 11px 24px;

    border-radius: 50px;

    background: #111;

    color: #fff;

    font-size: 13px;

    font-weight: 600;

    text-decoration: none;

    transition:
        background .25s ease,
        transform .25s ease;
}


.modal-shopping-cart .empty-message .btn-line:hover {

    background: #000;

    color: #fff;

    transform: translateY(-2px);
}


/* =========================================================
   27. GENERAL LINKS
========================================================= */

.modal-shopping-cart a {

    transition: all .25s ease;
}


/* =========================================================
   28. PREVENT CONTENT OVERFLOW
========================================================= */

.modal-shopping-cart,
.modal-shopping-cart *,
.modal-shopping-cart *::before,
.modal-shopping-cart *::after {

    box-sizing: border-box;
}


/* =========================================================
   29. MOBILE - 767PX
========================================================= */

@media (max-width: 767px) {

    /* Drawer */

    .modal-shopping-cart {

        width: 100% !important;
        max-width: 100%;

        height: 100dvh;
        max-height: 100dvh;
    }


    /* Header */

    .modal-shopping-cart .offcanvas-header {

        min-height: 64px;

        height: 64px;

        padding: 12px 18px;
    }


    .modal-shopping-cart .offcanvas-title {

        font-size: 21px;

        letter-spacing: -0.4px;
    }


    .modal-shopping-cart .cart-close {

        width: 40px;
        height: 40px;

        font-size: 19px;
    }


    /* Body */

    .modal-shopping-cart .offcanvas-body {

        height: calc(100dvh - 64px);

        max-height: calc(100dvh - 64px);
    }


    /* Product scroll */

    .modal-shopping-cart .tf-mini-cart-sroll {

        padding:

            5px 12px 20px;
    }


    /* Product card */

    .modal-shopping-cart .tf-mini-cart-item {

        gap: 11px;

        padding: 11px;

        margin-bottom: 10px;

        border-radius: 15px;
    }


    /* Product image */

    .modal-shopping-cart .tf-mini-cart-image {

        width: 72px;
        height: 72px;

        flex: 0 0 72px;

        border-radius: 12px;
    }


    /* Product title */

    .modal-shopping-cart .text-title .link {

        font-size: 15px;

        line-height: 1.3;
    }


    /* Variant */

    .modal-shopping-cart .text-secondary-2 {

        font-size: 11px;

        line-height: 1.45;
    }


    /* Price */

    .modal-shopping-cart .text-button {

        min-height: 32px;

        padding: 5px 9px;

        font-size: 12px;
    }


    /* Remove */

    .modal-shopping-cart .remove-item {

        width: 29px;
        height: 29px;

        min-width: 29px;

        font-size: 12px;
    }


    /* Bottom */

    .modal-shopping-cart .tf-mini-cart-bottom {

        padding:

            11px 13px calc(11px + env(safe-area-inset-bottom));
    }


    .modal-shopping-cart .tf-mini-cart-bottom-wrap {

        gap: 8px;
    }


    /* Subtotal */

    .modal-shopping-cart .tf-cart-totals-discounts {

        min-height: 46px;

        padding: 10px 13px;

        border-radius: 12px;
    }


    .modal-shopping-cart .tf-cart-totals-discounts h5 {

        font-size: 14px;
    }


    .modal-shopping-cart .tf-cart-totals-discounts .tf-totals-total-value {

        font-size: 17px;
    }


    /* Terms */

    .modal-shopping-cart .tf-cart-checkbox {

        font-size: 11px;

        line-height: 1.45;
    }


    /* Buttons */

    .modal-shopping-cart .tf-mini-cart-view-checkout {

        gap: 7px;
    }


    .modal-shopping-cart .tf-mini-cart-view-checkout .tf-btn {

        height: 44px;

        min-height: 44px;

        border-radius: 10px;

        font-size: 13px;
    }


    .modal-shopping-cart .tf-mini-cart-view-checkout .btn-fill {

        height: 48px;

        min-height: 48px;

        font-size: 14px;
    }


    /* Continue shopping */

    .modal-shopping-cart .tf-mini-cart-bottom .text-center .link {

        font-size: 11px;
    }


    /* Empty cart */

    .modal-shopping-cart .empty-message {

        min-height: 260px;

        padding: 30px 18px !important;

        font-size: 13px;
    }


    .modal-shopping-cart .empty-message::before {

        width: 65px;
        height: 65px;

        font-size: 29px;

        margin-bottom: 15px;
    }

}


/* =========================================================
   30. VERY SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .modal-shopping-cart .offcanvas-title {

        font-size: 19px;
    }


    .modal-shopping-cart .offcanvas-header {

        padding-left: 15px;
        padding-right: 15px;
    }


    .modal-shopping-cart .tf-mini-cart-sroll {

        padding-left: 10px;
        padding-right: 10px;
    }


    .modal-shopping-cart .tf-mini-cart-item {

        gap: 9px;

        padding: 9px;
    }


    .modal-shopping-cart .tf-mini-cart-image {

        width: 65px;
        height: 65px;

        flex-basis: 65px;
    }


    .modal-shopping-cart .text-title .link {

        font-size: 14px;
    }


    .modal-shopping-cart .text-button {

        padding: 5px 8px;

        font-size: 11px;
    }


    .modal-shopping-cart .tf-mini-cart-bottom {

        padding-left: 10px;
        padding-right: 10px;
    }

}


/* =========================================================
   31. DESKTOP LARGE SCREEN
========================================================= */

@media (min-width: 768px) {

    .modal-shopping-cart .tf-mini-cart-sroll {

        padding-left: 16px;
        padding-right: 16px;
    }


    .modal-shopping-cart .tf-mini-cart-bottom {

        padding-left: 16px;
        padding-right: 16px;
    }

}


/* =========================================================
   32. ACCESSIBILITY
========================================================= */

.modal-shopping-cart button:focus,
.modal-shopping-cart a:focus {

    outline: none;
}


.modal-shopping-cart button:focus-visible,
.modal-shopping-cart a:focus-visible {

    outline: 2px solid #111;

    outline-offset: 2px;
}


/* =========================================================
   33. IOS / MOBILE HEIGHT FIX
========================================================= */

@supports (-webkit-touch-callout: none) {

    .modal-shopping-cart {

        height: -webkit-fill-available;

        max-height: -webkit-fill-available;
    }

    .modal-shopping-cart .offcanvas-body {

        height: calc(100dvh - 64px);

        max-height: calc(100dvh - 64px);
    }

}


/* =========================================================
   34. REDUCE MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .modal-shopping-cart *,
    .modal-shopping-cart *::before,
    .modal-shopping-cart *::after {

        transition: none !important;

        animation: none !important;
    }

}

/* =========================================================
   ONLY FREE GIFT + CART CONTENT SCROLLS
========================================================= */

.modal-shopping-cart .free-gift-cart-wrap {
    width: 100%;

    flex: 1 1 auto;
    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;

    scrollbar-width: thin;
    scrollbar-color: #c9c9c9 transparent;
}


/* Chrome / Edge / Safari scrollbar */

.modal-shopping-cart .free-gift-cart-wrap::-webkit-scrollbar {
    width: 5px;
}

.modal-shopping-cart .free-gift-cart-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.modal-shopping-cart .free-gift-cart-wrap::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 50px;
}

.modal-shopping-cart .free-gift-cart-wrap::-webkit-scrollbar-thumb:hover {
    background: #999;
}