/* Estilos para a página do Simulador */
.simulador-page .container {
    max-width: 1600px;
    padding: 4rem 2%;
}

.simulador-container {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-top: 2rem;
    background-color: rgba(30, 30, 30, 0.8);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* ALTERAÇÃO: Adicionado max-width e overflow para conter a camiseta */
/* Encontre esta regra no seu CSS */
.simulador-canvas-wrapper {
    flex-basis: 60%;
    position: relative;
    background-color: #f0f0f0;
    border-radius: 10px;
    min-height: 550px; 
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%; 
    overflow: hidden;
}

/* ALTERAÇÃO: Canvas agora é responsivo */
#tshirt-canvas {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

#canvas-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #888;
    pointer-events: none; /* Garante que não interfere com o canvas */
}

#canvas-placeholder i {
    font-size: 80px;
    margin-bottom: 1rem;
}

#canvas-placeholder p {
    font-size: 1.2rem;
    color: #888;
}


.simulador-controls {
    flex-basis: 40%;
    background: rgba(51, 51, 51, 0.8);
    padding: 2rem;
    border-radius: 15px;
}

.simulador-controls h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.simulador-controls p {
    color: var(--text-color-secondary);
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.5;
}

.simulador-controls hr {
    border: none;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1rem;
}

.color-box {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
}

.color-box:hover, .color-box.active {
    border-color: var(--secondary-color);
    transform: scale(1.1);
}

.control-input {
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #333;
    color: var(--text-color);
    margin-top: 0.5rem;
}

.control-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

.primary-button {
    background-color: var(--secondary-color);
}
.primary-button:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.danger-button {
    background-color: #9b2d22;
}
.danger-button:hover {
    background-color: #7a221a;
    transform: translateY(-2px);
}

.hidden {
    display: none;
}

#estampa-controls p {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-color-muted);
}

/* --- Estilos para os botões Frente/Costas --- */
.view-toggle {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    padding: 5px;
    display: flex;
    z-index: 10;
}

.view-btn {
    background-color: transparent;
    border: none;
    color: var(--text-color);
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.view-btn.active {
    background-color: var(--secondary-color);
}

/* --- Estilos para o nome da cor selecionada --- */
.selected-color-display {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--white);
    margin-top: 1rem;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* NOVA ANIMAÇÃO DE "3 PONTINHOS" */
.loading-dots::after {
  content: ' .';
  display: inline-block;
  animation: dots 1.4s steps(5, end) infinite;
}

@keyframes dots {
  0%, 20% {
    color: rgba(0,0,0,0);
    text-shadow:
      .25em 0 0 rgba(0,0,0,0),
      .5em 0 0 rgba(0,0,0,0);
  }
  40% {
    color: white;
    text-shadow:
      .25em 0 0 rgba(0,0,0,0),
      .5em 0 0 rgba(0,0,0,0);
  }
  60% {
    text-shadow:
      .25em 0 0 white,
      .5em 0 0 rgba(0,0,0,0);
  }
  80%, 100% {
    text-shadow:
      .25em 0 0 white,
      .5em 0 0 white;
  }
}
/* Fim da nova animação */

/* Seus estilos de responsividade originais, mantidos e limpos */
.simulador-observacao { 
    color: var(--text-color-muted); 
    font-size: 0.9rem; 
    text-align: center; 
    margin-top: 1.5rem; 
    line-height: 1.4; 
}
.simulador-observacao a { 
    color: var(--secondary-color); 
    text-decoration: none; 
    font-weight: 500; 
}
.simulador-observacao a:hover { 
    text-decoration: underline; 
}

@media (max-width: 992px) {
    .simulador-container {
        flex-direction: column;
    }
    .simulador-canvas-wrapper, .simulador-controls {
        flex-basis: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .simulador-page .container {
        padding: 3rem 1rem;
    }
}