@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap');

* {
  animation: fadeIn 0.5s ease-in-out;
  font-family: 'Figtree', sans-serif;
}

body {
  background: #031222;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.products-page {
  padding: 20px 20px;
  text-align: center;
  margin: 0 auto !important;
  max-width: 1100px;
  box-sizing: border-box;
}

.products-page h1 {
  font-size: 3rem;
  margin-bottom: 40px;
  color: whitesmoke;
  font-family: 'Figtree', sans-serif;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  justify-items: center;
  align-items: start;
  width: 100%;
}

header {
  background: #031222;
  /* #0f2e50 */
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1;
  animation: rollIn 0.5s ease-in-out;
  height: 100px;
  align-items: left;
  /* taller for big logo */
  padding: 0 0px;
  font-family: Cambria;
}

/* Logo */
header .logo {
  margin-right: auto;
  height: 100px;
  display: flex;
  align-items: center;
  max-width: 200px;
  border-radius: 15px;
}
header .logo img {
  max-width: 150px;
  height: 70px;
  margin-top: 5px;
  margin-left: 10px;
}

header .logo:hover {
  cursor: pointer;
  box-shadow: #8cbfd6 0px 0px 20px 1px;
  transition: 0.5s all ease-in-out;
}

.navbar {
  display: flex;
  justify-content: space-between; /* logo left, Home right */
  align-items: center;            /* align vertically */
  padding: 10px 20px;
  background: #031222;       
  height: 100px;        /* optional background */
}

.logo img {
  height: 10px; /* adjust logo size */
}

.nav-links a {
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  color: white;
  margin-left: 20px;
}

.nav-links a:hover {
  color: #4af1f7; /* hover color */
}

.product-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1.25rem;
  text-align: center;
  box-sizing: border-box;
}

/* Product title: allow wrapping, keep it compact and centered */
.product-box .product-title {
  margin: 0 0 1.25rem 0;
  font-weight: 700;
  font-size: 1.05rem;        /* tweak to taste */
  line-height: 1.15;
  white-space: normal;       /* allow wrapping */
  word-break: break-word;    /* break long words if needed */
  hyphens: auto;
  max-width: 100%;           /* ensures it wraps inside the card */
}


.product-box {
  border: 2px solid #d1eff5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1.25rem;
  text-align: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 380px;
  border-radius: 8px;
  background: #c3ddf3;
  box-shadow: 0 3px 6px rgba(0,0,0,0.08);
  transition: transform 0.2s;
  font-family: 'Figtree', sans-serif;
}

.product-box:hover {
  transform: translateY(-5px);
  border-color: #d80a0a;
}

.product-box h3 {
  font-size: 1rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.product-box .price {
  font-size: 1.5rem;
  font-weight: bold;
  color: #045e05;
}

footer {
  background: #041f3b;
  color: white;
  text-align: center;
  padding: 40px 0;
  margin-top: 40px;
}

footer a {
  color: #fff;
  text-decoration: none;
}


/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(237, 241, 241, 0.6);
  justify-content: center; align-items: center;
}

.modal-content {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  width: 400px;
  max-width: 90%;
  position: relative;
}

.modal-content h2 { margin-bottom: 20px; }

.modal-content input, 
.modal-content textarea {
  width: 100%; margin-bottom: 15px; padding: 10px;
  border: 1px solid #ccc; border-radius: 4px;
}

.modal-content button {
  width: 100%;
}

.close {
  position: absolute; right: 15px; top: 10px;
  font-size: 22px; cursor: pointer;
}

.modal-content h4 {
  margin: 15px 0 10px;
  font-size: 1.1rem;
  color: #333;
}
.modal-content label {
  display: block;
  margin-bottom: 8px;
  text-align: left;
}

.payment-options {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}
.pay-btn {
  flex: 1;
  margin: 5px;
  padding: 12px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  color: white;
}
.pay-btn[data-method="razorpay"] { background: #5a4ff3; }
.pay-btn[data-method="gpay"] { background: #34a853; }
.pay-btn[data-method="paytm"] { background: #002970; }
.pay-btn[data-method="phonepe"] { background: #5f259f; }
.pay-btn:hover { opacity: 0.9; }

#company-registration {
  background: #f0f8ff;
  border: 2px dashed #0b900d;
  cursor: pointer;
}

/* UPI Confirmation Popup */
.upi-popup {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.upi-popup .popup-content {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  width: 90%;
  max-width: 350px;
  text-align: center;
}

.upi-popup input {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.upi-popup button {
  margin: 10px 5px;
  padding: 10px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#upiConfirmForm button[type="submit"] {
  background: #138808;
  color: #fff;
}
#upiCloseBtn {
  background: #ccc;
}

#upiScreenshot {
  margin: 8px 0;
}

.thankyou-popup {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 2100;
}
.thankyou-popup .popup-content {
  background: #fff;
  padding: 25px;
  border-radius: 10px;
  max-width: 320px;
  text-align: center;
}
.thankyou-popup button {
  margin-top: 15px;
  padding: 8px 14px;
  border: none;
  border-radius: 5px;
  background: #138808;
  color: #fff;
}

#downloadBtn {
  display: block;
  margin: 20px auto;
  padding: 10px 15px;
  background: #138808;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
#downloadBtn:hover {
  background: #0b5e05;
}

.receipt-para {
  margin-top: 35px;
  padding: 4px 180px;
  font-size: 1rem;
  color: #fff;
  text-align: center;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none; /* shown via JS */
  align-items: center;
  justify-content: center;
  z-index: 99999;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.loading-box {
  background: #ffffff;
  padding: 18px 22px;
  border-radius: 12px;
  text-align: center;
  min-width: 260px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 50%;
  border: 6px solid #eee;
  border-top-color: #147efb;
  animation: spin 1s linear infinite;
}

.loading-text {
  font-weight: 600;
  color: #222;
  font-size: 0.98rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* for QR Code */
/* ---- Stylish UPI QR modal (drop into products.css) ---- */
.qr-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 99999;
  background: rgba(3,18,34,0.65); /* dark brand tint */
  backdrop-filter: blur(6px) saturate(120%);
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.qr-card {
  width: 420px;
  max-width: 95%;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,255,0.98));
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(2,6,23,0.55);
  padding: 18px;
  text-align: center;
  position: relative;
  transform: translateY(18px) scale(0.98);
  transition: transform 220ms cubic-bezier(.2,.9,.25,1), opacity 240ms;
  opacity: 0;
}

/* when shown */
.qr-modal.show .qr-card { transform: translateY(0) scale(1); opacity: 1; }

/* brand header */
.qr-card .qr-head {
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:center;
  margin-bottom: 10px;
}
.qr-card .qr-head img.logo {
  background-color: #002970;
  height: 46px;
  width: 100px;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(3,18,34,0.12);
}
.qr-card .qr-head .title {
  font-weight:700;
  font-size:1.1rem;
  color:#031222; /* dark */
}

/* QR image container */
.qr-card .qr-box {
  background: linear-gradient(180deg,#f7fbff,#eef7fb);
  border-radius: 10px;
  padding: 12px;
  margin: 10px 0 12px;
  display:flex;
  justify-content:center;
  align-items:center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

/* size limit */
.qr-card .qr-box img { width: 250px; height: 250px; object-fit: contain; }

/* info row */
.qr-card .info {
  font-size: 0.95rem;
  color: #0b267e;
  margin-top: 8px;
}

/* action buttons */
.qr-actions {
  display:flex;
  gap:10px;
  margin-top:12px;
  justify-content:center;
  align-items:center;
}
.qr-actions button {
  padding: 9px 12px;
  border-radius: 8px;
  border: none;
  font-weight:600;
  cursor: pointer;
  font-size: 0.95rem;
  box-shadow: 0 6px 18px rgba(3,18,34,0.08);
}

/* primary accent (cyan) and subtle secondary (orange) */
.qr-actions .btn-primary {
  background: linear-gradient(90deg,#67e686,#25f90d);
  color: #031222;
}
.qr-actions .btn-ghost {
  background: transparent;
  border: 1px solid rgba(3,18,34,0.08);
  color: #031222;
}

.qr-actions .btn-blue {
  background: linear-gradient(90deg,#248aff,#3494f4);
  color: #031222;
}

/* small icon button (close) */
.qr-close {
  position: absolute;
  right: 10px;
  top: 10px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: rgba(3,18,34,0.6);
  cursor: pointer;
}

/* download link hidden anchor styling (if any) */
.qr-card a.qr-download {
  display:none;
}


/* Responsive tweaks for products page */
@media (max-width: 992px) {
  .products-page { max-width: 860px; padding-left: 16px; padding-right: 16px; }
  .products-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
  .product-box { padding: 1.5rem 1rem; max-width: 420px; }
}

@media (max-width: 768px) {
  .products-page { margin: 0 12px !important; padding: 14px 12px; }
  .products-grid { grid-template-columns: 1fr; gap: 14px; }
  .product-box { margin: 0 auto; width: 100%; max-width: 520px; padding: 1.25rem; }
  header { height: auto; padding: 8px 12px; }
}

@media (max-width: 480px) {
  .products-page h1 { font-size: 2rem; }
  .product-box { padding: 12px; }
  .product-box h3 { font-size: 0.98rem; }
  .product-box .price { font-size: 1.25rem; }
}
