/**
 * Copyright © Kitup.com. All rights reserved.
 * Custom Cart Items Styles
 */

/* Custom Cart Item Container */
.custom-cart-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    background: #fff;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0;
    margin-bottom: 20px;
    align-items: center;
}

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

/* Quantity Selector Section */
.item-quantity-section {
    flex-shrink: 0;
    width: 110px;
    margin-top: 10px;
}

.qty-selector-box {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: space-between !important;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 20px;
    overflow: hidden;
    height: 35px;
    width: 110px;
}

.qty-btn {
    width: 35px !important;
    height: 35px !important;
    background: #fff;
    border: none !important;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    color: #000;
    transition: background 0.2s;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 35px !important;
    vertical-align: middle !important;
}

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

.qty-input-field {
    width: 40px !important;
    height: 35px !important;
    text-align: center !important;
    border: none !important;
    border-left: 1px solid #ccc !important;
    border-right: 1px solid #ccc !important;
    background: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #000 !important;
    -moz-appearance: textfield;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 35px !important;
    vertical-align: middle !important;
    display: inline-block !important;
    box-sizing: border-box !important;
}

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

/* Product Image Section */
.item-image-section {
    flex-shrink: 0;
    width: 150px;
}

.product-image-photo {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

/* Product Info Section */
.item-info-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-sku {
    color: #17A2F6 !important;
    font-size: 14px;
    font-weight: 500;
}

.product-name-wrapper {
    margin: 0;
}

.product-item-name {
    font-size: 18px;
    font-weight: 700 !important;
    color: #4b4848;
    line-height: 1.5;
    text-decoration: none;
    display: block;
}

.product-item-name:hover {
    color: #0066cc;
}

/* Shopping Basket Title Alignment */
.checkout-cart-index .page-title-wrapper .page-title,
.checkout-cart-index h1.page-title {
    text-align: left !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Promotion/Offer Section */
.product-promotion {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-bottom: 6px;
}

.promo-badge {
    background: #28a745;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    text-transform: uppercase;
}

.promo-text {
    color: #155724;
    font-size: 13px;
    line-height: 1.4;
}

/* Price and Remove Item Row */
.item-price-remove-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.product-price {
    font-size: 22px;
    font-weight: 700;
    color: #000;
}

.action-remove {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.action-remove:hover {
    color: #0066cc;
    text-decoration: underline;
}

/* Stock Status Row */
.product-status-row {
    margin-top: 8px;
}

.product-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.product-status.in-stock {
    color: #17A2F6 !important;
}

.product-status.out-of-stock {
    color: #dc3545;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.product-status.in-stock .status-dot {
    background: #17A2F6 !important;
}

.product-status.out-of-stock .status-dot {
    background: #dc3545;
}

/* Override default cart item table styling */
.checkout-cart-index .cart.table-wrapper {
    display: block !important;
}

.checkout-cart-index .cart.items {
    display: block !important;
}

/* Hide table header */
.checkout-cart-index .cart.table-wrapper thead,
.checkout-cart-index .cart.items thead,
.checkout-cart-index .cart thead {
    display: none !important;
}

/* Hide default table structure */
.checkout-cart-index .cart.table-wrapper table,
.checkout-cart-index .cart.items table {
    border: none !important;
    background: transparent !important;
}

.checkout-cart-index .cart.items tbody tr {
    display: block !important;
    border: none !important;
}

.checkout-cart-index .cart.items tbody td {
    display: block !important;
    border: none !important;
    padding: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .custom-cart-item {
        flex-direction: column;
    }
    
    .item-quantity-section {
        width: 100%;
    }
    
    .qty-selector-box {
        width: 100%;
    }
    
    .item-image-section {
        width: 100%;
    }
}
