/* Slide-out Mini Cart Drawer Stylesheet */

.cg-mini-cart-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    visibility: hidden;
    transition: visibility 0.4s ease;
}

.cg-mini-cart-drawer.active {
    visibility: visible;
}

.cg-mini-cart-drawer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(6, 13, 25, 0.4);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cg-mini-cart-drawer.active .cg-mini-cart-drawer-overlay {
    opacity: 1;
}

.cg-mini-cart-drawer-content {
    position: absolute;
    top: 0;
    right: -450px;
    width: 400px;
    max-width: 100%;
    height: 100%;
    background-color: #ffffff;
    box-shadow: -10px 0 30px rgba(6, 13, 25, 0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cg-mini-cart-drawer.active .cg-mini-cart-drawer-content {
    right: 0;
}

.cg-mini-cart-drawer-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
}

.cg-mini-cart-drawer-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #154683;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.5px;
}

.cg-mini-cart-drawer-close {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: 300;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.cg-mini-cart-drawer-close:hover {
    color: #ef4444;
    transform: rotate(90deg);
}

.cg-mini-cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.cg-mini-cart-drawer-body .widget_shopping_cart_content {
    height: 100%;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Custom Mini Cart Items List */
.cg-mini-cart-drawer-body ul.cart_list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.cg-mini-cart-drawer-body ul.cart_list li {
    position: relative;
    padding: 15px 0 15px 75px;
    min-height: 80px;
    border-bottom: 1px solid #f1f5f9;
    margin: 0;
}

.cg-mini-cart-drawer-body ul.cart_list li:last-child {
    border-bottom: none;
}

.cg-mini-cart-drawer-body ul.cart_list li img {
    position: absolute;
    top: 15px;
    left: 0;
    width: 60px !important;
    height: 60px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
}

.cg-mini-cart-drawer-body ul.cart_list li a.remove {
    position: absolute;
    top: 15px;
    right: 0;
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    background-color: #f1f5f9;
    color: #64748b !important;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.cg-mini-cart-drawer-body ul.cart_list li a.remove:hover {
    background-color: #ef4444;
    color: #ffffff !important;
}

.cg-mini-cart-drawer-body ul.cart_list li a:not(.remove) {
    display: block;
    font-weight: 700;
    color: #154683;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.35;
    margin-bottom: 6px;
    padding-right: 25px;
    font-family: 'Outfit', 'Inter', sans-serif;
}

.cg-mini-cart-drawer-body ul.cart_list li a:not(.remove):hover {
    color: #6DC05A;
}

.cg-mini-cart-drawer-body ul.cart_list li .quantity {
    display: block;
    font-size: 13px;
    color: #64748b;
    font-family: 'Inter', sans-serif;
}

.cg-mini-cart-drawer-body ul.cart_list li .quantity .amount {
    font-weight: 700;
    color: #6DC05A;
}

/* Total & Buttons */
.cg-mini-cart-drawer-body .total {
    margin-top: auto;
    padding-top: 20px;
    border-top: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    color: #334155;
}

.cg-mini-cart-drawer-body .total strong {
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.cg-mini-cart-drawer-body .total .amount {
    font-size: 20px;
    font-weight: 800;
    color: #6DC05A;
}

.cg-mini-cart-drawer-body .buttons {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cg-mini-cart-drawer-body .buttons a.button {
    display: block !important;
    text-align: center !important;
    padding: 14px 20px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    font-family: 'Outfit', sans-serif;
}

.cg-mini-cart-drawer-body .buttons a.button.checkout {
    background-color: #6DC05A !important;
    color: #ffffff !important;
    border: 2px solid #6DC05A !important;
    box-shadow: 0 4px 14px rgba(109, 192, 90, 0.25) !important;
}

.cg-mini-cart-drawer-body .buttons a.button.checkout:hover {
    background-color: #154683 !important;
    border-color: #154683 !important;
    box-shadow: 0 4px 14px rgba(21, 70, 131, 0.25) !important;
    transform: translateY(-2px) !important;
}

.cg-mini-cart-drawer-body .buttons a.button:not(.checkout) {
    background-color: transparent !important;
    color: #154683 !important;
    border: 2px solid #154683 !important;
}

.cg-mini-cart-drawer-body .buttons a.button:not(.checkout):hover {
    background-color: #154683 !important;
    color: #ffffff !important;
}

/* Empty Cart View */
.cg-mini-cart-drawer-body .woocommerce-mini-cart__empty-message {
    text-align: center;
    padding: 40px 0;
    font-size: 16px;
    color: #64748b;
    font-family: 'Inter', sans-serif;
}

/* Body lock on cart open */
body.cg-mini-cart-open {
    overflow: hidden !important;
}

@media (max-width: 480px) {
    .cg-mini-cart-drawer-content {
        width: 100%;
        right: -100%;
    }
}
