/* Product Card Button Padding Fix */
/* Minimal fix for the 2 floated buttons in product cards */

/* Fix padding for the action buttons */
.product-card .actions .btn,
.product-card .actions .btn.style2 {
    padding: 8px 12px !important;
    margin: 0 5px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Ensure proper spacing between the 2 buttons */
.product-card .actions {
    gap: 10px !important;
}

/* Fix any margin issues */
.product-card .actions > * {
    margin: 0 !important;
}

/* Ensure icons are properly centered */
.product-card .actions .btn i,
.product-card .actions .btn.style2 i {
    margin: 0 !important;
    line-height: 1 !important;
}

/* Cart Page Button Fixes */
/* Fix Continue Shopping button - make text white always, not just on hover */
.continue-shopping {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
    border: 2px solid #28a745 !important;
}

.continue-shopping:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%) !important;
    color: white !important;
    border-color: #20c997 !important;
    text-decoration: none !important;
}

/* Quantity Controls Fix */
/* Fix quantity input visibility and button functionality */
.quantity-controls {
    display: flex !important;
    align-items: center !important;
    border: 2px solid #ddd !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    width: 130px !important;
    background: white !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.qty-input {
    border: none !important;
    width: 60px !important;
    height: 45px !important;
    text-align: center !important;
    font-weight: 700 !important;
    background: white !important;
    color: #000 !important;
    outline: none !important;
    font-size: 16px !important;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
}

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

.qty-btn {
    background: #f8f9fa !important;
    border: none !important;
    width: 35px !important;
    height: 45px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    color: #333 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    position: relative !important;
}

.qty-btn:hover {
    background: #28a745 !important;
    color: white !important;
    transform: scale(1.05) !important;
}

.qty-btn:active {
    transform: scale(0.95) !important;
    background: #1e7e34 !important;
}

.qty-btn.minus {
    border-right: 1px solid #ddd !important;
    border-radius: 10px 0 0 10px !important;
}

.qty-btn.plus {
    border-left: 1px solid #ddd !important;
    border-radius: 0 10px 10px 0 !important;
}

.qty-btn i {
    font-size: 14px !important;
    line-height: 1 !important;
}

/* Ensure quantity input is always visible and black text */
.qty-input:focus {
    border: none !important;
    outline: 2px solid #28a745 !important;
    outline-offset: -2px !important;
    background: white !important;
    color: #000 !important;
}

/* Additional specificity for black text */
input.qty-input,
input[name="qty[]"] {
    color: #000 !important;
    background: white !important;
    font-weight: 700 !important;
}

/* Override any conflicting styles */
.cart-area .qty-input,
.cart-wrapper .qty-input,
.item-quantity .qty-input {
    color: #000 !important;
    background: white !important;
    font-weight: 700 !important;
    font-size: 16px !important;
}

/* Enhanced button styling for better visibility */
.qty-btn.minus:before {
    content: "−" !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

.qty-btn.plus:before {
    content: "+" !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

.qty-btn i {
    display: none !important;
}

/* Checkout Payment Method Styling */
/* Enhanced UI for Cash on Delivery and Pay with Card */

.payment-method {
    margin: 20px 0 !important;
}

.payment-option {
    border: 3px solid #e9ecef !important;
    border-radius: 15px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    background: white !important;
    position: relative !important;
    overflow: hidden !important;
}

.payment-option::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent) !important;
    transition: left 0.5s ease !important;
}

.payment-option:hover::before {
    left: 100% !important;
}

.payment-option:hover {
    border-color: #28a745 !important;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.15) !important;
    transform: translateY(-2px) !important;
}

.payment-option.selected {
    border-color: #28a745 !important;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%) !important;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.2) !important;
    transform: translateY(-2px) !important;
}

.payment-option.selected::after {
    content: '✓' !important;
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    background: #28a745 !important;
    color: white !important;
    width: 25px !important;
    height: 25px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: bold !important;
    font-size: 14px !important;
}

.payment-option input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

.payment-option label {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 10px !important;
    cursor: pointer !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #333 !important;
    transition: color 0.3s ease !important;
}

.payment-option.selected label {
    color: #28a745 !important;
}

.payment-option label i {
    margin-right: 12px !important;
    font-size: 24px !important;
    width: 30px !important;
    text-align: center !important;
    color: #666 !important;
    transition: color 0.3s ease !important;
}

.payment-option.selected label i {
    color: #28a745 !important;
}

.payment-description {
    color: #666 !important;
    font-size: 14px !important;
    margin: 8px 0 15px 42px !important;
    line-height: 1.5 !important;
}

.payment-option.selected .payment-description {
    color: #555 !important;
}

/* Payment Cards Styling */
.payment-cards {
    display: flex !important;
    gap: 12px !important;
    margin-left: 42px !important;
    align-items: center !important;
}

.payment-card-logo {
    height: 32px !important;
    width: auto !important;
    border-radius: 6px !important;
    border: 1px solid #e0e0e0 !important;
    padding: 4px !important;
    background: white !important;
    transition: all 0.3s ease !important;
}

.payment-option.selected .payment-card-logo {
    border-color: #007bff !important;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1) !important;
}

/* CSS-based Payment Card Logos (fallback for missing images) */
.payment-cards::after {
    content: '' !important;
    display: flex !important;
    gap: 8px !important;
}

/* Create CSS-based card logos */
.payment-cards .payment-card-logo[alt="Visa"]::after,
.payment-cards .payment-card-logo[src*="visa"]::after {
    content: 'VISA' !important;
    display: inline-block !important;
    background: linear-gradient(135deg, #1a1f71 0%, #0f4c8c 100%) !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    font-weight: bold !important;
    font-size: 12px !important;
    letter-spacing: 1px !important;
    min-width: 45px !important;
    text-align: center !important;
}

.payment-cards .payment-card-logo[alt="Mastercard"]::after,
.payment-cards .payment-card-logo[src*="mastercard"]::after {
    content: 'MC' !important;
    display: inline-block !important;
    background: linear-gradient(135deg, #eb001b 0%, #f79e1b 100%) !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    font-weight: bold !important;
    font-size: 12px !important;
    letter-spacing: 1px !important;
    min-width: 45px !important;
    text-align: center !important;
}

.payment-cards .payment-card-logo[alt="Meeza"]::after,
.payment-cards .payment-card-logo[src*="meeza"]::after {
    content: 'MEEZA' !important;
    display: inline-block !important;
    background: linear-gradient(135deg, #00a651 0%, #00d4aa 100%) !important;
    color: white !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    font-weight: bold !important;
    font-size: 10px !important;
    letter-spacing: 1px !important;
    min-width: 45px !important;
    text-align: center !important;
}

/* Hide broken images and show CSS logos instead */
.payment-card-logo[src*="visa.png"],
.payment-card-logo[src*="mastercard.png"],
.payment-card-logo[src*="meeza.png"] {
    width: 0 !important;
    height: 0 !important;
    opacity: 0 !important;
    position: relative !important;
}

.payment-card-logo[src*="visa.png"]::before {
    content: 'VISA' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    display: inline-block !important;
    background: linear-gradient(135deg, #1a1f71 0%, #0f4c8c 100%) !important;
    color: white !important;
    padding: 8px 14px !important;
    border-radius: 6px !important;
    font-weight: bold !important;
    font-size: 12px !important;
    letter-spacing: 1px !important;
    min-width: 50px !important;
    text-align: center !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.payment-card-logo[src*="mastercard.png"]::before {
    content: 'MASTERCARD' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    display: inline-block !important;
    background: linear-gradient(135deg, #eb001b 0%, #f79e1b 100%) !important;
    color: white !important;
    padding: 8px 10px !important;
    border-radius: 6px !important;
    font-weight: bold !important;
    font-size: 10px !important;
    letter-spacing: 0.5px !important;
    min-width: 70px !important;
    text-align: center !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

.payment-card-logo[src*="meeza.png"]::before {
    content: 'MEEZA' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    display: inline-block !important;
    background: linear-gradient(135deg, #00a651 0%, #00d4aa 100%) !important;
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-weight: bold !important;
    font-size: 11px !important;
    letter-spacing: 1px !important;
    min-width: 55px !important;
    text-align: center !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

/* Cash on Delivery specific styling */
.payment-option:first-child label i {
    color: #28a745 !important;
}

.payment-option:first-child:hover,
.payment-option:first-child.selected {
    border-color: #28a745 !important;
}

/* Pay with Card specific styling */
.payment-option:nth-child(2) label i {
    color: #007bff !important;
}

.payment-option:nth-child(2):hover {
    border-color: #007bff !important;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.15) !important;
}

.payment-option:nth-child(2).selected {
    border-color: #007bff !important;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%) !important;
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.2) !important;
}

.payment-option:nth-child(2).selected label,
.payment-option:nth-child(2).selected label i {
    color: #007bff !important;
}

.payment-option:nth-child(2).selected::after {
    background: #007bff !important;
}
