:root {
  --primary: #8B4513;
  --primary-dark: #5D2E0F;
  --secondary: #F5F5DC;
  --accent: #D2691E;
  --text-dark: #333333;
  --text-light: #FFFFFF;
  --text-muted: #666666;
  --background: #FEF9F3;
  --border: #E6E6E6;
  --success: #4CAF50;
  --error: #F44336;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --radius: 8px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --max-width: 1200px;
}

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

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

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

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) 0;
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--spacing-md);
}

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

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

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

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent);
  color: var(--text-light);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1559056199-641a0ac8b55e?ixlib=rb-4.0.3') center/cover;
  color: var(--text-light);
  text-align: center;
  padding: var(--spacing-lg) 0;
  margin-bottom: var(--spacing-md);
}

.hero-content {
  max-width: 600px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: var(--text-light);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

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

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

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

/* Products Section */
.section-title {
  text-align: center;
  margin-bottom: var(--spacing-md);
  font-size: 2rem;
  color: var(--primary-dark);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.product-card {
  background: var(--text-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

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

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

.product-info {
  padding: var(--spacing-sm);
}

.product-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
}

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

.product-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
}

/* Categories */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  justify-content: center;
  margin-bottom: var(--spacing-lg);
}

.category-btn {
  background: var(--secondary);
  border: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.category-btn:hover,
.category-btn.active {
  background: var(--primary);
  color: var(--text-light);
}

/* Product Detail */
.product-detail {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

@media (min-width: 768px) {
  .product-detail {
    flex-direction: row;
  }
}

.product-detail-image {
  flex: 1;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.product-detail-info {
  flex: 1;
}

.product-detail-title {
  font-size: 2rem;
  margin-bottom: var(--spacing-xs);
  color: var(--primary-dark);
}

.product-detail-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: var(--spacing-sm);
}

.product-detail-description {
  margin-bottom: var(--spacing-md);
  color: var(--text-muted);
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  margin-bottom: var(--spacing-md);
}

.quantity-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--text-light);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.add-to-cart {
  width: 100%;
  padding: var(--spacing-sm);
  font-size: 1.1rem;
}

/* Reviews */
.reviews {
  margin-top: var(--spacing-md);
}

.review {
  border-bottom: 1px solid var(--border);
  padding: var(--spacing-sm) 0;
}

.review:last-child {
  border-bottom: none;
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-xs);
}

.review-author {
  font-weight: 600;
}

.review-date {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.review-rating {
  color: var(--accent);
}

.review-content {
  color: var(--text-muted);
}

/* Cart */
.cart-items {
  background: var(--text-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.cart-item {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-right: var(--spacing-sm);
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

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

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-xs);
}

.cart-item-quantity .quantity-btn {
  width: 30px;
  height: 30px;
  font-size: 1rem;
}

.cart-item-total {
  font-weight: 700;
  margin-left: var(--spacing-sm);
}

.cart-summary {
  background: var(--text-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--spacing-md);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border);
}

.checkout-btn {
  width: 100%;
  padding: var(--spacing-sm);
  font-size: 1.1rem;
}

/* Checkout */
.checkout-form {
  display: grid;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.form-row {
  display: grid;
  gap: var(--spacing-sm);
}

@media (min-width: 768px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

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

.form-label {
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.form-input {
  padding: var(--spacing-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.order-summary {
  background: var(--text-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--spacing-md);
}

.order-item {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-xs) 0;
  border-bottom: 1px solid var(--border);
}

.order-item:last-child {
  border-bottom: none;
}

.order-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.25rem;
  margin-top: var(--spacing-sm);
  padding-top: var(--spacing-sm);
  border-top: 2px solid var(--border);
}

/* Order Confirmation */
.order-confirmation {
  text-align: center;
  padding: var(--spacing-lg) 0;
}

.order-confirmation-icon {
  font-size: 4rem;
  color: var(--success);
  margin-bottom: var(--spacing-md);
}

.order-number {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.order-details {
  background: var(--text-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
  text-align: left;
}

.order-detail-item {
  display: flex;
  justify-content: space-between;
  padding: var(--spacing-xs) 0;
  border-bottom: 1px solid var(--border);
}

.order-detail-item:last-child {
  border-bottom: none;
}

/* Account Page */
.account-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.account-orders {
  background: var(--text-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.account-order {
  padding: var(--spacing-sm);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.account-order:last-child {
  border-bottom: none;
}

.order-status {
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius);
  font-weight: 600;
}

.order-status.processing {
  background: #FFF3E0;
  color: #EF6C00;
}

.order-status.shipped {
  background: #E8F5E9;
  color: #2E7D32;
}

.order-status.delivered {
  background: #E3F2FD;
  color: #1565C0;
}

/* Blog Section */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.blog-card {
  background: var(--text-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.blog-content {
  padding: var(--spacing-sm);
}

.blog-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
}

.blog-excerpt {
  color: var(--text-muted);
  margin-bottom: var(--spacing-sm);
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

/* Contact Section */
.contact-container {
  display: grid;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

@media (min-width: 768px) {
  .contact-container {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-info {
  background: var(--text-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--spacing-md);
}

.contact-details h3 {
  margin-bottom: var(--spacing-sm);
  color: var(--primary-dark);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--spacing-sm);
}

.contact-icon {
  margin-right: var(--spacing-sm);
  color: var(--primary);
  font-size: 1.25rem;
}

.contact-text h4 {
  margin-bottom: var(--spacing-xs);
}

.opening-hours {
  margin-top: var(--spacing-md);
}

.opening-hours h4 {
  margin-bottom: var(--spacing-xs);
}

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

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

.contact-form {
  background: var(--text-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--spacing-md);
}

.form-group {
  margin-bottom: var(--spacing-sm);
}

/* Admin Pages */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.stat-card {
  background: var(--text-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--spacing-md);
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: var(--spacing-xs);
}

.stat-label {
  color: var(--text-muted);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--text-light);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: var(--spacing-md);
}

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

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

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover {
  background: #f9f9f9;
}

.action-btn {
  padding: var(--spacing-xs) var(--spacing-sm);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  margin-right: var(--spacing-xs);
}

.edit-btn {
  background: #2196F3;
  color: var(--text-light);
}

.delete-btn {
  background: var(--error);
  color: var(--text-light);
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: var(--text-light);
  padding: var(--spacing-lg) 0;
}

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

.footer-section h3 {
  margin-bottom: var(--spacing-sm);
  font-size: 1.25rem;
}

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

.footer-links li {
  margin-bottom: var(--spacing-xs);
}

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

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

.social-links {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.social-icon {
  color: var(--text-light);
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.social-icon:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #ccc;
  font-size: 0.9rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .cart-item-image {
    margin-bottom: var(--spacing-sm);
  }
  
  .cart-item-actions {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }
  
  .account-order {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
  }
  
  .order-status {
    align-self: flex-start;
  }
}