/* We now render the decorative image via the footer pseudo-element. Hide the old div if present. */
.sd-footer-drip { display: none !important; }

/* Hide the old SVG drip and the inline IMG. We render via background only. */
.sd-footer-drip__svg { display: none !important; }
.sd-footer-drip__img { display: none !important; }

/* No longer set a forced gray fill; image provides the shape */

/* Avoid forcing footer background; keep theme's design */

/* Make sure the drip sits above the footer area */
.site-footer {
    position: relative;
    z-index: 0;
    width: 100vw;              /* match decorative background width */
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background-image: url('https://shahdoosh.com/en/wp-content/uploads/2025/10/footer-final.webp');
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% auto; /* full-width background */
    padding-top: var(--sd-footer-ratio, 52%); /* space for top shape; do not change */
    border: 0;
    background-color: transparent;
}

/* Decorative top image attached to the actual footer to ensure widgets are inside the footer area */
.site-footer::before { content: none; }

/* Hide default GeneratePress footer text/content so only the image shows */
.site-footer .site-info,
.site-footer .footer-widgets,
.site-footer .inside-site-info {
    display: none !important;
}

@media (min-width: 768px) {
    /* ratio is handled by var; nothing else needed here */
}

/* Footer widgets grid */
.sd-footer-widgets {
    width: min(1400px, 100%);
    padding: 0 16px 24px;
    display: grid;
    grid-template-columns: repeat(var(--sd-footer-cols, 3), 1fr);
    gap: 24px 48px; /* row gap, column gap */
    align-items: start;
    /* Place columns within the upper area of the footer image */
    position: absolute;
    top: var(--sd-footer-content-top, 42%);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.sd-footer-widgets__col { min-width: 0; }
.sd-footer-widgets .widget-title { margin: 0 0 8px; font-weight: 600; }
.sd-footer-widgets p { margin: 0 0 8px; }

/* Ensure first column aligns to the left edge visually */
.sd-footer-widgets__col--1 { justify-self: start; }

@media (max-width: 900px) {
    .sd-footer-widgets { grid-template-columns: 1fr 1fr; gap: 24px; top: var(--sd-footer-content-top-md, 46%); }
}

@media (max-width: 600px) {
    .sd-footer-widgets {
        grid-template-columns: 1fr;
        gap: 20px;
        top: var(--sd-footer-content-top_sm, 85%);
        /* Mobile-only container styling to blend with footer background */
        background: var(--sd-footer-mobile-bg, #eaf5ff);
        border-radius: 12px;/* requested top space */
        max-width: calc(100% - 5px); /* small side breathing room */
    }
}

/* Footer navigation menu styling */
.sd-footer-widgets .widget_nav_menu .menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.sd-footer-widgets .widget_nav_menu .menu .menu-item a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--sd-footer-link, #0f172a);
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    transition: color .2s ease, border-color .2s ease, transform .2s ease;
}

.sd-footer-widgets .widget_nav_menu .menu .menu-item a::before {
    content: '›';
    color: var(--sd-footer-link-accent, #2563eb);
    font-weight: 700;
    line-height: 1;
}

.sd-footer-widgets .widget_nav_menu .menu .menu-item a:hover {
    color: var(--sd-footer-link-hover, #2563eb);
    border-bottom-color: rgba(37, 99, 235, 0.35);
}

/* WooCommerce Products list (Column 3) */
.sd-footer-widgets .widget_products ul.product_list_widget,
.sd-footer-widgets .woocommerce ul.product_list_widget {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.sd-footer-widgets .widget_products ul.product_list_widget li,
.sd-footer-widgets .woocommerce ul.product_list_widget li {
    display: flex !important;          /* one row: image + title */
    align-items: center !important;     /* vertical alignment */
    gap: 30px;                          /* space between image and title */
    min-height: 48px;
}

.sd-footer-widgets .widget_products ul.product_list_widget li img,
.sd-footer-widgets .woocommerce ul.product_list_widget li img {
    width: 46px;
    height: auto;
    border-radius: 6px;
    float: none !important;
    margin: 0 !important;
    order: 0;                 /* image left */
    display: block;
    flex: 0 0 46px;           /* fixed width, no shrink */
    align-self: center;
}

.sd-footer-widgets .widget_products ul.product_list_widget li a + a,
.sd-footer-widgets .woocommerce ul.product_list_widget li a + a,
.sd-footer-widgets .woocommerce ul.product_list_widget .product-title {
    flex: 1 1 auto;
    line-height: 1.2;
    margin: 0;                /* prevent stray margins */
    display: inline-block;     /* keep title on same row */
    vertical-align: middle;
}

/* Ensure the first link (image link) doesn't expand */
.sd-footer-widgets .woocommerce ul.product_list_widget li > a:first-child {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}
.sd-footer-widgets .widget_products ul.product_list_widget li a,
.sd-footer-widgets .woocommerce ul.product_list_widget li a,
.sd-footer-widgets .woocommerce ul.product_list_widget .product-title {
    text-decoration: none;
    color: var(--sd-footer-link, #0f172a);
}

.sd-footer-widgets .widget_products ul.product_list_widget li a:hover,
.sd-footer-widgets .woocommerce ul.product_list_widget li a:hover {
    color: var(--sd-footer-link-hover, #2563eb);
}


