* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Inter, sans-serif;
  background: #f0f6ff;
  color: #0f172a;
}

/* =====================
   THEME VARIABLES
===================== */
:root {
  --primary: #2563eb;       /* main blue */
  --primary-dark: #1e40af;
  --muted: #64748b;
  --card: #ffffff;
  --radius: 18px;
  --border: #e5e7eb;
}

/* =====================
   LAYOUT
===================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* =====================
   HEADER / NAV
===================== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: white;
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-weight: 800;
  font-size: 20px;
  color: var(--primary);
}

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

input {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  outline: none;
}

input:focus {
  border-color: var(--primary);
}

/* =====================
   BUTTONS
===================== */
button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font-weight: 600;
}

button:hover {
  background: var(--primary-dark);
}

button.outline {
  background: white;
  color: var(--primary);
  border: 1px solid var(--primary);
}

/* =====================
   HERO
===================== */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: 42px;
  line-height: 1.1;
}

.hero p {
  margin-top: 12px;
  color: var(--muted);
}

.hero img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(37,99,235,.15);
}

/* =====================
   FILTERS
===================== */
.filters {
  display: flex;
  gap: 10px;
  margin: 10px 0 20px;
  flex-wrap: wrap;
}

.filters button {
  background: white;
  color: var(--primary);
  border: 1px solid var(--border);
}

.filters button.active,
.filters button:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* =====================
   PRODUCTS
===================== */
.section-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.grid a {
  color: inherit; 
  text-decoration: none;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(37,99,235,.15);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-body {
  padding: 14px;
}

.price {
  color: var(--muted);
  font-size: 14px;
  margin-top: 6px;
}

.rating {
  font-size: 13px;
  color: #475569;
  margin-top: 4px;
}

.card-body button {
  width: 100%;
  margin-top: 12px;
}

/* =====================
   FLOATING CART
===================== */
.floating-cart {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary);
  color: white;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(37,99,235,.4);
  z-index: 1000;
}

.floating-cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: white;
  color: var(--primary);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
  min-width: 18px;
  text-align: center;
  display: none;
}

/* =====================
   FOOTER
===================== */
footer {
  background: white;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

footer .container {
  color: var(--muted);
  font-size: 14px;
}

/* =====================
   DRAWER / MENU
===================== */
.menu-btn {
  font-size: 22px;
  background: none;
  color: var(--primary);
  padding: 6px 10px;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  display: none;
  z-index: 90;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100%;
  background: white;
  transform: translateX(-100%);
  transition: transform .3s ease;
  z-index: 100;
  padding: 16px;
  box-shadow: 6px 0 25px rgba(0,0,0,.15);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-overlay.show {
  display: block;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  color: var(--primary);
  font-weight: 700;
}

.drawer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-links a,
.drawer-links button {
  text-align: left;
  background: #f1f5ff;
  color: var(--primary-dark);
  border-radius: 12px;
  padding: 10px 12px;
}

.drawer-links a:hover,
.drawer-links button:hover {
  background: var(--primary);
  color: white;
}

.drawer-links hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 10px 0;
}

.drawer-title {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

/* =====================
   RESPONSIVE
===================== */
@media(max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media(max-width: 520px) {
  .grid { grid-template-columns: 1fr; }

  .cart-icon { display: none; }
  .filters { display: none; }

  .hero h1 { font-size: 22px; }

  .nav-right input {
    max-width: 80%;
    margin-left: 10px;
  }

  .menu-btn {
    margin-left: -18px;
  }
}