/* Breadcrumb */
.url-detail-title {
    padding: 12px 0 8px 0;
    margin-top: 0;
}

/* Cart Section - Reduce top padding */
.cart.section {
    padding-bottom: 20px;
}

@media (max-width: 768px) {
    .cart.section {
        padding-top: 0;
    }
    
    .url-detail-title {
        padding: 8px 0 4px 0;
    }
}

/* Fix header overlap - handled by .main-content-wrapper in master layout */
.url-detail-title .container p {
    margin-bottom: 0;
    font-size: 16px;
    color: #0F2A5F;
}
.url-detail-title .container p a {
    color: #1e5bb8;
    text-decoration: none;
}
.url-detail-title .container p a:hover {
    text-decoration: underline;
}

/* Cart Products Section */
.cart-products {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
}

/* Table Header */
.cart-table-header {
    display: grid;
    grid-template-columns: 40px 2fr 1fr 1.2fr 1fr;
    gap: 16px;
    padding: 16px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 700;
    font-size: 14px;
    color: #333;
    text-transform: uppercase;
}

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

.cart-header-product {
    grid-column: 2;
}

.cart-header-price {
    justify-content: flex-end;
}

.cart-header-qty {
    justify-content: center;
}

.cart-header-subtotal {
    justify-content: flex-end;
}

/* Products List */
.cart-products-list {
    padding: 0;
}

.cart-product-item {
    display: grid;
    grid-template-columns: 40px 2fr 1fr 1.2fr 1fr;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    align-items: center;
}

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

/* Remove Button */
.cart-product-remove {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f0f0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
    font-size: 12px;
}

.cart-remove-btn:hover {
    background: #e0e0e0;
    color: #dc3545;
}

/* Product Info */
.cart-product-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-product-image {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
    position: relative;
}

.cart-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-product-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    line-height: 1.5;
}

/* Price */
.cart-product-price {
    text-align: right;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

/* Quantity Controls */
.cart-product-qty {
    display: flex;
    justify-content: center;
}

.cart-qty-controls {
    display: inline-flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.cart-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-qty-btn:hover {
    background: #e0e0e0;
}

.cart-qty-input {
    width: 50px;
    height: 32px;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background: #fff;
}

/* Subtotal */
.cart-product-subtotal {
    text-align: right;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

/* Empty Cart */
.cart-empty {
    padding: 60px 20px;
    text-align: center;
    color: #999;
}

.cart-empty p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Action Buttons */
.cart-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.btn-continue-shopping {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #1e5bb8;
    border-radius: 4px;
    background: #ffffff;
    color: #1e5bb8;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-continue-shopping:hover {
    background: #1e5bb8;
    color: #ffffff;
    text-decoration: none;
}

.btn-update-cart {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    background: #17a2b8;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-update-cart:hover {
    background: #138496;
}

/* Cart Summary */
.cart-summary {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    position: sticky;
    top: 120px;
}

.cart-summary-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.cart-summary-content {
    margin-bottom: 20px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    color: #333;
}

.cart-summary-row:last-of-type {
    border-bottom: none;
}

.cart-summary-total {
    font-weight: 700;
    font-size: 16px;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 2px solid #e0e0e0;
}

.cart-summary-value {
    font-weight: 600;
    color: #333;
}

.cart-summary-total .cart-summary-value {
    font-size: 18px;
    font-weight: 700;
}

/* Checkout Button */
.btn-checkout {
    display: block;
    width: 100%;
    padding: 14px 20px;
    background: #0F2A5F;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.2s ease;
    margin-bottom: 20px;
}

.btn-checkout:hover {
    background: #1a3d7a;
    color: #ffffff;
    text-decoration: none;
}

.btn-checkout-disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-checkout-disabled:hover {
    background: #ccc;
}


/* Mobile Responsive */
@media (max-width: 768px) {
    .cart-table-header {
        display: none;
    }
    
    .cart-product-item {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
        position: relative;
    }
    
    .cart-product-remove {
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 10;
    }
    
    .cart-product-info {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        margin-top: 8px;
    }
    
    .cart-product-image {
        width: 100px;
        height: 100px;
        flex-shrink: 0;
    }
    
    .cart-product-name {
        flex: 1;
        font-size: 14px;
        line-height: 1.4;
    }
    
    .cart-product-price,
    .cart-product-qty,
    .cart-product-subtotal {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-top: 1px solid #e0e0e0;
        margin-top: 8px;
    }
    
    .cart-product-price::before {
        content: 'Giá: ';
        font-weight: 500;
        font-size: 14px;
    }
    
    .cart-product-qty::before {
        content: 'Số lượng: ';
        font-weight: 500;
        font-size: 14px;
    }
    
    .cart-product-subtotal::before {
        content: 'Tạm tính: ';
        font-weight: 500;
        font-size: 14px;
    }
    
    .cart-qty-controls {
        display: inline-flex;
    }
    
    .cart-qty-btn {
        min-width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .cart-qty-input {
        width: 60px;
        height: 36px;
        font-size: 14px;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn-continue-shopping,
    .btn-update-cart {
        width: 100%;
    }
    
    .cart-summary {
        position: static;
        margin-top: 24px;
    }
}
