/* ============================
   MAIN CART GRID
============================= */
.skye-cart-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 34px;
    max-width: 1320px;
    margin: 40px auto;
    padding: 0 18px;
}

@media (max-width: 960px) {
    .skye-cart-wrapper {
        grid-template-columns: 1fr;
        margin: 20px auto;
        padding: 0 8px;
    }
}

/* ============================
   LEFT TABLE WRAPPER
============================= */
.skye-cart-table {
    background: #1b1522;
    border-radius: 26px;
    box-shadow: 0 0 35px rgba(255,120,220,.09);
    padding: 24px 18px;
    overflow-x: auto;
}

.skye-cart-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 14px;
    table-layout: auto;
}

.skye-cart-table thead th {
    color: #ffbafc;
    font-size: 17px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid #4a255f44;
}

/* ============================
   CART ROW
============================= */
.lolli-cart-item {
    background: #18141f;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(255,182,255,.12);
}

.lolli-cart-item td {
    padding: 16px 10px;
    font-size: 16px;
    vertical-align: middle;
}

/* IMAGE */
.lolli-cart-image img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    display: block;
    background: #251b36;
    padding: 10px;
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(197,105,255,.25);
    transition: .2s;
}

.lolli-cart-image img:hover {
    transform: scale(1.04);
    box-shadow: 0 0 28px rgba(220,120,255,.45);
}

/* PRODUCT NAME */
.product-name a {
    color: #7de4ff;
    font-weight: 700;
    font-size: 17px;
    text-decoration: none;
    transition: .2s;
}
.product-name a:hover {
    color: #ff88e6;
}

/* QUANTITY */
.lolli-cart-qty .qty {
    width: 58px;
    height: 40px;
    border-radius: 10px;
    background: #231d31;
    border: 2px solid #c86bff;
    font-size: 16px;
    color: #fff;
    text-align: center;
    transition: .2s;
}

.qty:focus {
    border-color: #ff9cff;
    box-shadow: 0 0 12px rgba(255,148,255,.35);
}

/* REMOVE */
.lolli-cart-remove {
    color: #ff7cd8;
    font-size: 22px;
    font-weight: 900;
    transition: .2s;
    text-decoration: none;
}
.lolli-cart-remove:hover {
    color: #fff;
}

/* UPDATE BUTTON */
.lolli-cart-update {
    background: #ff9cff;
    border-radius: 14px;
    padding: 12px 20px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    color: #222;
    transition: .2s;
    box-shadow: 0 0 12px rgba(255,120,220,.15);
}

.lolli-cart-update:hover {
    background: #ff7cd8;
    color: #fff;
}

/* ============================
   CART TOTALS FIXED
============================= */
.skye-cart-totals {
    background: #241832;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 0 30px rgba(255,120,220,.12);
}

.skye-cart-totals h2 {
    color: #ffbbfd;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 18px;
    text-align: left;
}

/* TABLE INSIDE TOTALS */
.skye-cart-totals table {
    width: 100%;
    border-collapse: collapse;
}

.skye-cart-totals table tr {
    border-bottom: 1px solid #3d2a4a;
}

.skye-cart-totals table tr:last-child {
    border-bottom: none;
}

.skye-cart-totals th,
.skye-cart-totals td {
    padding: 12px 0;
    font-size: 16px;
    color: #f2eef5;
}

/* left text */
.skye-cart-totals th {
    font-weight: 600;
    color: #ffb6fa;
}

/* right text */
.skye-cart-totals td {
    text-align: right;
}

/* SHIPPING FIX */
.woocommerce-shipping-methods {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.woocommerce-shipping-methods li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffd9ff;
    font-size: 15px;
    padding: 6px 0;
}

.woocommerce-shipping-methods input[type=radio] {
    transform: scale(1.15);
    accent-color: #ff7cd8;
}

/* CHECKOUT BUTTON */
.wc-proceed-to-checkout a.checkout-button {
    display: block;
    width: 100%;
    background: linear-gradient(90deg, #ff9cff, #c07bff);
    padding: 16px 0;
    font-size: 20px;
    font-weight: 800;
    border-radius: 14px;
    color: #fff !important;
    text-align: center;
    transition: .2s;
    margin-top: 22px;
    box-shadow: 0 0 20px rgba(255,120,220,.25);
}

.wc-proceed-to-checkout a.checkout-button:hover {
    background: #ff7cd8;
    box-shadow: 0 0 26px rgba(255,120,220,.4);
}

/* ============================
   MOBILE CART
============================= */
@media (max-width: 768px) {

    .skye-cart-table {
        padding: 0;
        background: transparent;
    }

    .lolli-cart-item {
        display: grid;
        grid-template-columns: 90px 1fr;
        grid-template-rows: repeat(4, auto);
        gap: 6px;
        padding: 12px;
    }

    .product-remove {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .product-name {
        grid-column: 2;
        grid-row: 1;
        padding-left: 6px;
    }

    .product-price {
        grid-column: 2;
        grid-row: 2;
    }

    .product-quantity {
        grid-column: 2;
        grid-row: 3;
    }

    .product-subtotal {
        grid-column: 2;
        grid-row: 4;
    }

    .skye-cart-totals {
        padding: 16px 14px;
        border-radius: 16px;
    }

    .wc-proceed-to-checkout a.checkout-button {
        font-size: 18px;
        padding: 14px;
    }
}

@media (max-width: 800px) {

    /* ПЕРЕОПРЕДЕЛЯЕМ ПОВЕДЕНИЕ TR */
    .woocommerce-cart-form__cart-item,
    .shop_table.cart tr,
    .lolli-cart-item {
        display: grid !important;
        grid-template-columns: 90px 1fr;
        grid-template-rows: auto auto auto auto;
        align-items: start;
        background: #18141f;
        border-radius: 18px;
        padding: 12px;
        margin-bottom: 14px;
        width: 100%;
        height: auto !important;
    }

    /* ВАЖНО: отключаем table-row */
    .woocommerce-cart-form__cart-item,
    .shop_table.cart tr {
        display: block;
    }

    /* IMAGE */
    .product-thumbnail,
    .lolli-cart-image,
    .lolli-cart-prod > .lolli-cart-image {
        grid-row: 1 / span 4;
        grid-column: 1 / 2;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .product-thumbnail img {
        width: 85px !important;
        height: auto !important;
        border-radius: 12px;
        background: #27213d;
        padding: 8px;
    }

    /* NAME */
    .product-name {
        grid-column: 2 / 3;
        grid-row: 1;
        margin: 0;
        padding: 0 0 4px 12px;
        font-size: 16px;
        font-weight: 700;
    }

    /* REMOVE ICON RIGHT */
    .product-remove {
        position: absolute;
        top: 8px;
        right: 10px;
    }
    .product-remove a {
        font-size: 22px !important;
    }

    /* PRICE */
    .product-price {
        grid-column: 2;
        grid-row: 2;
        padding-left: 12px;
        margin-top: 4px;
        font-size: 15px;
    }

    /* QUANTITY */
    .product-quantity {
        grid-column: 2;
        grid-row: 3;
        padding-left: 12px;
        margin-bottom: 4px;
    }

    /* SUBTOTAL */
    .product-subtotal {
        grid-column: 2;
        grid-row: 4;
        padding-left: 12px;
        font-size: 15px;
        font-weight: 700;
        color: #ffd9ff;
    }

    /* FIX TD (remove stretching) */
    .woocommerce-cart-form__cart-item td {
        display: block !important;
        width: auto !important;
        height: auto !important;
        padding: 4px 0 !important;
    }
}

/* ============================
   DESKTOP CART PRODUCT IMAGE FIX
============================= */

@media (min-width: 801px) {

    .product-thumbnail,
    .lolli-cart-image,
    .lolli-cart-prod > .lolli-cart-image {
        width: 140px !important;
        min-width: 140px !important;
        max-width: 140px !important;
        text-align: center;
    }

    .product-thumbnail img,
    .lolli-cart-image img {
        width: 130px !important;
        height: 130px !important;
        object-fit: contain !important;
        border-radius: 14px;
        background: #27213d;
        padding: 10px;
        box-shadow: 0 0 24px rgba(197,105,255,0.23);
    }
}
