/**
 * PRODUCT CARD FIXES - Alignment & Price Overflow Issues
 * Fixes price overflow and card alignment in Related Products section
 */

/* Price Section Fix - Prevent Overflow */
.product-card .product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 32px;
}

/* Ensure price text doesn't overflow */
.product-card .price-sale,
.product-card .price-current,
.product-card .price-original {
    white-space: nowrap;
    font-size: 1.125rem;
    font-weight: 700;
}

.product-card .price-sale {
    color: #9333ea;
}

.product-card .price-original {
    color: #9ca3af;
    text-decoration: line-through;
    font-size: 0.875rem;
    font-weight: 400;
}

/* Card Width Fix - Ensure consistent sizing */
.product-card {
    min-width: 240px;
    max-width: 100%;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card-inner:hover {
    border-color: #9333ea;
    box-shadow: 0 8px 24px rgba(147, 51, 234, 0.12);
    transform: translateY(-4px);
}

/* Product Content Area */
.product-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Product Actions - Buttons */
.product-actions {
    display: flex !important;
    gap: 8px !important;
    margin-top: auto !important;
    padding-top: 0.5rem !important;
}

.product-actions .btn,
.product-actions button {
    padding: 0.625rem 1rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    font-family: inherit !important;
}

/* ===== ORDER NOW BUTTON - SOLID PURPLE (NO GRADIENT) ===== */
.product-actions .btn-order,
.product-actions .btn-primary.btn-order,
.product-actions button.btn-order,
.product-actions .btn.btn-order,
.product-card .product-actions .btn-order,
.product-card-inner .product-actions .btn-order {
    background: #9333ea !important;
    background-color: #9333ea !important;
    background-image: none !important;
    color: white !important;
    border: none !important;
    flex: 1 !important;
    min-height: 40px !important;
}

.product-actions .btn-order:hover,
.product-actions .btn-primary.btn-order:hover,
.product-actions button.btn-order:hover,
.product-actions .btn.btn-order:hover,
.product-card .product-actions .btn-order:hover,
.product-card-inner .product-actions .btn-order:hover {
    background: #7e22ce !important;
    background-color: #7e22ce !important;
    background-image: none !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3) !important;
}

/* ===== CART ICON BUTTON - LIGHT PURPLE BACKGROUND (NO GRADIENT) ===== */
.product-actions .btn-cart-icon,
.product-actions .btn-primary.btn-cart-icon,
.product-actions button.btn-cart-icon,
.product-actions .btn.btn-cart-icon,
.product-card .product-actions .btn-cart-icon,
.product-card-inner .product-actions .btn-cart-icon {
    background: rgba(147, 51, 234, 0.1) !important;
    background-color: rgba(147, 51, 234, 0.1) !important;
    background-image: none !important;
    color: #9333ea !important;
    border: 1px solid rgba(147, 51, 234, 0.2) !important;
    padding: 0.625rem !important;
    min-width: 42px !important;
    max-width: 42px !important;
    flex: 0 0 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.product-actions .btn-cart-icon:hover,
.product-actions .btn-primary.btn-cart-icon:hover,
.product-actions button.btn-cart-icon:hover,
.product-actions .btn.btn-cart-icon:hover,
.product-card .product-actions .btn-cart-icon:hover,
.product-card-inner .product-actions .btn-cart-icon:hover {
    background: #9333ea !important;
    background-color: #9333ea !important;
    background-image: none !important;
    color: white !important;
    border-color: #9333ea !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.3) !important;
}

.product-actions .btn-cart-icon svg,
.product-actions .btn-cart-icon i {
    width: 18px !important;
    height: 18px !important;
    font-size: 18px !important;
}



/* Related Products Slider Specific Fixes */
.related-products-carousel .swiper-slide {
    width: auto;
    height: auto;
}

.related-products-carousel .product-card {
    min-width: 240px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .product-card {
        min-width: 200px;
    }

    .related-products-carousel .product-card {
        min-width: 200px;
    }

    .product-card .price-sale,
    .product-card .price-current {
        font-size: 1rem;
    }

    /* MOBILE: Stacked Button Layout (Full Width) */
    .product-actions {
        flex-direction: column !important;
        gap: 10px !important;
    }

    /* Order Now Button - Full Width on Mobile */
    .product-actions .btn-order,
    .product-actions .btn-primary.btn-order,
    .product-actions button.btn-order,
    .product-actions .btn.btn-order,
    .product-card .product-actions .btn-order,
    .product-card-inner .product-actions .btn-order {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Cart Icon Button - Full Width on Mobile */
    .product-actions .btn-cart-icon,
    .product-actions .btn-primary.btn-cart-icon,
    .product-actions button.btn-cart-icon,
    .product-actions .btn.btn-cart-icon,
    .product-card .product-actions .btn-cart-icon,
    .product-card-inner .product-actions .btn-cart-icon {
        flex: none !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        justify-content: center !important;
    }
}

@media (max-width: 480px) {
    .product-card {
        min-width: 180px;
    }

    .related-products-carousel .product-card {
        min-width: 180px;
    }
}