:root {
  --primary-color: #6d4c41; /* Brown */
  --secondary-color: #f57c00; /* Orange */
  --background-color: #fdfaf6;
  --text-color: #3e2723;
  --card-bg: #ffffff;
  --header-height: 80px;
  --font-heading: 'Merriweather', serif;
  --font-body: 'Lato', sans-serif;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  padding-top: var(--header-height); /* Offset for fixed header */
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background-color: rgba(109, 76, 65, 0.95); /* Semi-transparent primary color */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  height: var(--header-height);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-container {
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.nav-links a {
  color: white;
  text-decoration: none;
  margin: 0 1rem;
  font-weight: bold;
  position: relative;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  color: #ffcc80; /* Lighter orange for hover */
}

.nav-links a:hover::after {
  width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background-color 0.3s;
    color: white;
}
.cart-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.cart-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    background-color: #e53935; /* Red */
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.hamburger {
    display: block;
    width: 25px;
    height: 2px;
    background: white;
    position: relative;
    transition: transform 0.3s ease;
}
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: white;
    transition: top 0.3s 0.3s, transform 0.3s;
}
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* Hero Section */
.hero-section {
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1599834596355-9a1b6b55e3f2?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1740&q=80') no-repeat center center/cover;
  color: white;
  padding: 6rem 1rem;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.hero-content p {
  font-size: 1.2rem;
  margin-top: 0.5rem;
  font-style: italic;
}

main {
  padding-top: 2rem;
  overflow-x: hidden; /* Prevent horizontal scrollbar from animations */
}

.section {
  margin-bottom: 3rem;
  padding: 2rem;
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.section h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 2rem;
}

.about-content {
  font-size: 1.1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  white-space: pre-wrap; /* To respect newlines from Gemini */
}

.error {
  text-align: center;
  font-style: italic;
  color: #c62828;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

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

.product-info {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin: 0 0 0.5rem 0;
  color: var(--primary-color);
}

.product-info p {
  margin: 0 0 1rem 0;
  flex-grow: 1;
}

.product-price {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
}

.checkout-button {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.1s ease;
  align-self: flex-start;
}

.checkout-button:hover {
  background-color: #fb8c00; /* Darker Orange */
}

.checkout-button:active {
  transform: scale(0.98);
}

/* Contact Section */
.contact-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}
.contact-details {
    margin: 1.5rem 0;
    line-height: 1.8;
}
.contact-details p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}
.contact-content .checkout-button {
    align-self: center;
}

.footer {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: 1.5rem;
  margin-top: 2rem;
}

/* Cart Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}
.modal-content {
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    animation: slideIn 0.4s ease-out;
}
.modal-close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #999;
    cursor: pointer;
}
.modal-content h2 {
    margin-top: 0;
    text-align: left;
}
.cart-items-list {
    margin: 2rem 0;
}
.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}
.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 1rem;
}
.cart-item-info {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
}
.cart-item-info span {
    color: var(--text-color);
}
.modal-checkout-button {
    width: 100%;
    padding: 1rem;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #43a047; /* Green */
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1001;
    font-weight: bold;
    animation: toastIn 0.5s ease;
}

/* Spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s ease infinite;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}


@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--primary-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links a {
    font-size: 1.5rem;
    margin: 0;
  }
  .menu-toggle {
    display: block;
  }
  .nav-links.open ~ .menu-toggle .hamburger {
    transform: rotate(45deg);
  }
  .nav-links.open ~ .menu-toggle .hamburger::before {
    top: 0;
    transform: rotate(90deg);
  }
  .nav-links.open ~ .menu-toggle .hamburger::after {
    top: 0;
    transform: rotate(90deg);
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }
  .section h2 {
    font-size: 2rem;
  }
}
