* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Lato', Arial, sans-serif;
  background: #FAF7F4;
  color: #4A3F35;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
  border-radius: 16px;
}

.container {
  width: min(1100px, 90%);
  margin: 0 auto;
  padding: 2rem 0;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  margin-top: 0;
}

/* Header */
header {
  text-align: center;
  padding: 2.5rem 1rem 1rem;
  background: #F8F1ED;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

header p {
  color: #8E6A79;
  margin: 0;
}

/* Navigation */
nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1rem 2rem;
  background: #F8F1ED;
}

nav a {
  text-decoration: none;
  color: #4A3F35;
  background: #F4A6B8;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-weight: bold;
}

/* Homepage hero */
.hero {
  background: #F8DBE7;
  border-radius: 20px;
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

/* Cards / product grid */
.cards,
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  margin: 0.5rem 0;
}

/* Product list section */
.product-list h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Newsletter */
.newsletter {
  background: #FFE6F1;
  border-radius: 20px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.newsletter-form,
.form-stack,
.product-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.input,
input,
select {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid #cfcfcf;
  background: #fff;
  font-size: 1rem;
  outline: none;
}

input[type="number"] {
  max-width: 120px;
}

label {
  font-weight: bold;
  margin-bottom: -0.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  background: #8E6A79;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  text-align: center;
}

.btn:hover {
  opacity: 0.92;
}

.btn--hero {
  align-self: center;
}

/* General page intro */
.page-intro {
  text-align: center;
  margin-bottom: 2rem;
}

/* Shop / cart / checkout layout */
.shop-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

.filters {
  min-height: 200px;
}

/* Product detail page */
.product-single {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.product-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.product-info p {
  margin-bottom: 1rem;
}

/* Cart */
.cart-item {
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

/* Confirmation */
.confirmation {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.confirmation hr,
.card hr {
  border: 0;
  border-top: 1px solid #eee;
  margin: 1rem 0;
}

/* Footer */
footer {
  text-align: center;
  padding: 1.5rem 1rem;
  background: #EEE4DE;
  color: #8E6A79;
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .cards,
  .product-grid,
  .shop-layout,
  .product-single {
    grid-template-columns: 1fr;
  }

  header h1 {
    font-size: 2rem;
  }

  .card img {
    height: auto;
  }

  input[type="number"] {
    max-width: 100%;
  }
}

/* Search, sort, and filter */
.shop-controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: center;
}

/* Improved product cards */
.product-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10);
}

.product-card h3 {
  font-size: 1.35rem;
  color: #4A3F35;
}

.product-price {
  font-size: 1.2rem;
  font-weight: bold;
  color: #8E6A79;
}

.product-card .btn {
  margin-top: auto;
}

/* Better spacing for shop */
.product-grid {
  gap: 1.5rem;
}

/* Cart badge */
.cart-link {
  position: relative;
}

.cart-badge {
  background: #4A3F35;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.3rem;
}

/* Responsive search controls */
@media (max-width: 768px) {
  .shop-controls {
    grid-template-columns: 1fr;
  }

  .product-card {
    min-height: auto;
  }
}

/* Search, sort, and filter */
.shop-controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
  align-items: center;
}

/* Improved product cards */
.product-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10);
}

.product-card h3 {
  font-size: 1.35rem;
  color: #4A3F35;
}

.product-price {
  font-size: 1.2rem;
  font-weight: bold;
  color: #8E6A79;
}

.product-card .btn {
  margin-top: auto;
}

.product-grid {
  gap: 1.5rem;
}

/* Cart badge */
.cart-link {
  position: relative;
}

.cart-badge {
  background: #4A3F35;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  margin-left: 0.3rem;
}

/* Cart layout */
.cart-item-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.cart-item-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.cart-total {
  max-width: 400px;
  margin-left: auto;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .shop-controls {
    grid-template-columns: 1fr;
  }

  .product-card {
    min-height: auto;
  }

  .cart-item-card {
    grid-template-columns: 1fr;
  }

  .cart-total {
    max-width: 100%;
  }
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 300px));
  justify-content: center;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

.admin-table th {
  background: #F8F1ED;
}

.admin-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}

.admin-table th {
  background: #F8F1ED;
}

.admin-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
}

.page-intro {
  max-width: 800px;
  margin: 40px auto;
  text-align: center;
}

.page-intro p {
  margin-top: 15px;
  line-height: 1.8;
}

.cart-item-card {
  max-width: 850px;
  margin: 25px auto;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 25px;
  align-items: start;
}

.cart-item-card img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 18px;
}

.cart-total {
  max-width: 850px;
  margin: 25px auto;
  text-align: center;
}

@media (max-width: 700px) {
  .cart-item-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cart-item-card img {
    margin: 0 auto;
  }
}