/* Rustic Manor Farms — Custom styles */

html {
  scroll-behavior: smooth;
}

/* Typography */
.font-serif {
  font-family: Georgia, 'Times New Roman', serif;
}

/* Navbar links */
.nav-link {
  position: relative;
}
.nav-link:after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  height: 1px;
  width: 0;
  background: #4A7043;
  transition: width 0.2s ease;
}
.nav-link:hover:after {
  width: 100%;
}

/* Product cards */
.product-card {
  background: white;
  border: 1px solid #D4C3A3;
  border-radius: 1.5rem;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgb(60 42 29 / 0.1), 0 4px 6px -4px rgb(60 42 29 / 0.1);
  border-color: #4A7043;
}

.product-image {
  height: 158px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.product-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.04));
}

/* Add to cart buttons - nature green accent */
.add-to-cart-btn {
  background: #4A7043;
  color: white;
  transition: all 0.2s;
}
.add-to-cart-btn:hover {
  background: #3D5A3C;
  transform: translateY(-1px);
}

/* Cart line items */
.cart-item {
  display: flex;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #EDE4D4;
  align-items: flex-start;
}
.cart-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Quantity controls */
.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #D4C3A3;
  background: white;
  font-size: 15px;
  line-height: 1;
  border-radius: 9999px;
  transition: all 0.1s;
}
.qty-btn:hover {
  background: #F8F5F0;
  border-color: #A88F6F;
}
.qty-btn:active {
  transform: scale(0.92);
}

/* Checkout summary */
.checkout-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 3px 0;
}

/* Form inputs */
input, textarea {
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus {
  border-color: #5C4033;
  box-shadow: 0 0 0 3px rgba(92, 64, 51, 0.08);
  outline: none;
}

/* Mobile nav */
.mobile-nav-link {
  display: block;
  padding: 6px 4px;
  border-radius: 10px;
}
.mobile-nav-link:hover {
  background: #F8F5F0;
}

/* Toast */
#toast {
  animation: toastPop 0.2s ease forwards;
}
@keyframes toastPop {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* PayPal container polish */
#paypal-button-container {
  min-height: 50px;
}

/* Make sure cart panel looks good on small screens */
@media (max-width: 640px) {
  #cart-panel {
    max-width: 100%;
  }
}

/* Subtle rustic touches */
h1, h2 {
  font-feature-settings: "kern", "tnum";
}

/* Tailwind farm color fallbacks for robustness */
.text-farm-green { color: #4A7043; }
.hover\:text-farm-green:hover { color: #4A7043; }

/* Company logo styling */
.logo {
  transition: transform 0.2s ease;
}
a:has(.logo):hover .logo,
nav .logo:hover {
  transform: scale(1.04);
}
nav .logo {
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

/* Nature green accents for a fresher farm feel */
.nature-green {
  color: #4A7043;
}
.nature-green-bg {
  background-color: #4A7043;
}
.nature-sage {
  color: #6B8E4E;
}
.accent-link:hover {
  color: #4A7043;
}
.green-button {
  background-color: #4A7043;
  color: white;
  transition: background-color 0.2s;
}
.green-button:hover {
  background-color: #3D5A3C;
}

/* Smoother, slightly rounded font for navbar brand name */
.brand-name {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" "liga" "clig" "calt";
  /* subtle extra rounding feel via tracking (already set in HTML) */
}