/* 
========================================================
GDJ Standalone Cart Page — Clean Flex Layout
--------------------------------------------------------
Purpose:
Stable desktop + mobile layout.
Delete button aligned right using flexbox.
No absolute positioning.
No overlay hacks.
========================================================
*/

/* ================================
   WRAPPER
================================ */

.gdj-cart-wrapper {
    max-width:1200px;
}

/* ================================
   CART ROW (GRID STRUCTURE)
================================ */

.gdj-cart-row {
    display:grid;
    grid-template-columns:120px 1fr;
    gap:2em;
    align-items:start;
    padding:2em 0;
    border-bottom:1px solid #eee;
    transition:.3s ease;
}

.gdj-cart-row.removing {
    opacity:0;
    transform:translateX(40px);
}

/* ================================
   IMAGE
================================ */

.gdj-cart-image img {
    width:120px;
    border-radius:16px;
    display:block;
}

/* ================================
   MAIN COLUMN
================================ */

.gdj-cart-main {
    display:flex;
    flex-direction:column;
    gap:.8em;
    width:100%;
    min-width:0;
}

/* ================================
   HEADER ROW (TITLE + DELETE)
================================ */

.gdj-cart-header-row {
    display:flex;
    align-items:flex-start;
    width:100%;
    gap:1em;
}

.gdj-cart-name {
    flex:1 1 auto;
    text-decoration:none;
    font-weight:500;
    color:#111;
    font-size:1.1em;
    line-height:1.3;
    min-width:0;
}

.gdj-cart-name:hover {
    color:#135266;
}

.gdj-cart-remove {
    flex:0 0 auto;
    width:40px;
    height:40px;
    border:none;
    border-radius:10px;
    background:#135266;
    color:#fff;
    cursor:pointer;
    transition:.2s ease;
}

.gdj-cart-remove:hover {
    background:#0780A5;
}

/* ================================
   PRICE
================================ */

.gdj-cart-price {
    font-weight:500;
}

/* ================================
   META (QTY + SUBTOTAL)
================================ */

.gdj-cart-meta {
    display:flex;
    align-items:center;
    gap:2em;
}

/* ================================
   QTY CONTROLS
================================ */

.gdj-cart-qty {
    display:flex;
    align-items:center;
    gap:8px;
}

.gdj-qty {
    width:55px;
    text-align:center;
    padding:8px;
    border-radius:10px;
    border:1px solid #ddd;
    background:#f7f7f7;
    font-weight:500;
    pointer-events:none; /* disables manual editing */
}

.gdj-qty-minus,
.gdj-qty-plus {
    width:36px;
    height:36px;
    border:none;
    border-radius:10px;
    background:#eee;
    color:black;
    cursor:pointer;
    font-size:18px;
    line-height:1;
    transition:.2s ease;
    display:flex;
    align-items:center;
    justify-content:center;
}

.gdj-qty-minus:hover,
.gdj-qty-plus:hover {
    background:#0780A5;
    color: white;
}

.gdj-cart-subtotal {
    display:flex;
    gap:10px;
}

/* ================================
   SUMMARY
================================ */

.gdj-cart-summary {
    margin-top:2em;
    margin-bottom:2em;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

/* ================================
   PROCEED BLOCK (CHECKBOX + BUTTON)
================================ */

.gdj-cart-proceed {
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:.8em;
}

/* Terms label */
.gdj-terms-label {
    display:flex;
    align-items:center;
    gap:.5em;
    font-size:.9em;
    color:#444;
    cursor:pointer;
}

.gdj-terms-label input[type="checkbox"] {
    width:18px;
    height:18px;
    accent-color:#135266;
    cursor:pointer;
    flex-shrink:0;
}

.gdj-terms-label a {
    color:#135266;
    text-decoration:underline;
}

.gdj-terms-label a:hover {
    color:#0780A5;
}

/* Checkout button — active state */
.gdj-cart-checkout {
    background:#135266;
    color:#fff;
    padding:12px 18px;
    border-radius:12px;
    text-decoration:none;
    transition:.2s ease;
}

.gdj-cart-checkout:hover {
    background:#0780A5;
}

/* Checkout button — disabled state (checkbox not ticked) */
.gdj-checkout-disabled {
    background:#bbb !important;
    pointer-events:none;
    cursor:not-allowed;
}

.gdj-cart-empty {
    text-align:center;
}

/* ================================
   FULL HEIGHT PAGE
================================ */

body {
    min-height:100vh;
}

body .wp-site-blocks {
    min-height:100vh;
    display:flex;
    flex-direction:column;
}

body .wp-site-blocks > main {
    flex:1;
}

/* ================================
   MOBILE
================================ */

@media (max-width:768px){

    .gdj-cart-row {
        grid-template-columns:100px 1fr;
        gap:1em;
    }

    .gdj-cart-image img {
        width:100px;
    }

    .gdj-cart-meta {
        flex-direction:column;
        align-items:flex-start;
        gap:1em;
    }

    .gdj-cart-summary {
        flex-direction:column;
        align-items:flex-start;
        gap:1.5em;
        margin-top:1em;
        margin-bottom:1em;
    }

    .gdj-cart-proceed {
        align-items:flex-start;
        width:100%;
    }

    .gdj-cart-checkout {
        width:100%;
        text-align:center;
    }

    .gdj-cart-name {
        display:-webkit-box;
        -webkit-line-clamp:3;
        -webkit-box-orient:vertical;
        overflow:hidden;
    }

    .gdj-cart-qty {
        gap:10px;
    }

    .gdj-qty-minus,
    .gdj-qty-plus {
        width:40px;
        height:40px;
    }
}