/* ===== Marketplace Topbar ===== */
.topbar {
  background:#fff;
  border-bottom:1px solid #eee;
  position:sticky;
  top:0;
  z-index:2000;
}

.topbar-inner {
  max-width:1200px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
}

.brand img {
  height:32px;
}

.main-nav {
  display:flex;
  gap:24px;
  font-weight:600;
}

.main-nav a {
  color:#111;
  font-size:14px;
}

.main-nav a.active {
  color:#ff2b92;
}

.nav-right {
  display:flex;
  align-items:center;
  gap:16px;
}

.cta-top {
  background:#ff2b92;
  color:#fff;
  padding:8px 16px;
  border-radius:999px;
  font-weight:600;
  font-size:14px;
}

.mobile-toggle {
  display:none;
  font-size:22px;
  background:none;
  border:0;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}


/* =========================
   AUTO SCROLL FEATURED SELLERS
========================= */

.h-scroll{
  overflow:hidden;
  position:relative;
}

.h-track{
  display:flex;
  gap:16px;
  width:max-content;
  animation: scrollFeatured 40s linear infinite;
}

@keyframes scrollFeatured{
  from{
    transform:translateX(0);
  }
  to{
    transform:translateX(-50%);
  }
}

/* Pause on hover (desktop only) */
@media (hover:hover){
  .h-scroll:hover .h-track{
    animation-play-state:paused;
  }
}


/* =========================
   Sponsored Tag
========================= */

.sponsored-tag{
  position:absolute;
  top:12px;
  right:12px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  font-size:11px;
  font-weight:600;
  border-radius:999px;

  backdrop-filter:blur(4px);
  letter-spacing:.3px;
  text-transform:uppercase;
  background:rgba(255,255,255,0.85);
color:#111;
box-shadow:0 4px 10px rgba(0,0,0,0.1);
}

.sponsored-tag.small{
  position:static;
  margin-bottom:8px;
  font-size:10px;
  padding:3px 8px;
  background:rgba(255,255,255,0.85);
color:#111;
box-shadow:0 4px 10px rgba(0,0,0,0.1);
}

.sponsored-icon{
  font-size:10px;
  opacity:.9;
}

/* Ensure hero can position absolute badge */
.hero{
  position:relative;
  border-radius:16px;
  overflow:hidden;
  background:linear-gradient(180deg,#eef2f7,#ffffff);
  
}

/* Image */
.hero-media{
  width:100%;
}

.hero-media img{
  width:100%;
  height:auto;
  display:block;
}

/* Text area */
.hero-content{
  padding:28px;
}

@media (min-width: 768px) {

  /* Only when hero has no image */
  .hero:not(.hero-has-image) {
    display:flex;
    align-items:center;
    min-height:280px; /* adjust height as needed */
  }

  .hero:not(.hero-has-image) .hero-content {
    width:100%;
  }

}
/* ========= MOTTA-INSPIRED THEME (single-file CSS) ========= */
/* Variables */
:root{
  --bg:#ffffff;
  --muted:#6b7280;
  --text:#0f172a;
  --accent1:#291044; /* top bar dark purple */
  --accent2:#7b2b9d; /* gradient stop */
  --accent-grad: linear-gradient(90deg,#ff2b92,#6f1e6e);
  --glass: rgba(255,255,255,0.6);
  --card-radius:14px;
  --card-shadow: 0 8px 24px rgba(16,24,40,0.08);
  --gap:18px;
  font-family: Inter, system-ui, -apple-system, "Helvetica Neue", Arial;
}

/* Reset & base */
* { box-sizing: border-box; }
html,body { height:100%; margin:0; background:#f6f7fb; color:var(--text); -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }
a { color:inherit; text-decoration:none; }
.container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
}

/* Announcement strip */
.announce {
  background:#f1f5f9;
  color:#111827;
  padding:10px 18px;
  text-align:center;
  font-weight:600;
  border-bottom:1px solid rgba(15,23,42,0.04);
}

/* Header - motta style */
.header {
  display:flex;
  align-items:center;
  gap:16px;
  padding:14px 16px;
  background:var(--accent1);
  color:white;
  border-radius:8px;
  margin:12px 0;
}

.header-links {
  display:flex;
  gap:18px;
  font-size:14px;
  white-space:nowrap;
}

.header-links a {
  color:white;
  font-weight:500;
}
.header .left { display:flex; align-items:center; gap:12px; }
.hamburger { width:42px; height:42px; display:flex; align-items:center; justify-content:center; border-radius:10px; background:rgba(255,255,255,0.06); cursor:pointer; }
.logo { font-weight:700; font-size:20px; letter-spacing:0.4px; display:flex; align-items:center; gap:8px; }
.logo img { height:30px; }
.searchbar { flex:1; display:flex; align-items:center; gap:8px; background:white; border-radius:999px; padding:8px 14px; box-shadow:0 6px 18px rgba(2,6,23,0.08); }
.searchbar input { border:0; outline:none; flex:1; font-size:14px; padding:8px; }
.header .icons { display:flex; gap:12px; align-items:center; }

/* Layout columns */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

/* Sidebar (desktop categories) */
.sidebar {
  background:white;
  border-radius:12px;
  padding:12px;
  box-shadow:var(--card-shadow);
  height:fit-content;
}
.cat-item { display:flex; align-items:center; gap:10px; padding:10px; border-radius:10px; cursor:pointer; transition:background .18s; }
.cat-item:hover { background:rgba(16,24,40,0.03); }
.cat-icon { width:40px; height:40px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:linear-gradient(180deg,#fff,#f5f6fa); box-shadow:0 6px 10px rgba(2,6,23,0.04); }
.cat-text { font-weight:600; }

/* Main hero + right banners area (motta layout) */
.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: 18px;
  width: 100%;
  box-sizing: border-box;
}



.hero h1 { margin:0; font-size:28px; }
.hero p { color:var(--muted); margin-top:8px; }
.hero .cta { margin-top:14px; display:inline-block; padding:10px 18px; border-radius:999px; background:var(--accent-grad); color:#fff; font-weight:700; }

/* Right stacked banners */
.side-banners { display:flex; flex-direction:column; gap:12px; }
.side-banner { background:white; padding:14px; border-radius:12px; box-shadow:var(--card-shadow); display:flex; gap:8px; align-items:center; justify-content:space-between; }

/* Guarantees strip */
.guarantees { display:flex; gap:18px; margin:24px 0; justify-content:space-between; }
.guarantee { background:white; flex:1; border-radius:12px; padding:14px; display:flex; gap:12px; align-items:center; box-shadow:var(--card-shadow); }

/* Section blocks (cards) */
.section {
  background:white;
  border-radius:12px;
  padding:14px;
  box-shadow:var(--card-shadow);
  margin-bottom:18px;
}
.section .section-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.section .section-head h3 { margin:0; }


.h-card { min-width:220px; background:linear-gradient(180deg,#fff,#fff); border-radius:10px; overflow:hidden; box-shadow:var(--card-shadow); }

/* Product grid (motta-like rows with cards) */
.products-wrap { margin-top:6px; }
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

.prod-card {
  background:white;
  border-radius:12px;
  overflow:hidden;
  box-shadow:var(--card-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.prod-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(16,24,40,0.12); }
.prod-media { width:100%; height:180px; display:block; overflow:hidden; background:#f3f4f6; }
.prod-media img { width:100%; height:100%; object-fit:cover; display:block; }
.prod-body { padding:12px; }
.prod-title { font-weight:600; font-size:14px; margin-bottom:6px; color:var(--text); }
.prod-store { color:var(--muted); font-size:13px; margin-bottom:8px; }
.prod-bottom { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.price { font-weight:700; font-size:15px; color:#111; }

/* Badges */
.badge { background:#ff5a8f; color:#fff; padding:6px 8px; border-radius:999px; font-weight:700; font-size:12px; }

/* Load more */
.load-more { display:flex; justify-content:center; margin-top:14px; }
.btn { display:inline-block; padding:10px 16px; border-radius:999px; background:var(--accent1); color:white; font-weight:700; border:0; cursor:pointer; }




/* Bottom nav mobile (floating) */
.bottom-nav {
  display:none;
  position:fixed;
  left:14px;
  right:14px;
  bottom:14px;
  height:64px;

  /* Soft classy gradient background */
  background: linear-gradient(
    180deg,
    #f5cee6 0%,
    #fafafa 100%
  );

  border-radius:20px;

  /* Soft magenta edge */
  border: 1.5px solid rgba(255,23,106,0.25);

  /* 3D floating depth */
  box-shadow:
    0 4px 10px rgba(0,0,0,0.06),     /* tight shadow */
    0 18px 40px rgba(0,0,0,0.18),    /* deep lift */
    inset 0 1px 0 rgba(255,255,255,0.8); /* top bevel highlight */

  align-items:center;
  justify-content:space-around;
  z-index:1200;
}
.bottom-nav a { text-align:center; font-size:12px; color:var(--text); text-decoration:none; }
@media (max-width: 1100px) {
  .bottom-nav {
    display: flex;
  }
}




.h-scroll{
  display:flex;
  gap:16px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
}

.h-scroll::-webkit-scrollbar{
  display:none;
}

.h-card{
  min-width:200px;
  flex-shrink:0;
  scroll-snap-align:start;
  transition:transform .2s ease;
}

.h-card:hover{
  transform:translateY(-4px);
}

/* Responsive */
@media (max-width: 1100px) {
  .featured-sellers{
    margin-top:24px;
  }    
   .layout {
    grid-template-columns: 1fr;
  }
  

  .hero { min-height:180px; }
  .guarantees { flex-direction:column; gap:10px; }
  .products-grid { grid-template-columns: repeat(3,1fr); }
}

@media (max-width:420px) {
  .products-grid { grid-template-columns: 1fr 1fr; }
  .prod-media { height:140px; }
  .hero h1 { font-size:18px; }
}

@media (max-width: 900px) {

  .main-nav {
    display:none;
    position:absolute;
    top:60px;
    left:0;
    right:0;
    background:#fff;
    flex-direction:column;
    padding:20px;
    box-shadow:0 20px 40px rgba(0,0,0,0.08);
    gap:14px;
  }

  .main-nav.show {
    display:flex;
  }

  .mobile-toggle {
    display:block;
  }

}



/* =========================
   MOBILE SIDEBAR (APP STYLE)
========================= */

@media (max-width:1100px){

  .market-content{
    display:flex;
    flex-direction:column;
  }

  .guarantees{
    order: 99;
    margin-top: 24px;
    margin-bottom:30px;
  }
  .layout{
    grid-template-columns:1fr;
  }

  .sidebar{
    display:block;              /* important */
    position:fixed;
    top:0;
    left:0%;
    width:85%;
    max-width:320px;
    height:100vh;
    background:#fff;
    z-index:5000;
    padding:20px 16px;
    box-shadow:0 30px 60px rgba(0,0,0,0.15);
    transition:left .3s ease;
    overflow-y:auto;
    
      /* animation */
  transform:translateX(-100%);
  transition:transform .32s cubic-bezier(.22,.61,.36,1);
  will-change:transform;
  }
  
  body.sidebar-open .sidebar{
  transform:translateX(0);
}

  body.sidebar-open .sidebar{
    left:0;
  }

  body.sidebar-open{
    overflow:hidden;
  }

}

/* =========================
   MOBILE HEADER (APP MODE)
========================= */

/* =========================================
   ISSUE #1 — MOBILE FULL-WIDTH HEADER
========================================= */
@media (max-width:768px){
   .hero{
    padding-top:48px; /* creates space for badge */
  }

  .sponsored-tag{
    top:10px;
    right:12px;
  }   
    .hero-row {
    grid-template-columns: 1fr;
  }
  
  header.container{
    max-width:100%;
    padding:0;
  }

  .header{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    padding:18px 16px 16px;
    margin:0;
    border-radius:0;
    gap:12px;
  }

  /* Top Row Container */
  .header .left{
    display:flex;
    align-items:center;
    gap:12px;
    flex:1 1 auto;
  }

  /* Hide other links */
  .header-links a:not(:first-child){
    display:none;
  }

  /* Force Build button to stay inline */
  .header-links{
    flex:0 0 auto;
    order:2;
  }

  .header-links a{
    background:var(--accent-grad);
    color:#fff;
    padding:8px 14px;
    font-size:13px;
    border-radius:999px;
    font-weight:600;
    box-shadow:0 4px 10px rgba(255,43,146,0.35);
    white-space:nowrap;
  }

  /* Search takes full row */
  .searchbar{
    order:3;
    width:100%;
    margin-top:4px;
  }

}

@media (max-width:768px){


  .container{
    padding:0 14px;
  }

  .h-scroll{
    gap:12px;
  }

  .h-card{
    min-width:140px;
    border-radius:14px;
  }

  .vendor-logo-wrap{
    height:90px;
    padding:12px;
  }

  .h-card strong{
    font-size:13px;
  }

}

.pagination{
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
}

/* Vendor logo container */
.vendor-logo-wrap {
  height: 140px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  border-bottom: 1px solid #f1f1f1;
}

.vendor-logo-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Hero gradient when no image */
.hero-gradient {
  background: linear-gradient(
    155deg,
    #ffffff 0%,
    #fff3f8 60%,
    #ff2b92 100%
  );
  color: #111;
}

.hero-gradient h1 {
  color: #111;
}

.hero-gradient p {
  color: #4b5563;
}

.hero-gradient .cta {
  background: #111;
  color: #fff;
}

@media (max-width:768px){
  .hero-row{
    margin-top:16px;
  }
  .section{
    border-radius:16px;
    padding:16px;
  }

  .hero{
    border-radius:16px;
  }

  .guarantees{
    gap:12px;
  }

  .guarantee{
    border-radius:16px;
  }
  
  body{
    background:#eef1f6;
  }
  
  
}

/* =========================================
   ISSUE #2 — HERO ROW OVERFLOW FIX
========================================= */
html, body {
  overflow-x: hidden;
}


@media (max-width:1100px){

  main.container{
    overflow-x:hidden;
  }

  .layout{
    width:100%;
    overflow-x:hidden;
  }

  section{
    width:100%;
    overflow-x:hidden;
  }

}
/* =========================================
   MOBILE SIDEBAR UI ENHANCEMENT
========================================= */

.sidebar-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
  padding-bottom:10px;
  border-bottom:1px solid #eee;
}

.sidebar-all{
  display:inline-block;
  font-size:13px;
  color:var(--muted);
  margin-bottom:10px;
}

/* Pretty Close Button */
.sidebar-close:hover{
  background:#ff2b92;
  color:#fff;
  transform:rotate(90deg);
}


/* Hide close button on desktop */
/* Pretty Close Button */
.sidebar-close{
  display:none; /* default hidden */
  width:36px;
  height:36px;
  border-radius:50%;
  border:none;
  background:#f3f4f6;
  align-items:center;
  justify-content:center;
  font-size:16px;
  cursor:pointer;
  transition:all .2s ease;
}

/* Show only in mobile/tablet overlay mode */
@media (max-width:1100px){
  .sidebar-close{
    display:flex;
  }
}

/* Overlay */
.sidebar-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.35);
  backdrop-filter:blur(2px);
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease;
  z-index:4000;
}

body.sidebar-open .sidebar-overlay{
  opacity:1;
  pointer-events:auto;
}
/* =========================
   SUBHERO WITH IMAGE (LEFT)
========================= */

.side-banner{
  display:flex;
  gap:14px;
  align-items:center;
  padding:16px;
}

/* Image container */
.side-banner-media{
  width:90px;
  height:90px;
  flex-shrink:0;
  border-radius:12px;
  overflow:hidden;
  background:#f3f4f6;
  display:flex;
  align-items:center;
  justify-content:center;
}

.side-banner-media img{
  width:100%;
  height:100%;
  object-fit:cover;
}

/* Fallback if no image */
.side-banner-fallback{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:600;
  color:#666;
  background:linear-gradient(135deg,#fafafa,#eee);
}

/* Text area */
.side-banner-content{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.side-banner-title{
  font-weight:700;
  font-size:14px;
}

.side-banner-desc{
  font-size:13px;
  color:var(--muted);
}
.side-banner-content{
  align-items:flex-start;
}

.side-banner-link{
  display:block;
  text-decoration:none;
  color:inherit;
}

.side-banner-link:hover .side-banner{
  transform:translateY(-3px);
  box-shadow:0 12px 30px rgba(0,0,0,0.12);
}
/* Hide hamburger on desktop */
@media (min-width:1101px){
  .hamburger{
    display:none;
    pointer-events:none;
  }
}

/* =========================
   SIDEBAR AD CARD
========================= */

.sidebar-ad{
  display:flex;
  flex-direction:column;
  background:#fff;
  border-radius:14px;
  overflow:hidden;
  box-shadow:var(--card-shadow);
  text-decoration:none;
  color:inherit;
  transition:all .2s ease;
  position:relative;
  margin-bottom:20px;
  margin-top:20px;
}

.sidebar-ad:hover{
  transform:translateY(-4px);
  box-shadow:0 18px 40px rgba(0,0,0,0.12);
}

/* IMAGE BLOCK */
.sidebar-ad-media{
  position:relative;
  width:100%;
  height:170px;
  overflow:hidden;
  background:#f3f4f6;
}

.sidebar-ad-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Sponsored overlay on image */
.sponsored-tag.overlay{
  position:absolute;
  top:10px;
  right:10px;
  background:rgba(255,255,255,0.9);
  backdrop-filter:blur(4px);
  padding:4px 10px;
  font-size:11px;
  font-weight:600;
  border-radius:999px;
  box-shadow:0 4px 12px rgba(0,0,0,0.12);
}

/* No-image spacer */
.sidebar-ad-noimg{
  height:20px;
}

/* Sponsored above text when no image */
.sponsored-tag.noimg{
  margin:12px 14px 0;
  align-self:flex-start;
  background:#f3f4f6;
  padding:4px 10px;
  font-size:11px;
  font-weight:600;
  border-radius:999px;
}

/* Content block */
.sidebar-ad-content{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.sidebar-ad-title{
  font-weight:700;
  font-size:14px;
}

.sidebar-ad-desc{
  font-size:13px;
  color:var(--muted);
}
/* =========================
   MOVE SIDEBAR TO BOTTOM ON TABLET & MOBILE
========================= */

@media (max-width:1100px){

  .layout{
    display:flex;
    flex-direction:column;
  }

  .sidebar-column{
    order: 2;   /* push below main content */
    margin-bottom:120px; /* prevents overlap with floating nav */
  }
  }

  .market-content{
    order: 1;
  }


  @media (max-width:1100px) and (min-width:600px){

  .sidebar-ad-media{
    height:240px; /* more visual balance on tablet */
  }

}
/* =========================================
   SIDEBAR ADS GRID (TABLET & MOBILE)
========================================= */

@media (max-width:1100px){

  .sidebar-extras{
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:16px;
  }

  /* Make cards tighter in grid mode */
  .sidebar-ad{
    border-radius:16px;
  }

  .sidebar-ad-media{
    height:180px;
  }

}

/* Mobile breakpoint */
@media (max-width:600px){

  .sidebar-extras{
    grid-template-columns:repeat(2, 1fr);
    gap:14px;
  }

  .sidebar-ad-media{
    height:150px;
  }

}
/* iOS Safari search field fix */
.searchbar input[type="search"],
.searchbar input[type="text"]{
  -webkit-appearance: none;
  appearance: none;
  background:#ffffff !important;
  border:0;
  box-shadow:none;
  border-radius:999px;
}

.price{
    font-weight:700;
    font-size:16px;
    color:#111;
}

.old-price{
    text-decoration: line-through;
    color:#888;
    font-weight:400;
    margin-left:6px;
    font-size:0.9em;
}