/* Styles for Product Popup - TioSam Scripts */
/* Usando as mesmas cores do site */
#productInfoModal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.85) !important;
    z-index: 9999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#productInfoModal.show {
    display: flex !important;
    opacity: 1;
}

.ts-popup-content {
    background-color: #1f2937 !important;
    border-radius: 0.75rem;
    max-width: 56rem;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
    border: 1px solid rgba(255,255,255,0.08);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    font-family: 'Poppins', sans-serif;
}

.ts-popup-content::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.ts-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background-color: #111827 !important;
}

.ts-popup-title {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600;
    color: white;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.02em;
}

.ts-popup-close {
    color: #9ca3af; /* text-gray-400 */
    background: rgba(255, 255, 255, 0.05);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ts-popup-close:hover {
    color: white;
    background: rgba(246, 95, 0, 0.2);
    transform: rotate(90deg);
}

.ts-popup-body {
    padding: 2rem;
}

.ts-popup-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .ts-popup-grid {
        flex-direction: row;
    }
    .ts-popup-col-left {
        width: 45%; /* Expandido de 35% */
        flex-shrink: 0;
    }
    .ts-popup-col-right {
        width: 55%; /* Ajustado de 65% */
        flex-grow: 1;
    }
}

.ts-popup-image {
    width: 100%;
    max-height: 420px; /* Aumentado de 350px */
    border-radius: 0.5rem;
    display: block;
    object-fit: contain;
    background-color: #111827;
}

.ts-popup-product-name {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    font-family: 'Poppins', sans-serif;
}

.ts-popup-price-box {
    background-color: #111827 !important;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.08);
}

.ts-popup-price-label {
    color: #d1d5db; /* text-gray-300 */
    margin: 0;
}

.ts-popup-price-value {
    color: #f97316; /* text-orange-500 */
    font-weight: 700;
    font-size: 1.2rem;
}

.ts-popup-desc-label {
    font-size: 1.125rem; /* text-lg */
    font-weight: 500;
    color: white;
    margin-bottom: 0.5rem;
    display: block;
}

.ts-popup-desc-text {
    color: #9ca3af; /* text-gray-400 */
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    white-space: pre-line; /* Preserves line breaks */
}

.ts-popup-btn {
    width: 100%;
    background: linear-gradient(135deg, #F65F00 0%, #FF9A00 100%);
    color: white;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
    display: block;
    text-align: center;
    text-decoration: none;
    height: 44px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.ts-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(246, 95, 0, 0.4);
    color: white;
    text-decoration: none;
}

/* Video Section */
.ts-popup-video-container {
    margin-top: 1.5rem;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 0.5rem;
    background: #000;
}

.ts-popup-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Gallery Thumbnails */
.ts-popup-thumbnails {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.ts-popup-thumb {
    width: 80px;
    height: 80px;
    border-radius: 0.375rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background-color: #111827;
}

.ts-popup-thumb:hover {
    border-color: #f97316;
    transform: translateY(-2px);
}

.ts-popup-thumb.active {
    border-color: #f97316;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.5);
}

.ts-popup-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 0.25rem;
}

/* =========================
   Estilos do Modal de Produto - TioSam Scripts
   Seguindo conceito do PaginaProdutos.html
   ========================= */

/* Botões do Modal - espaçamento compacto */
#modalAddCartBtn:hover {
    background-color: #ea580c !important;
    transform: translateY(-2px);
}

#modalBuyNowBtn:hover {
    background-color: rgba(246, 95, 0, 0.1) !important;
}

/* Caixa de aviso */
.modal-warning-box {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal mais largo para caber galeria + card lado a lado - botão Discord aplicado */
#productInfoModal .ts-popup-content {
    max-width: 1280px !important;
    width: 92% !important;
}

@media (min-width: 1920px) {
    #productInfoModal .ts-popup-content {
        max-width: 1350px !important;
    }
}

/* Remover margem extra do bloco de produto dentro do modal */
#productInfoModal .ts-product-area {
    margin-top: 0;
    padding-top: 0;
}

/* Altura um pouco menor que a página de produto para caber melhor no modal */
#productInfoModal .ts-product-area > .ts-product-main-img {
    min-height: 380px;
    max-height: 380px;
    margin-top: 0;
}

/* Garantir que IMG/IFRAME respeitem a altura e centralizem bem dentro do modal */
#productInfoModal .ts-product-area > .ts-product-main-img > img,
#productInfoModal .ts-product-area > .ts-product-main-img > iframe {
    min-height: 380px;
    max-height: 380px;
    width: 100%;
    object-fit: contain;
}

/* Layout da coluna direita do popup (título, preço, descrição, botões) */
#productInfoModal .ts-product-card-about {
    display: flex;
    flex-direction: column;
    gap: 0; /* removido para permitir controle individual via margins inline */
    border: none !important;
    padding: 0 !important;
}

/* Remover bordas apenas dos elementos que não devem ter */
#productInfoModal h2,
#productInfoModal h4,
#productInfoModal .modal-price-box,
#productInfoModal .ts-description-product,
#productInfoModal .ts-buttons-controller,
#productInfoModal .ts-about-product {
    border: none !important;
}

/* Garantir que os botões mantenham suas bordas */
#productInfoModal button {
    border: inherit !important;
}

/* Forçar coluna direita do modal a iniciar no topo */
#productInfoModal .ts-about-product {
  align-self: flex-start !important;
}

/* Reduzir espaço entre box de preço e título Descrição no modal - mais compacto */
#productInfoModal .modal-price-box {
  margin-bottom: 0 !important;
}

#productInfoModal .ts-product-card-about > .ts-description-product {
    /* controla a posição do bloco Descrição + texto no POPUP, sem afetar a página de produto */
    margin-top: 0.25rem !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
}

/* Ajustar tamanho da fonte e leitura da descrição dentro do modal */
#productInfoModal .ts-description-product .ts-text-desc {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Scrollbar customizada para descrição do modal - cinza semi-opaco */
#productInfoModal #modalProductAbout::-webkit-scrollbar {
    width: 8px;
}

#productInfoModal #modalProductAbout::-webkit-scrollbar-track {
    background: transparent;
}

#productInfoModal #modalProductAbout::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
    border-radius: 4px;
}

#productInfoModal #modalProductAbout::-webkit-scrollbar-thumb:hover {
    background-color: rgba(156, 163, 175, 0.7);
}

/* Firefox scrollbar */
#productInfoModal #modalProductAbout {
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

/* Dar um respiro maior entre a imagem principal e as miniaturas no popup */
#productInfoModal .ts-product-listen-imgs {
  margin: 1.25rem auto 0;
  background-color: #1e2a3a;
  padding: 1.5rem 1.75rem 1.75rem;
  border-radius: 0.75rem;
  align-items: center;
  justify-content: center;
  max-width: 92%;
}

/* Botões de navegação do carousel no modal - cinza escuro com hover laranja */
#productInfoModal .ts-carousel-btn {
  background-color: #1f2937;
  color: #ffffff;
  margin: 0 0.75rem;
}

#productInfoModal .ts-carousel-btn:hover {
  background-color: #F65F00;
    color: #ffffff;
}

/* Centralizar o wrapper das miniaturas logo abaixo do vídeo */
#productInfoModal .ts-carousel-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 75%;
    margin: 0 auto;
}

/* Reduzir espaço entre miniaturas e o aviso */
#productInfoModal .modal-warning-box {
    margin-top: 1.5rem !important;
}

/* Em telas pequenas, reduzir um pouco mais a altura da mídia para caber no viewport
     e liberar mais largura para as miniaturas */
@media (max-width: 768px) {
    #productInfoModal .ts-popup-content {
        width: 96% !important;
        max-height: 95vh;
        border-radius: 0.75rem;
    }

    #productInfoModal .ts-popup-body {
        padding: 1rem;
    }

    #productInfoModal .ts-popup-header {
        padding: 1rem 1.25rem;
    }

    #productInfoModal .ts-popup-title {
        font-size: 1.05rem;
    }

    #productInfoModal .ts-product-area > .ts-product-main-img {
            min-height: 220px;
            max-height: 220px;
    }

    #productInfoModal .ts-product-area > .ts-product-main-img > img,
    #productInfoModal .ts-product-area > .ts-product-main-img > iframe {
            min-height: 220px;
            max-height: 220px;
    }

    #productInfoModal .ts-product-listen-imgs {
            padding: 0.75rem 0.75rem 1rem;
            max-width: 100%;
            margin-top: 0.75rem;
    }

    #productInfoModal .ts-carousel-wrapper {
            max-width: 100%;
    }

    /* Right column adjustments for mobile */
    #productInfoModal .ts-about-product {
        margin-top: 1rem;
    }

    #productInfoModal .ts-product-card-about h2 {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem !important;
    }

    #productInfoModal #modalProductAbout {
        max-height: 180px;
        padding: 0.7rem 0.85rem;
        font-size: 0.85rem;
    }

    #productInfoModal button {
        padding: 0.65rem 0.85rem !important;
        font-size: 0.85rem !important;
    }

    /* SOBRE box below image */
    #productInfoModal .modal-warning-box {
        margin-top: 0.75rem !important;
        padding: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    #productInfoModal .ts-product-area > .ts-product-main-img {
        min-height: 180px;
        max-height: 180px;
    }

    #productInfoModal .ts-product-area > .ts-product-main-img > img,
    #productInfoModal .ts-product-area > .ts-product-main-img > iframe {
        min-height: 180px;
        max-height: 180px;
    }

    #productInfoModal #modalProductAbout {
        max-height: 150px;
    }
}

