@font-face {
  font-family: "Montserratarm-Regular";
  src:
    url("fonts/Montserratarm-Regular.woff2") format("woff2"),
    url("fonts/Montserratarm-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Montserrat-Regular";
  src:
    url("fonts/Montserrat-SemiBold.woff2") format("woff2"),
    url("fonts/Montserrat-SemiBold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
}

* {
  font-family: "Montserratarm-Regular", Arial, sans-serif;
}

html {
  font-size: 16px;
}

:root {
  --bg: #fbf9f7;
  --card: #ffffff;
  --muted: #9b8f87;
  --accent: #e8dcc7;
  --accent-2: #f3ede4;
  --shadow: 0 8px 24px rgba(22, 18, 15, 0.06);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg), #fff);
  color: #3b3b3b;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 36px;
}

.logo {
  font-weight: 700;
  color: #c9a66b;
  font-size: 20px;
}

.search input {
  display: block;
  margin: auto;
  margin-top: 15px;
  margin-bottom: 15px;
  width: 50%;
  padding: 12px 16px;
  border-radius: 30px;
  border: 1px solid #eee;
  background: #fff;
}

.phone {
  background: var(--card);
  padding: 8px 12px;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 18px 36px 0;
}

.cats {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.cat {
  background-color: #c9a66b;
  color: white;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s;
}

.cat:hover {
  transform: translateY(-4px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* always 2 equal columns */
  gap: 20px;
  padding: 12px 12px 60px;
}

.grid .card {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  transition: transform 0.25s;
  width: 100%; /* fills its grid cell */
}

.card:hover {
  transform: translateY(-8px);
}

.card .media {
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #fff, #faf7f6);
}

.card .media img {
  max-width: 90%;
  max-height: 100%;
  transform: scale(0.98);
  transition: transform 0.5s;
}

.card:hover .media img {
  transform: scale(1);
}

.ribbon {
  position: absolute;
  right: 14px;
  top: 14px;
  background: #c9a66b;
  color: #fff;
  padding: 6px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  z-index: 100;
}

.info {
  padding: 16px;
}

.title {
  font-weight: 700;
  margin-bottom: 6px;
}

.price {
  color: var(--muted);
  margin-bottom: 12px;
}

.actions {
  display: flex;
  gap: 5px;
}

.btn {
  flex: 1;
  padding: 10px 10px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
}

.btn.primary {
  background-color: #c9a66b;
  color: white;
}

.btn.demo {
  background: transparent;
  border: 1px solid #eee;
  text-align: center;
}

/* Demo preview modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.45);
  z-index: 30;
}

.modal.open {
  display: flex;
}

textarea {
  resize: vertical;
}

.phone-mock {
  width: 360px;
  height: 780px;
  border-radius: 30px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  position: relative;
}

.phone-top {
  height: 46px;
  background: linear-gradient(180deg, #fff, #f7f4f3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-screen {
  padding: 12px;
  overflow: auto;
  height: calc(100% - 46px);
}

footer {
  padding: 24px 36px;
  text-align: center;
  color: var(--muted);
}

/* small responsive tweaks */
@media (max-width: 700px) {
  header {
    flex-direction: column;
    gap: 12px;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid .card {
    /* flex: 1 1 185px; */
    /* min-width: 185px; */
    min-width: 180px;
  }

  .btn {
    font-size: 0.8rem;
  }

  .card .media {
    height: 320px;
  }

  .phone-mock {
    width: 280px;
    height: 620px;
  }

  .cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 8px;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .grid .card {
    max-width: 150px;
  }
  .actions {
    margin-left: -8px; /*19.01*/
  }
}

/* small animations */
.card,
.cat {
  will-change: transform;
}

/* buyForm.css */
.responsive-iframe-container {
  position: relative;
  width: 100%;
  height: 100vh;
  padding-top: 56.25%;
  overflow: hidden;
}

.responsive-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  border: none;
}

#buyForm {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: linear-gradient(135deg, #fff 0%, #fdf6e3 100%);
  padding: 24px;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
  z-index: 40;
  max-width: 420px;
  width: 80%;
  max-height: 90vh;
  overflow-y: auto;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    visibility 0s linear 0.4s;
}

#buyForm.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  transition-delay: 0s;
}

#buyForm form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#buyForm .form-title {
  font-size: 1.3rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
  color: #4a3f2f;
}

#buyForm input,
#buyForm textarea {
  display: block;
  margin: auto;
  width: 80%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 15px;
  transition:
    border-color 0.3s,
    box-shadow 0.3s;
}

#buyForm input:focus,
#buyForm textarea:focus {
  border-color: #c9a66b;
  box-shadow: 0 0 0 3px rgba(201, 166, 107, 0.25);
  outline: none;
}

#buyForm .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

#buyForm .btn {
  flex: 1;
  min-width: 100px;
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition:
    transform 0.2s,
    box-shadow 0.3s;
}

#buyForm .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#buyForm .btn.primary {
  color: #fff;
  color: white;
  background-color: #c9a66b;
}

#buyForm .btn.demo {
  background: #eacbcb;
  color: #4a4a4a;
}

#buyForm .btn.danger {
  background: #e74c3c;
  color: #fff;
}

.social {
  margin-top: 25px;
  margin-bottom: 25px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.social a {
  text-decoration: none;
  color: #3b3b3b;
}

.social svg {
  height: 35px;
  width: 35px;
  margin: 2px;
  transition:
    transform 0.3s ease,
    color 0.3s ease;
  cursor: pointer;
}

.social svg:hover {
  transform: scale(1.15);
  color: #3b3b3b;
}

#successMessage {
  position: fixed;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: auto;
  max-width: 80%;
  text-align: center;
  opacity: 1;
  background: #28a745; /* green success */
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  #buyForm {
    width: 95%;
    max-width: none;
    padding: 20px;
  }
}

@media (max-width: 480px) {
  #buyForm {
    padding: 16px;
  }
  #buyForm .form-title {
    font-size: 1rem;
  }
  #buyForm input,
  #buyForm textarea {
    width: 80%;
  }
  #buyForm .btn {
    font-size: 14px;
    padding: 10px;
    min-width: auto;
  }
}
