body { font-family: Arial, sans-serif; margin:0; padding:0; overflow-x:hidden; }
/* ===================== TOP ROW ===================== */
.top-row { 
display:flex; 
justify-content:space-between; 
align-items:center;
background: linear-gradient(135deg, #3ba9ff, #122041);
padding:40px 20px;
color:#fff;
flex-wrap:wrap;
}
.top-row .logo-container { display:flex; align-items:center; gap:20px; }
.top-row .logo-container img { width:40px; height:auto; }
.top-row .signout-container { display:flex; align-items:center; gap:20px; }
.top-row .signout-container img { width:40px; height:auto; }
.top-row .signout-container span { font-size:1.1rem;}
.top-row .search-container { flex:1; margin:0px 20px; }
.top-row .search-container input[type="search"] { width:100%; padding:6px 10px; border-radius:0px; border:none; font-size:1rem; }
.top-row .signout-container a { color:#fff; text-decoration:none;}
.top-row .signout-container a:hover { text-decoration:underline; }

/* ===================== GROUPS STYLES ===================== */
.groups-scroll-container { display:flex; flex-wrap:wrap; gap:15px; padding:10px 0; justify-content:center; }
.group-scroll-item { text-align:center; cursor:pointer; flex:0 1 375px; max-width:100%; }
.group-scroll-item img { width:100%; max-width:375px; height:auto; border-radius:0px; box-shadow:0 2px 5px rgba(0,0,0,0.2); transition:transform 0.2s; }
.group-scroll-item img:hover { transform:scale(1.05); }
.group-scroll-item p { margin:8px 0 0; font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:375px; }
.groups-menu-header { display:flex; flex-wrap:wrap; gap:30px; padding-bottom:10px; justify-content:center; }
.groups-menu-header .menu-item { flex:0 1 150px; text-align:center; }
.groups-menu-header .menu-item img { width:100%; max-width:150px; height:auto; border-radius:8px; transition:transform 0.2s; }
.groups-menu-header .menu-item img:hover { transform:scale(1.1); }
.fade-message { opacity:1; transition:opacity 1.5s ease-out; }
.fade-out { opacity:0; }
.pagination-container { margin-top:15px; padding:10px 0; text-align:center; }
.pagination-container .btn { min-width:40px; }
.msb-primaryColor { background-color:#2EA5EB; border-color:#2BA6E9; color:#fff; }
.msb-primaryColor:visited { background-color:#2EA5EB; border-color:#2BA6E9; color:#fff; }
.msb-primaryColor:hover { background-color:#2196f3; }
.msb-primaryColor:active {background-color: #2EA5EB;border-color: #2BA6E9;color: #fff;}
.msb-primaryBtnColor { background-color:#2EA5EB; border-color:#1c90d5; color:#fff; }
.msb-primaryBtnColor:hover { background-color:#2ea5eba1;border-color:#1c90d5; color:#fff; }

/* ===================== NAV + MEGAMENU ===================== */
nav {
background: linear-gradient(135deg, #3ba9ff, #122041);
position:relative;
width:100%;
z-index:1000;
}
nav ul { display:flex; list-style:none; margin:0; padding:0; }
nav li { position:static; }
nav a { display:flex; align-items:center; padding:15px 20px; color:#fff; text-decoration:none; }
nav a:hover { background:none; }

.card-body-user {
background-color: #000;
}
.caret { display:inline-block; width:8px; height:8px; margin-left:6px; border-right:2px solid #fff; border-bottom:2px solid #fff; transform:rotate(45deg); transition:transform 0.3s; }
.nav-item.open > a .caret { transform:rotate(-135deg); }

/* Mega-panel base */
.mega-panel { 
display:none; 
position:absolute; 
top:100%; 
left:0; 
right:0; 
width:100%; 
background:#f8f8f8; 
color:#333; 
padding:10px 10px; 
box-sizing:border-box; 
box-shadow:0 4px 10px rgba(0,0,0,0.2); 
gap:10px; 
z-index:999; 
}

/* Mega-grid: up to 6 cards per row on wide screens */
.mega-panel .mega-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; width: 100%; }

.nav-item.open > .mega-panel { display:block; }
.mega-panel a { color:#fff; text-decoration:none; margin:4px 10px; }
.mega-panel a:hover { color:#2EA5EB; }

/* Make the logo text always white */
.logo-container span {
color: #fff;
font-family: 'Outfit', sans-serif;
font-size: 1.7rem;
font-weight:400;
letter-spacing: -0.5px;
}
.signout-container span {color: #fff !important; font-size:1.1rem;}
nav a,
.mega-panel a {
color: #fff !important;
}

/* ===================== HAMBURGER ===================== */
.nav-toggle { display:none; flex-direction: column; justify-content: space-around; width:30px; height:25px; cursor:pointer; }
.nav-toggle span { display:block; height:3px; width:100%; background:#fff; border-radius:2px; }

/* ===================== TRENDING & BUDDY CARDS (MEGAMENU + INDEX) ===================== */

/* Uniform, fluid card images – no cropping */
#trending .card-img-top,
#buddy .card-img-top {
width: 100%;
height: auto;          /* let image keep its aspect ratio */
border-top-left-radius: .25rem;
border-top-right-radius: .25rem;
}

/* Card body styling */
#trending .card-body,
#buddy .card-body {
padding: .5rem;
}

/* Truncated link styling */
#trending .card-link,
#buddy .card-link {
font-weight: 500;
color: #333;
text-decoration: none;
}
#trending .card-link:hover,
#buddy .card-link:hover {
color: #0d6efd;
text-decoration: underline;
}

/* Hover effect for cards */
#trending .card,
#buddy .card {
border: none;
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#trending .card:hover,
#buddy .card:hover {
transform: translateY(-4px);
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.icon-bell{
padding-left: 10px;
padding-top: 14px;
padding-bottom:20px;
}
.textMsg{
padding-left: 20px;
padding-top: 14px;
padding-bottom:20px;
}
.icon-trolly {
padding-left: 10px;
padding-top: 14px;
padding-bottom: 20px;
}

/* Prevent horizontal overflow */
html, body {
max-width: 100%;
overflow-x: hidden;
}

/* Allow flex items to wrap instead of overflowing */
.list-group-horizontal-md {
flex-wrap: wrap;
}

/* Ensure long words/URLs break instead of overflowing */
.list-group-item a,
.list-group-item {
word-break: break-word;
overflow-wrap: anywhere;
}

.cart-qty {
margin-top: 25px;
}

#categories, #products, .mega-list li a {
color: #000 !important;
}

/* Products mega-menu inherits same style as Categories */
#products.mega-panel {
background: #fff;
padding: 15px;
border: 1px solid #ddd;
}

/* ===================== STYLE FOR NEW SEARCH BAR ===================== */
.top-row,
.top-row-mobile {
position: relative;
z-index: 2000;
background: linear-gradient(135deg, #3ba9ff, #122041);
}
.search-wrapper {
position: relative;
width: 100%;
}
#search-input {
width: 100%;
padding: 10px 14px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 0px;
outline: none;
transition: border-color 0.2s ease;
}
#search-input:focus {
border-color: #0078ff;
}
.search-dropdown {
position: absolute;
top: 100%;
left: 0;
right: 0;
color: #000;
margin-top: 4px;
background: #fff;
border: 1px solid #ddd;
border-radius: 0px;
box-shadow: 0 4px 14px rgba(0,0,0,0.08);
max-height: 420px;
overflow-y: auto;
z-index: 50;
}
.search-dropdown.hidden {
display: none;
}
.search-section {
padding: 8px 0;
border-bottom: 1px solid #f1f1f1;
}
.search-section:last-child {
border-bottom: none;
}
.search-section-title {
font-size: 12px;
font-weight: 600;
color: #666;
padding: 6px 14px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.search-item {
padding: 10px 14px;
cursor: pointer;
transition: background 0.15s ease;
}
.search-item:hover,
.search-item.active {
background: #f5f9ff;
}
.search-item strong {
color: #0078ff;
}
.search-footer {
padding: 10px 14px;
font-size: 13px;
color: #555;
border-top: 1px solid #eee;
background: #fafafa;
}
.search-footer.hidden {
display: none;
}
.search-loading {
padding: 12px 14px;
font-size: 14px;
color: #777;
}
.search-dropdown {
opacity: 0;
transform: translateY(4px);
transition: opacity 120ms ease, transform 120ms ease;
}
.search-dropdown.visible {
opacity: 1;
transform: translateY(0);
}
.search-bar {
width:100%;
padding:10px 10px;
border-radius:0px;
border:none;
font-size:1rem;
}
.desktop-search { display: block; }
.mobile-search { display: none; }

/* --- FIX DROPDOWN DRIFT ON MOBILE --- */
@media (max-width: 992px) {
.search-wrapper {
position: relative; /* ensure anchor stays with input */
width: 100%;
}

.search-dropdown {
position: relative;
top: 100%;
left: 0;
width: 100%; /* match input width exactly */
right: auto; /* prevent stretching beyond wrapper */
margin-top: 4px;
}
}


/* ================= TAGLINE BASE ================= */
.tagline,
.tagline-bottom {
color: #fff;
font-size: 1.1rem;
text-align: center;
pointer-events: none;
transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Fade tagline when search is focused */
.search-wrapper:focus-within .tagline,
.search-wrapper:focus-within .tagline-bottom {
opacity: 0;
transform: translateY(-6px);
}

/* Optional manual hide */
.tagline.hidden,
.tagline-bottom.hidden {
opacity: 0;
transform: translateY(-6px);
}

/* LOGO LINK */
.logo-link:hover { opacity: 1; }
.signout-link:hover { opacity: 1; }
.logo-link {
display: flex;
align-items: center;
gap: 8px;
text-decoration: none;
color: inherit;
}
.signout-link {
display: flex;
align-items: center;
gap: 8px;
text-decoration: none;
color: inherit;
}
.logo-container {
margin-bottom: 15px;
text-decoration: none;
color: inherit;
margin-left: 15px;
}
.signout-container {
margin-top: 15px;
text-decoration: none;
color: inherit;
}
.logo-link, .signout-link {
margin-bottom: 0px;
}
.page-exit {
display: flex;
align-items: center;
gap: 8px;
text-decoration: none;
color: #fff;
font-size: 1rem;
margin-top: 13px;
margin-left: 9px;
}
.msb-btn {
display: inline-flex;
align-items: center;
justify-content: center;
height: 32px;
padding: 0 14px;
border-radius: 5px;
font-size: 14px;
font-weight: 600;
text-decoration: none;
color: #fff;
background: rgba(255,255,255,0.12);
border: 1px solid rgba(255,255,255,0.25);
transition: background 0.2s ease, border-color 0.2s ease;
}
.msb-btn:hover {
background: rgba(255,255,255,0.18);
border-color: rgba(255,255,255,0.35);
}

.msb-btnExit {
display: inline-flex;
align-items: center;
justify-content: center;
height: 32px;
padding: 0 14px;
border-radius: 0px;
font-size: 14px;
font-weight: 600;
text-decoration: none;
color: #fff;
background-color: rgb(46 126 195);
border: 1px solid rgba(255, 255, 255, 0.25);
transition: background 0.2s ease, border-color 0.2s ease;
}
.msb-btnExit:hover {
background-color: rgb(49 136 210);
border-color: rgba(255,255,255,0.35);
}
.msb-btn-header { margin-top: 15px; }
.msb-btn-header.mobile { margin-top: 15px; }
.logo-container span { margin-top: 22px; }

/* ===================== TOP ROW DESKTOP ===================== */
.top-row {
display: flex;
align-items: center;
justify-content: space-between;
background: linear-gradient(135deg, #3ba9ff, #122041);
padding: 60px 40px;
gap: 20px;
}
.top-row .logo-container,
.top-row .signout-container {
display: flex;
align-items: center;
margin: 0;
}
.top-row .search-container {
flex: 1;
display: flex;
justify-content: center;
margin: 0 20px;
}
.top-row .search-container input[type="search"] {
width: 100%;
max-width: 500px;
}
.top-row .logo-container img {
margin-top: 22px;
}
#startBuddyBtn,
#joinBuddyBtn {
padding:10px 0;
}
.top-row .signout-container a {
margin-top: 23px;
}

.nav-icons-inner {
display: flex;
align-items: center;
gap: 10px;
}

.header-auth-buttons .msb-btn {
width: 120px;
padding: 20px 18px;
color: #777;
border-radius: 5px;
transition: background 0.2s ease, border-color 0.2s ease;
font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
font-weight: 600;
font-size: 14px;
letter-spacing: 0.5px;
}
.header-auth-buttons .msb-btn:hover {
background: rgba(255,255,255,0.18);
border: 1px solid rgb(206 206 206);
}


/* ===================== INDEX AUTH BUTTONS ===================== */
.index-auth-buttons .msb-btn {
display: inline-block;
width: 120px;
margin-top: 15px;
padding: 18px 18px;
background: #2EA5EB;
line-height: 0.15;
color: #fff !important;
border: none;
border-radius: 25px;
font-size: 15px;
font-weight: normal;
text-align: center;
letter-spacing: 0.3px;
transition: background 0.2s ease, border-color 0.2s ease;
}

.index-auth-buttons .msb-btn:hover {
background: rgba(255,255,255,0.18);
border: solid 1px #2EA5EB;
color: #000 !important;

}

/* PROFILE MODAL */
.profile-modal {
display: none;
position: fixed;
inset: 0;
background: rgba(0,0,0,0.6);
justify-content: center;
align-items: center;
z-index: 9999;
}
.profile-modal-content {
background: #fff;
padding: 25px;
border-radius: 10px;
width: 90%;
max-width: 400px;
text-align: center;
}
.progress-container {
width: 100%;
background: #eee;
border-radius: 5px;
margin-top: 15px;
}
.progress-bar {
height: 10px;
background: #28a745;
width: 40%;
border-radius: 5px;
}

/* ==========  ALL @MEDIA QUERIES ======================= */

/* Mobile-first tweaks */
@media(max-width: 576px){
#trending .card-img-top,
#buddy .card-img-top {
height: auto; /* keep aspect ratio even on very small screens */
}
}

@media(min-width:767px){
.top-row-mobile .row-2 {
width:93%;
padding:0 15px;
}
}

@media(max-width: 767px){
.header-auth-buttons .msb-btn {
display: block;
width: calc(100% - 16px);
margin: 5px auto;
}
}

@media(max-width: 767px){
#startBuddyBtn,
#joinBuddyBtn {
width: calc(100% - 25px);
max-width: calc(100% - 25px);
margin-left: auto;
margin-right: auto;
}
}

@media(max-width: 767px){
.index-auth-buttons .msb-btn {
width: 100%;
max-width: 150px;
margin: 10px auto;
display: block;
}
}






@media(max-width: 992px){
.nav-icons-inner {
justify-content: flex-end;
padding: 25px 15px;
}
.nav-icons-inner a {
padding: 0 16px;
white-space: nowrap;
}
}

@media(max-width: 992px){
.page-exitBottom {
position: absolute;
top: 30px;
color: #fff;
font-size: 1rem;
margin-right: 0px;
}
}

@media(max-width: 992px){
.logo-container span { margin-top: 0px; }
.logo-link { margin-bottom: 0px; }
.signout-link { margin-bottom: 0px; }
.page-exitBottom  {
position: relative;
top: 5px;
color: #fff;
font-size: 1rem;
}
}

@media(max-width: 992px){
.desktop-search { display: none; }
.mobile-search { display: block; }
}

@media(max-width: 992px){
nav ul li a {
padding: 15px 20px;
white-space: nowrap;
}
nav ul {
gap: 0;
}
}

@media(max-width: 992px){
.icon-bell { padding-left: 15px; padding-bottom:30px; }
.icon-trolly { padding-right: 15px; padding-bottom:30px; }
.textMsg { padding-right: 15px; padding-bottom:30px; }
}

@media(max-width:992px){
.top-row-mobile .row-2 {
width:90%;
padding:0 15px;
}
.signout-container { display: none !important; }
.mobile-signout { display: block; }
}

/* Hide MSB nav item on ≤992px */
@media(max-width: 992px){
#msb { display: none !important; }
}

/* ============================ MOBILE NAV & MEGA-PANEL =============================== */

@media(max-width:992px){

/* Mobile header layout */
.top-row { display:none !important; }
.top-row-mobile { 
display:flex; 
flex-direction:column; 
gap:10px; 
background: linear-gradient(135deg, #3ba9ff, #122041);
padding:0;
}
.top-row-mobile .row-1 { justify-content:flex-start; padding:10px 15px; display:flex; align-items:center; }
.top-row-mobile .row-2 { width:100%; padding:0 15px; }
.top-row-mobile .row-3 { display:flex; justify-content:space-between; align-items:center; padding:10px 15px; }
.menu-left .menu-msb { font-weight:bold; font-size:1.2rem; color:#fff; text-decoration:none; }
.nav-toggle { display:flex; }

/* Mobile nav list */
nav ul { 
display:none; 
flex-direction:column; 
width:100%;
background: linear-gradient(135deg, #3ba9ff, #122041);
}
nav ul.show { display:flex; }

/* Default mobile mega-panel state: CLOSED */
.mega-panel {
display:none;
position: static;
width: 100%;
padding: 10px;
box-shadow: none;
background: #f8f8f8;
}

/* OPEN state (when JS adds .open) */
.nav-item.open > .mega-panel {
display:block;
}
}

@media(min-width:993px){
.top-row-mobile { display:none !important; }
}

@media(min-width: 993px){
.mobile-signout { display: none !important; }
}

@media(min-width: 993px){
nav ul li a {
padding: 15px 12px;
white-space: nowrap;
}
nav ul {
gap: 5px;
}
}



/* Improve spacing around the search bar */
.search-container {
padding: 12px 16px;
}


