/* ===== Haramain Storefront Header -- Floating Pill Navbar ===== */

header.tf-header {
    position: fixed !important;
    top: 14px !important;
    left: 24px !important;
    right: 24px !important;
    width: auto !important;
    max-width: 1300px;
    margin: 0 auto !important;
    background: #ffffff !important;
    border-radius: 50px !important;
    box-shadow: 0 8px 24px rgba(10,61,46,0.12) !important;
    padding: 3px 28px !important;
    z-index: 999;
    transition: box-shadow 0.25s ease;
}

header.tf-header.header-sticky {
    box-shadow: 0 10px 28px rgba(10,61,46,0.18) !important;
}

/* Floating bar overlays the hero directly -- no gap */
body {
    padding-top: 0 !important;
}

.logo-site img {
    max-height: 58px !important;
    width: auto !important;
}

.box-nav-menu {
    justify-content: center !important;
    gap: 30px !important;
}

.box-nav-menu .item-link,
.menu-item > a {
    white-space: nowrap !important;
    color: #0a3d2e !important;
    text-shadow: none !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

.box-nav-menu .item-link:hover {
    color: #c9a24b !important;
}

.nav-icon-list {
    gap: 16px !important;
}

.nav-icon-item {
    color: #0a3d2e !important;
    text-shadow: none !important;
}

.nav-icon-item:hover {
    color: #c9a24b !important;
}

.shop-cart .count {
    background: #c9a24b !important;
    color: #0a3d2e !important;
    font-weight: 700;
}

/* Turn the cart icon into a solid pill button, echoing the reference design's
   "Start selling" call-to-action button */
.shop-cart {
    background: #0a3d2e !important;
    color: #c9a24b !important;
    border-radius: 30px !important;
    padding: 8px 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.shop-cart .icon {
    color: #c9a24b !important;
}

@media (max-width: 768px) {
    header.tf-header {
        left: 12px !important;
        right: 12px !important;
        top: 12px !important;
        padding: 8px 16px !important;
    }
}

body {
    padding-bottom: 0 !important;
}

/* Sitewide heading color to match brand green/gold scheme */
.title.fw-normal,
h1:not(.title-page), h2, h3.title {
    color: #0a3d2e !important;
}

/* Exception: headings inside dark green banner sections must stay white */
[style*="background:linear-gradient(135deg,#0a3d2e"] h2,
[style*="background:#0a3d2e"] h2,
[style*="background:#0a3d2e"] h1 {
    color: #ffffff !important;
}

/* Apply the same editorial polish (centered title + gold accent line) to
   every page's title banner sitewide, matching the About page redesign */
.s-page-title,
section.s-page-title,
div.s-page-title {
    text-align: center !important;
    background: #0a3d2e !important;
    background-image: none !important;
    background-color: #0a3d2e !important;
    padding: 48px 0 !important;
}

/* Remove the busy tiled background image completely */
.s-page-title::before,
section.s-page-title::before {
    display: none !important;
    content: none !important;
    background: none !important;
}

/* Remove the floating gold line from the section — we'll put it on the title instead */
.s-page-title::after {
    display: none !important;
    content: none !important;
}

.s-page-title .content {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Reduce footer body padding — was too much empty space */
.tf-footer .footer-body {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
}

   and never trigger since the element is at the very top of the page */
.s-page-title .title-page,
.s-page-title [class*="wow"],
.s-page-title .animated {
    animation: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.s-page-title .title-page,
section.s-page-title h1.title-page {
    font-size: 34px !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    display: inline-block !important;
    padding-bottom: 10px !important;
    border-bottom: 3px solid #c9a24b !important;
    margin-bottom: 12px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Breadcrumbs on dark background */
.s-page-title .breadcrumbs-page {
    justify-content: center !important;
    margin-top: 6px !important;
}

.s-page-title .breadcrumbs-page a,
.s-page-title .breadcrumbs-page .current-page,
.s-page-title .breadcrumbs-page .h6,
.s-page-title .breadcrumbs-page i {
    color: rgba(255,255,255,0.7) !important;
}

.s-page-title .breadcrumbs-page a:hover {
    color: #c9a24b !important;
}







/* ===== MOBILE RESPONSIVENESS FIXES ===== */

/* Floating pill navbar — smaller on mobile */
@media (max-width: 575px) {
    header.tf-header {
        left: 8px !important;
        right: 8px !important;
        top: 8px !important;
        padding: 4px 12px !important;
    }
    .logo-site img {
        max-height: 40px !important;
    }
    .shop-cart {
        padding: 6px 12px !important;
    }
}

/* Account pages — hide sticky sidebar on mobile */
@media (max-width: 1199px) {
    [style*="position:sticky"] {
        position: relative !important;
    }
}

/* Flex rows that need to wrap on mobile */
@media (max-width: 767px) {
    .row-no-wrap-fix {
        flex-wrap: wrap !important;
    }

    /* My Account dashboard welcome banner */
    [style*="background:linear-gradient(135deg,#0a3d2e"] {
        flex-direction: column !important;
        text-align: center;
    }
    [style*="background:linear-gradient(135deg,#0a3d2e"] > div:last-child {
        margin-left: 0 !important;
        margin-top: 10px;
    }

    /* Payment page card + form side by side — stack on mobile */
    .col-md-7, .col-md-5 {
        width: 100% !important;
    }

    /* Zabiha & Qurbani order sidebar */
    [style*="position:sticky;top:100px"] {
        position: relative !important;
        top: auto !important;
    }

    /* Footer 3-col — stack on mobile */
    .tf-footer .col-lg-5,
    .tf-footer .col-lg-3,
    .tf-footer .col-lg-4 {
        width: 100% !important;
    }

    /* Footer newsletter input/button — stack */
    .tf-footer [style*="display:flex;gap:8px"] {
        flex-direction: column !important;
    }
    .tf-footer [style*="display:flex;gap:8px"] input,
    .tf-footer [style*="display:flex;gap:8px"] button {
        width: 100% !important;
    }

    /* Qurbani page animal selector */
    .col-md-3.col-6 {
        width: 50% !important;
    }

    /* How it works 4 columns — 2 per row on mobile */
    .col-md-3 {
        width: 50% !important;
    }

    /* Order tracking form — stack */
    [style*="display:flex;gap:10px"] {
        flex-direction: column !important;
    }
    [style*="display:flex;gap:10px"] input,
    [style*="display:flex;gap:10px"] button {
        width: 100% !important;
    }

    /* Register/login container max-width */
    .col-md-5, .col-md-6 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    /* Zabiha pages feature grid — full width on mobile */
    [style*="border-radius:8px;padding:16px"] {
        margin-bottom: 8px;
    }

    /* About page Our Story section */
    [style*="border-left:4px solid #c9a24b;padding-left:24px"] {
        padding-left: 16px !important;
    }
}

/* Tablet tweaks */
@media (max-width: 991px) {
    /* Qurbani trust sidebar — full width on tablet */
    .col-lg-5, .col-lg-7 {
        width: 100% !important;
    }
    .col-lg-3, .col-lg-4 {
        width: 100% !important;
    }
}


/* ===== FLOATING MOBILE BOTTOM PILL NAVBAR ===== */
@media (max-width: 1199px) {
    .tf-toolbar-bottom {
        position: fixed !important;
        bottom: 16px !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        background: transparent !important;
        border-top: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        height: auto !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
    }

    /* Force the inner pill to stay horizontal */
    .tf-toolbar-bottom > div {
        flex-direction: row !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-around !important;
        width: calc(100% - 32px) !important;
        max-width: 420px !important;
    }

    /* Each toolbar item stays inline */
    .tf-toolbar-bottom > div > a {
        flex-direction: column !important;
        display: flex !important;
        align-items: center !important;
        flex: 1;
    }

    /* Add padding to page bottom so content isn't hidden behind floating bar */
    body {
        padding-bottom: 90px !important;
    }
}

/* ===== MOBILE TOP DROPDOWN MENU ===== */
#mobileMenu.offcanvas-top {
    top: 0 !important;
    border-bottom: 3px solid #c9a24b !important;
    display: flex;
    flex-direction: column;
}

#mobileMenu .offcanvas-body {
    overflow-y: auto;
    padding: 0;
}

/* ===== GLOBAL FUTURE-PROOF MOBILE RULES ===== */
/* Applied sitewide — ensures all new pages built onwards are mobile safe */

/* Prevent any element from causing horizontal scroll */
* {
    max-width: 100%;
}

/* All images responsive by default */
img {
    max-width: 100% !important;
    height: auto;
}

/* Inline flex containers always wrap on small screens */
@media (max-width: 575px) {
    [style*="display:flex"] {
        flex-wrap: wrap;
    }
    [style*="display: flex"] {
        flex-wrap: wrap;
    }
}

/* ===== DASHBOARD ACCOUNT CARDS — EQUAL HEIGHT ===== */
.account-card-row .col-md-4,
.account-card-row .col-6 {
    display: flex;
}

.account-card-row .col-md-4 > a,
.account-card-row .col-6 > a {
    display: flex;
    width: 100%;
}

.account-card-row .col-md-4 > a > div,
.account-card-row .col-6 > a > div {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* ===== FORCE HIDE STUCK OFFCANVAS BACKDROPS ===== */
/* Nuclear option - if body doesn't have offcanvas open, backdrops must not show */
body:not(.offcanvas-backdrop) .offcanvas-backdrop,
body:not(.modal-open) .modal-backdrop {
    display: none !important;
    opacity: 0 !important;
}

/* ===== HOMEPAGE ABOUT SECTION — FORCE WHITE TEXT ===== */
/* Overrides the global h2 green color rule for elements on dark backgrounds */
[style*="background:linear-gradient(135deg,rgba(10,61,46"] h2,
[style*="background:rgba(10,61,46"] h2,
[style*="background:linear-gradient(135deg,rgba(10,61,46"] h1,
[style*="background:linear-gradient(135deg,rgba(10,61,46"] p {
    color: #ffffff !important;
}
