/* ==========================================================================
   1. Base & Global Styles
   ========================================================================== */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background-color: #fdeef4;
  color: #333;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header & Logo */
header {
  background-color: #ffffff;
  padding: 15px 20px;
  text-align: center;
  border-bottom: 2px solid #f0cfd9;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.logo {
  max-height: 100px;
  width: auto;
}

/* Banner Alerts */
.banner {
  padding: 12px 20px;
  text-align: center;
  font-weight: bold;
  font-size: 0.95rem;
}

.banner.success {
  background-color: #d4edda;
  color: #155724;
  border-bottom: 1px solid #c3e6cb;
}

.banner.cancel {
  background-color: #f8d7da;
  color: #721c24;
  border-bottom: 1px solid #f5c6cb;
}

/* Main Layout Grid & Flex Container */
.container {
  max-width: 1400px;
  width: 95%;
  margin: 30px auto;
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 25px;
  align-items: start;
  flex: 1; /* Pushes the footer to the bottom of screen on short pages */
}

/* Column Wrappers */
.column {
  background: #ffffff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(216, 27, 96, 0.08);
}

.column-title {
  color: #d81b60;
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.5rem;
  border-bottom: 2px solid #fdeef4;
  padding-bottom: 8px;
}

/* ==========================================================================
   2. Product Cards & Grid
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border: 1px solid #f8d7da;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 15px rgba(216, 27, 96, 0.15);
}

.product-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}

.card h3 {
  margin: 10px 0 5px 0;
  font-size: 1.1rem;
  color: #333;
}

.starting-price {
  color: #d81b60;
  font-weight: bold;
  margin-bottom: 12px;
}

.view-btn, .add-btn {
  background-color: #e91e63;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.2s ease;
}

.view-btn:hover, .add-btn:hover {
  background-color: #c2185b;
}

/* ==========================================================================
   3. Shopping Cart Section (Sticky on PC / Laptop)
   ========================================================================== */
.cart-column {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.cart-box {
  display: flex;
  flex-direction: column;
}

.cart-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  max-height: 350px;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}

.item-name {
  font-weight: 600;
  flex: 1;
  padding-right: 10px;
}

.cart-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  background: #f0f0f0;
  border: 1px solid #ccc;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.qty-btn:hover {
  background: #e0e0e0;
}

.qty {
  font-weight: bold;
  min-width: 18px;
  text-align: center;
}

.price {
  font-weight: bold;
  margin-left: 8px;
  color: #d81b60;
}

.remove-btn {
  background: none;
  border: none;
  color: #ff5252;
  cursor: pointer;
  font-size: 1.1rem;
  margin-left: 8px;
}

/* Custom Mix Preferences Box */
.cart-notes-group {
  margin-bottom: 15px;
  background: #fff8fa;
  padding: 12px;
  border-radius: 8px;
  border: 1px dashed #ffb6c1;
}

.cart-notes-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: bold;
  color: #d81b60;
}

.notes-disclaimer {
  display: block;
  font-size: 0.75rem;
  color: #777;
  margin-bottom: 6px;
}

.cart-notes-group textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
}

.char-count-wrapper {
  text-align: right;
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
}

.cart-summary {
  border-top: 2px solid #fdeef4;
  padding-top: 15px;
}

.shipping-info {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 8px;
}

.checkout-btn {
  background-color: #2e7d32;
  color: white;
  border: none;
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: 15px;
  transition: background-color 0.2s ease;
}

.checkout-btn:hover:not(:disabled) {
  background-color: #1b5e20;
}

.checkout-btn:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

/* ==========================================================================
   4. Modals (Product Selection & Allergy Warning)
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 25px;
  border-radius: 12px;
  max-width: 450px;
  width: 90%;
  position: relative;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #666;
}

.weight-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.weight-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 6px;
}

.weight-row .add-btn {
  width: auto;
}

/* ==========================================================================
   5. Footer & Legal Compliance Section
   ========================================================================== */
.site-footer {
  margin-top: auto; /* Pushes footer to screen bottom if content is short */
  width: 100%;
  background-color: #ffffff;
  border-top: 1px solid #f0cfd9;
  padding: 30px 20px 20px 20px;
  box-sizing: border-box;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-nav a,
.footer-link-btn {
  color: #d81b60;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-link-btn:hover {
  color: #ad1457;
  text-decoration: underline;
}

.footer-legal-info {
  border-top: 1px solid #f8f8f8;
  padding-top: 15px;
  font-size: 0.8rem;
  color: #777;
  line-height: 1.6;
}

.business-details {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #999;
}

/* ==========================================================================
   6. Mobile & Tablet Responsiveness
   ========================================================================== */
@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr; /* Stacks shopping cart below products on mobile */
  }

  .cart-column {
    position: static;
    max-height: none;
    overflow-y: visible;
    order: 2;
  }

  .products-column {
    order: 1;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr; /* Single column card grid for small phone screens */
  }

  .footer-nav {
    flex-direction: column;
    gap: 12px;
  }
}

/* ==========================================================================
   7. Legal & Subpage Styles (Terms, Refunds, Privacy, Shipping, Contact)
   ========================================================================== */
h1 { 
  color: #d81b60; 
}

h2 { 
  color: #444; 
  margin-top: 30px; 
  font-size: 1.2rem; 
}

a { 
  color: #d81b60; 
  text-decoration: none; 
}

a:hover { 
  text-decoration: underline; 
}

.back-btn { 
  display: inline-block; 
  margin-bottom: 20px; 
  color: #e91e63; 
  text-decoration: none; 
  font-weight: bold; 
  font-size: 0.9rem; 
}

.legal-container { 
  max-width: 900px; 
  margin: 40px auto; 
  background: #fff; 
  padding: 40px; 
  border-radius: 12px; 
  box-shadow: 0 4px 12px rgba(0,0,0,0.05); 
}

.legal-container h1 { 
  color: #d81b60; 
  margin-bottom: 10px; 
}

.legal-container h2 { 
  color: #c2185b; 
  font-size: 1.2rem; 
  margin-top: 24px; 
  margin-bottom: 8px; 
  border-bottom: 1px solid #eee; 
  padding-bottom: 4px; 
}

.legal-container p, 
.legal-container li { 
  font-size: 0.95rem; 
  color: #444; 
  line-height: 1.6; 
}

.legal-container ul { 
  margin-left: 20px; 
  margin-top: 8px; 
}

.contact-card { 
  background: #fce4ec; 
  padding: 15px; 
  border-left: 4px solid #d81b60; 
  margin: 20px 0; 
  border-radius: 4px; 
}

.faq-item {
  margin-bottom: 12px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.faq-item summary {
  font-weight: bold;
  color: #d81b60;
  cursor: pointer;
  padding: 8px 0;
  user-select: none;
}

.faq-item summary:hover {
  color: #ad1457;
}

.faq-item p {
  margin-top: 8px;
  margin-bottom: 4px;
}

.warning-box { 
  background-color: #fff0f5; 
  border-left: 4px solid #e91e63; 
  padding: 15px; 
  margin: 15px 0; 
  border-radius: 4px; 
}

.shipping-table { 
  width: 100%; 
  border-collapse: collapse; 
  margin-top: 12px; 
  font-size: 0.9rem; 
}

.shipping-table th, 
.shipping-table td { 
  border: 1px solid #eee; 
  padding: 10px; 
  text-align: left; 
}

.shipping-table th { 
  background-color: #fff0f5; 
  color: #d81b60; 
}