:root {
  --primary: #8B4513;
  --primary-dark: #5D2E0F;
  --secondary: #F5F5DC;
  --accent: #D4A574;
  --text: #333333;
  --text-light: #666666;
  --background: #FFFFFF;
  --border: #E0E0E0;
  --success: #4CAF50;
  --error: #F44336;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background-color: var(--background);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.header {
  background: var(--background);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary);
}

.cart-icon {
  position: relative;
  cursor: pointer;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('coffee-hero.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  text-align: center;
  padding: 4rem 1rem;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s;
  border: none;
  cursor: pointer;
}

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

.btn-secondary {
  background: var(--accent);
}

.btn-secondary:hover {
  background: #c0905f;
}

/* Categories */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.category-card {
  background: var(--secondary);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s;
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-5px);
}

.category-card h3 {
  margin-top: 1rem;
  color: var(--primary);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.product-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-info {
  padding: 1.5rem;
}

.product-info h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.rating {
  color: var(--accent);
  margin-bottom: 1rem;
}

.add-to-cart {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.add-to-cart:hover {
  background: var(--primary-dark);
}

/* Product Detail */
.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.product-images {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.main-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
}

.thumbnail-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.thumbnail {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
}

.thumbnail.active {
  border-color: var(--primary);
}

.product-content h1 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.product-content .price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}

.product-content .description {
  margin-bottom: 2rem;
  color: var(--text-light);
}

.quantity-selector {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1rem;
}

.quantity-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2rem;
}

.quantity {
  font-size: 1.2rem;
  font-weight: 600;
  min-width: 40px;
  text-align: center;
}

/* Cart */
.cart-items {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.cart-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
}

.item-details h3 {
  margin-bottom: 0.5rem;
}

.item-price {
  font-weight: 600;
  color: var(--primary-dark);
}

.remove-item {
  background: none;
  border: none;
  color: var(--error);
  cursor: pointer;
  font-size: 1.2rem;
}

.cart-summary {
  background: var(--secondary);
  padding: 1.5rem;
  border-radius: 8px;
}

.cart-summary h2 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* Checkout */
.checkout-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
}

.payment-methods {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.payment-method {
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  flex: 1;
  text-align: center;
}

.payment-method.active {
  border-color: var(--primary);
  background: rgba(139, 69, 19, 0.1);
}

/* Order Confirmation */
.order-summary {
  background: var(--secondary);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 2rem;
}

.order-summary h2 {
  color: var(--success);
  margin-bottom: 1rem;
}

.order-number {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.order-details {
  text-align: left;
  margin-bottom: 2rem;
}

.order-details h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.order-items {
  list-style: none;
}

.order-items li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

/* Account */
.account-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.account-nav {
  display: flex;
  list-style: none;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.account-nav li a {
  display: block;
  padding: 1rem 0;
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
}

.account-nav li a.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

.order-history {
  display: grid;
  gap: 1rem;
}

.order-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.order-card h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.order-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.blog-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.blog-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-content {
  padding: 1.5rem;
}

.blog-content h3 {
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.blog-meta {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.read-more {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* Contact */
.contact-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.contact-details, .opening-hours {
  background: var(--secondary);
  padding: 1.5rem;
  border-radius: 8px;
}

.contact-details h3, .opening-hours h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.contact-item i {
  margin-right: 1rem;
  color: var(--primary);
}

.hours-list {
  list-style: none;
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-form .form-group {
  margin-bottom: 1rem;
}

/* Admin */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-nav {
  display: flex;
  list-style: none;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.admin-nav li a {
  display: block;
  padding: 1rem 0;
  text-decoration: none;
  color: var(--text-light);
  font-weight: 500;
}

.admin-nav li a.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.admin-table th,
.admin-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--secondary);
  font-weight: 600;
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
}

.admin-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
}

.admin-btn.edit {
  background: #2196F3;
  color: white;
}

.admin-btn.delete {
  background: var(--error);
  color: white;
}

.admin-form {
  background: var(--secondary);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.admin-form .form-group {
  margin-bottom: 1rem;
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: var(--accent);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: white;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  color: white;
  font-size: 1.2rem;
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive Design */
@media (min-width: 768px) {
  .navbar {
    padding: 1rem 0;
  }
  
  .nav-links {
    gap: 2rem;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .product-detail {
    grid-template-columns: 1fr 1fr;
  }
  
  .contact-info {
    grid-template-columns: 1fr 1fr;
  }
  
  .checkout-form {
    grid-template-columns: 2fr 1fr;
  }
}

@media (min-width: 1024px) {
  .categories {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}