/*  > <  o o  - -  */
body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
}

/* Logo hình ảnh */
.baohanh-img {
  display: block;
  max-width: 70%;
  height: auto;
  margin: 20px auto;
  border-radius: 8px;
}


.logo-container img:hover {
  transform: scale(1.05);
}

#searchToggle {
  cursor: pointer;
  transition: color 0.3s ease;
}

#searchToggle:hover {
  color: yellow;
}

.contact {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px;
  flex-wrap: wrap;
  background-color: #ff0000;
  ;
}

.office {
  flex: 1;
  min-width: 220px;
  border-radius: 8px;
  padding: 15px;
}

.office h3 {
  color: white;
  margin-bottom: 10px;
}

.office p {
  margin: 4px 0;
  font-size: 14px;
  color: white;
}

.menu-baohanh {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 17px;
  margin: 70px 0;
  background-color: #f5f5f5;
  padding: 15px 10px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.menu-baohanh a {
  text-decoration: none;
  color: #d20505;
  font-size: 16px;
  padding: 8px 12px;
  border: 1px solid #d20505;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: inline-block;
}

.menu-baohanh a:hover {
  background-color: #d20505;
  color: white;
}

/* Form tra cứu */
.form-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#captchaForm {
  max-width: 700px;
  margin: 30px auto;
  background-color: #fafafa;
  padding: 25px 30px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

#captchaForm input[type="text"] {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
}

/* Captcha style */
.captcha-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha {
  background-color: #e0e0e0;
  padding: 10px 15px;
  font-weight: bold;
  letter-spacing: 2px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 18px;
  user-select: none;
}

.reset-icon {
  cursor: pointer;
  color: #555;
  font-size: 18px;
  transition: transform 0.3s ease;
}

.reset-icon:hover {
  transform: rotate(180deg);
  color: #d20505;
}

/* Nút tra cứu */
#captchaForm button {
  background-color: #d20505;
  color: white;
  padding: 10px 20px;
  font-size: 17px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: fit-content;
}

#captchaForm button:hover {
  background-color: #d20505;
}


.baohanh-info-container {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.product-info, .customer-info {
  flex: 1;
  min-width: 300px;
  max-width: 800px;
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.product-info h2, .customer-info h2 {
  margin-bottom: 20px;
  color: #ff0000;
  text-align: center;
  font-weight: bold;
}

.product-info label,
.customer-info label {
  display: block;
  margin-bottom: 15px;
  font-size: 14px;
  color: #333;
}

.product-info input[type="text"],
.customer-info input[type="text"],
.customer-info input[type="date"],
.customer-info input[type="tel"],
.customer-info input[type="email"],
.product-info textarea,
.customer-info textarea {
  width: 100%;
  padding: 10px 12px;
  margin-top: 4px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
}

.product-info textarea[readonly] {
  background-color: #f5f5f5;
}

input[readonly] {
  background-color: #f5f5f5;
  cursor: not-allowed;
}


#backToTopBtn {
  display: none;
  /* Ẩn ban đầu */
  position: fixed;
  bottom: 40px;
  right: 30px;
  z-index: 999;
  font-size: 18px;
  border: none;
  outline: none;
  background-color: #ff0000;
  color: white;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 50%;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease;
}

#backToTopBtn:hover {
  background-color: #d20505;
}

@media (max-width: 1024px) {

  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Logo nhỏ lại để vừa màn */
  .baohanh-img {
    max-width: 100vw;
  }

  /* Menu tra cứu bảo hành xếp dọc khi thiếu chỗ */
  .menu-baohanh {
    flex-direction: column;
    gap: 12px;
    margin: 60px 0;
  }

  .menu-baohanh a {
    width: 100%;
    text-align: center;
    font-size: 15px;
  }

  /* Form tra cứu co lại hợp lý */
  #captchaForm {
    margin: 20px 10px;
    padding: 20px 16px;
  }

  .form-group {
    gap: 4px;
  }

  #captchaForm button {
    width: 100%;
  }

  .captcha-inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Nút cuộn lên ẩn nếu cần hoặc reposition */
  #backToTopBtn {
    display: none !important;
  }
}