/* =================================================================
   ESTILOS GLOBAIS DA LOJA (Cores, Fundo, Botões)
================================================================= */

/* Define as cores para o botão primário (Comprar, Adicionar ao carrinho, etc.) */
.btn-primary {
    background-color: var(--btn-primary-bg) !important;
    border-color: var(--btn-primary-bg) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--btn-primary-hover-bg) !important;
    border-color: var(--btn-primary-hover-bg) !important;
}

/* Regra específica para botões de ação na conta do cliente (Ex: Acompanhar Pedido) */
.table .btn {
    --bs-btn-color: var(--bs-btn-hover-color);
    --bs-btn-border-color: var(--bs-btn-hover-border-color);
}

/* =================================================================
   BLOCO REMOVIDO
   As classes .main-content-wrapper e .main-content-container que
   causaram o problema foram completamente removidas.
================================================================= */


/* =================================================================
   NOVO: CONTÊINER DE CONTEÚDO ISOLADO E CORRIGIDO
   Esta nova classe .content-box será usada APENAS no miolo do site,
   garantindo que o header e o footer não sejam afetados.
================================================================= */
.content-box {
    background-color: #FFFFFF;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    margin-top: 2rem;
    margin-bottom: 2rem;
}


/* =================================================================
   ESTILOS DINÂMICOS DA LOJA (HEADER E FOOTER)
================================================================= */
.site-header {
    background: var(--header-background);
}

.site-footer {
    background: var(--footer-background);
}

.nav-icon-link {
    font-size: var(--nav-icon-font-size) !important;
}


/* =================================================================
   MENU DE CATEGORIAS - REGRAS CORRIGIDAS E UNIFICADAS
================================================================= */
.categories-nav {
    background-color: var(--nav-bar-bg-color);
    padding: 0.5rem 0;
}
.categories-nav .nav-link {
    color: var(--nav-text-color);
    border: 2px solid var(--nav-border-color);
    border-radius: 50px;
    padding: 0.5rem 1.25rem;
    margin: 0 0.25rem;
    font-weight: 500;
    font-size: var(--nav-font-size);
    transition: all 0.2s ease-in-out;
}
.categories-nav .nav-item:hover > .nav-link,
.categories-nav .nav-link.active {
    color: var(--nav-text-hover-color);
    background-color: var(--nav-item-bg-hover-color);
    border-color: var(--nav-border-hover-color);
}
.dropdown-menu .dropdown-item:hover {
    color: var(--nav-text-hover-color);
    background-color: var(--nav-item-bg-hover-color);
}

/* =================================================================
   CABEÇALHO E BARRA DE BUSCA (ESTILOS RESTAURADOS)
================================================================= */
.search-bar-container { flex-grow: 1; display: flex; justify-content: center; padding: 0 2rem; }
.search-form { position: relative; width: 100%; max-width: 600px; }
.search-form .form-control { height: 48px; padding-left: 1.25rem; padding-right: 4rem; border-radius: 50px; }
.search-form .btn-search { position: absolute; top: 0; right: 0; height: 100%; width: 50px; border: none; background: transparent; color: #6c757d; font-size: 1.25rem; cursor: pointer; }
.nav-icon-link { display: flex; align-items: center; gap: 0.5rem; color: var(--nav-icon-color, #333) !important; transition: color 0.2s ease-in-out; }
.nav-icon-link:hover, .nav-icon-link:focus { color: var(--nav-icon-hover-color, #007bff) !important; }

/* =================================================================
   DROPDOWN DE RESULTADOS DA BUSCA AJAX
================================================================= */
.search-results-container {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 1050;
    max-height: 450px;
    overflow-y: auto;
    display: none;
}
.search-result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f1f1;
    text-decoration: none;
    color: #212529;
    transition: background-color 0.2s ease;
}
.search-result-item:last-child {
    border-bottom: none;
}
.search-result-item:hover {
    background-color: #f8f9fa;
}
.search-result-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-right: 1rem;
    border-radius: 0.25rem;
    background-color: #f8f9fa;
}
.search-result-details {
    display: flex;
    flex-direction: column;
}
.search-result-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}
.search-result-price {
    font-size: 0.9rem;
    color: #0d6efd;
    font-weight: 600;
}
.search-result-all-link {
    display: block;
    text-align: center;
    padding: 0.75rem;
    font-weight: 600;
    color: #0d6efd;
    background-color: #f8f9fa;
    text-decoration: none;
}
.search-result-all-link:hover {
    background-color: #e9ecef;
}
.search-loading, .search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: #6c757d;
}

/* =================================================================
   DESIGN DA FAIXA DE TÍTULO
================================================================= */
.product-list-ribbon {
    position: relative;
    background: var(--ribbon-bg-color-global, #0d6efd);
    color: var(--ribbon-text-color-global, #ffffff);
    padding: 1rem 2rem;
    margin: 3rem auto;
    max-width: 90%;
    width: 80%;
    text-align: center;
    z-index: 1;
}
.ribbon-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
}
.product-list-ribbon::before {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 260px;
    left: -50px;
    background: var(--ribbon-bg-color-global, #0d6efd);
    filter: brightness(0.8);
    z-index: -1;
    clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%, 30px 50%);
}
.product-list-ribbon::after {
    content: '';
    position: absolute;
    top: 0;
    height: 100%;
    width: 260px;
    right: -50px;
    background: var(--ribbon-bg-color-global, #0d6efd);
    filter: brightness(0.8);
    z-index: -1;
    clip-path: polygon(0% 0%, 100% 0%, calc(100% - 30px) 50%, 100% 100%, 0% 100%);
}
/* =================================================================
   CARDS DE PRODUTO PADRONIZADOS
================================================================= */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
.product-card-image-wrapper {
    position: relative;
    aspect-ratio: 4 / 3; 
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.product-card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    transition: transform 0.3s ease;
}
.product-card:hover .product-card-image-wrapper img {
    transform: scale(1.05);
}
.product-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1rem;
}
.product-card-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    flex-grow: 1;
}
.product-card-price {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.product-card-price .old-price {
    font-size: 0.9rem;
    text-decoration: line-through;
    color: #6c757d;
    margin-right: 0.5rem;
}

/* =================================================================
   MINHA CONTA
================================================================= */
.account-header {
    position: relative;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2.5rem;
    border: 1px solid rgba(0, 123, 255, 0.2);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.profile-picture-container { position: relative; width: 100px; height: 100px; }
.profile-picture { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid #ffffff; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.profile-upload-overlay { position: absolute; bottom: 0; right: 0; width: 32px; height: 32px; background-color: #0d6efd; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; border: 2px solid white; transition: background-color 0.2s ease; }
.profile-upload-overlay:hover { background-color: #0b5ed7; }
.account-nav .list-group-item { border-radius: 0.375rem !important; margin-bottom: 5px; font-weight: 500; color: #495057; border: none; transition: all 0.2s ease; background-color: transparent; }
.account-nav .list-group-item i { color: #6c757d; transition: color 0.2s ease; }
.account-nav .list-group-item:hover, .account-nav .list-group-item.active:hover { background-color: rgba(255, 255, 255, 0.8); color: #000; }
.account-nav .list-group-item.active { background-color: #0d6efd; color: white; box-shadow: 0 4px 10px -4px rgba(13, 110, 253, 0.5); }
.account-nav .list-group-item.active i { color: white; }
.account-nav .list-group-item.text-danger { color: #dc3545 !important; }
.account-nav .list-group-item.text-danger:hover { background-color: #f8d7da; color: #842029 !important; }
.dashboard-card { text-decoration: none; color: inherit; display: block; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.dashboard-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); }
.dashboard-card .card-body { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 180px; }
.dashboard-card-icon { font-size: 3rem; margin-bottom: 1rem; color: #0d6efd; }

/* =================================================================
   STATUS DE PEDIDO
================================================================= */
.badge-status-pending { background-color: #fd7e14; color: white; }
.badge-status-processing { background-color: #6f42c1; color: white; }
.badge-status-approved { background-color: #8B4513; color: white; }
.badge-status-shipped { background-color: #198754; color: white; }
.badge-status-delivered { background-color: #FFB300; color: #212529; }
.badge-status-cancelled { background-color: #dc3545; color: white; }
.badge-status-default { background-color: #6c757d; color: white; }
.progress-indicator { display: flex; justify-content: space-between; position: relative; margin-bottom: 2rem; }
.progress-indicator-line { position: absolute; top: 1.25rem; left: 0; width: 100%; height: 0.25rem; background-color: #e9ecef; z-index: 1; }
.progress-indicator-step { display: flex; flex-direction: column; align-items: center; text-align: center; z-index: 2; width: 20%; }
.progress-indicator-icon { width: 2.5rem; height: 2.5rem; border-radius: 50%; background-color: #e9ecef; color: #495057; border: 3px solid #e9ecef; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 0.5rem; transition: all 0.3s ease; }
.progress-indicator-text { font-size: 0.9rem; font-weight: 500; color: #6c757d; }
.progress-indicator-step.completed .progress-indicator-icon { background-color: #198754; border-color: #198754; color: #fff; }
.progress-indicator-step.completed .progress-indicator-text { color: #198754; }
.progress-indicator-step.active .progress-indicator-icon { background-color: #0d6efd; border-color: #0d6efd; color: #fff; }
.progress-indicator-step.active .progress-indicator-text { color: #0d6efd; }
.progress-indicator-step.cancelled .progress-indicator-icon { background-color: #dc3545; border-color: #dc3545; color: #fff; }
.progress-indicator-step.cancelled .progress-indicator-text { color: #dc3545; }
.progress-indicator-line-fill { position: absolute; top: 1.25rem; left: 0; height: 0.25rem; background-color: #198754; transition: width 0.5s ease; z-index: 1; }
.progress-indicator-step.cancelled ~ .progress-indicator-line-fill { background-color: transparent; }

/* =================================================================
   RODAPÉ (FOOTER)
================================================================= */
.social-icons a { color: var(--footer-social-color); text-decoration: none; transition: color 0.2s ease-in-out; }
.social-icons a:hover { color: var(--footer-social-hover-color); }

/* =================================================================
   SLIDER DE BANNERS (Swiper) - ESTILOS MOVIDOS
================================================================= */
/* Os estilos do slider foram movidos para /assets/css/slider.css para melhor organização. */


/* =================================================================
   MODAL DE PARCELAS E CATÁLOGO
================================================================= */
#installments-modal .modal-body {
    max-height: 350px;
    overflow-y: auto;
}
.catalog-view .site-header,
.catalog-view .categories-nav,
.catalog-view .site-footer {
    display: none;
}
body.catalog-view {
    padding-top: 90px;
}
.catalog-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1040;
    padding: 10px 0;
    background: var(--header-background, rgba(255, 255, 255, 0.8));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}
.catalog-logo-link img {
    max-width: 180px;
    height: auto;
}
.catalog-search-wrapper {
    width: 100%;
    max-width: 500px;
}
.quote-fab {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: var(--btn-primary-bg, #0d6efd);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1050;
    transition: transform 0.2s ease-in-out;
}
.quote-fab:hover {
    transform: scale(1.1);
}
.quote-fab .badge {
    position: absolute;
    top: -5px;
    right: -5px;
}
.catalog-main-content {
    margin-top: 3rem; 
    padding-top: 0;
}
.catalog-view .btn-primary {
    background-color: var(--btn-primary-bg, #0d6efd) !important;
    border-color: var(--btn-primary-bg, #0d6efd) !important;
    color: #fff !important;
}
.product-card .mt-auto {
    margin-top: auto !important;
}
.catalog-header .container {
    gap: 1rem;
}
.catalog-logo-link img {
    max-width: 180px;
    height: auto;
    transition: max-width 0.3s ease;
}
.quote-fab .badge {
    font-size: 0.7rem;
    line-height: 1;
    padding: .35em .5em;
}
.product-gallery-swiper {
    width: 100%;
    height: 400px;
    background-color: #f1f1f1;
    border-radius: .5rem;
}
.product-gallery-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}
.product-gallery-swiper .swiper-slide img,
.product-gallery-swiper .swiper-slide video,
.product-gallery-swiper .swiper-slide iframe {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.product-gallery-swiper .swiper-slide iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.product-gallery-swiper .swiper-button-next,
.product-gallery-swiper .swiper-button-prev {
    color: var(--btn-primary-bg, #0d6efd);
}
.product-gallery-swiper .swiper-pagination-bullet-active {
    background-color: var(--btn-primary-bg, #0d6efd);
}
@media (max-width: 767.98px) {
    body.catalog-view {
        padding-top: 150px; 
    }
    .catalog-header .container {
        flex-direction: column;
        gap: 10px;
    }
}