/* =====================================================
   RESET / TOKENS
===================================================== */
* { box-sizing: border-box; }

:root{
  --bg: #0f1216;           /* page canvas */
  --surface: #151a20;      /* section surface */
  --surface-2: #1b222b;    /* elevated bar */
  --text: #e8edf2;         /* primary text */
  --muted: #a9b4c0;        /* secondary */
  --card: #ffffff;         /* product cards (intentionally light) */
  --cardText: #0f1111;     /* inside card */
  --cardMuted: #565959;    /* inside card muted */
  --border: rgba(255,255,255,.08);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --brand: #ffd814;        /* buy button */
  --brandHover: #f7ca00;
  --topbar: #131921;       /* amazon-like */
  --topbar2: #232f3e;
}

html, body { height: 100%; }

body{
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 10% 0%, rgba(255,216,20,.10), transparent 55%),
              radial-gradient(900px 500px at 90% 10%, rgba(90,200,250,.10), transparent 60%),
              var(--bg);
  color: var(--text);
}

/* =====================================================
   TOP BAR
===================================================== */
.top-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding: 12px 20px;
  background: linear-gradient(180deg, rgba(0,0,0,.25), transparent),
              var(--topbar);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.top-bar img{
  height: 34px;
  width: auto;
}

.news-alert{
  padding: 6px 12px;
  background: #f1c40f;
  color: #111;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.top-bar-right{
  display:flex;
  align-items:center;
  gap:10px;
}

.top-bar-right select,
.top-bar-right a{
  padding: 7px 10px;
  font-size: 13px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 8px;
  color: #fff;
  text-decoration:none;
  cursor:pointer;
}

.top-bar-right select{
  outline:none;
}

.shopping-cart{ position: relative; }
.badge{
  position:absolute;
  top:-8px;
  right:-8px;
  width:18px;
  height:18px;
  display:grid;
  place-items:center;
  background:#f08804;
  color:#111;
  font-size:11px;
  font-weight:800;
  border-radius:999px;
}

/* =====================================================
   SEARCH
===================================================== */
.search-container{
  padding: 18px 20px;
  background: var(--surface-2);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.search-container input{
  display:block;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  color: var(--text);
}

.search-container input::placeholder{ color: rgba(232,237,242,.55); }

/* =====================================================
   NAV
===================================================== */
.navigation-menu{
  display:flex;
  justify-content:center;
  gap: 26px;
  padding: 14px 18px;
  background: var(--surface);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.navigation-menu a{
  color: var(--text);
  text-decoration:none;
  font-size: 14px;
  font-weight: 600;
  opacity: .92;
}

.navigation-menu a:hover{ opacity: 1; color: var(--brand); }

/* =====================================================
   FEATURED / SLIDER WRAPPER (dark; actual slide styling in acasa-slider.css)
===================================================== */
.slider-container{
  width: 100%;
  max-width: 1240px;
  margin: 28px auto 0;
  padding: 18px 16px 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

/* =====================================================
   MAIN CONTENT LAYOUT
===================================================== */
.main-content{
  width: 100%;
  max-width: 1240px;
  margin: 22px auto 60px;
  padding: 0 16px;
  display:flex;
  flex-direction: column;
  gap: 34px;
}

/* Each section is a grid (title + cards) */
.product-showcase,
.best-selling,
.new-arrivals{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
}

/* JS injects this title inside each section */
.main-content-title{
  grid-column: 1 / -1;          /* CRITICAL: title spans full width */
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--text);
}

/* =====================================================
   PRODUCT CARD
===================================================== */
.product{
  background: var(--card);
  color: var(--cardText);
  border-radius: 14px;
  padding: 14px;
  display:flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 8px 18px rgba(0,0,0,.15);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.product:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0,0,0,.22);
}

.product img{
  width: 100%;
  height: 190px;
  object-fit: contain;
  background: #f7f7f7;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.06);
}

/* Text inside card */
.product-text{
  display:flex;
  flex-direction: column;
  gap: 6px;
}

.product-text h3{
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;

  /* keep it neat like eMAG/Amazon */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-text p{
  margin: 0;
  font-size: 13px;
  color: var(--cardMuted);
  line-height: 1.35;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rating{
  color: #f0c14b;
  font-size: 12px;
}

/* Price (your JS outputs "Price: $xx") */
.product-text p:last-of-type{
  margin-top: 2px;
  font-size: 18px;
  font-weight: 900;
  color: #b12704;
  -webkit-line-clamp: 1;
}

/* Button */
.product button{
  margin-top: auto;
  padding: 10px 12px;
  background: var(--brand);
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.product button:hover{
  background: var(--brandHover);
}

/* =====================================================
   FOOTER
===================================================== */
footer{
  background: var(--topbar);
  color:#fff;
  padding: 16px 24px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,.06);
}

footer .social-media-icons a{
  color:#fff;
  margin: 0 8px;
  font-size: 18px;
}

footer .copyright{ font-size: 12px; opacity: .9; }

/* =====================================================
   MOBILE
===================================================== */
@media (max-width: 768px){
  .top-bar{
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .news-alert{ order: 3; width: 100%; text-align:center; }

  .navigation-menu{
    flex-wrap: wrap;
    gap: 14px;
  }

  .product-showcase,
  .best-selling,
  .new-arrivals{
    padding: 14px;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }

  .product img{ height: 160px; }
}
