/* Convert Products Section Styles */
.convert-products-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, #111827, #000);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  overflow-x: hidden;
}

@media (max-width: 767px) {
  .convert-products-section {
    padding: 3rem 0;
  }
}

.convert-products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .convert-products-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.convert-products-content {
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 767px) {
  .convert-products-content {
    text-align: center;
  }
}

.convert-products-title {
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  background: linear-gradient(to right, #fff, #67e8f9, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  word-wrap: break-word;
}

@media (max-width: 767px) {
  .convert-products-title {
    font-size: 2rem;
  }
}

.convert-products-description {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  word-wrap: break-word;
}

@media (max-width: 767px) {
  .convert-products-description {
    font-size: 1rem;
  }
}

.convert-products-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  word-wrap: break-word;
}

.convert-products-subtitle strong {
  color: #67e8f9;
  font-weight: 700;
}

.convert-products-viewer {
  width: 100%;
  height: 500px;
  border-radius: 1rem;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #111827);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

@media (max-width: 767px) {
  .convert-products-viewer {
    height: 400px;
  }
}

/* Model Viewer Styles */
.product-model-viewer {
  width: 100%;
  height: 100%;
  background-color: transparent;
  border-radius: 1rem;
}

/* This keeps child nodes hidden while the element loads */
:not(:defined) > * {
  display: none;
}

model-viewer {
  background-color: #eee;
  overflow-x: hidden;
  width: 100%;
  height: 100%;
}

/* AR Button Styles */
#ar-button {
  background-color: white;
  border-radius: 8px;
  border: none;
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px 16px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

#ar-button:hover {
  background-color: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#ar-button:active {
  background-color: #e0e0e0;
  transform: translateY(0);
}

/* Fullscreen Button */
#fullscreen-button {

  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 8px;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 100;
}

#fullscreen-button:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#fullscreen-button svg {
  width: 20px;
  height: 20px;
}

/* AR Prompt and Failure styles remain the same */
@keyframes circle {
  from {
    transform: translateX(-50%) rotate(0deg) translateX(50px) rotate(0deg);
  }
  to {
    transform: translateX(-50%) rotate(360deg) translateX(50px) rotate(-360deg);
  }
}

@keyframes elongate {
  from {
    transform: translateX(100px);
  }
  to {
    transform: translateX(-100px);
  }
}

model-viewer > #ar-prompt {
  position: absolute;
  left: 50%;
  bottom: 60px;
  animation: elongate 2s infinite ease-in-out alternate;
  display: none;
}

model-viewer[ar-status="session-started"] > #ar-prompt {
  display: block;
}

model-viewer > #ar-prompt > img {
  animation: circle 4s linear infinite;
  width: 50px;
  height: 50px;
}

model-viewer > #ar-failure {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 60px;
  display: none;
  background: rgba(255, 0, 0, 0.8);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  border: none;
}

model-viewer[ar-tracking="not-tracking"] > #ar-failure {
  display: block;
}

/* AR QR Modal Styles */
.ar-qr-modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.ar-qr-modal-content {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
  backdrop-filter: blur(20px);
  margin: 10% auto;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  width: 90%;
  max-width: 400px;
  text-align: center;
  color: #fff;
  box-sizing: border-box;
}

.ar-qr-close {
  color: rgba(255, 255, 255, 0.6);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
}

.ar-qr-close:hover,
.ar-qr-close:focus {
  color: #fff;
}

.ar-qr-modal-content h3 {
  margin-bottom: 1.5rem;
  color: #fff;
  font-size: 1.25rem;
}

#arQrCode {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
}

#arQrCode canvas {
  border-radius: 0.5rem;
}

.ar-qr-modal-content p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  margin-top: 1rem;
}
