/* Container principal */
.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 50px;
    background-color: #f5f5f5;
    margin-top: 40px;
}

/* Detalhes do produto */
.product-detail-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    background-color: #ffffff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

.product-detail-image {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;

}

.product-detail-image img {
    width: 700px;
    height: 600px;
    border-radius: 8px;
}

.product-variant-images {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.product-variant-images img {
    border: 1px solid #000;
    width: 100px;
    height: 100px;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

.product-variant-images img:hover {
    transform: scale(1.1);
}

.product-detail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-title {
    font-size: .9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-color);
}

.product-price {
    font-size: 1.5rem;
    color: var(--main-color);
}

.product-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    max-height:150px;
    min-height:150px;
    overflow: auto;
    border: 1px solid #f4f6f6;
    border-radius: 5px;
    padding: 4px;
}

.product-colors h4,
.product-quantity h4,
.product-ram h4,
.product-storage h4,
.product-ml h4,
.product-watter h4 {
    font-size: .9rem;
    margin-bottom: 10px;
}

/* Botões de cores */
.color-options {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #ccc;
    cursor: pointer;
    transition: 0.3s;
}

/* Cor ativa */
.color-option.active {
    width: 35px;
    height: 35px;
    border: 3px solid var(--main-color);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.color-option:hover {
    border-color: var(--main-color);
    transform: scale(1.1);
}

/* Botões de RAM, ROM, ML e WATTER */
.ram-options, .storage-options, .ml-options, .watter-options {
    display: flex;
    gap: 15px; /* Espaçamento entre os botões */
    justify-content: flex-start;
}

.ram-option, .storage-option, .ml-option, .watter-option {
    padding: 10px 20px;
    border: 1px solid #ccc;
    background-color: #f5f5f5;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 5px;
}

.ram-option.active, .storage-option.active, .ml-option.active, .watter-option.active {
    border: 2px solid var(--main-color);
    background-color: var(--main-color);
    color: #fff;
}

.ram-option:hover, .storage-option:hover, .ml-option:hover, .watter-option:hover {
    background-color: var(--main-color);
}

/* Quantidade */
.product-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
}

.quantity-input {
    font-size: 16px;
    width: 60px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Botão de adicionar ao carrinho */
.add-to-cart-btn {
    padding: 10px 20px;
    background-color: var(--main-color);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    align-self: flex-start;
}

.add-to-cart-btn:hover {
    background-color: var(--text-color);
}

/* Produtos Relacionados */
.related-products {
    background-color: #ffffff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.related-products h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-align: center;
}

.related-products-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.related-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--second-color);
    padding: 10px;
    border-radius: 8px;
    transition: 0.3s;
}

.related-product:hover {
    box-shadow: var(--box-shadow);
}

.related-product img {
    width: 100%;
    height: auto;
    max-width: 150px;
    max-height: 150px;
    border-radius: 8px;
}

.related-product h5 {
    font-size: .6rem;
    color: var(--text-color);
    margin-top: 10px;
    text-align: center;
}

.related-product p {
    font-size: 1.2rem;
    color: var(--main-color);
}

/* Estilo para o preço original riscado */
.original-price {
    font-size: .9rem;
    margin-right: 10px;
}

/* Estilo para o preço com desconto */
.discount-price {
    font-size: 1.2rem;
    color: var(--main-color);
    font-weight: bold;
}

.especificacoes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.icon-info {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s ease-in-out;
}

.icon-info:hover {
    transform: scale(1.05);
}

.icon {
    font-size: 25px;
    color: #000;
}

.info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    font-size: 13px;
    color: #333;
}

.info span {
    margin-top: 12px;
    font-weight: normal;
    color: #555;
}

.info strong {
    margin-top: -20px;
    font-weight: bold;
    color: #000;
}

/* Esconder o rodapé móvel por padrão */
.mobile-footer {
    display: none;
}

/* Responsividade */
@media (max-width: 1450px) {
    .product-detail-container {
        max-width: 100%;
        padding: 15px;
    }
}

@media (max-width: 1058px) {
    .product-title {
        font-size: 0.75rem;
    }
    .product-price {
        font-size: 1.2rem;
    }

    .product-description {
        font-size: .8rem;
    }

    .product-colors h4,
    .product-ram h4,
    .product-storage h4,
    .product-ml h4,
    .product-watter h4 {
        font-size: .9rem;
    }

    .product-detail-content {
        gap: 20px;
    }

    .product-detail-image img {
        width: 100%;
        height: auto;
        max-width: 600px;
    }

    .related-products-container {
        grid-template-columns: repeat(4, 1fr);
    }
    .product-variant-images img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 991px) {
    .product-detail-content {
        flex-direction: column;
        align-items: center;
    }

    .related-products-container {
        grid-template-columns: repeat(3, 1fr);
    }
    .product-variant-images img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 768px) {
    .product-title {
        font-size: .75rem;
    }
    .product-price {
        font-size: 1rem;
    }

    .product-description {
        font-size: .7rem;
    }

    .product-detail-content {
        flex-direction: column;
        align-items: center;
    }

    .product-variant-images {
        gap: 5px;
    }

    .product-variant-images img {
        width: 80px;
        height: 80px;
    }

    .related-products-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .mobile-footer {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 15px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    /* Preço do produto */
    .mobile-price {
        font-size: 1.5rem;
        font-weight: bold;
        color: #27ae60;
        margin-bottom: 10px;
    }

    /* Linha de ações: quantidade + botão */
    .mobile-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    /* Botões de + e - */
    .quantity-btn {
        width: 40px;
        height: 40px;
        background-color: #ddd;
        border: none;
        font-size: 1.2rem;
        font-weight: bold;
        cursor: pointer;
        border-radius: 5px;
        transition: 0.3s;
        outline: none;
        touch-action: manipulation; /* Evita zoom no mobile */
    }

    .quantity-btn:hover {
        background-color: #bbb;
    }

    /* Input de quantidade - Sem zoom */
    .quantity-input-mobile {
        width: 50px;
        font-size: 16px; /* Evita zoom no iOS */
        text-align: center;
        border: 1px solid #ccc;
        border-radius: 5px;
        padding: 5px;
        outline: none;
        touch-action: manipulation; /* Evita zoom no mobile */
    }

    /* Botão Adicionar ao Carrinho */
    .add-to-cart-btn {
        flex-grow: 1;
        padding: 10px;
        background-color: #27ae60;
        color: #ffffff;
        font-size: 1rem;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        transition: 0.3s;
        margin-left: 10px;
        outline: none;
        touch-action: manipulation; /* Evita zoom no mobile */
    }

    .add-to-cart-btn:hover {
        background-color: #219150;
    }


    /* Ocultar os elementos originais em mobile */
    .product-detail-info .product-quantity,
    .product-detail-info .add-to-cart-btn {
        display: none;
    }

    /* Adicionar margem inferior para não sobrepor o conteúdo */
    .product-detail-container {
        margin-bottom: 80px;
    }
}

@media (max-width: 375px) {
    .related-products-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-variant-images img {
        width: 60px;
        height: 60px;
    }
}
