
/* ==========================================================
   ELEGANT DRIVING ACADEMY
   WOOCOMMERCE SLIDING CART DRAWER

   File: assets/css/cart-drawer.css

   Brand Blue: #234084
   Brand Red:  #DC2C1D

   Cart layout, products, summary, buttons and responsive CSS
   ========================================================== */


/* ==========================================================
   1. CART DRAWER CONTAINER
   ========================================================== */

.cart-ttt {
    position: fixed;
    top: 0;
    left: 100%;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    z-index: 1000;
    visibility: hidden;
}

.cart-ttt,
.cart-ttt * {
    box-sizing: border-box;
}

.cart-inner-div {
    background: #f1f1f1;
    margin-left: auto;
    z-index: 1000;
    right: 0;
    width: 30vw;
    top: 0;
    left: 100%;
    height: 100vh;
    height: 100dvh;
}

.cart-ttt .woocommerce {
    padding: 10px;
}


/* ==========================================================
   2. CART CLOSE BUTTON
   ========================================================== */

.cross-icon-elegent {
    position: fixed;
    top: 2px;
    right: 10px;
    cursor: pointer;
}

.cross-icon-elegent i {
    font-size: 1.5rem;
}


/* ==========================================================
   3. CART PRODUCT LIST
   ========================================================== */

.cart-ttt .eda-mini-cart-products {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.cart-ttt .eda-mini-cart-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid #e2e8f2;
    border-radius: 12px;
    background: #ffffff;
}

.cart-ttt .eda-mini-cart-image,
.cart-ttt .eda-mini-cart-info {
    min-width: 0;
}

.cart-ttt .eda-mini-cart-image img {
    display: block;
    width: 76px !important;
    height: 76px !important;
    max-width: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.cart-ttt .eda-mini-cart-name,
.cart-ttt .eda-mini-cart-name a {
    color: #234084 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.4;
    text-decoration: none !important;
    overflow-wrap: anywhere;
}

.cart-ttt .eda-mini-cart-price {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: nowrap;
    white-space: nowrap;
    margin-top: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.cart-ttt .eda-mini-cart-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #fff0ee;
    color: #DC2C1D !important;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none !important;
}

.cart-ttt .eda-mini-cart-remove:hover {
    background: #DC2C1D;
    color: #ffffff !important;
}


/* ==========================================================
   4. CART SUMMARY
   ========================================================== */

.cart-ttt .eda-mini-cart-summary {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #e2e8f2;
    border-radius: 12px;
    background: #ffffff;
}

.cart-ttt .eda-mini-cart-summary h3 {
    margin: 0 0 15px;
    color: #234084;
    font-size: 21px;
    font-weight: 700;
}

.cart-ttt .eda-mini-cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f2;
    color: #334155;
    font-size: 14px;
}

.cart-ttt .eda-mini-cart-summary-row strong {
    text-align: right;
    font-weight: 600;
}

.cart-ttt .eda-mini-cart-summary-row:last-child {
    border-bottom: none;
}

.cart-ttt .eda-mini-cart-total {
    color: #234084;
    font-size: 17px;
    font-weight: 700;
}


/* ==========================================================
   5. VIEW CART / CHECKOUT BUTTONS
   ========================================================== */

.cart-ttt .eda-drawer-buttons {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.cart-ttt .eda-drawer-btn {
    display: block !important;
    width: 100% !important;
    padding: 13px 8px !important;
    border-radius: 8px !important;
    background: #234084 !important;
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-align: center !important;
    text-decoration: none !important;
}

.cart-ttt .eda-drawer-btn:hover {
    background: #DC2C1D !important;
    color: #ffffff !important;
}


/* ==========================================================
   6. EMPTY CART
   ========================================================== */

.cart-ttt .eda-drawer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 15px;
    padding: 45px 10px 25px;
    background: #ffffff;
}

.cart-ttt .eda-drawer-empty > i {
    color: #234084;
    font-size: 48px;
}

.cart-ttt .eda-drawer-empty h3 {
    color: #234084;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.cart-ttt .eda-drawer-empty p {
    color: #64748b;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

.cart-ttt .eda-drawer-empty a {
    display: block;
    width: 100%;
    padding: 14px 16px;
    background: #234084;
    color: #ffffff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.cart-ttt .eda-drawer-empty a:hover {
    background: #DC2C1D;
    color: #ffffff;
}


/* ==========================================================
   7. CART ICON AND ITEM COUNT
   ========================================================== */

.cart-elegent-mobile-menu-upper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    z-index: 999;
}

.cart-elegent-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-left: auto;
    position: relative;
    cursor: pointer;
}

.cart-elegent-bars i {
    font-size: 20px;
    color: #ffffff;
}

.subscript-count-1 {
    position: relative;
}

.subscript-count {
    position: absolute;
    top: -10px;
    left: 23px;
    background: #234084;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 13px;
    padding-bottom: 2px;
}


/* ==========================================================
   8. LEGACY CART CONTENT COMPATIBILITY
   ========================================================== */

.cart-elegent-mobile-menu-lower-2
img.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail {
    width: 130px !important;
    object-fit: cover !important;
}

.cart-ttt .product-name {
    font-size: 14px;
    line-height: 10px;
    font-weight: 600;
}

.cart-elegent-mobile-menu-lower-2
.shop_table.shop_table_responsive.cart.woocommerce-cart-form__contents {
    padding-right: 16px !important;
}

.cart-elegent-mobile-menu-lower-2
.woocommerce table.shop_table th {
    padding: 9px 3px !important;
}

.cart-elegent-mobile-menu-lower-2
span.woocommerce-Price-amount.amount {
    display: block !important;
}

.cart-elegent-mobile-menu-lower-2
.woocommerce-notices-wrapper {
    margin: 10px !important;
}

.cart-elegent-mobile-menu-lower-2
.woocommerce-cart-form {
    margin-top: 27px;
}


/* ==========================================================
   9. MOBILE AND TABLET CART DRAWER
   ========================================================== */

@media (max-width: 992px) {

    .cart-ttt .cart-inner-div {
        background: #ffffff !important;
        overflow-y: auto;
    }

    .cart-ttt .eda-cart-drawer-content {
        padding: 60px 20px 25px !important;
    }

    .cart-ttt .cross-icon-elegent {
        z-index: 100020 !important;
    }
}


/* ==========================================================
   10. MOBILE CART
   ========================================================== */

@media (max-width: 768px) {

    .cart-inner-div {
        width: 93vw !important;
        padding: 10px;
    }

    .cart-elegent-bars i {
        font-size: 20px;
        color: #254286 !important;
    }

    .cart-elegent-mobile-menu-upper {
        top: 2.5rem !important;
        right: 5rem !important;
        z-index: 999;
        position: absolute !important;
    }
}


/* ==========================================================
   11. MOBILE PRODUCT CARDS
   ========================================================== */

@media (max-width: 767px) {

    .cart-ttt .eda-mini-cart-item {
        grid-template-columns: 65px minmax(0, 1fr) 30px;
        gap: 10px;
        padding: 12px;
    }

    .cart-ttt .eda-mini-cart-image img {
        width: 65px !important;
        height: 65px !important;
    }

    .cart-ttt .eda-mini-cart-name,
    .cart-ttt .eda-mini-cart-name a {
        font-size: 14px !important;
    }

    .cart-ttt .eda-mini-cart-summary {
        padding: 16px;
    }

    .cart-ttt .eda-drawer-buttons {
        gap: 10px;
    }
}


/* ==========================================================
   12. DESKTOP CART ICON
   ========================================================== */

@media (min-width: 1024px) {

    header > .cart-elegent-mobile-menu-upper {
        position: fixed !important;
        top: 0 !important;
        right: 3% !important;
        height: 46px !important;
        width: 38px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transform: none !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 100 !important;
    }

    header > .cart-elegent-mobile-menu-upper
    .cart-elegent-bars {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 38px !important;
        height: 46px !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}


/* ==========================================================
   END OF CART DRAWER STYLESHEET
   ========================================================== */
