/* ============================================================
   SINGLE PRODUCT PAGE CUSTOMIZATIONS
   ============================================================ */

/* Product title H1 - reduced text size */
.single-product .product-title,
.single-product h1.product-title,
.product-info .product-title {
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
}

/* 1. RESTORE MISSING ELEMENTS (Variant/Quantity/CTA) */
.single-product .product .summary .variations_form,
.single-product .product .summary .cart,
.single-product .product .summary .single_add_to_cart_button,
.single-product .product .summary .quantity {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure Add to Cart area layout */
.single-product .product .summary .cart {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    align-items: center !important;
    margin-bottom: 20px !important;
}

/* Quantity Input Styling */
.single-product .product .summary .quantity input.qty {
    height: 48px !important;
    border-radius: 8px !important;
    border: 1px solid #e0e0e0 !important;
    padding: 0 12px !important;
    font-weight: 600 !important;
    width: 60px !important;
    text-align: center !important;
}

/* 2. PAIRS WELL WITH SECTION */
.pairs-well-with {
    display: block !important;
    visibility: visible !important;
    margin-top: 40px !important;
    padding-top: 30px !important;
    border-top: 1px solid #eee !important;
    clear: both !important;
}

.pairs-well-with h3 {
    font-size: 20px !important;
    margin-bottom: 20px !important;
    font-weight: 700 !important;
}

.pairs-well-with .products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
    gap: 24px !important;
}

/* Pairs Well With card images */
.af-pair-img,
.pairs-well-with .product img,
.pairs-well-with-product img {
    width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
    display: block !important;
}

/* 3. STICKY CART */
/* Sticky cart z-index */
.af-sticky-atc {
    z-index: 9 !important;
}

/* Variable product sticky cart: shift info text left, keep button in place */
.af-sticky-atc .af-sticky-inner {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.af-sticky-atc .af-sticky-info {
    margin-left: -8px !important;
    /* Shift description text slightly left */
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.af-sticky-atc .af-sticky-buttons-container {
    flex-shrink: 0 !important;
    /* Keep button at its natural position */
    margin-left: auto !important;
}

.afriyah-sticky-add-to-cart,
.sticky-add-to-cart-bar,
#sticky-cart-panel {
    z-index: 90 !important;
}

/* WhatsApp and Chat Icons (Generic Selectors - Adjust based on actual plugin) */
.whatsapp_chat_support,
#wa-whatsapp-button,
.joinchat_button,
.ht-ctc-chat {
    z-index: 9999 !important;
}

/* 4. SHORT DESCRIPTION TRUNCATION */
.woocommerce-product-details__short-description {
    max-height: 120px !important;
    overflow: hidden !important;
    position: relative !important;
    margin-bottom: 20px !important;
}

.woocommerce-product-details__short-description::after {
    content: "" !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 40px !important;
    background: linear-gradient(transparent, #fff) !important;
    pointer-events: none !important;
}

/* 5. SHARE BUTTON STYLING (Pills & Brand Colors) */
.af-share-container {
    display: flex !important;
    gap: 10px !important;
    margin-top: 20px !important;
    flex-wrap: wrap !important;
}

.af-share-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 20px !important;
    border-radius: 50px !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: transform 0.2s !important;
}

.af-share-btn:hover {
    transform: translateY(-2px) !important;
    color: #fff !important;
}

.af-share-btn i {
    font-size: 16px !important;
}

/* Brand Colors */
.af-share-facebook {
    background-color: #1877F2 !important;
}

.af-share-twitter,
.af-share-x {
    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-email {
    background-color: #666666 !important;
}

/* ============================================================
   SHOP & FRONTPAGE ADJUSTMENTS
   ============================================================ */

/* 6. FRONTPAGE: Why Choose Afriyah (Single Line) & Related Products */
.af-usps-grid,
.related.products ul.products {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 20px !important;
    padding-bottom: 15px !important;
    justify-content: flex-start !important;
    /* Start from left */
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
}

.af-usps-grid::-webkit-scrollbar,
.related.products ul.products::-webkit-scrollbar {
    height: 6px !important;
}

.af-usps-grid::-webkit-scrollbar-thumb,
.related.products ul.products::-webkit-scrollbar-thumb {
    background: #ccc !important;
    border-radius: 3px !important;
}

.related.products ul.products li.product {
    flex: 0 0 250px !important;
    /* Fixed width for horizontal scroll */
    min-width: 250px !important;
    margin-bottom: 0 !important;
}

/* 7. SHOP PAGE: Sidebar Width Adjustment */
@media (min-width: 992px) {
    .site-main .shop-layout {
        grid-template-columns: 1fr 20% !important;
        /* Reduced sidebar width */
        gap: 30px !important;
    }

    .site-main .shop-sidebar {
        max-width: 100% !important;
        /* Let grid control width */
    }
}