/* GLOBAL STYLES */
body {
  margin: 0;
  font-family: "Arial", sans-serif;
  background: #f4ede3; /* light latte */
  color: #3b2f2f; /* dark espresso */
}

* {
  box-sizing: border-box;
}

/* HEADER */
.header {
  background: #3b2f2f; /* espresso dark brown */
  padding: 15px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar {
  display: flex;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.navbar a {
  color: #f4ede3;
  font-weight: bold;
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s;
}

.navbar a:hover {
  color: #d9c5a3; /* latte highlight */
}

/* MAIN CONTENT */
main {
  max-width: 1200px;
  margin: 0 auto;
}

h1 {
  color: #3b2f2f;
  text-align: center;
  margin: 30px 0 20px 0;
}

h2 {
  color: #3b2f2f;
  margin: 20px 0 15px 0;
}

h3 {
  color: #3b2f2f;
  margin: 15px 0 10px 0;
}

p {
  line-height: 1.6;
  margin: 10px 0;
}

/* PRODUCT GRID */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
}

.product-card {
  background: #fffaf3;
  border-radius: 12px;
  box-shadow: 0px 3px 12px rgba(0, 0, 0, 0.15);
  padding: 15px;
  text-decoration: none;
  color: #3b2f2f;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: scale(1.03);
  box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.2);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

.product-card h3 {
  margin: 10px 0 5px 0;
  font-size: 18px;
}

.product-card p {
  margin: 5px 0;
  font-size: 14px;
}

/* PRODUCT BUTTON */
.buy-button {
  background: #8a5a2e; /* mocha brown */
  color: #fff;
  padding: 12px 18px;
  display: inline-block;
  margin-top: 12px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: background 0.3s;
  border: none;
  cursor: pointer;
}

.buy-button:hover {
  background: #724723;
}

/* PRODUCT DETAIL PAGE */
.product-detail {
  background: #fffaf3;
  border-radius: 12px;
  padding: 30px;
  margin: 20px;
  box-shadow: 0px 3px 12px rgba(0, 0, 0, 0.15);
}

.product-detail img {
  max-width: 350px;
  width: 100%;
  border-radius: 12px;
  margin-bottom: 20px;
}

.product-detail h1 {
  text-align: left;
  margin: 0 0 15px 0;
}

.product-detail section {
  margin-bottom: 30px;
}

.product-detail ul {
  list-style-position: inside;
  margin: 10px 0;
}

.product-detail li {
  margin: 8px 0;
}

/* HEADER TOP */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: #f4ede3;
  text-decoration: none;
}

.search-bar {
  display: flex;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.search-bar input {
  flex: 1;
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
}

.search-bar button {
  padding: 10px 15px;
  background: #8a5a2e;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}

.search-bar button:hover {
  background: #724723;
}

/* HERO SECTION */
.hero {
  background: linear-gradient(135deg, #3b2f2f 0%, #8a5a2e 100%);
  color: #f4ede3;
  padding: 60px 20px;
  text-align: center;
  margin-bottom: 40px;
}

.hero-content h1 {
  font-size: 48px;
  margin: 0 0 10px 0;
  color: #f4ede3;
}

.hero-subtitle {
  font-size: 20px;
  margin-bottom: 30px;
  color: #d9c5a3;
}

.hero-search {
  display: flex;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
}

.hero-search input {
  flex: 1;
  padding: 12px 15px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
}

.hero-search button {
  padding: 12px 25px;
  background: #f4ede3;
  color: #3b2f2f;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.hero-search button:hover {
  background: #d9c5a3;
}

/* HOME GRID LAYOUT */
.home-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  margin-bottom: 40px;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* FEATURED CATEGORIES */
.featured-categories h2,
.latest-reviews h2 {
  font-size: 28px;
  margin-bottom: 20px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.category-card {
  background: #fffaf3;
  border-radius: 12px;
  padding: 25px;
  text-align: center;
  text-decoration: none;
  color: #3b2f2f;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0px 3px 12px rgba(0, 0, 0, 0.1);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.15);
}

.category-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.category-card h3 {
  margin: 10px 0 5px 0;
  font-size: 18px;
}

.category-card p {
  font-size: 14px;
  color: #666;
  margin: 0;
}

/* POSTS GRID */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.post-card {
  background: #fffaf3;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0px 3px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.15);
}

.post-image {
  display: block;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .post-image img {
  transform: scale(1.05);
}

.post-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-category {
  display: inline-block;
  background: #8a5a2e;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 10px;
  width: fit-content;
}

.post-content h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
}

.post-content h3 a {
  color: #3b2f2f;
  text-decoration: none;
  transition: color 0.3s;
}

.post-content h3 a:hover {
  color: #8a5a2e;
}

.post-summary {
  font-size: 14px;
  color: #666;
  margin: 0 0 15px 0;
  flex: 1;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
  margin-bottom: 15px;
}

.read-more {
  color: #8a5a2e;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.read-more:hover {
  color: #724723;
}

/* SIDEBAR */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.sidebar-widget {
  background: #fffaf3;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0px 3px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-widget h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  border-bottom: 2px solid #8a5a2e;
  padding-bottom: 10px;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  margin: 8px 0;
}

.category-list a {
  color: #3b2f2f;
  text-decoration: none;
  transition: color 0.3s;
}

.category-list a:hover {
  color: #8a5a2e;
  font-weight: bold;
}

.popular-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.popular-list li {
  margin: 12px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.popular-list li:last-child {
  border-bottom: none;
}

.popular-list a {
  color: #3b2f2f;
  text-decoration: none;
  transition: color 0.3s;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.popular-list a:hover {
  color: #8a5a2e;
}

.popularity {
  font-size: 12px;
  color: #999;
}

.deals-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.deal-item {
  text-align: center;
}

.deal-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

.deal-item h4 {
  margin: 0 0 5px 0;
  font-size: 14px;
}

.deal-price {
  color: #8a5a2e;
  font-weight: bold;
  margin: 5px 0;
}

.deal-btn {
  display: inline-block;
  background: #8a5a2e;
  color: white;
  padding: 8px 15px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 12px;
  font-weight: bold;
  transition: background 0.3s;
}

.deal-btn:hover {
  background: #724723;
}

.affiliate-disclosure {
  background: #fff3cd;
  border-left: 4px solid #8a5a2e;
}

.affiliate-disclosure p {
  margin: 0;
  font-size: 12px;
  color: #333;
}

/* FOOTER */
.footer {
  background: #3b2f2f;
  color: #f4ede3;
  padding: 40px 20px 20px;
  margin-top: 40px;
  border-top: 3px solid #8a5a2e;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h4 {
  margin: 0 0 15px 0;
  color: #d9c5a3;
}

.footer-section p {
  margin: 0;
  font-size: 14px;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin: 8px 0;
}

.footer-section a {
  color: #f4ede3;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: #d9c5a3;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  border-top: 1px solid #555;
  padding-top: 20px;
  font-size: 12px;
}

.footer-bottom p {
  margin: 5px 0;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .home-grid {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    order: -1;
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    gap: 10px;
  }
  
  .navbar {
    flex-direction: column;
    gap: 10px;
  }

  .hero-content h1 {
    font-size: 36px;
  }
  
  .hero-search {
    flex-direction: column;
  }
  
  .categories-grid {
    grid-template-columns: 1fr;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 15px;
  }

  .product-detail {
    padding: 15px;
    margin: 10px;
  }

  h1 {
    font-size: 24px;
  }

  .buy-button {
    width: 100%;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

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

  .navbar a {
    font-size: 14px;
  }

  h1 {
    font-size: 20px;
  }
  
  .hero-content h1 {
    font-size: 28px;
  }
  
  .hero-subtitle {
    font-size: 16px;
  }
  
  .search-bar input {
    font-size: 12px;
  }
}
