/* ============================================================
   fermierul.online — Shared styles
   Include pe toate paginile pentru comportamente comune
   ============================================================ */

/* ---------- Breadcrumbs ---------- */
[data-breadcrumbs], #fo-breadcrumbs, .fo-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 14px 0;
  font-size: 12.5px;
  color: var(--muted, #6E6049);
  border-bottom: 1px dashed var(--line-soft, rgba(31,26,20,0.10));
  margin-bottom: 14px;
}
[data-breadcrumbs] a, #fo-breadcrumbs a, .fo-breadcrumbs a {
  color: var(--ink-2, #3D3324);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s ease;
}
[data-breadcrumbs] a:hover, #fo-breadcrumbs a:hover, .fo-breadcrumbs a:hover {
  color: var(--green, #2D4A2B);
  text-decoration: underline;
}
[data-breadcrumbs] [aria-current], #fo-breadcrumbs [aria-current], .fo-breadcrumbs [aria-current] {
  color: var(--ink, #1F1A14);
  font-weight: 600;
}
.fo-bc-sep {
  color: var(--muted-2, #B5A689);
  user-select: none;
}

/* ---------- Mobile drawer ---------- */
.fo-mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
}
.fo-mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31,26,20,0.45);
  backdrop-filter: blur(4px);
  animation: foFade .25s ease;
}
.fo-mobile-drawer-panel {
  position: relative;
  margin-left: auto;
  width: min(320px, 85vw);
  background: var(--cream, #FBF6EA);
  box-shadow: -8px 0 28px rgba(31,26,20,0.18);
  display: flex;
  flex-direction: column;
  padding: 22px 22px 28px;
  animation: foSlideIn .3s cubic-bezier(.2,.8,.2,1);
  overflow-y: auto;
}
@keyframes foFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes foSlideIn { from { transform: translateX(20px); opacity: 0 } to { transform: translateX(0); opacity: 1 } }

.fo-mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(31,26,20,0.10);
  margin-bottom: 14px;
}
.fo-mobile-drawer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink, #1F1A14);
}
.fo-mobile-drawer-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--green, #2D4A2B);
  color: var(--cream, #FBF6EA);
  display: grid;
  place-items: center;
}
.fo-mobile-drawer-brand-text {
  font-family: "Fraunces", Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.fo-mobile-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2, #3D3324);
  border: 1px solid transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s ease;
}
.fo-mobile-drawer-close:hover {
  background: var(--cream-2, #F4ECDB);
}
.fo-mobile-drawer-close svg {
  width: 18px;
  height: 18px;
}

.fo-mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 18px;
}
.fo-mobile-drawer-nav a {
  display: flex;
  align-items: center;
  padding: 13px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2, #3D3324);
  text-decoration: none;
  border-radius: 12px;
  transition: background .15s ease, color .15s ease;
}
.fo-mobile-drawer-nav a:hover,
.fo-mobile-drawer-nav a.is-active {
  background: var(--green-soft, rgba(45,74,43,0.10));
  color: var(--green, #2D4A2B);
}

.fo-mobile-drawer-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px dashed rgba(31,26,20,0.15);
}
.fo-mobile-drawer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--line, rgba(31,26,20,0.18));
  background: var(--paper, #FFFDF8);
  color: var(--ink-2, #3D3324);
  text-decoration: none;
  transition: all .2s ease;
}
.fo-mobile-drawer-btn:hover {
  border-color: var(--green, #2D4A2B);
  color: var(--green, #2D4A2B);
}
.fo-mobile-drawer-btn.is-primary {
  background: var(--green, #2D4A2B);
  color: var(--cream, #FBF6EA);
  border-color: var(--green, #2D4A2B);
}
.fo-mobile-drawer-btn.is-primary:hover {
  background: #243E22;
  color: var(--cream, #FBF6EA);
}

/* ---------- Toast ---------- */
.fo-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1F1A14;
  color: #FBF6EA;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(31,26,20,0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 10000;
  max-width: 90vw;
  text-align: center;
}
.fo-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.fo-toast.is-success {
  background: var(--green, #2D4A2B);
}
.fo-toast.is-error {
  background: #B33B22;
}
.fo-toast.is-info {
  background: var(--voronet, #1B3D8F);
}

/* ---------- Empty / Loading / Error states ---------- */
.fo-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  background: var(--paper, #FFFDF8);
  border: 1px dashed var(--line-soft, rgba(31,26,20,0.10));
  border-radius: 24px;
  gap: 14px;
}
.fo-empty-state .fo-empty-ico {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--cream-2, #F4ECDB);
  color: var(--muted, #6E6049);
  display: grid;
  place-items: center;
}
.fo-empty-state .fo-empty-ico svg {
  width: 28px;
  height: 28px;
}
.fo-empty-state h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 22px;
  color: var(--ink, #1F1A14);
}
.fo-empty-state p {
  margin: 0;
  color: var(--muted, #6E6049);
  max-width: 50ch;
  line-height: 1.55;
}
.fo-empty-state .fo-empty-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.fo-loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--muted, #6E6049);
  font-size: 13px;
  gap: 10px;
}
.fo-loading-state::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid var(--cream-2, #F4ECDB);
  border-top-color: var(--green, #2D4A2B);
  border-radius: 50%;
  animation: foSpin .8s linear infinite;
}
@keyframes foSpin { to { transform: rotate(360deg); } }

/* ---------- Skeleton card ---------- */
.fo-skeleton-card {
  background: var(--paper, #FFFDF8);
  border: 1px solid var(--line-soft, rgba(31,26,20,0.10));
  border-radius: 18px;
  height: 320px;
  background-image: linear-gradient(90deg, var(--cream-2, #F4ECDB) 0%, var(--paper, #FFFDF8) 50%, var(--cream-2, #F4ECDB) 100%);
  background-size: 200% 100%;
  animation: foShimmer 1.4s linear infinite;
}
@keyframes foShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- Sticky CTA bar (mobile) ---------- */
.fo-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--paper, #FFFDF8);
  border-top: 1px solid var(--line-soft, rgba(31,26,20,0.10));
  padding: 12px 16px;
  display: none;
  gap: 10px;
  z-index: 200;
  box-shadow: 0 -8px 22px rgba(31,26,20,0.06);
}
@media (max-width: 720px) {
  .fo-sticky-cta {
    display: flex;
  }
  body.has-sticky-cta {
    padding-bottom: 76px;
  }
}
.fo-sticky-cta a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid var(--line, rgba(31,26,20,0.18));
  background: var(--paper, #FFFDF8);
  color: var(--ink-2, #3D3324);
}
.fo-sticky-cta a.is-primary {
  background: var(--green, #2D4A2B);
  color: var(--cream, #FBF6EA);
  border-color: var(--green, #2D4A2B);
}

/* ---------- Cart badge in any header ---------- */
.cart-badge {
  background: var(--clay, #C45D3D);
  color: var(--cream, #FBF6EA);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
  min-width: 18px;
  text-align: center;
  display: inline-block;
}
.cart-badge.is-empty {
  display: none;
}
