/* Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  scroll-behavior: smooth;
}
.card-stock {
  text-decoration: line-through;
}

.display {
  position: absolute;
  /* display: none; */
  width: 100vw;
  height: 100vh;
  background-color: #4caf50;
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.display_img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}
.display_img img {
  width: 90%;
  height: 90%;
  border-radius: 15%;
  object-fit: contain;
  object-position: center center;
}
.display_cont {
  color: #555;
  text-align: center;
}
.display_cont h2 {
  font-size: 2rem;
}
.main-display {
  display: none;
}
body {
  background-color: #f2f2f2;
  overflow-x: hidden;
  width: 100vw;
  height: 100vh;
}

/* Navbar */
header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  background-color: #00fc00;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  gap: 30px;
  height: 100px;
  color: #555;
}

.nav-logo img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  animation: zoomIn 2s ease-out forwards;
}

.nav-company h1 {
  margin: 0;
  font-size: 2rem;
  animation: fadeInLeft 1s ease-out forwards;
}
.nav-company p {
  animation: fadeInLeft 1s ease-out forwards;
}
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Search Section */
section.search {
  margin: 2rem auto;
  width: 90%;
  max-width: 800px;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.search-input {
  padding: 10px 15px;
  border: none;
  outline: none;
  width: 100%;
  font-size: 16px;
  border-radius: 10px;
}

#option {
  border-radius: 10px;
}

/* Error Message */
.error {
  text-align: center;
  color: red;
  padding: 1rem;
}

/* Cards Grid */
#vegetableTable {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.5s, box-shadow 0.3s;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-img {
  width: 100%;
  height: 150px;
  overflow: hidden;
  border-radius: 12px;
  background-color: #eee;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}

.card-img img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
  object-position: center;
}

.card-name,
.card-price {
  text-align: center;
  margin: 0.5rem 0;
}

.card-name {
  font-size: 1.3rem;
  font-weight: bold;
}

.card-price {
  background-color: #4caf50;
  padding: 10px 15px;
  border-radius: 8px;
  color: #fff;
}

/* Buttons */
.btn-container {
  display: flex;
  justify-content: space-evenly;
  margin: 1rem 0;
}

.btn-arr {
  border: none;
  outline: none;
  font-size: 1rem;
  font-weight: bold;
  padding: 10px 25px;
  border-radius: 10px;
  color: #fff;
  background-color: #4caf50;
  transition: transform 0.3s;
  cursor: pointer;
}

.btn-arr:hover {
  transform: scale(1.1);
}

/* WhatsApp Contact */
.whatsapp-cont {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  position: fixed;
  bottom: 30px;
  right: 25px;
  background-color: black;
  z-index: 1000;
}

.whatsapp-cont::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: 2px solid #4caf50;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  animation: bounceRing 2s infinite;
  pointer-events: none;
}
.whatsapp-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes bounceRing {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  70%,
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}

.call-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.call-cont {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  position: fixed;
  bottom: 110px;
  right: 31px;
  background-color: black;
  z-index: 1000;
}

.call-cont::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: 2px solid #4caf50;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  animation: bounceRing 2s infinite;

  pointer-events: none;
}

.last-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 20px;
  box-sizing: border-box;
  align-items: center;
  background-color: #4caf50;
}
.map-container {
  flex: 1 1 60%;
  min-width: 300px;
  position: relative;
  overflow: hidden;
}
.map-container iframe {
  width: 100%;
  height: 100%;
  min-height: 300px;
  border: 0;
}
.footer-aside {
  flex: 1 1 30%;
  min-width: 280px;
  padding: 20px;
  box-sizing: border-box;
  text-align: justify;
  /* background-color: cadetblue; */
}
.pro-btn {
  margin-top: 30px;
  text-decoration: none;
  width: 25px;
  height: 20px;
  padding: 6px 10px;
  border-radius: 6px;
  background-color: white;
}
@media (max-width: 768px) {
  .last-section {
    flex-direction: column;
    align-items: center;
  }
  .map-container,
  .footer-aside {
    flex: unset;
    width: 100%;
    padding: 10px;
  }
}

/* Responsive Breakpoints */

/* Tablets and medium-sized screens */
@media (max-width: 768px) {
  header {
    padding: 0.8rem;
    height: 80px;
    gap: 15px;
    position: sticky;
  }
  .nav-logo img {
    width: 55px;
    height: 55px;
  }
  .nav-company h1 {
    color: #555;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
  }
  section.search {
    width: 95%;
    padding: 0 10px;
  }
  #vegetableTable {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem;
    padding: 0.8rem;
  }
}

/* Mobile devices (e.g. iPhones) */
@media (max-width: 480px) {
  body {
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }
  header {
    padding: 0.8rem;
    height: 70px;
    position: sticky;
  }

  .nav-company p {
    display: none;
  }
  .nav-logo img {
    width: 45px;
    height: 45px;
  }
  .nav-company h1 {
    color: #555;
    font-size: clamp(1.5rem, 3.5vw, 1.2rem);
  }
  .search-input {
    -webkit-appearance: none;
    appearance: none;
    padding: 8px 12px;
    font-size: 16px;
    border-radius: 0;
  }
  .card-name {
    font-size: 0.8rem;
  }
  .card {
    width: 100%;
    margin: 0 auto;
  }
  .card-img {
    height: auto;
    object-fit: cover;
    object-position: center;
    aspect-ratio: 16/9;
  }
  .card-img img {
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .whatsapp-cont {
    width: 3rem;
    height: 3rem;
    bottom: 20px;
    right: 15px;
  }

  .call-cont {
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 50%;
    position: fixed;
    bottom: 80px;
    right: 16.5px;
    background-color: black;
    z-index: 1000;
  }
  /* .footer-aside {
    gap: 10px;
  } */
}

/* Very small devices (iPhone SE and similar) */
@media (max-width: 375px) {
  header {
    padding: 0.3rem;
    height: 70px;
  }
  nav-company p {
    font-size: 2.5px;
    font-weight: 100;
  }
  .nav-logo img {
    width: 35px;
    height: 35px;
  }
  .nav-company h1 {
    font-size: 1rem;
  }
  #vegetableTable {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
  }
  .card {
    padding: 0.8rem;
  }
  .card-img {
    object-fit: cover;
    object-position: center;
  }
  .btn-arr {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
}

/* iOS Safe Area adjustments */
@supports (padding-top: env(safe-area-inset-top)) {
  header {
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* Fix for mobile viewport height */

/* Custom Scrollbar for WebKit Browsers */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Custom Scrollbar for Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #888 #f1f1f1;
}
