@font-face {
    font-family: 'Lora';
    src: url('../FONTS/LoraItalica.ttf') format('truetype');
}
@font-face {
    font-family: 'Montserrat';
    src: url('../FONTS/Montserrat.ttf') format('truetype');
}
@font-face {
    font-family: 'MontserratBold';
    src: url('../FONTS/Montserrat-Bold.ttf') format('truetype');
}

body {
    margin: 0;
    padding: 0;
    padding-top: 200px;
    background-color: #f5f5f5;
    display: flex;
    justify-content: space-evenly;
    z-index: 1;

}

html, body {
    height: 100%;
    min-height: 100vh;
}

.Conteudo{

    background-color: #ffffff;
    position: fixed;
    top: 0;
    padding-top: 80px;
    z-index: 2;
    width: 100%;

}

.BarraFiltro {
    display: flex;
    justify-content: center;
    align-items: center;
}


.search-bar {
    border-top: 1px solid rgb(218, 218, 218);
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 10px;
    padding-right: 10px;
    padding-left: 10px;
    padding-bottom: 10px;
    gap: 50px;
    position: relative;
    border-bottom: 1px solid rgb(218, 218, 218);

}

.search-bar input {
    width: 450px;
    height: 45px;
    padding-left: 70px;
    padding-right: 20px;
    border-top: 2px solid #838383;
    border-bottom: 2px solid #838383;
    border-left: 2px solid #838383;
    border-top-left-radius: 25px;
    border-bottom-left-radius: 25px;
    font-size: 15px;
    outline: none;
    background-image: url('../IMGS/lupa.png');
    background-repeat: no-repeat;
    background-position: 20px;
    background-size: 20px;
    transition: width 0.5s ease-in-out;
    font-family: 'Montserrat';
    border-right: none;
    
}

.search-bar input::placeholder {
    color: #000000; /* Escolha a cor desejada */
    opacity: 1;     /* Garante que a cor será aplicada */
}

.search-bar select {
    width:250px;
    height: 45px;
    padding: 0 15px;
    font-size: 15px;
    background-color: white;
    cursor: pointer;
    outline: none;
    background-image: url('../IMGS/seta-para-baixo\ preta.png');
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    appearance: none;          
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: 'Montserrat';

}

.search-bar select:focus {
    border-color: #093e64; /* Cor do foco */
}

#filterCategory{

    border: 2px solid #838383;
    border-top-right-radius: 25px;
    border-bottom-right-radius: 25px;
}

#sortOrder {
    border: 2px solid #838383;
    border-radius: 25px;
}

.intro-section {
    text-align: center;
    margin: 20px auto;
    max-width: 1200px;
    position: relative;
    top: -50px;
}

.intro-section h2 {
    font-family: 'MontserratBold';
    font-size: clamp(24px, 4vw, 32px);
    color: #093e64;
    margin: 0 0 10px 0;
}

.intro-section p {
    font-family: 'Montserrat';
    font-size: clamp(14px, 2.5vw, 18px);
    color: #666;
    margin: 0;
}

.product-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 15px;
    transition: max-width 0.3s ease;
}

.product-container.compact {
    max-width: 800px;
}

.product-container.very-compact {
    max-width: 500px;
}

.product-container.hidden {
    display: none !important;
}

.product-display {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border: 3px solid #093e64; 
    border-radius: 15px;
    background-color: white;
    padding: 25px 20px;
    height: auto;
    min-height: 450px;
    box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.15);
    width: 280px;
    word-wrap: break-word;
    margin: 15px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    cursor: pointer;
}

.product-display:hover {
    transform: translateY(-5px);
    box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.2);
}

.product-display img {
    max-width: 250px;
    max-height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 8px;
}

.product-display h3 {
    font-size: 20px;
    color: #333;
    margin: 10px 0;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-display p {
    font-size: 15px;
    line-height: 1.4;
    padding: 0 5px;
    margin: 8px 0;
    width: 100%;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limita a 3 linhas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-display .product-info {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.product-display {
    font-weight: "Arial";
    color: #093e64; 
    font-size: 18px;
}

.product-display .product-category,
.product-display .product-unit {
    font-size: 14px;
    color: #666;
    background-color: #eee;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin: 5px 0;
}

/* Texto de produto indisponivel */
#noProductMsg {
    display: none;
    text-align: center;
    color: #093e64;
    margin-top: clamp(18px, 4vw, 32px);
    background-color: #f8f9fa;
    border: 1.5px solid #093e64; 
    border-radius: 12px;
    padding: clamp(14px, 4vw, 22px) clamp(8px, 4vw, 18px) clamp(10px, 3vw, 18px) clamp(8px, 4vw, 18px);
    max-width: 95vw;
    width: clamp(220px, 60vw, 480px);
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 2px 12px 0 rgba(9,62,100,0.07);
    font-family: 'Montserrat', Arial, sans-serif;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    margin-bottom: 50px;
}

.noProductTitle {
    display: block;
    font-size: clamp(1rem, 3vw, 1.4rem);
    font-weight: bold;
    color: #0a2a4d;
    margin-bottom: clamp(4px, 1vw, 8px);
}

.noProductSub {
    display: block;
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    color: #2d4c6a;
    margin-top: clamp(1px, 0.5vw, 4px);
}

/* Modal de Detalhes do Produto */
.product-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.modal-header {
    background: linear-gradient(135deg, #093e64, #0a4a7a);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    position: relative;
}

.modal-title {
    font-family: 'MontserratBold';
    font-size: 24px;
    margin: 0;
    padding-right: 40px;
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
    line-height: 1;
    text-align: center;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 9999;
}

.image-modal.active {
    display: flex; /* Só ativa quando adicionamos a classe .active */
}

.image-modal-content {
    max-width: 95%;
    max-height: 95%;
    border-radius: 5px;
    background-color: #fff;
    padding: 10px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.image-modal .close-btn2 {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    line-height: 45px; /* centraliza o X verticalmente */
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.image-modal .close-btn2:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

.modal-body {
    padding: 25px;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 25px;
}

.product-image-detail {
    text-align: center;
}

.product-image-detail img {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 12px;
}

.product-info-detail h3 {
    font-family: 'MontserratBold';
    color: #093e64;
    font-size: 24px;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.product-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-family: 'Montserrat';
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-family: 'MontserratBold';
    font-size: 14px;
    color: #333;
}

.product-description {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.description-text {
    font-family: 'Montserrat';
    line-height: 1.7;
    color: #555;
    font-size: 15px;
    margin: 0;
    max-height: 120px;
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translate(-50%, -60%); opacity: 0; }
    to { transform: translate(-50%, -50%); opacity: 1; }
}

@media (max-width: 768px) {
    .modal-content {
        width: 85%;
        max-height: 90vh;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .product-meta {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: calc(100% - 40px);
        max-width: 400px;
        max-height: 90vh;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .modal-body {
        padding: 12px;
    }
    
    .modal-header {
        padding: 12px;
    }
    
    .modal-title {
        font-size: 16px;
        padding-right: 35px;
    }
    
    .close-btn {
        width: 30px;
        height: 30px;
        font-size: 24px;
        right: 12px;
        top: 12px;
    }
    
    .product-info-detail h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .product-image-detail img {
        max-height: 160px;
    }
    
    .product-detail-grid {
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .product-meta {
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .meta-label {
        font-size: 11px;
    }
    
    .meta-value {
        font-size: 13px;
    }
    
    .description-header {
        gap: 6px;
        margin-bottom: 10px;
    }
    
    .description-title {
        font-size: 14px;
    }
    
    .description-icon {
        width: 14px;
        height: 14px;
        font-size: 8px;
    }
    
    .description-content {
        padding: 12px;
    }
    
    .description-text {
        font-size: 13px;
        margin-bottom: 10px;
        max-height: 80px;
    }
    
    .specs-title {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .spec-item {
        font-size: 11px;
        gap: 5px;
    }
    
    .product-specs {
        margin-top: 10px;
        padding-top: 10px;
    }
}

/* Media Queries para Responsividade */
@media (max-width: 1200px) {
    .product-container {
        max-width: 700px;
        justify-content: space-between;
    }
    
    .product-container.compact {
        max-width: 550px;
    }
    
    .product-container.very-compact {
        max-width: 400px;
        justify-content: center;
    }
    
    /* Centraliza produto único */
    .product-container:has(.product-display:only-child) {
        justify-content: center;
    }
    
    .product-display {
        width: calc(50% - 15px);
        max-width: 320px;
        min-height: 400px;
        margin: 10px 0;
    }
    
    .product-container.very-compact .product-display {
        width: 280px;
    }
}

@media (max-width: 991px) {
    .search-bar {
        flex-wrap: wrap;
    }
    
    .search-bar input {
        width: 300px;
    }
    
    .product-container {
        padding: 20px;
        max-width: 650px;
    }
    
    .product-container.very-compact {
        max-width: 350px;
        justify-content: center;
    }
    
    .product-display {
        width: calc(50% - 12px);
        max-width: 300px;
        min-height: 380px;
        padding: 18px 15px;
    }
    
    .product-container.very-compact .product-display {
        width: 280px;
    }
    
    .product-display h3 {
        font-size: 18px;
    }
    
    .product-display img {
        max-width: 200px;
        max-height: 150px;
    }
}

@media (max-width: 885px){
    .search-bar{
        gap: 20px;
    }
    #sortOrder{
        width: 550px;
    }
    .intro-section
    {
        position: relative;
        top: 0;
        padding-top: 20px;
        padding-bottom: 50px;
    }
}

@media (max-width: 768px) {
    
    body {
        padding-top: 80px;
    }
    
    .search-bar {
        padding: 15px;
    }
    
    .search-bar input {
        width: 100%;
        max-width: 400px;
    }
    
    .search-bar select {
        width: 100%;
        max-width: 400px;
    }
    
    .product-container {
        gap: 10px;
        padding: 15px;
        max-width: 600px;
    }
    
    .product-container.very-compact {
        max-width: 320px;
        justify-content: center;
    }
    
    .product-display {
        width: calc(50% - 8px);
        max-width: 280px;
        margin: 5px 0;
        min-height: 360px;
        padding: 15px 12px;
    }
    
    .product-container.very-compact .product-display {
        width: 260px;
    }
    
    .product-display h3 {
        font-size: 17px;
    }
    
    .product-display p {
        font-size: 14px;
    }
    
    .product-display img {
        max-width: 180px;
        max-height: 140px;
    }
    
    #sortOrder {
        width: 100% !important;
        max-width: 460px !important;
    }

    .intro-section{
        padding-top: 150px;
        padding-bottom: 50px;
    }

    .Conteudo{
        padding-top: 70px;
    }
}

@media (max-width: 576px) {
    .product-container {
        padding: 10px;
        max-width: 500px;
        margin-left: 20px;
        margin-right: 20px;
        margin-bottom: 20px;
        justify-content: center;
    }
    
    .product-container.very-compact {
        max-width: 550px;
        justify-content: center;
    }
    
    .product-display {
        width: calc(50% - 6px);
        max-width: 240px;
        min-height: 340px;
        padding: 12px 10px;
    }
    
    /* Força centralização para produto único */
    .product-container:has(.product-display:only-child) {
        justify-content: center !important;
    }
    
    .product-container.compact,
    .product-container.very-compact {
        justify-content: center !important;
    }
    
    .product-display h3 {
        font-size: 16px;
        margin: 8px 0;
    }
    
    .product-display p {
        font-size: 13px;
        margin: 6px 0;
    }
    
    .product-display img {
        max-width: 130px;
        max-height: 130px;
        margin-bottom: 10px;
    }
    
    .product-display {
        font-size: 15px;
    }
    
    .product-display .product-category,
    .product-display .product-unit {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .product-display .product-info {
        padding: 8px;
    }

    .intro-section p{
       font-size: clamp(10px, 4vw, 14px);
       padding-left: 15px;
       padding-right: 15px;
    }

    .intro-section h2 {
        font-size: clamp(16px, 5vw, 24px);
    }
    
}

@media (max-width: 480px) {
    
    .search-bar {
        gap: 15px;
        padding: 8px;
    }
    
    .search-bar input {
        padding-left: 45px;
        background-position: 15px center;
        background-size: 18px;
        font-size: 14px;
    }
    
    .search-bar input::placeholder {
        font-size: 13px;
    }
    
    .search-bar select {
        font-size: 14px;
        background-size: 18px;
        background-position: right 12px center;
    }
    
}

/* Estilos da Paginação */
.page-link {
    background: none;
    border: 1px solid #093e64;
    color: #093e64;
    padding: 8px 12px;
    margin: 0 2px;
    cursor: pointer;
    text-decoration: none;
    border-radius: 4px;
    font-family: 'Montserrat';
}

.page-link:hover {
    background: #093e64;
    color: white;
}

.page-link.active {
    background: #093e64;
    color: white;
}



@media (max-width: 380px) {
    .product-container {
        padding: 15px 25px;
        padding-top: 20px;
        max-width: 100%;

    }
    
    .product-display {
        width: 100%;
        max-width: 320px;
        min-height: 340px;
        margin: 10px auto;
        padding: 15px 12px;
    }
    
    .product-display h3 {
        font-size: 16px;
        margin: 8px 0;
    }
    
    .product-display p {
        font-size: 13px;
        margin: 6px 0;
    }
    
    .product-display img {
        max-width: 130px;
        max-height: 130px;
        margin-bottom: 10px;
    }
    
    .product-display {
        font-size: 15px;
    }
    
    .product-display .product-category,
    .product-display .product-unit {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .product-display .product-info {
        padding: 8px;
    }

    .intro-section {
        padding-bottom: 20px;

    }
}

/* Seção de Anúncios */
.ads-section {
    margin: 30px auto;
    max-width: 1200px;
    padding: 20px;
}

.ad-image {
    max-width: 25%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.ad-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .ad-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .ad-image {
        max-width: 90%;
    }
}

@media (max-width: 576px) {
    .ads-section {
        padding: 15px;
        margin: 20px auto;
        padding-top: 0px;


    }
    
    .ad-image {
        max-width: 95%;
    }
}

.ad-container {
    display: flex;
    gap: 50px;
    justify-content: center;
    align-items: center;
}

.ad-image {
    max-width: 25%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.ad-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .ad-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .ad-image {
        max-width: 90%;
    }
}
.ad-image {
    max-width: 30%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.ad-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .ad-container {
        gap: 20px;
    }
    
    .ad-image {
        max-width: 45%;
    }
    
    .ad-image-3 {
        display: none;
    }
}

@media (max-width: 360px) {
    .ad-image-2 {
        display: none;
    }
    
    .ad-image {
        max-width: 80%;
    }
}
/* Forçar imagens lado a lado */
@media (max-width: 768px) {
    .ad-container {
        flex-direction: row !important;
        gap: 20px;
    }
    
    .ad-image {
        max-width: 45%;
    }
    
    .ad-image-3 {
        display: none;
    }
}

@media (max-width: 500px) {
    .ad-image-2 {
        display: none;
    }
    
    .ad-image {
        max-width: 80%;
    }
}
/* Paginação */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 10px;
}

.pagination-btn {
    padding: 10px 15px;
    border: 1px solid #093e64;
    background-color: white;
    color: #093e64;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background-color: #093e64;
    color: white;
}

.pagination-btn.active {
    background-color: #093e64;
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .pagination-container {
        margin: 20px 0;
        gap: 5px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
}
/* Estilos da Paginação - Copiado do Edicao.php */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
    gap: 10px;
    z-index: 1;
    position: relative;
}

.page-link {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 2px;
    text-decoration: none;
    color: #093e64;
    border: 2px solid #093e64;
    border-radius: 8px;
    font-family: 'MontserratBold';
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
    z-index: 1;
    position: relative;
}

.page-link:hover {
    background-color: #093e64;
    color: white;
    transform: translateY(-2px);
}

.page-link.active {
    background-color: #093e64;
    color: white;
    box-shadow: 0 4px 10px rgba(9, 62, 100, 0.3);
}

@media (max-width: 480px) {
    .pagination-container {
        gap: 5px;
        margin: 20px 0;
    }
    
    .page-link {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 35px;
    }
}