/* ================= GLOBAL RESET ================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background-color: #f4f6f9;
  color: #333;
  line-height: 1.6;
  padding-top: 70px; /* Prevent overlap with fixed header */
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* ================= HEADER ================= */

.site-header {
  background: #000;
  border-bottom: 1px solid #222;
  padding: 15px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(15px);
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 25px;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  color: rgb(255, 192, 0);
  text-decoration: none;
}

.main-nav a {
  text-decoration: none;
  color: #fff;
  margin-left: 25px;
  font-size: 16px;
  font-weight: 500;
  transition: transform 0.3s ease, color 0.3s ease;
}

.main-nav a:hover {
  color: rgb(255, 192, 0);
  transform: translateY(-3px);
}

/* ================= ADVANCED HERO ================= */

.hero {
  background: linear-gradient(120deg, #000 0%, #0a58ca 55%, rgb(255, 192, 0) 100%);
  color: #fff;
  padding: 80px 20px 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 192, 0, 0.18), transparent 60%),
    rgba(0, 0, 0, 0.4);
}

.hero .container {
  position: relative;
  z-index: 2;
  max-width: 900px;
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: 2px;
  line-height: 1.3;
  text-transform: uppercase;
  text-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.hero p {
  font-size: 18px;
  margin: 0 auto 30px;
  opacity: 0.95;
  line-height: 1.7;
  font-weight: 400;
}

.hero-benefits {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 35px;
  padding: 0;
}

.hero-benefits li {
  font-size: 16px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  padding: 10px 20px;
  border-radius: 30px;
  transition: all 0.4s ease;
  cursor: pointer;
}

.hero-benefits li:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.15);
}

.primary-btn {
  display: inline-block;
  background: rgb(255, 192, 0);
  color: #000;
  padding: 18px 45px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
  letter-spacing: 1px;
  text-transform: uppercase;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.primary-btn:hover {
  background: #ffd24d;
  transform: translateY(-5px);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.25);
}

/* ================= FORM SECTION ================= */

.form-section {
  padding: 80px 20px;
  background: #ffffff;
  border-top: 6px solid rgb(255, 192, 0);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.05);
  border-radius: 8px;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 38px;
  margin-bottom: 15px;
  color: rgb(255, 192, 0);
  font-weight: 800;
  text-transform: uppercase;
}

.section-header p {
  font-size: 18px;
  color: #6c757d;
  line-height: 1.8;
}

.form-card {
  background: #ffffff;
  padding: 45px;
  margin-bottom: 35px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid #e9ecef;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background-color: #f1f1f1;
  transition: 0.4s ease;
}

/* ================= FIELD STATES: VALID/INVALID ================= */

/* When the field is invalid (empty or incorrect) */
.form-group input:invalid,
.form-group select:invalid,
.form-group textarea:invalid {
  background-color: rgba(255, 0, 0, 0.1); /* Light red shade */
  border-color: #dc3545; /* Red border */
  opacity: 0.7; /* Reduced opacity for invalid fields */
}

/* When the field is valid (filled) */
.form-group input:valid,
.form-group select:valid,
.form-group textarea:valid {
  background-color: rgba(0, 255, 0, 0.1); /* Light green shade */
  border-color: #198754; /* Green border */
  opacity: 0.7; /* Reduced opacity for valid fields */
}

/* Focus states for inputs */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgb(255, 192, 0); /* Highlight with orange border */
  background-color: #ffffff;
  outline: none;
}

/* ================= INTRO ================= */

.rfq-intro {
  background: #fff;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

/* ================= FORM CARDS ================= */

.form-card {
  background: #fff;
  padding: 30px;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.05);
  border: 1px solid #e9ecef;
}

.form-card legend {
  font-weight: 600;
  color: rgb(255, 192, 0);
  padding: 0 10px;
}

/* ================= FORM INPUTS ================= */

.buyer-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.business-details-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  min-width: 220px;
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #ced4da;
  font-size: 14px;
  transition: 0.3s;
  background: #fff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgb(255, 192, 0);
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 192, 0, 0.25);
}

textarea {
  resize: vertical;
}

/* ================= PRODUCT GRID ================= */

.product-header,
.product-row {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
}

.product-header {
  font-size: 13px;
  font-weight: 600;
  color: #6c757d;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 8px;
}

/* Apply red and green shadow to form fields inside product row */
.product-row input:invalid,
.product-row select:invalid,
.product-row textarea:invalid {
  background-color: rgba(255, 0, 0, 0.1); /* Light red shade */
  border-color: #dc3545; /* Red border */
  opacity: 0.7; /* Reduced opacity for invalid fields */
  box-shadow: 0 0 8px rgba(220, 53, 69, 0.3); /* Red shadow */
}

.product-row input:valid,
.product-row select:valid,
.product-row textarea:valid {
  background-color: rgba(0, 255, 0, 0.1); /* Light green shade */
  border-color: #198754; /* Green border */
  opacity: 0.7; /* Reduced opacity for valid fields */
  box-shadow: 0 0 8px rgba(25, 135, 84, 0.3); /* Green shadow */
}

/* Focus states for product fields */
.product-row input:focus,
.product-row select:focus,
.product-row textarea:focus {
  border-color: rgb(255, 192, 0); /* Highlight with orange border */
  background-color: #ffffff;
  outline: none;
  box-shadow: 0 0 8px rgba(255, 192, 0, 0.3); /* Orange shadow */
}

.product-row textarea {
  height: 45px;
}


/* ================= BUTTONS ================= */

.remove-btn {
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  transition: 0.3s;
}

.remove-btn:hover {
  background: #bb2d3b;
}

.add-btn {
  background: #000;
  color: #fff;
  padding: 12px 20px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}

.add-btn:hover {
  background: rgb(255, 192, 0);
  color: #000;
}

.submit-btn {
  background: rgb(255, 192, 0);
  color: #000;
  padding: 14px 40px;
  border-radius: 6px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: 0.3s;
}

.submit-btn:hover {
  background: #e6b800;
}

.submit-section {
  text-align: center;
  margin-top: 20px;
}

.success-msg {
  margin-top: 15px;
  color: #198754;
  font-weight: 500;
}

/* ================= TRUST ================= */

.trust-notice {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 25px;
  border-left: 4px solid rgb(255, 192, 0);
}

/* ================= FOOTER ================= */

.site-footer {
  background: #000;
  color: #fff;
  text-align: center;
  padding: 25px 0;
  font-size: 14px;
  margin-top: 60px;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  color: rgb(255, 192, 0);
}

/* ================= RESPONSIVE IMPROVED ================= */

/* Large Tablets */
@media (max-width: 992px) {
  .product-header,
  .product-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero h1 {
    font-size: 30px;
  }
}

/* Tablets */
@media (max-width: 768px) {
  .header-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
  }

  .main-nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .main-nav a {
    margin-left: 0;
  }

  .hero {
    padding: 50px 20px;
  }

  .hero h1 {
    font-size: 24px;
  }

  .hero p {
    font-size: 14px;
  }

  .product-header,
  .product-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .submit-btn {
    width: 100%;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .hero h1 {
    font-size: 22px;
  }

  .hero-benefits {
    flex-direction: column;
    gap: 8px;
  }

  .product-header {
    display: none;
  }

  .product-row {
    grid-template-columns: 1fr;
    background: #f8f9fa;
    padding: 18px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
  }

  .submit-btn {
    width: 100%;
    padding: 14px;
  }
}
