
/* =========================
       E-COMMERCE
========================= */

/* REMOVER BOTÕES DESNECESSÁRIOS */
.orderby-displaynumber, .vm-pagination,
.vm-product-grid .product-container .btn-secondary{
    display: none !important;
}
.border-bottom, .border-top {
    border: 0 !important;
    margin: 0 !important;
}

/*### visualização de categoria ###*/
.category-view .product {
    width: 33%;
}

@media screen and (max-width: 1000px) {
    .category-view .product {
        width: 50%;
    }
}
@media screen and (max-width: 600px) {
    .category-view .product {
        width: 100%;
    }
}

.vm-category-title{
    font-size: var(--h2);
    font-weight: 600 !important;
}
.vm-category-description{
    font-size: var(--h6);
    max-width: 812px;
}

.container{
    max-width: 100% !important;
}
#fancybox-outer{
    padding: 20px;
    border-radius: 10px;
}
#fancybox-outer .pt-2{
    gap: 10px;
}
.cart-view .btn-sm{
    margin-bottom: 0.25rem;
}

/* IMAGEM */
.vm-product-grid .vm-product-media-container img{
    height: 480px;
}
.browseProductImage {
    width: 100%;
    height: auto;
    border-radius: 20px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* NOME E PREÇO */
.vm-product-title a{
    font-size: var(--h4);
    font-weight: 700;
}
.vm-subcategory-title{
    font-size: var(--h5);
    padding-top: 0;
    padding-bottom: var(--space-sm);
}

.product-price .vm-price-value {
    font-size: var(--h6);
    justify-content: normal;
    align-items: center;
}
/*.product-price .PricesalesPrice{font-size: var(--h5);}*/
.vm-price-value span:only-child{
    margin-left: 0;
}
.vm-price-desc{
    margin-right: 5px;
}
.vm-price-desc {
  font-size: var(--text-sm);
}
.PricediscountAmount .PricediscountAmount{
    font-size: var(--text-base);
    color: green;
}

/*### DETALHE DO PRODUTO ###*/
.vm-page-title{
    font-size: var(--h1);
    font-weight: 700;
}
.product-short-description, .product-description{
    font-size: var(--text-base);
}
.product-description h2, .product-related-products h2{
    padding-bottom: .5rem !important;
    margin-bottom: 1rem !important;
}
.vm-product-details-container .PricesalesPrice .PricesalesPrice{
    font-size: var(--h6);;
    font-weight: normal;
}
.productdetails .vm-product-media-container.position-sticky{
    position: relative !important;
    z-index: 0;
}
.productdetails .vm-product-details-container{
    position: sticky !important;
    align-self: flex-start !important;
    top: 10px;
}

.product-related-products .col{
    min-width: 200px;
}
.vm-related-product-container img, .productdetails .vm-related-product-container img{
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 6px;
}
.vm-related-product-container img{
    max-height: 100px;
}

.vm-product-vertical-gallery img{
    border-radius:6px;
    cursor:pointer;
    transition:transform .2s ease;
}
.vm-product-vertical-gallery img:hover, 
.vm-product-grid .vm-product-media-container img:hover, 
.mod-categorias img:hover{
    transform:scale(1.03);
}

/*### CARRINHO CHECKOUT ###*/
.cart-view form#checkoutForm > div:first-of-type{
    border-top: 1px solid #e3e6e9;
}
.cart-view form#checkoutForm .sticky-top{
    border-top: 1px solid #e3e6e9;
    background-color: #f5f5f5;
}

.cart-view .vm2-remove_from_cart{
    /*color: firebrick;*/
    color: var(--color-text);
    font-size: var(--text-xs);
}


/*### MÓDULO DO CARRINHO ###*/
.right-group {
    display: flex;
    align-items: center;
    gap: 10px;
}
.carrinho{
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 999;
}
.dropdownCart {
    position: relative;
}
.dropdownCart .dropdownCart-btn{
    border: 0;
    color: white;
    background:none;
/*    background-color: #333;
    padding: .35em .65em;
    border-radius: .25em;*/
    display: flex;
    flex-direction: row;
    /*gap:10px;*/
    /*align-items: center;*/
}

.dropdownCart-icon img{
    width:25px;
    height: 25px;
    opacity: 0.9;
    /*vertical-align: middle;*/
}
.dropdownCart .total_products{
    font-size: var(--text-sm);
    background-color: white;
    color: var(--color-text);
    padding: .35em .65em;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    bottom: 15px;
    right: 5px;
}

/* base (sempre visível mas fora do ecrã) */
.dropdownCart-container {
    position: fixed;
    top: 15px;
    right: 0;
    height: auto;
    max-height: calc(100vh - 30px); /* 15 top + 15 bottom */
    overflow-y: auto;
    /*max-width: 90%;*/
    max-width: calc(100% - 30px);
    background: white;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(.77,0,.18,1);
    z-index: 501;
    padding: 20px;
    border-radius: .25em;
}

/* aberto */
.cart-open .dropdownCart-container {
    transform: translateX(0);
    right: 15px;
}

/* overlay */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 500;
}

.cart-open .cart-overlay {
    opacity: 1;
    visibility: visible;
}
body.cart-open {
    overflow: hidden;
}

.cart-close {
    position: absolute;
    top: 5px;
    right: 8px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    /*background: rgba(0,0,0,1);*/
    background-color: #f4f4f4;
    color: #000;
    font-size: var(--h5);
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.cart-close:hover {
    transform: rotate(360deg);
}

.dropdownCart-container .product_row:last-of-type{
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dedede;
}
.dropdownCart-container .product_row_info{
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    gap: 12px;
}
.dropdownCart-container .product_row_info .product_name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dropdownCart-container .product_row_info .product_price {
    margin-left: auto;
    white-space: nowrap;
}
.dropdownCart-container .cart-empty-state{
    text-align: center;
}

.dropdownCart-container img{
    width: 65px;
    height: 65px;
}

.dropdownCart-container.empty-active{
    /*max-width: 250px;*/
    max-width: calc(100% - 30px);
}
.dropdownCart-container .show_cart{
    padding: 30px 0 10px 0;
    display: grid;
    text-align: center;
}
.dropdownCart-container .empty-btn{
    display: inline-block;
    margin-top: 30px;
}

.addtocart-button, .dropdownCart-container .show_cart a,
.dropdownCart-container a.empty-btn{
    padding: 10px 20px;
    color: white;
    background-color: black;
    border-radius: 1rem;
    /*border-radius: .25em;*/
    border: 0;
}

.addtocart-button:hover, .dropdownCart-container .show_cart a:hover,
.dropdownCart-container a.empty-btn:hover{
    background-color: #383423;
    /*   background: none;
       box-shadow: inset 0 0 0 2px black;
       color: black;*/
}
.addtocart-button:active, .dropdownCart-container .show_cart a:active,
.dropdownCart-container a.empty-btn:active{
    background-color: black !important;
}

.empty-icon {
    width: 100px;
    height: 100px;
    background-color: #f4f4f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    margin-bottom: 15px;
}
.empty-icon img {
    width: 50px;
    height: 50px;
    opacity: 0.2;
}
.empty-text b{
    /*font-size: var(--text-base);*/
}

/*Esconder "Texto de Cesto vazio" no botão do carrinho*/
.cart-empty .total_products {
    display: none;
}

/*Animação Carrinho*/
.vm-cart-toggle.added{
    animation:cartPulse 0.4s;
}

@keyframes cartPulse{
    0%{
        transform:scale(1)
    }
    50%{
        transform:scale(1.2)
    }
    100%{
        transform:scale(1)
    }
}

/*### cart-view ###*/
.cart-view .sticky-top{
    z-index: 0;
}

.vm-padded div .continue_link, .vm-padded div .showcart{
    width: 48%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/*### Pagination ###*/
.vm-loadmore-wrapper {
    margin-top: 30px;
}

#vm-loadmore {
    padding: 12px 24px;
    border-radius: 10px;
    background-color: var(--color-bg2);
    color: #fff;
    border: none;
    transition: all 0.3s ease;
}

#vm-loadmore:hover {
    transform: translateY(-2px);
    background: #333;
}


/* ==========================
   MODULO CATEGORIAS
========================== */

.mod-categorias {}
.mod-categorias :is(h1, h2, h3, h4, h5, h6) {
    max-width: var(--container-max);
    padding: 0 3%;
    margin: var(--space-xl) auto var(--space-lg) auto;
}

/* Grid */
.mod-categorias .vm-categories-wall {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    padding: 0 2%;
    margin: 0 auto;
    list-style: none;
    max-width: var(--container-max);
}

/* Card */
.mod-categorias .vm-categories-wall-catwrapper {
    position: relative;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 4 / 5;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

/* Remove o <li class="clear"> que o VirtueMart injeta */
.mod-categorias li.clear {
    display: none !important;
}

/* Container interno */
.mod-categorias .vm-categories-wall-spacer {
    width: 100%;
    height: 100%;
}

.mod-categorias .vm-categories-wall-spacer > a {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    overflow: hidden;
    border-radius: inherit;
}

/* Imagem */
.mod-categorias .vm-categories-wall-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.mod-categorias .vm-categories-wall-catwrapper:hover .vm-categories-wall-img {
    transform: scale(1.08);
}

/* Overlay + título */
.mod-categorias .vm-categories-wall-catname {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 30px;
    margin: 0;
    box-sizing: border-box;

    color: #ffffff;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;

    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.65) 0%,
        rgba(0, 0, 0, 0.15) 15%,
        rgba(0, 0, 0, 0) 20%
    );
}

/* Responsive */
@media (max-width: 769px) {
    .mod-categorias .vm-categories-wall {
        grid-template-columns: repeat(2, 1fr);
    }
    .mod-categorias .vm-categories-wall, 
    .mod-categorias :is(h1, h2, h3, h4, h5, h6) {
        padding: 0 5%;
    }

    .mod-categorias .vm-categories-wall {
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .mod-categorias .vm-categories-wall {
        grid-template-columns: 1fr;
    }

    .mod-categorias .vm-categories-wall-catwrapper {
        border-radius: 22px;
    }

    .mod-categorias .vm-categories-wall-catname {
        padding: 24px;
    }
}

















