*,
*:before,
*:after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
* {
  margin: 0;
}
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}
input,
button,
textarea,
select {
  font: inherit;
}
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/*******************************************/
body {
  font-family: sans-serif;

  background-color: #f1faff;
  /*background-color: #FAF5FF; */
}
header {
  width: 100%;
  padding: 12px 16px;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.image-wrapper-header {
  height: 48px;
  width: 48px;
  overflow: hidden;
  border-radius: 8px;
  flex-shrink: 0;
}

.image-wrapper-header img {
  height: 100%;
  width: 100%;
  object-fit: contain;
}

header h2 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

.spacer {
  width: 48px;
}

/**************Main Tabs Area*************/
/* Tabs Layout */
.main-tab-wrapper {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 12px auto;
}

.tab-btn {
  padding: 10px 18px;
  border-radius: 20px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s, color 0.3s;
}

.tab-btn.active {
  background-color: #da8b2f;
  color: white;
  border-color: #da8b2f;
}
/* Grid Container */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: auto;
  justify-content: center;
}

/* Each grid item */
.grid-item {
  width: 100%;
  max-width: 220px;
  justify-self: center;
  background: white;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.grid-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.menu-image-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #f5f5f5, #eaeaea);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  object-fit: contain;
}

/* Lazy image + blur preload effect */
.lazy-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: blur(10px);
  transition: filter 0.4s ease;
}

/* Item footer: label + button */
.item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  gap: 8px;
}

/* Label text */
.item-label {
  font-size: 16px;
  font-weight: 600;
  flex-grow: 1;
  text-align: left;
  color: #da8b2f;
}

/* Try On Button */
.try-btn {
  padding: 6px 12px;
  font-size: 14px;
  border: none;
  background: #da8b2f;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.try-btn:hover {
  background: #333;
}

@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .item-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .try-btn {
    width: 100%;
    margin-top: 6px;
  }
  .item-label {
    text-align: center;
  }
}

.lead-wrapper {
  position: absolute;
  bottom: 16px;
  width: 100%;
  margin: 0 auto;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 8px;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  justify-content: flex-end;
  padding: 0 4px;
}
.feedbackWrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  gap: 8px;
}
.image-wrapper {
  height: 32px;
  width: 32px;
  overflow: hidden;
  border-radius: 8px;
}
.image-wrapper img {
  height: 100%;
}

.btn-img-wrapper {
  position: relative;
}

.product-info {
  max-width: 840px;
  padding: 0 5%;
  margin: 0 auto;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}
main {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.filter-wrapper {
  width: 120px;
  text-align: center;
  position: absolute;
  top: 16px;
  right: 4px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}
.filter-btn-wrapper {
  border-top: 1px solid hsl(0, 0%, 20%);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  text-align: center;
}

.add-filter {
  border-right: 1px solid hsl(0, 0%, 30%);
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  border-radius: 4px;
}
.clear-filter {
  -webkit-box-flex: 1;
  -ms-flex: 1;
  flex: 1;
  border-radius: 4px;
}

.add-filter:hover,
.clear-filter:hover {
  background-color: #fd7e14;
}

.loading-screen-wrapper {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  z-index: 5;
}
.loading-screen-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: #ffffffbf;
}
.loading-screen-dialog {
  position: relative;
  padding: 8px;
  background: transparent;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}
@-webkit-keyframes rotate {
  0% {
    -webkit-transform: rotate(0);
    transform: rotate(0);
  }
  to {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
@keyframes rotate {
  0% {
    -webkit-transform: rotate(0);
    transform: rotate(0);
  }
  to {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
.loading-img {
  height: 64px;
  width: 64px;
  border: 4px solid hsl(0, 0%, 83%);
  border-right: 4px solid hsl(158, 76%, 37%);
  border-radius: 50%;
  overflow: hidden;
  -webkit-animation: rotate 2s ease-in-out infinite;
  animation: rotate 2s ease-in-out infinite;
}
.fade-item {
  -webkit-transition: 1s all ease-in-out;
  -o-transition: 1s all ease-in-out;
  transition: 1s all ease-in-out;
  opacity: 0;
}
.fadein {
  -webkit-animation: fadeIn 1s 1;
  animation: fadeIn 1s 1;
  -webkit-animation-fill-mode: forwards;
  animation-fill-mode: forwards;
  color: var(--primary-theme);
}
@-webkit-keyframes fadeIn {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
    color: var(--primary-theme);
  }
  to {
    color: gray;
    opacity: 1;
  }
}
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
    color: var(--primary-theme);
  }
  to {
    color: gray;
    opacity: 1;
  }
}
.cam-loading-screen-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  z-index: 5;
}
.marquee-wrapper {
  position: absolute;
  bottom: 18px;
  right: 44px;
  color: green;
  background-color: #fff;
  padding: 2px;
  border-radius: 4px;
}
.blink {
  -webkit-animation: blinker 1.5s linear infinite;
  animation: blinker 1.5s linear infinite;
  font-family: Arial, sans-serif;
}
@-webkit-keyframes blinker {
  50% {
    opacity: 0;
  }
}
@keyframes blinker {
  50% {
    opacity: 0;
  }
}

/**************CAM WRAPPER********/

.cam-wrapper {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  align-items: center;
}

.cam-wrapper canvas {
  width: 100%;
  height: auto;
  border-radius: 12px;
  background-color: #eee;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

#btnScreenshot {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 2;
  background-color: hsl(0, 0%, 0%);
  font-weight: bold;
}

#btnScreenshot:hover {
  background-color: #fd7e14;
}

.cam-wrapper-btns {
  padding: 10px 14px;
  background-color: hsl(0, 0%, 0%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

/*******************Modal code************/

.modal-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  z-index: 4;
  background: hsla(0, 0%, 0%, 0.8);
  backdrop-filter: blur(6px);

  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.3s ease;
}

.modal-backdrop {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-dialog {
  position: relative;
  background-color: #fff;
  border-radius: 16px;
  padding: 24px;
  width: auto;
  max-width: 850px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--bright-red, #ff4d4d);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}
.modal-btn:hover {
  background-color: #d63031;
}

.modal-wrapper.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.modal-wrapper.hide {
  display: none;
}

.modal-wrapper.show .modal-backdrop {
  opacity: 1;
}

@media (max-width: 600px) {
  /* Fullscreen modal, no margin or padding */
  #cameraModal.modal-wrapper {
    padding: 0;
  }

  #cameraModal .modal-dialog {
    max-width: none;
    max-height: none;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
  .modal-btn {
    position: absolute;
    top: -48px;
    right: 0px;
  }
}

/**************Sub Modal******/
.sub-modal-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  z-index: 2000; /* Higher than main modal */
  background: transparent;
}

.sub-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.4); /* lighter than main */
  backdrop-filter: blur(2px);
  z-index: -1;
}

.sub-modal-dialog {
  position: relative;
  background-color: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.sub-modal-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  background-color: var(--bright-red, #ff4d4d);
  color: white;
  border: none;
  border-radius: 50%;
  padding: 2px 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.sub-modal-btn:hover {
  background-color: #d63031;
}

@media (max-width: 500px) {
  .sub-modal-dialog {
    max-width: 90%;
    padding: 16px;
  }
}

.input-wrapper {
  padding: 4px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  border-bottom: 1px solid grey;
}
.input-wrapper label {
  width: 150px;
  white-space: initial;
  word-wrap: break-word;
  font-weight: 600;
}
.input-wrapper select {
  margin: 0 auto;
  text-align: center;
  width: 150px;
  padding: 0 4px;
}
.btnWrapper {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-pack: distribute;
  justify-content: space-around;
  margin: 8px 0;
}
.btnWrapper button {
  width: 80px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 8px;
  border: none;
}
#applyFilterBtn {
  color: green;
  background-color: #e5ffe5;
  border: 1px solid currentColor;
}
#clearFilterModalBtn {
  color: #c00;
  background-color: #ffe5e5;
  border: 1px solid currentColor;
}

#btnDownloadPhoto {
  color: green;
  background-color: #e5ffe5;
  border: 1px solid currentColor;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
}

.sub-modal-dialog.image-modal {
  width: auto;
  max-width: 95vw;
  max-height: 80vh;
  padding: 1rem;
}

.modal-image-body {
  text-align: center;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-image:hover {
  transform: scale(1.02);
}

.modal-image-title {
  margin-top: 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
}

/*******************Footer*****************/
.footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background-color: #f9f9f9;
  font-size: 14px;
  color: #333;
  border-top: 1px solid #ddd;
}

.footer img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.footer a {
  color: #0077cc;
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  text-decoration: underline;
}

/*****************Iframe*****************/
.main-section {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.hide {
  display: none;
}
.current-chosen-category {
  border: 2px solid green;
  border-radius: 8px;
  background-color: hsl(120, 100%, 90%);
  color: green;
  text-align: center;
}
.bold-text {
  font-weight: 600;
}
.highlighted-text {
  color: #00f;
}
.btn-on {
  background-color: green;
}
.active-ring-position {
  background-color: green !important;
}
.active-canvas {
  border: 4px solid green;
}
button[disabled] {
  filter: opacity(0.5);
}
.center-text {
  text-align: center;
}

.hover-pointer {
  cursor: pointer;
}
