@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
  --sd-primary: #8b5a2b; /* Warm Crust Brown */
  --sd-secondary: #a0522d; /* Sienna Crust */
  --sd-accent: #d2b48c; /* Tan Wheat */
  --sd-bg-light: #fdfbf7; /* Wheat Cream Cream */
  --sd-bg-dark: #2a1f18; /* Dark Chocolate */
  --text-dark: #2c2520;
  --text-light: #fdfbf7;
  --border-color: #e8dfd5;
  --font-main: 'Outfit', sans-serif;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--sd-bg-light);
  color: var(--text-dark);
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  backdrop-filter: blur(15px);
  background: rgba(253, 251, 247, 0.8);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(42, 31, 24, 0.03);
}

.nav-brand {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--sd-primary);
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-weight: 600;
  color: var(--text-dark);
  position: relative;
  padding-bottom: 0.2rem;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--sd-primary);
  transition: var(--transition);
}

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

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

/* Header */
.page-header {
  height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 2rem;
  color: var(--text-light);
  position: relative;
  background: linear-gradient(135deg, rgba(42, 31, 24, 0.8), rgba(139, 90, 43, 0.6)), url('sourdough_bg.png') center/cover no-repeat;
  background-blend-mode: multiply;
  margin-bottom: 4rem;
}

.page-title {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.page-subtitle {
  font-size: 1.4rem;
  font-weight: 300;
  max-width: 600px;
  opacity: 0.95;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Main Layout */
.section {
  padding: 2rem 2rem 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1rem;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--sd-primary);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2.5rem;
}

.product-card {
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(42, 31, 24, 0.04);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 36px rgba(42, 31, 24, 0.08);
  border-color: var(--sd-accent);
}

.product-img-container {
  position: relative;
  height: 250px;
  background: #f9f6f0;
  overflow: hidden;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.product-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a89f91;
  font-weight: bold;
  background: #fdfaf5;
  font-size: 1.1rem;
}

.product-info {
  padding: 1.5rem;
}

.product-name {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.product-desc {
  font-size: 0.95rem;
  color: #61554c;
  margin-bottom: 1rem;
  height: 3.2em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--sd-primary);
}

/* Badges */
.badge-discount {
  background: #c2593f;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: bold;
}

.badge-status {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(42, 31, 24, 0.85);
  color: white;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  backdrop-filter: blur(5px);
  z-index: 10;
}

/* Buttons */
.btn-primary {
  padding: 0.85rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  background: var(--sd-primary);
  color: var(--text-light);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(139, 90, 43, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  background: var(--sd-secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(139, 90, 43, 0.35);
}

.btn-secondary {
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 50px;
  background: transparent;
  color: var(--sd-primary);
  border: 2px solid var(--sd-primary);
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--sd-primary);
  color: white;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(42, 31, 24, 0.65);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #ffffff;
  width: 92%;
  max-width: 600px;
  max-height: 90vh;
  border-radius: 20px;
  position: relative;
  transform: scale(0.92);
  transition: var(--transition);
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(42, 31, 24, 0.25);
  border: 1px solid var(--border-color);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  background: var(--sd-bg-light);
  position: sticky;
  top: 0;
  z-index: 20;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--sd-primary);
}

.close-btn {
  background: none;
  border: none;
  font-size: 2.2rem;
  color: #7b6f63;
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
}

.close-btn:hover {
  color: var(--sd-secondary);
  transform: rotate(90deg);
}

.modal-body {
  padding: 2rem;
}

/* Warning / Disclaimer Notice Box */
.notice-box {
  background-color: #fdf2f2;
  border-left: 4px solid #c2593f;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  color: #7a2b18;
  font-size: 0.95rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  box-shadow: 0 2px 8px rgba(194, 89, 63, 0.05);
}

.notice-icon {
  font-size: 1.25rem;
  line-height: 1;
  margin-top: 0.1rem;
}

.notice-text {
  font-weight: 500;
  line-height: 1.4;
}

/* Checklist and Qty Selectors */
.checklist-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  background: #faf8f5;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  max-height: 250px;
  overflow-y: auto;
}

.checklist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-color);
}

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

.checklist-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
}

.checklist-label input[type="checkbox"] {
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--sd-primary);
}

.checklist-qty-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checklist-qty-selector span {
  font-size: 0.9rem;
  color: #61554c;
}

.checklist-qty-selector input[type="number"] {
  width: 60px;
  padding: 0.3rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  text-align: center;
  font-family: inherit;
  font-weight: 600;
  color: var(--text-dark);
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.form-input {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background-color: #faf8f5;
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--sd-primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(139, 90, 43, 0.1);
}

textarea.form-input {
  height: 90px;
  resize: vertical;
}

.payment-radio-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.payment-radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 500;
}

.payment-radio-group input[type="radio"] {
  accent-color: var(--sd-primary);
  width: 1.1rem;
  height: 1.1rem;
}

/* Order Totals */
.order-summary-box {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #fdf8f2;
  border-radius: 8px;
  border: 1px solid rgba(139, 90, 43, 0.15);
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.1rem;
}

.order-summary-box span:last-child {
  color: var(--sd-primary);
}

/* Responsive styling */
@media (max-width: 768px) {
  .navbar {
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 0.75rem;
  }
  .nav-links {
    gap: 1.25rem;
  }
  .page-header {
    height: 40vh;
    margin-top: 80px;
  }
  .page-title {
    font-size: 2.5rem;
  }
  .page-subtitle {
    font-size: 1.1rem;
  }
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}
