/* Import Google Font (Mulish) */
@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@500;600;700&display=swap');

/* Wrapper below Add to Cart */
.cart .sizeme-btn-wrapper {
  display: block;
  margin-top: 0.8rem;      /* spacing below Add to Cart */
  text-align: left;        /* align left with other buttons/text */
}

/* Center on mobile if theme stacks buttons */
@media screen and (max-width: 768px) {
  .cart .sizeme-btn-wrapper {
    text-align: center;
    margin-top: 1rem;
  }
}

/* Button styling (unchanged) */
.sizeme-btn,
button.sizeme-btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Mulish', 'Helvetica Neue', Arial, sans-serif !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  color: #d8ddd8 !important;
  cursor: pointer;
  line-height: 1.4;
  text-decoration: none;
  text-transform: lowercase !important;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  padding: 0.3rem 0.6rem !important;
  border-radius: 4px;
  white-space: nowrap;
}

.sizeme-btn:hover {
  color: #91893e !important;
}

.sizeme-btn i {
  margin-right: 6px;
}

/* Modal overlay */
#sizemeModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9999;
  overflow: hidden;
  transition: background 0.3s ease;
}

/* Drawer modal */
#sizemeModalContent {
  position: absolute;
  top: 0;
  left: 0;
  width: 420px;
  max-width: 90%;
  height: 100%;
  background: #18112c;
  box-shadow: 6px 0 18px rgba(0,0,0,0.25);
  border-radius: 0 8px 8px 0;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.4s ease-in-out;
  padding: 1.5rem 0;
}

#sizemeModal.show #sizemeModalContent {
  transform: translateX(0);
}

/* Close button */
#sizemeModalClose {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1rem;
  color: #d8ddd8;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}

/* Iframe */
#sizemeModal iframe {
  width: 100%;
  height: 100%;
  border: none;
  flex-grow: 1;
}

/* Custom dark scrollbar for modal */
#sizemeModalContent::-webkit-scrollbar {
  width: 8px;
}

#sizemeModalContent::-webkit-scrollbar-track {
  background: #18112c;
}

#sizemeModalContent::-webkit-scrollbar-thumb {
  background-color: #2a1f47;
  border-radius: 4px;
}

/* Mobile behavior */
@media screen and (max-width: 768px) {
  #sizemeModalContent {
    width: 100%;
    border-radius: 0;
  }

  .cart .sizeme-btn-wrapper {
    display: block;
    margin: 1rem auto 0 auto; /* centers and adds space above */
    text-align: center;
  }
}
