/* Basic reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: #f5f5f5;
  color: #222;
  line-height: 1.5;
}

/* Layout helpers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Top bar */
.top-bar {
  background: #222;
  color: #eee;
  font-size: 0.85rem;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e2e2;
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
}

.logo a {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  font-size: 1.1rem;
  color: #222;
}

/* Nav */
.main-nav {
  display: flex;
  gap: 16px;
  flex: 1;
  justify-content: center;
}

.main-nav a {
  text-decoration: none;
  color: #444;
  font-size: 0.95rem;
  padding: 4px 8px;
  border-radius: 4px;
}

.main-nav a:hover {
  background: #f0f0f0;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-form input {
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid #d0d0d0;
  font-size: 0.9rem;
}

.cart-link {
  text-decoration: none;
  font-size: 1.1rem;
  color: #222;
  position: relative;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #e53935;
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  padding: 2px 5px;
}

/* Mobile menu toggle (hidden on desktop) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.3rem;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #fdfdfd 0%, #f0f4ff 100%);
  padding: 32px 0 40px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: center;
}

.hero-text h1 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.hero-text p {
  color: #555;
  margin-bottom: 20px;
  max-width: 32rem;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: #1976d2;
  color: #fff;
}

.btn-primary:hover {
  background: #115293;
}

.btn-outline {
  background: #ffffff;
  border-color: #1976d2;
  color: #1976d2;
}

.btn-outline:hover {
  background: #e3f2fd;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-secondary {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
}

.btn-secondary:hover {
  background: #f3f4f6;
}


/* Hero image placeholder */
.hero-image-placeholder {
  background: #d6e4ff;
  border-radius: 16px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #345;
  font-size: 0.95rem;
}

/* Sections */
.section {
  padding: 32px 0;
}

.section-grey {
  background: #f1f1f1;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  gap: 12px;
}

.section-header h2 {
  font-size: 1.4rem;
}

.section-link {
  font-size: 0.9rem;
  color: #1976d2;
  text-decoration: none;
}

.section-link:hover {
  text-decoration: underline;
}

/* Category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.category-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 12px 10px;
  text-align: center;
  text-decoration: none;
  color: #222;
  border: 1px solid #e1e1e1;
  transition: transform 0.1s ease, box-shadow 0.1s ease, border-color 0.1s ease;
}

.category-icon {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.category-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.category-card:hover {
  border-color: #1976d2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* Product card */
.product-card {
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid #e1e1e1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-image-wrapper {
  position: relative;
  display: block;
}

.product-image-wrapper img {
  display: block;
  width: 100%;
  height: auto;
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #1976d2;
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 999px;
}

.product-badge-sale {
  background: #e53935;
}

.product-info {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.product-title a {
  text-decoration: none;
  color: #222;
}

.product-title a:hover {
  color: #1976d2;
}

.product-meta {
  font-size: 0.8rem;
  color: #777;
}

.product-bottom {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.product-price {
  font-weight: 700;
  font-size: 0.95rem;
}

.price-old {
  text-decoration: line-through;
  color: #888;
  margin-right: 6px;
  font-size: 0.85rem;
}

.price-new {
  color: #e53935;
}

/* Footer */
.site-footer {
  background: #111;
  color: #ddd;
  padding-top: 24px;
  margin-top: 32px;
  font-size: 0.9rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr;
  gap: 24px;
  padding-bottom: 16px;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.footer-col p {
  color: #bbb;
}

.footer-col ul {
  list-style: none;
  margin-top: 4px;
}

.footer-col li a {
  text-decoration: none;
  color: #ccc;
  font-size: 0.9rem;
}

.footer-col li a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding: 10px 0;
  font-size: 0.8rem;
  text-align: center;
  color: #aaa;
}





/* Responsive */
@media (max-width: 992px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .top-bar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .main-nav {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 16px;
    display: none;
  }

  .main-nav.nav-open {
    display: flex;
  }

  .header-inner {
    align-items: center;
  }

  .menu-toggle {
    display: block;
  }

  .header-actions {
    display: none; /* simplify on mobile or move below */
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  /* Single product page */
.product-page {
  padding-top: 32px;
}

.breadcrumb {
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.breadcrumb a {
  color: #1976d2;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: flex-start;
}

.product-page-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid #e1e1e1;
  background: #fff;
}

.product-page-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-page-badge {
  display: inline-block;
  background: #1976d2;
  color: #fff;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
}

.product-page-title {
  font-size: 1.6rem;
}

.product-page-meta {
  font-size: 0.9rem;
  color: #555;
}

.product-page-price {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 4px;
}

.product-page-description {
  margin-top: 8px;
  font-size: 0.95rem;
  color: #444;
}

.product-page-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}



@media (max-width: 768px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
}

}

