/* AgroPro public marketplace homepage — mockup chrome on both viewports. */
.ap-home {
  --ap-primary: #086b28;
  --ap-forest: #06491e;
  --ap-leaf: #38a34a;
  --ap-mint: #eaf7ec;
  --ap-text: #202820;
  --ap-muted: #68736b;
  --ap-line: #e3eae3;
  --ap-white: #fff;
  font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  color: var(--ap-text);
  background: var(--ap-white);
}

.ap-home a { color: inherit; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ap-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.7rem 1.5rem;
  border-bottom: 1px solid var(--ap-line);
  background: var(--ap-white);
  position: sticky;
  top: 0;
  z-index: 40;
}

.ap-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  min-width: 0;
}

.ap-brand__zuto-img {
  height: 28px;
  width: auto;
}

.ap-brand__free-logo,
.ap-hero__free-logo {
  width: auto;
  height: 52px;
  max-width: 240px;
  object-fit: contain;
  display: block;
}

.ap-hero__free-logo {
  height: 88px;
  max-width: 360px;
  margin: 0 auto 0.75rem;
}

.ap-hero__powered {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.ap-brand__mark {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.ap-brand__name {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ap-primary);
  line-height: 1.1;
}

.ap-brand__tag {
  font-size: 0.68rem;
  color: var(--ap-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.ap-nav {
  display: flex;
  gap: 1.1rem;
  margin: 0 auto;
  list-style: none;
  padding: 0;
  font-weight: 600;
  font-size: 0.92rem;
}

.ap-nav a {
  text-decoration: none;
  color: var(--ap-text);
}

.ap-nav a:hover,
.ap-nav a:focus-visible {
  color: var(--ap-primary);
}

.ap-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: auto;
}

.ap-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.86rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 40px;
}

.ap-btn--ghost {
  background: var(--ap-white);
  border-color: var(--ap-line);
}

.ap-btn--primary {
  background: var(--ap-leaf);
  color: var(--ap-white);
}

.ap-btn--forest {
  background: var(--ap-primary);
  color: var(--ap-white);
}

.ap-home .ap-btn--white {
  background: var(--ap-white);
  color: var(--ap-primary);
}

.ap-menu-btn {
  display: none;
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  min-width: 44px;
  min-height: 44px;
}

.ap-hero {
  position: relative;
  min-height: 420px;
  color: var(--ap-white);
  background:
    linear-gradient(90deg, rgba(6, 40, 16, 0.72) 0%, rgba(6, 40, 16, 0.35) 46%, rgba(6, 40, 16, 0.18) 100%),
    url("https://images.unsplash.com/photo-1625246333195-78d9c38ad449?auto=format&fit=crop&w=1800&q=70") center/cover no-repeat;
}

.ap-hero__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3.2rem 1.5rem 5.5rem;
}

.ap-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin: 0 0 0.45rem;
  font-weight: 800;
}

.ap-hero__lead {
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 700;
  max-width: 36rem;
  margin: 0 0 0.7rem;
}

.ap-hero__copy {
  max-width: 38rem;
  margin: 0 0 1.3rem;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.5;
}

.ap-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.ap-search {
  max-width: 1180px;
  margin: -2.4rem auto 0;
  padding: 0 1.5rem;
  position: relative;
  z-index: 5;
}

.ap-search__bar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--ap-white);
  border: 1px solid var(--ap-line);
  border-radius: 16px;
  padding: 1.05rem 1.15rem;
  box-shadow: 0 12px 32px rgba(8, 40, 18, 0.08);
}

.ap-search__locations,
.ap-search__query {
  display: grid;
  gap: 0.75rem;
  align-items: end;
  min-width: 0;
}

.ap-search__locations {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ap-search__query {
  grid-template-columns: minmax(0, 1fr) auto;
}

.ap-search__field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.ap-search__bar label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ap-muted);
  letter-spacing: 0.01em;
}

.ap-search__bar select,
.ap-search__bar input {
  font: inherit;
  border: 1px solid var(--ap-line);
  border-radius: 10px;
  padding: 0 0.75rem;
  height: 44px;
  min-height: 44px;
  width: 100%;
  box-sizing: border-box;
  color: var(--ap-text);
  background: var(--ap-white);
  -webkit-appearance: none;
  appearance: none;
}

.ap-search__bar input[type="search"]::-webkit-search-decoration,
.ap-search__bar input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.ap-search__bar select:focus,
.ap-search__bar input:focus {
  outline: 2px solid rgba(56, 163, 74, 0.35);
  outline-offset: 1px;
  border-color: var(--ap-leaf);
}

.ap-search__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  align-self: end;
  height: 44px;
  min-height: 44px;
  min-width: 7.5rem;
  padding: 0 1.15rem;
  border-radius: 12px;
  white-space: nowrap;
  box-sizing: border-box;
}

.ap-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.85rem 0 0;
  padding-bottom: 0.25rem;
  font-size: 0.85rem;
  color: var(--ap-muted);
}

.ap-chip {
  border: 1px solid var(--ap-line);
  background: var(--ap-white);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font: inherit;
  cursor: pointer;
}

.ap-chip:hover,
.ap-chip.is-active {
  border-color: var(--ap-leaf);
  color: var(--ap-primary);
}

.ap-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.2rem 1.5rem;
}

.ap-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ap-section__head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.ap-section__head a {
  color: var(--ap-primary);
  font-weight: 700;
  text-decoration: none;
}

.ap-cats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}

.ap-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.9rem 0.4rem;
  border: 1px solid var(--ap-line);
  border-radius: 16px;
  background: var(--ap-white);
  cursor: pointer;
  font: inherit;
  min-height: 96px;
}

.ap-cat i {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--ap-mint);
  color: var(--ap-primary);
}

.ap-cat.is-active,
.ap-cat:hover,
.ap-cat:focus-visible {
  border-color: var(--ap-leaf);
  box-shadow: 0 6px 16px rgba(8, 107, 40, 0.08);
}

.ap-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.ap-toolbar__kinds,
.ap-toolbar__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
}

.ap-toolbar select {
  font: inherit;
  border: 1px solid var(--ap-line);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  min-height: 36px;
  background: var(--ap-white);
  color: var(--ap-text);
}

.ap-count {
  color: var(--ap-muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.ap-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem;
}

.ap-card {
  background: var(--ap-white);
  border: 1px solid var(--ap-line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.ap-card img,
.ap-card .ap-photo {
  width: 100%;
  height: 132px;
  object-fit: cover;
  background: var(--ap-mint);
  display: block;
}

.ap-card__body {
  padding: 0.7rem 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.ap-card h3 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.3;
}

.ap-badge {
  display: inline-flex;
  width: fit-content;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ap-primary);
  background: var(--ap-mint);
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
}

.ap-card__price {
  font-weight: 800;
  color: var(--ap-primary);
  margin-top: 0.15rem;
}

.ap-card__place,
.ap-card__meta {
  font-size: 0.75rem;
  color: var(--ap-muted);
}

.ap-card__fav {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--ap-muted);
  cursor: pointer;
}

.ap-card__row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ap-card__actions {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.ap-card__actions button {
  flex: 1;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid var(--ap-line);
  background: var(--ap-white);
  padding: 0.35rem 0.3rem;
  cursor: pointer;
}

.ap-manage {
  margin: 1rem 1.5rem 2.5rem;
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(234, 247, 236, 0.92), rgba(255, 255, 255, 0.88)),
    url("https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&w=1600&q=60") center/cover;
}

.ap-manage__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1.1fr;
  gap: 1.2rem;
  padding: 2rem 1.5rem;
  align-items: center;
}

.ap-manage h2 {
  margin: 0 0 0.6rem;
  font-size: 1.7rem;
}

.ap-manage p {
  color: var(--ap-muted);
  margin: 0 0 1rem;
}

.ap-laptop {
  background: #0f172a;
  border-radius: 12px 12px 6px 6px;
  padding: 0.55rem 0.55rem 0;
  box-shadow: 0 18px 40px rgba(6, 73, 30, 0.18);
}

.ap-laptop__screen {
  background: linear-gradient(180deg, #ecfdf5, #fff);
  min-height: 160px;
  border-radius: 8px 8px 0 0;
  padding: 0.7rem;
  color: var(--ap-forest);
  font-size: 0.78rem;
}

.ap-feats {
  display: grid;
  gap: 0.55rem;
}

.ap-feat {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--ap-line);
}

.ap-feat strong {
  display: block;
  font-size: 0.88rem;
}

.ap-feat span {
  font-size: 0.78rem;
  color: var(--ap-muted);
}

.ap-why {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.ap-why article {
  border: 1px solid var(--ap-line);
  border-radius: 14px;
  padding: 1rem;
}

.ap-form {
  max-width: 1180px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}

html.is-iframed .ap-header,
body.is-iframed .ap-header,
html.is-iframed .ap-footer,
body.is-iframed .ap-footer {
  display: none !important;
}

@media (max-width: 1200px) {
  .ap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ap-cats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .ap-manage__inner { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .ap-nav { display: none; }
  .ap-header.is-open .ap-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--ap-white);
    padding: 0.8rem 1.5rem 1rem;
    border-bottom: 1px solid var(--ap-line);
  }
  .ap-menu-btn { display: inline-flex; }
  .ap-search__locations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-search__locations .ap-search__field:last-child { grid-column: 1 / -1; }
  .ap-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ap-why { grid-template-columns: 1fr; }
  .ap-toolbar { align-items: stretch; }
  .ap-toolbar__meta { width: 100%; }
}

@media (max-width: 640px) {
  .ap-brand__tag { display: none; }
  .ap-search__bar { padding: 0.9rem; gap: 0.9rem; }
  .ap-search__locations,
  .ap-search__query { grid-template-columns: 1fr; }
  .ap-search__locations .ap-search__field:last-child { grid-column: auto; }
  .ap-search__submit { width: 100%; min-width: 0; }
  .ap-chips { padding-bottom: 4.5rem; }
  .ap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-actions { flex-wrap: wrap; justify-content: flex-end; }
  .ap-brand__free-logo { height: 40px; max-width: 168px; }
  .ap-hero__free-logo { height: 56px; max-width: 240px; }
}

@media (max-width: 400px) {
  .ap-grid { grid-template-columns: 1fr; }
}
