/* ============================================================
   AFRIYAH PRODUCT UPDATES - CRITICAL FIXES
   ============================================================ */

/* 1. FORCE VARIANT & CTA VISIBILITY (Override potential JS hiding) */
.variations_form,
.variations,
.variation-group,
.variation-group-row,
.variation-swatch-wrapper,
.variation-swatches,
.single_variation_wrap,
.woocommerce-variation-add-to-cart,
.entry-summary .cart,
.entry-summary .quantity,
.afriyah-product-actions {
    display: block !important;
    /* or flex/grid where appropriate */
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.variation-swatches,
.variation-group-row,
.woocommerce-variation-add-to-cart,
.product-actions-wrapper {
    display: flex !important;
    flex-wrap: wrap !important;
}

/* Ensure Add to Cart Button is Visible */
.single_add_to_cart_button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: #006400 !important;
    color: #fff !important;
}

/* 2. SOCIAL SHARE BUTTONS ALIGNMENT */
.af-product-social-share {
    margin-top: 25px !important;
    width: 100% !important;
}

.af-share-title {
    font-weight: 600 !important;
    margin-bottom: 15px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.af-social-share-buttons {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.af-share-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    align-items: center !important;
}

.af-share-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    padding: 0 20px !important;
    border-radius: 50px !important;
    /* Pill shape */
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    flex: 1 !important;
    /* Equal width buttons */
    min-width: 120px !important;
    max-width: 200px !important;
}

.af-share-btn:hover {
    transform: translateY(-2px) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
}

.af-share-btn i {
    margin-right: 8px !important;
    font-size: 16px !important;
}

/* Brand Colors (Reinforce) */
.af-share-facebook {
    background-color: #1877F2 !important;
}

.af-share-twitter {
    background-color: #000000 !important;
}

.af-share-whatsapp {
    background-color: #25D366 !important;
}

.af-share-pinterest {
    background-color: #E60023 !important;
}

.af-share-linkedin {
    background-color: #0077B5 !important;
}

.af-share-tiktok {
    background-color: #000000 !important;
}

/* 3. RELATED PRODUCTS PRICE (Single Line) */
.related.products .price,
.up-sells .price,
ul.products li.product .price {
    display: block !important;
    white-space: nowrap !important;
    /* Force single line */
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 14px !important;
    /* Adjust if too big */
    line-height: 1.4 !important;
    color: #006400 !important;
    font-weight: 700 !important;
    width: 100% !important;
}

.related.products .price del,
.up-sells .price del,
ul.products li.product .price del {
    display: inline-block !important;
    /* Keep on same line if possible */
    margin-right: 5px !important;
    font-size: 0.9em !important;
    color: #999 !important;
    opacity: 0.7 !important;
}

.related.products .price ins,
.up-sells .price ins,
ul.products li.product .price ins {
    background: none !important;
    text-decoration: none !important;
    display: inline-block !important;
}

/* Ensure Related Products row scrolls properly */
.af-related-products-single-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 20px !important;
    padding-bottom: 10px !important;
    /* Space for scrollbar */
}

.af-related-products-single-row li.product {
    flex: 0 0 240px !important;
    /* Fixed width */
    width: 240px !important;
    min-width: 240px !important;
}

/* Short Description: max 4 lines */
.product-short-description,
.woocommerce-product-details__short-description {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 20px;
    line-height: 1.5;
}