
/* ============ Ginechip Cart Page Fixes ============ */

/* Cart block layout - ensure left-right split */
.wc-block-cart {
    display: flex !important;
    flex-wrap: wrap;
    gap: 32px;
    align-items: flex-start;
}

/* Left side - cart items */
.wc-block-cart .wc-block-cart-items,
.wc-block-cart .wc-block-cart__main,
.wc-block-cart .wc-block-cart-items__wrapper {
    flex: 1 1 620px;
    min-width: 0;
}

/* Right side - totals */
.wc-block-cart .wc-block-cart__sidebar,
.wc-block-cart .wc-block-cart-totals {
    flex: 0 1 380px;
    position: sticky;
    top: 20px;
}

/* Cart line items table */
.wc-block-cart-items__row {
    display: grid !important;
    grid-template-columns: 80px 1fr auto auto 32px !important;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 8px;
    background: #fff;
}

.wc-block-cart-items__header {
    display: none !important;
}

/* Product image */
.wc-block-cart-items__row .wc-block-cart-item__image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f9fafb;
}

.wc-block-cart-items__row .wc-block-cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product info */
.wc-block-cart-items__row .wc-block-cart-item__product {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.wc-block-cart-items__row .wc-block-components-product-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
    line-height: 1.35;
    word-break: break-word;
}

.wc-block-cart-items__row .wc-block-components-product-name:hover {
    color: #7c3aed;
}

.wc-block-cart-items__row .wc-block-cart-item__pricing {
    font-size: 12px;
    color: #6b7280;
}

/* Quantity */
.wc-block-cart-items__row .wc-block-components-quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.wc-block-cart-items__row .wc-block-components-quantity-selector button {
    width: 32px;
    height: 34px;
    border: none;
    background: #f9fafb;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s;
}

.wc-block-cart-items__row .wc-block-components-quantity-selector button:hover {
    background: #ede9fe;
    color: #7c3aed;
}

.wc-block-cart-items__row .wc-block-components-quantity-selector input {
    width: 44px;
    height: 34px;
    border: none;
    border-left: 1px solid #d1d5db;
    border-right: 1px solid #d1d5db;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    -moz-appearance: textfield;
}

.wc-block-cart-items__row .wc-block-components-quantity-selector input::-webkit-outer-spin-button,
.wc-block-cart-items__row .wc-block-components-quantity-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Line total */
.wc-block-cart-items__row .wc-block-cart-item__total {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    text-align: right;
    min-width: 70px;
}

/* Remove button */
.wc-block-cart-items__row .wc-block-cart-item__remove-link {
    width: 30px;
    height: 30px;
    border: none;
    background: none;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.12s;
    padding: 0;
    font-size: 16px;
    text-decoration: none;
}

.wc-block-cart-items__row .wc-block-cart-item__remove-link:hover {
    background: rgba(239,68,68,0.08);
    color: #dc2626;
}

/* Totals sidebar */
.wc-block-cart__sidebar .wc-block-components-totals-wrapper,
.wc-block-cart .wc-block-cart-totals {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

/* Proceed to checkout button */
.wc-block-cart .wc-block-cart__submit-container .wc-block-components-button {
    background: #7c3aed !important;
    color: #fff !important;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 8px;
    width: 100%;
    text-align: center;
    font-size: 15px;
    border: none;
    transition: all 0.15s;
}

.wc-block-cart .wc-block-cart__submit-container .wc-block-components-button:hover {
    background: #6d28d9 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124,58,237,0.3);
}

/* Coupon form */
.wc-block-cart .wc-block-components-totals-coupon {
    margin-bottom: 16px;
}

.wc-block-cart .wc-block-components-totals-coupon input {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    width: 100%;
}

/* Empty cart */
.wc-block-cart__empty-cart__title {
    font-size: 20px;
    color: #374151;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-block-cart-items__row {
        grid-template-columns: 48px 1fr auto !important;
        gap: 8px;
        padding: 12px;
    }
    
    .wc-block-cart-items__row .wc-block-cart-item__image {
        width: 48px;
        height: 48px;
    }
    
    .wc-block-cart {
        gap: 20px;
    }
    
    .wc-block-cart .wc-block-cart__sidebar {
        flex: 1 1 100%;
        position: static;
    }
}
