/* 
 * Medical Equipment Cart Styles
 * Place this file in: your-child-theme/assets/css/medical-cart.css
 * Or add this CSS to your child theme's style.css
 */

/* ============================================
   CART CONTAINER
   ============================================ */
.medical-cart-container {
    background: #ffffff;
    border-radius: 0;
    margin: 0 0 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ============================================
   HEADER ROW
   ============================================ */
.medical-cart-header {
    display: grid;
    grid-template-columns: 1fr 150px 150px;
    gap: 30px;
    padding: 16px 20px;
    background: #ffffff;
    border-top: 2px solid #16A085;
    border-bottom: 1px solid #e5e5e5;
    font-size: 14px;
    font-weight: 400;
    color: #333333;
}

.medical-cart-header .header-col {
    display: flex;
    align-items: center;
}

.medical-cart-header .weight-col,
.medical-cart-header .quantity-col {
    justify-content: center;
}

/* ============================================
   CART ITEMS
   ============================================ */
.medical-cart-items {
    background: #ffffff;
}

.medical-cart-item {
    display: grid;
    grid-template-columns: 1fr 150px 150px;
    gap: 30px;
    padding: 24px 20px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

.medical-cart-item:last-child {
    border-bottom: none;
}

/* ============================================
   EQUIPMENT COLUMN
   ============================================ */
.equipment-col {
    display: flex;
    align-items: center;
    gap: 16px;
}

.product-image {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    border-radius: 4px;
    padding: 8px;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.product-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.product-details {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-size: 15px;
    font-weight: 400;
    color: #333333;
    line-height: 1.4;
    margin: 0 0 4px 0;
}

.product-name a {
    color: #333333;
    text-decoration: none;
}

.product-name a:hover {
    color: #16A085;
}

.product-meta {
    font-size: 13px;
    color: #666666;
    line-height: 1.3;
}

/* ============================================
   WEIGHT COLUMN
   ============================================ */
.weight-col {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #333333;
}

.weight-value {
    font-weight: 400;
}

/* ============================================
   QUANTITY COLUMN
   ============================================ */
.quantity-col {
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #d0d0d0;
    background: #ffffff;
    color: #333333;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.15s ease;
    font-weight: 400;
}

.qty-btn:hover {
    background: #f5f5f5;
    border-color: #999999;
}

.qty-btn:active {
    background: #e8e8e8;
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-controls input.qty {
    width: 45px;
    height: 24px;
    text-align: center;
    border: none;
    background: transparent;
    padding: 0;
    font-size: 14px;
    color: #333333;
    font-weight: 400;
    -moz-appearance: textfield;
}

.quantity-controls input.qty::-webkit-outer-spin-button,
.quantity-controls input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-controls input.qty:focus {
    outline: none;
}

/* Hide mobile labels on desktop */
.mobile-label {
    display: none;
}

/* ============================================
   CART ACTIONS (Hidden)
   ============================================ */
.cart-form-actions {
    display: none;
}

/* ============================================
   EMPTY CART MESSAGE
   ============================================ */
.cart-empty-message {
    padding: 60px 20px;
    text-align: center;
}

.cart-empty-message p {
    font-size: 16px;
    color: #666666;
    margin: 0;
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media screen and (max-width: 768px) {
    /* Hide header on mobile */
    .medical-cart-header {
        display: none;
    }
    
    /* Stack items vertically on mobile */
    .medical-cart-item {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px 16px;
    }
    
    /* Equipment column - keep horizontal */
    .equipment-col {
        gap: 12px;
    }
    
    .product-image {
        width: 60px;
        height: 60px;
    }
    
    .product-name {
        font-size: 14px;
    }
    
    .product-meta {
        font-size: 12px;
    }
    
    /* Weight and Quantity - show labels and align left */
    .weight-col,
    .quantity-col {
        justify-content: flex-start;
        gap: 8px;
    }
    
    .mobile-label {
        display: inline-block;
        font-weight: 600;
        font-size: 13px;
        color: #666666;
        min-width: 70px;
    }
    
    .weight-value {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .medical-cart-item {
        padding: 16px 12px;
    }
    
    .product-image {
        width: 50px;
        height: 50px;
    }
}

/* ============================================
   WOOCOMMERCE OVERRIDES
   ============================================ */

/* Remove default WooCommerce cart table styles */
.woocommerce-cart-form.medical-cart-form table.shop_table {
    display: none;
}

/* Style the proceed to checkout button if it appears in this section */
.wc-proceed-to-checkout .checkout-button {
    background: #16A085;
    color: #ffffff;
    padding: 14px 32px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wc-proceed-to-checkout .checkout-button:hover {
    background: #138871;
}

/* ============================================
   LOADING STATE
   ============================================ */
.medical-cart-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ============================================
   ADDITIONAL REFINEMENTS
   ============================================ */

/* Ensure proper box-sizing */
.medical-cart-container *,
.medical-cart-container *::before,
.medical-cart-container *::after {
    box-sizing: border-box;
}

/* Remove any default margins/padding from WooCommerce */
.woocommerce-cart-form.medical-cart-form {
    margin: 0;
    padding: 0;
}
