/*
========================================================
GDJ Mini Cart Drawer — Layout & Interaction Styles
--------------------------------------------------------
Purpose:
Defines structure, animation, and visual styling
for the WooCommerce AJAX mini cart drawer.

Includes:
- Slide-in drawer panel
- Scrollable product list
- Product row layout & removal animation
- Subtotal and action buttons
- Empty state handling
- Custom scrollbar styling

Version: 1.0
========================================================
*/

/* ===== DRAWER ===== */

.gdj-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 28em;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -0.5em 0 2em rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.gdj-cart-drawer.active {
    transform: translateX(0);
}


/* ===== INNER WRAPPER ===== */

.gdj-cart-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1em;
    min-height: 0;
}


/* ===== MINI CART ===== */

.gdj-mini-cart {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}


/* ===== PRODUCT LIST (SCROLL AREA) ===== */

.gdj-cart-items {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}


/* ===== PRODUCT ROW ===== */

.gdj-cart-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #eeeeee;
    transition: all 0.35s ease;
    overflow: hidden;
}

/* Smooth remove animation */
.gdj-cart-row.removing {
    opacity: 0;
    transform: translateX(20px);
    height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
}


/* ===== THUMB ===== */

.gdj-thumb img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 14px;
    display: block;
}


/* ===== PRODUCT INFO ===== */

.gdj-info {
    flex: 1;
    min-width: 0;
}

.gdj-title {
    font-weight: 500;
    font-size: 15px;
    color: #111111;
    text-decoration: none;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    max-height: 2.6em;
}

.gdj-title:hover {
    color: #135266;
}

.gdj-meta {
    font-size: 14px;
    color: #777777;
}

.gdj-line-total {
    margin-top: 4px;
    font-weight: 500;
    font-size: 14px;
}


/* ===== REMOVE BUTTON ===== */

.gdj-cart-remove {
    background: #135266;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.gdj-cart-remove:hover {
    background: #0780A5;
    transform: translateY(-1px);
}

.gdj-cart-remove:active {
    transform: translateY(0);
}


/* ===== FOOTER ===== */

.gdj-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 2px solid #eeeeee;
}

.gdj-footer.hidden {
    display: none;
}


/* ===== SUBTOTAL ===== */

.gdj-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    margin-bottom: 16px;
}


/* ===== BUTTON ROW ===== */

.gdj-buttons {
    display: flex;
    gap: 12px;
}


/* ===== ACTION BUTTONS ===== */

.gdj-cart-btn {
    flex: 1;
    background: #135266;
    color: #ffffff;
    padding: 13px 0;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: background 0.2s ease, transform 0.15s ease;
}

.gdj-cart-btn:hover {
    background: #0780A5;
    transform: translateY(-1px);
    color: white;
}

.gdj-cart-btn:active {
    transform: translateY(0);
}


/* ===== EMPTY STATE ===== */

.gdj-empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 16px;
    color: #777777;
    padding: 40px 10px;
}


/* ===== SCROLLBAR ===== */

.gdj-cart-items::-webkit-scrollbar {
    width: 6px;
}

.gdj-cart-items::-webkit-scrollbar-thumb {
    background: #dddddd;
    border-radius: 10px;
}

.gdj-cart-items::-webkit-scrollbar-thumb:hover {
    background: #cccccc;
}


/* ===== CLOSE BUTTON ===== */

#cartClose {
    width: 65px;
    margin-top: 0.5em;
}