
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* ========== Global Styles ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #f5f7fc;
  color: #1f1f1f;
  text-align: center;
  line-height: 1.6;
}

/* ========== Navbar ========== */
.navbar {
  position: fixed;
  top: 0; left: 0; width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 10%;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(31, 59, 147, 0.08);
  z-index: 1000;
  border-bottom: 2px solid #1f3b93;
}

.logo img {
  height: 50px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
}

.nav-links li {
  display: inline;
}

.nav-links a {
  color: #1f3b93;
  text-decoration: none;
  font-size: 16px;
  font-weight: bold;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: #162c6d;
}

.btn-login {
  background: linear-gradient(135deg, #4b6cb7, #1f3b93);
  padding: 8px 15px;
  border-radius: 5px;
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.btn-login:hover {
  background: linear-gradient(135deg, #3757a6, #162c6d);
}

.menu-icon {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: #1f3b93;
}

@media (max-width: 768px) {
  .menu-icon {
    display: block;
    z-index: 1100;
  }

  .nav-links {
    position: absolute;
    top: 75px;
    right: 0;
    background: #ffffff;
    width: 100%;
    flex-direction: column;
    text-align: center;
    height: 0;
    overflow: hidden;
    transition: height 0.5s ease-in-out;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    height: auto;
    padding: 10px 0;
  }

  .nav-links li {
    padding: 10px;
    border-bottom: 1px solid #eee;
  }
}

#userEmail {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  font-size: 16px;
  font-weight: 500;
  padding: 0 10px;
  color: #1f3b93;
}

/* ========== Product Section ========== */
.product-gallery {
  max-width: 1200px;
  padding: 0 20px;
  margin: 40px auto 20px;
}

.main-image {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  margin: auto;
}

.thumbnail-wrapper {
  margin-top: 30px;
  background: #f1f4fb;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
}

.thumbnail-container {
  overflow-x: auto;
  padding: 0 12px;
  display: flex;
  justify-content: center;
}

.thumbnail-row {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  width: fit-content;
  scrollbar-width: none;
}

.thumbnail-row::-webkit-scrollbar {
  display: none;
}

.thumbnail-row img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, border-color 0.3s;
}

.thumbnail-row img:hover,
.thumbnail-row img.active {
  transform: scale(1.1);
  border-color: #1f3b93;
}

.product-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  background: #ffffff;
  padding: 30px;
  margin: 60px auto 40px;
  border-radius: 10px;
  max-width: 850px;
  box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.05);
  gap: 30px;
}

.product-info {
  max-width: 650px;
  padding: 0 30px;
  text-align: left;
}

.product-info h2 {
  font-size: 26px;
  color: #1f3b93;
  margin-bottom: 15px;
}

.product-info p,
.product-info li {
  font-size: 16px;
  margin: 10px 0;
  color: #333;
}

.product-info ul {
  padding-left: 20px;
}

.price {
  font-size: 24px;
  font-weight: bold;
  color: #1f3b93 !important;
  border-left: 4px solid #4b6cb7;
  border-bottom: 4px solid #4b6cb7;
  background: linear-gradient(90deg, #e6ecf8, #dde3f7);
  padding: 10px 18px;
  border-radius: 8px;
  display: inline-block;
  box-shadow: inset 0 0 5px rgba(31, 59, 147, 0.15);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .product-container {
    flex-direction: column;
    padding: 20px;
  }

  .main-image {
    height: 280px;
  }

  .product-info {
    padding: 0 15px;
  }

  .product-info ul {
    padding-left: 20px;
  }
}
/* ========== Upload & Preview ========== */
input[type="file"] {
  width: 100%;
  padding: 12px;
  margin-top: 12px;
  border: 2px dashed #4b6cb7;
  border-radius: 8px;
  background: #eef2fb;
  color: #1f3b93;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

input[type="file"]:hover {
  background: #e0e9f9;
  border-color: #1f3b93;
}

.preview-container {
  display: none;
  background: #ffffff;
  padding: 25px;
  margin: 30px auto;
  border-radius: 12px;
  max-width: 595px; /* A4 width */
  aspect-ratio: 1 / 1.414;
  box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.07);
  overflow: hidden;
}

.preview-container h2 {
  font-size: 22px;
  color: #1f3b93;
  font-weight: 600;
  margin-bottom: 20px;
}

/* ========== Canvas ========== */
canvas {
  border: 2px solid #d1d5db;
  width: 100%;
  max-width: 420px;
  margin: 15px auto;
  display: block;
  border-radius: 8px;
  background: #ffffff;
}

/* ========== Shipping Address ========== */
.shipping-container {
  background: #ffffff;
  padding: 30px 25px;
  margin: 40px auto;
  border-radius: 12px;
  max-width: 600px;
  box-shadow: 0 6px 20px rgba(31, 59, 147, 0.08);
  text-align: left;
  animation: fadeIn 0.5s ease-in-out;
}

.shipping-container h2 {
  font-size: 24px;
  color: #1f3b93;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 700;
  text-transform: uppercase;
}

.shipping-container form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.shipping-container input {
  width: 100%;
  padding: 14px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 16px;
  background: #f9fbff;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
}

.shipping-container input:focus {
  border-color: #4b6cb7;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(31, 59, 147, 0.2);
  transform: scale(1.02);
}

@media (min-width: 600px) {
  .shipping-container form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .shipping-container input:nth-child(5),
  .shipping-container input:nth-child(6) {
    grid-column: span 2;
  }
}

/* ========== CTA Button ========== */
.sticky-order-btn {
  display: block;
  width: 100%;
  background: linear-gradient(to right, #4b6cb7, #1f3b93);
  color: #fff;
  font-size: 18px;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  margin: 30px 0 10px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.sticky-order-btn:hover {
  background: linear-gradient(to right, #3757a6, #162c6d);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

/* ========== Scroll Button ========== */
#scrollToOrder {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  background: #1f3b93;
  color: white;
  border: none;
  border-radius: 50%;
  padding: 14px;
  width: 48px;
  height: 48px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#scrollToOrder i {
  font-size: 22px;
}

#scrollToOrder:hover {
  background: #162c6d;
  transform: scale(1.1);
}

#scrollToOrder.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* ========== Responsive Fixes ========== */
@media (max-width: 768px) {
  .product-container {
    flex-direction: column;
    padding: 20px;
  }

  .main-image {
    height: 280px;
  }

  .product-info {
    padding: 0 15px;
  }

  .product-info ul {
    padding-left: 20px;
  }

  .preview-container {
    aspect-ratio: unset;
    max-width: 100%;
    padding: 20px;
  }
}

/* Animation */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}