
/* the dropdown box itself: wider, rounded, softer shadow, no inner padding */
.arrow_box:has(.Basket) {
    width: 250px;
    padding: 0 !important;
    min-height: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18), 0 0 0 1px #e8ecf1;
    text-align: left !important;
}

@media screen and (min-width: 768px) {
    .arrow_box:has(.Basket) {
        left: -210px;   /* was -140px for a 180px box: keeps the right edge (and the arrow) under the cart icon */
    }
}

/* the basket panel: grid so the two action divs can share one row */
.arrow_box .Basket div[id$="userBasket_basket"],
.arrow_box .Basket #basket {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    text-align: left;
}

    .arrow_box .Basket div[id$="userBasket_basket"] > div,
    .arrow_box .Basket #basket > div {
        grid-column: 1 / -1;
    }

/* ---- header band: "N items Added Yet" + expand/collapse icons ---- */
.arrow_box .Basket div[id$="baskettop"] {
    float: none !important;
    width: auto !important;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #277487, #3a93a8);
    padding: 10px 12px;
    order: 1;
}

    .arrow_box .Basket div[id$="baskettop"] > div:first-child {
        width: auto !important;
        flex: 1 1 auto;
        margin: 0 !important;
        text-align: left;
    }

    .arrow_box .Basket div[id$="baskettop"] > div:last-child {
        float: none !important;
        width: auto !important;
        margin: 0 !important;
        flex: none;
        line-height: 0;
    }

        .arrow_box .Basket div[id$="baskettop"] > div:last-child img {
            cursor: pointer;
            filter: brightness(0) invert(1);   /* icons read white on the teal band */
            opacity: 0.9;
        }

    .arrow_box .Basket span[id$="lblBasketMsg"] {
        color: #ffffff !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        letter-spacing: 0.4px;
        text-transform: uppercase;
        text-align: left !important;
        display: block !important;
        width: auto !important;
    }

/* ---- item list ---- */
.arrow_box .Basket #ctl00_userBasket_basketMid,
.arrow_box .Basket #basketMid {
    width: auto !important;
    padding: 2px 0 0 !important;
    color: #1a2b49;
    max-height: 260px;
    overflow-y: auto;
    order: 2;
}

    .arrow_box .Basket #ctl00_userBasket_basketMid ul li,
    .arrow_box .Basket #basketMid ul li {
        text-align: left;
        line-height: 16px;
        margin: 0;
        min-height: 0;
    }

        .arrow_box .Basket #ctl00_userBasket_basketMid ul li a,
        .arrow_box .Basket #basketMid ul li a {
            display: flex;
            align-items: center;
            gap: 10px;
            min-height: 0;
            padding: 8px 12px;
            border-bottom: 1px solid #f0f3f6;
            color: #1a2b49;
            font-size: 12px;
            line-height: 16px;
            text-decoration: none;
            transition: background 0.12s ease;
        }

            .arrow_box .Basket #ctl00_userBasket_basketMid ul li a:hover,
            .arrow_box .Basket #basketMid ul li a:hover {
                background: #f0f6fa;
                color: #1a2b49;
                text-decoration: none;
            }

            /* thumb: the <span style="float:left"> wrapper + 35x25 img → 36px tile */
            .arrow_box .Basket #ctl00_userBasket_basketMid ul li a > span,
            .arrow_box .Basket #basketMid ul li a > span {
                float: none !important;
                flex: none;
                line-height: 0;
            }

            .arrow_box .Basket #ctl00_userBasket_basketMid ul li a img,
            .arrow_box .Basket #basketMid ul li a img {
                width: 36px !important;
                height: 36px !important;
                object-fit: contain;
                border: 1px solid #e8ecf1 !important;
                border-radius: 8px;
                background: #f7fafc;
                padding: 2px;
                box-sizing: border-box;
                display: block;
            }

/* ---- subtotal bar ---- */
.arrow_box .Basket #ctl00_userBasket_basket #basketSub,
.arrow_box .Basket #basket #basketSub {
    width: auto !important;
    min-height: 0;
    margin: 0 !important;
    padding: 10px 12px !important;
    border: none;
    border-top: 1px solid #e8ecf1;
    background: #f7f9fb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    overflow: visible;
    order: 3;
}

    .arrow_box .Basket #basketSub > div:first-child {
        font-size: 11px !important;
        font-weight: 700;
        color: #62778c !important;
        letter-spacing: 0.6px;
        text-transform: uppercase;
        margin: 0 !important;
        white-space: nowrap;
    }

    .arrow_box .Basket #basketSub div[id$="dvTotal"] {
        margin: 0 !important;
        font-size: 15px !important;
        font-weight: 700;
        color: #1a2b49 !important;
        text-align: right;
    }

        .arrow_box .Basket #basketSub .cartPrice {
            margin: 0 !important;
            text-align: right !important;
            font-size: 15px !important;
            color: #1a2b49 !important;
        }

            .arrow_box .Basket #basketSub .cartPrice > div {
                padding: 0 2px !important;
                vertical-align: middle;
            }

/* ---- actions: Clear (left, outlined) + Checkout (right, blue) on one row ----
   padding is !important because the store-front copies of these wrappers carry
   inline padding-left (37px / 28px). */
.arrow_box .Basket div[id$="userBasket_basket"] > div:nth-child(4),
.arrow_box .Basket #basket > div:nth-child(4) {   /* Checkout wrapper */
    grid-column: 2;
    order: 5;
    margin: 0 !important;
    padding: 12px 12px 12px 4px !important;
}

.arrow_box .Basket div[id$="userBasket_basket"] > div:nth-child(5),
.arrow_box .Basket #basket > div:nth-child(5) {   /* Clear wrapper */
    grid-column: 1;
    order: 4;
    margin: 0 !important;
    padding: 12px 4px 12px 12px !important;
}

.arrow_box .Basket div[id$="basketBot1"] {
    display: none;
    order: 6;
}

.arrow_box .Basket div[id$="userBasket_basket"] .bluebutton,
.arrow_box .Basket #basket .bluebutton {
    display: block;
    width: auto !important;
    height: auto !important;
    line-height: 15px !important;
    margin: 0 !important;
    padding: 10px 6px !important;
    font-family: inherit !important;    /* store-front css gives .bluebutton font-family:"Sans" */
    background: linear-gradient(135deg, #3b6bb4, #4d84d7) !important;
    color: #ffffff !important;
    border: none;
    border-radius: 8px !important;
    font-size: 11px !important;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 3px 8px rgba(59, 107, 180, 0.30);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
    cursor: pointer;
}

    .arrow_box .Basket div[id$="userBasket_basket"] .bluebutton:hover,
    .arrow_box .Basket #basket .bluebutton:hover {
        transform: translateY(-1px);
        color: #ffffff !important;
    }

    /* Clear Basket reads as the secondary action */
    .arrow_box .Basket div[id$="userBasket_basket"] a[id$="lnkBasketClear"],
    .arrow_box .Basket #basket a[id$="lnkBasketClear"] {
        background: #ffffff !important;
        color: #3b6bb4 !important;
        border: 1px solid #b9cbe6 !important;
        box-shadow: none;
    }

        .arrow_box .Basket div[id$="userBasket_basket"] a[id$="lnkBasketClear"]:hover,
        .arrow_box .Basket #basket a[id$="lnkBasketClear"]:hover {
            background: #f0f6fa !important;
            color: #3b6bb4 !important;
        }

/* ============================================================================
   Store fronts (shop/StoreDetailsTheme1/2/3.aspx): the same basket markup sits
   inside Bootstrap's ul.dropdown-menu#divCartMenu, shown by openCartPopup().
   Everything here is scoped to #divCartMenu, so ShopMaster pages never see it.
   ============================================================================ */

#divCartMenu {
    min-width: 0;
    width: 250px;
    margin: -18px 0 0;          /* the cart link's bottom sits ~18px above the bar's bottom on desktop */
    padding: 26px 0 0;          /* box top still lands 8px below the bar */
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
}

    /* (no arrow on the store fronts - by request; ShopMaster keeps its own
       .arrow_box:before/:after from style.css, which isn't loaded here) */

    /* open on hover like ShopMaster's #ulHeaderIcon li.box:hover .arrow_box.
       !important because openCartPopup()/hide() leave an inline display on it.
       Pointer devices only - on touch the cart tap (openCartPopup) still opens it. */
    @media (hover: hover) {
        #liCartbox:hover ~ #divCartMenu,
        #divCartMenu:hover {
            display: block !important;
        }
    }

    /* not the positioned element here (the ul is), so the ShopMaster left:-210px must not shift it */
    #divCartMenu .arrow_box {
        position: static;
        left: auto;
    }

    /* Theme2_css_common.css (CDN) floats #basket at 200px with a bottom margin */
    #divCartMenu #basket {
        float: none !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* the store markup has the expand/collapse icons FIRST and the message
       second (Basketnew.ascx is the other way round) - swap them back */
    #divCartMenu div[id$="baskettop"] > div:first-child {
        order: 2;
        flex: none;
        width: auto !important;
        margin: 0 !important;
        line-height: 0;
    }

    #divCartMenu div[id$="baskettop"] > div:last-child {
        order: 1;
        flex: 1 1 auto;
        width: auto !important;
        margin: 0 !important;
        line-height: normal;
        text-align: left;
    }

    #divCartMenu div[id$="baskettop"] img {
        cursor: pointer;
        filter: brightness(0) invert(1);
        opacity: 0.9;
    }

/* ============================================================================
   "Hello, <name>" account dropdown (#myac .arrow_Sbox) — Option A:
   teal band with the name, link rows with the orange left-edge hover used in
   the My Profile sidebar, grey footer "Not <name>?" + orange SIGN OUT.
   The code-behind emits <div class='acct-head'>Hello,<b>Name</b></div> first,
   then anchors separated by <br>, then a.MySignOut last.
   ============================================================================ */

.welcometext #myac .arrow_Sbox {
    width: 210px;
    left: -170px;           /* was -125px for 165px: keeps the right edge under the name */
    padding: 0;
    min-height: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18), 0 0 0 1px #e8ecf1;
    overflow: hidden;
    text-align: left;
}

    /* the <br> separators add stray gaps once the anchors are blocks */
    .welcometext #myac .arrow_Sbox br {
        display: none;
    }

    .welcometext #myac.box .arrow_Sbox a[href$="my-credit-cards"] {
        display: none;
    }

    /* header band */
    .welcometext #myac .arrow_Sbox .acct-head {
        background: linear-gradient(135deg, #277487, #3a93a8);
        color: #ffffff;
        font-size: 11px;
        line-height: 14px;
        padding: 10px 14px;
        letter-spacing: 0.3px;
    }

        .welcometext #myac .arrow_Sbox .acct-head b {
            display: block;
            font-size: 14px;
            line-height: 18px;
            font-weight: 700;
            color: #ffffff;
        }

    /* link rows */
    .welcometext #myac.box .arrow_Sbox a {
        float: none;
        display: block;
        width: auto;
        box-sizing: border-box;
        padding: 9px 14px 9px 11px;
        line-height: 16px;
        font-size: 12.5px;
        font-weight: 600;
        color: #1a2b49;
        text-decoration: none;
        border-left: 3px solid transparent;
        border-bottom: 1px solid #f0f3f6;
        transition: background 0.13s ease, color 0.13s ease, border-color 0.13s ease, padding-left 0.13s ease;
    }

        .welcometext #myac.box .arrow_Sbox a:hover {
            background: #f0f6fa;
            color: #277487;
            text-decoration: none;
            border-left-color: #f78d1e;
            padding-left: 15px;
        }

    /* footer: "Not Subhyan ?"  ..........  SIGN OUT */
    .welcometext #myac.box .arrow_Sbox a.MySignOut {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 4px;
        background: #f7f9fb;
        border-left: none;
        border-bottom: none;
        border-top: 1px solid #e8ecf1;
        padding: 10px 14px;
        font-size: 11.5px;
        font-weight: 400;
        color: #62778c;
        white-space: nowrap;
    }

        .welcometext #myac.box .arrow_Sbox a.MySignOut b {
            font-weight: 600;
            color: #1a2b49;
            margin-right: auto;
        }

        .welcometext #myac.box .arrow_Sbox a.MySignOut span {
            float: none;
            width: auto;
            color: #f78d1e;
            font-weight: 700;
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.4px;
        }

        .welcometext #myac.box .arrow_Sbox a.MySignOut:hover {
            background: #f0f6fa;
            padding-left: 14px;
            color: #62778c;
        }

            .welcometext #myac.box .arrow_Sbox a.MySignOut:hover span {
                text-decoration: underline;
            }
