/* ===================================
   PROFESSIONAL DESIGN SYSTEM
=================================== */

:root{
  --primary:#1f3c88;
  --primary-dark:#14274e;
  --accent:#f59e0b;
  --bg:#f8f9fb;
  --card-bg:#ffffff;
  --text:#1e293b;
  --muted:#64748b;
  --radius:12px;
}

/* ===================================
   GLOBAL
=================================== */

*{
  box-sizing:border-box;
}

html,body{
  margin:0;
  padding:0;
  height:100%;
  font-family:"Segoe UI",system-ui,-apple-system,sans-serif;
  background:var(--bg);
  color:var(--text);
}

.container{
  max-width:1180px;
  margin:auto;
  padding:20px 20px; /* reduced for compact feel */
}

/* ===================================
   STICKY FOOTER
=================================== */

.page-wrapper{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

footer{
  margin-top:auto;
}

/* ===================================
   COMPACT HEADER
=================================== */

.main-header{
  background:var(--primary);
  padding:8px 0; /* compact height */
  position:sticky;
  top:0;
  z-index:1000;
  box-shadow:0 4px 15px rgba(0,0,0,0.06);
}

.header-flex{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

/* Brand */

.logo{
  display:flex;
  flex-direction:column;
}

.brand-name{
  font-size:22px;
  font-weight:700;
  color:#fff;
  text-decoration:none;
  letter-spacing:0.5px;
}

.brand-tagline{
  font-size:10px;
  color:#dbeafe;
  margin-top:2px;
}

/* Navbar */

#navbar a{
  margin-left:18px;
  color:#fff;
  text-decoration:none;
  font-weight:500;
  font-size:14px;
  transition:0.2s ease;
}

#navbar a:hover{
  opacity:0.8;
}

/* ===================================
   HERO SECTION
=================================== */

.hero{
  background:#ffffff;
  padding:50px 0;
  border-bottom:1px solid #e5e7eb;
}

.hero-layout{
  display:flex;
  justify-content:space-between;
  gap:60px;
  flex-wrap:wrap;
}

.hero-text{
  flex:1;
  min-width:300px;
}

.hero-text h1{
  font-size:32px;
  font-weight:700;
  margin-bottom:16px;
}

.hero-text p{
  font-size:15px;
  color:var(--muted);
  line-height:1.6;
  margin-bottom:22px;
}

/* Primary Button */

.btn-primary{
  background:var(--primary);
  color:#fff;
  padding:10px 20px;
  border-radius:8px;
  text-decoration:none;
  font-weight:600;
  display:inline-block;
  transition:0.2s ease;
}

.btn-primary:hover{
  background:var(--primary-dark);
}

/* ===================================
   HERO TOP RATED
=================================== */

.hero-top-rated{
  width:320px;
}

.hero-top-rated h3{
  font-size:17px;
  margin-bottom:18px;
  font-weight:600;
}

.hero-small-card{
  display:flex;
  gap:12px;
  padding:12px;
  background:#f1f5f9;
  border-radius:10px;
  margin-bottom:12px;
  transition:0.2s ease;
}

.hero-small-card:hover{
  background:#e2e8f0;
}

.hero-small-card img{
  width:65px;
  height:65px;
  object-fit:contain;
}

.hero-small-info h4{
  font-size:13px;
  margin:0 0 5px;
}

.hero-small-info .rating{
  color:var(--accent);
  font-weight:600;
  font-size:13px;
}

.hero-small-info .price{
  font-weight:600;
  font-size:13px;
}

/* ===================================
   PRODUCT GRID (4 DESKTOP)
=================================== */

.products{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:28px;
  margin-top:35px;
}

/* Tablet */
@media(max-width:1024px){
  .products{
    grid-template-columns:repeat(2,1fr);
  }
}

/* Mobile */
@media(max-width:600px){
  .products{
    grid-template-columns:1fr;
  }
}

/* ===================================
   PRODUCT CARD
=================================== */

.card{
  background:var(--card-bg);
  padding:18px;
  border-radius:var(--radius);
  box-shadow:0 6px 20px rgba(0,0,0,0.04);
  transition:0.25s ease;
  text-align:center;
}

.card:hover{
  transform:translateY(-4px);
  box-shadow:0 12px 30px rgba(0,0,0,0.06);
}

.card img{
  width:100%;
  height:190px;
  object-fit:contain;
}

.card h3{
  font-size:15px;
  margin:12px 0;
  min-height:45px;
}

.price{
  font-size:17px;
  font-weight:700;
  margin-bottom:8px;
}

/* Secondary Button */

.btn{
  background:var(--accent);
  color:#fff;
  padding:8px 14px;
  border-radius:6px;
  text-decoration:none;
  font-weight:600;
  font-size:14px;
  transition:0.2s ease;
}

.btn:hover{
  opacity:0.9;
}

/* ===================================
   CATEGORY TITLE
=================================== */

#category-title{
  font-size:26px;
  margin-top:10px;
  margin-bottom:20px;
}
.category-description{
  font-size:15px;
  color:var(--muted);
  max-width:850px;
  line-height:1.7;
  margin-bottom:30px;
}
/* ===================================
   PRODUCT DETAIL
=================================== */

#product-detail{
  background:#fff;
  padding:35px;
  border-radius:var(--radius);
  box-shadow:0 8px 25px rgba(0,0,0,0.04);
  margin-top:35px;
  text-align:center;
}

#product-detail h1{
  font-size:26px;
  margin-bottom:18px;
}

#product-detail img{
  max-width:280px;
  margin:18px 0;
}

#product-detail p{
  color:var(--muted);
  line-height:1.6;
}

/* ===================================
   FOOTER
=================================== */

footer{
  background:var(--primary-dark);
  color:#fff;
  padding:35px 0;
  text-align:center;
  font-size:13px;
}

/* ===================================
   RESPONSIVE HEADER
=================================== */

@media(max-width:768px){

  .header-flex{
    flex-direction:column;
    align-items:flex-start;
  }

  #navbar{
    margin-top:8px;
  }

  #navbar a{
    margin-right:14px;
    margin-left:0;
  }

  .hero-text h1{
    font-size:24px;
  }

}