/* Estilos para a loja dinâmica */

/* Filtros */
.loja-filters {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filter-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-options select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

/* Informações dos produtos */
.produtos-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.produtos-novos-info {
    margin-top: 0.5rem;
}

.badge-novo {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    animation: pulse-novo 2s infinite;
}


/* Estilos para a página da Loja */
.loja-content {
    padding: 3rem 0;
}

.loja-filters {
    margin-bottom: 2rem;
}

.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.produto-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.produto-card:hover {
    transform: translateY(-5px);
}

.produto-imagem {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.produto-imagem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Grid de produtos */
.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.produto-card:hover .produto-imagem img {
    transform: scale(1.05);
}

.info-product-tag {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    position: absolute;
    padding: 0 10px;
    top: 5px;
}

.produto-tag {
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.produto-tag.vendidos {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
}

.produto-tag.novo {
    background: linear-gradient(135deg, #28a745, #20c997);
}

/* Quando há dois tags, ajustar posicionamento */
.produto-card:has(.produto-tag.vendidos):has(.produto-tag.novo) .produto-tag.vendidos {
    top: 10px;
    right: 10px;
}

.produto-card:has(.produto-tag.vendidos):has(.produto-tag.novo) .produto-tag.novo {
    top: 40px;
    right: 10px;
}


/* Hover effect para tags */
.produto-tag:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.produto-info {
    padding: 1.5rem;
}

.produto-info h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    height: 60px;
    margin-bottom: 0;
}

.produto-categoria {
    color: #007bff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.produto-descricao {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.produto-preco {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.preco-atual {
    font-size: 1.4rem;
    font-weight: 700;
    color: #28a745;
}

.preco-antigo {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.btn-comprar {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 0.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comprar-card {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.btn-comprar:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

/* Estado vazio */
.produtos-vazio {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.produtos-vazio h3 {
    color: #333;
    margin-bottom: 1rem;
}

.produtos-vazio p {
    color: #666;
    margin-bottom: 2rem;
}

/* Paginação */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid #e9ecef;
    background: white;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.pagination-btn i {
    font-size: 14px;
}

/* Carrinho Flutuante */
.carrinho-flutuante {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.carrinho-header {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    position: relative;
}

.carrinho-header i {
    color: var(--white);
    font-size: 1.5rem;
}

.carrinho-contador {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-color);
    color: var(--white);
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.carrinho-conteudo {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 300px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    display: none;
}

.carrinho-conteudo.active {
    display: block;
    animation: slideUp 0.3s ease-out;
}

.carrinho-conteudo h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.carrinho-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.carrinho-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.carrinho-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
}

.item-info h4 {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.item-info p {
    font-size: 0.8rem;
    color: #666;
}

.item-quantidade {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.carrinho-item .item-quantidade button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin: 0 6px;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.carrinho-item .item-quantidade button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.carrinho-item .item-quantidade button:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.carrinho-item .item-quantidade button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.carrinho-item .item-quantidade span {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1rem;
    min-width: 20px;
    text-align: center;
    padding: 0 8px;
}

.carrinho-item .remover-item {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    outline: none;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.carrinho-item .remover-item:hover {
    background: linear-gradient(135deg, #ee5a52 0%, #ff6b6b 100%);
}

.carrinho-item .remover-item:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.carrinho-item .remover-item:focus {
    outline: 2px solid #ff6b6b;
    outline-offset: 2px;
}

.carrinho-item .remover-item i {
    pointer-events: none;
    font-size: 1rem;
}

.carrinho-total {
    text-align: center;
    padding-top: 1rem;
}

.carrinho-total p {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.btn-finalizar {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-finalizar i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn-finalizar:hover i {
    transform: scale(1.1);
}

.btn-finalizar:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.btn-finalizar:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-finalizar:focus {
    outline: 2px solid #28a745;
    outline-offset: 2px;
}

/* Efeito de ripple para os botões */
.carrinho-item .item-quantidade button::before,
.carrinho-item .remover-item::before,
.btn-finalizar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.carrinho-item .item-quantidade button:active::before,
.carrinho-item .remover-item:active::before,
.btn-finalizar:active::before {
    width: 100px;
    height: 100px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-produto{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.produto-page{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.produto-main {
  display: flex;
  gap: 40px;
  margin-top: 6rem;
}

.produto-main .container {
  flex: 1;
}

.produto-main .produto-box {
  flex: 1;
  max-width: 400px;
  border: 1px solid #eee;
  padding: 20px;
  background: #fff;
}

.produto-box h1 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
}

.produto-box .preco {
  font-size: 26px;
  font-weight: bold;
  color: #c0392b;
  margin-bottom: 10px;
}

.produto-box .sku {
  font-size: 13px;
  color: #777;
  margin-bottom: 15px;
}

.produto-box .stock {
  display: inline-block;
  font-size: 14px;
  margin-bottom: 15px;
  padding: 4px 8px;
  border-radius: 3px;
  background: #27ae60;
  color: #fff;
}

.produto-box .stock.esgotado {
  background: #fff;
  color: #c0392b;
  border: 1px solid #f1d0d0;
}

.actions {
  margin-top: 15px;
}

.actions .qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ccc;
  margin-right: 10px;
  margin-bottom: 10px;
}

.actions .qty button {
  border: none;
  background: #f5f5f5;
  padding: 6px 10px;
  font-size: 16px;
  cursor: pointer;
}

.actions .qty input {
  width: 50px;
  text-align: center;
  border: none;
}

.actions .btn {
  display: inline-block;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: bold;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  margin-right: 8px;
}

.actions .btn {
  background: #3ce745;
  color: #fff;
  transition: .2s ease-out;
}

.actions .btn:hover{
    opacity: 0.7;
}
.actions .btn.secondary {
  background: #fff;
  color: #333;
  border: 1px solid #333;
}

.tags {
  margin-top: 20px;
}

.tags .tag {
  display: inline-block;
  background: #f1f1f1;
  color: #555;
  padding: 5px 10px;
  border-radius: 3px;
  margin-right: 5px;
  font-size: 13px;
}

.galeria {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.galeria-principal img {
  max-width: 600px;
  width: 100%;
  padding: 10px;
}

.thumbs {
  display: flex;
  gap: 10px;
}

.thumbs img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
}

.thumbs img.active {
  border-color: #e74c3c;
}

.descricao {
    margin: 1.2rem 0;
}
/* Responsividade para página da Loja */
@media (max-width: 768px) {
    .loja-header h1 {
        font-size: 2rem;
    }

    .produtos-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .carrinho-conteudo {
        width: 280px;
        right: -10px;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        min-width: auto;
    }

    .filter-options {
        justify-content: center;
    }

    .filter-options select {
        min-width: 120px;
    }

    .produtos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .produto-info {
        padding: 1rem;
    }

    .produto-info h3 {
        font-size: 1.1rem;
    }

    .preco-atual {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .loja-filters {
        padding: 1rem;
    }

    .filter-options {
        flex-direction: column;
        width: 100%;
    }

    .filter-options select {
        width: 100%;
        min-width: auto;
    }

    .produto-imagem {
        height: 150px;
    }

    .pagination {
        gap: 0.25rem;
    }

    .pagination-btn {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.produto-card {
    animation: fadeInUp 0.6s ease forwards;
}

.produto-card:nth-child(1) {
    animation-delay: 0.1s;
}

.produto-card:nth-child(2) {
    animation-delay: 0.2s;
}

.produto-card:nth-child(3) {
    animation-delay: 0.3s;
}

.produto-card:nth-child(4) {
    animation-delay: 0.4s;
}

.produto-card:nth-child(5) {
    animation-delay: 0.5s;
}

.produto-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* Loading state */
.produtos-grid.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Melhorias de acessibilidade */
.produto-card:hover {
    cursor: pointer;
}

/* Efeito de destaque para produtos em promoção */
.produto-card[data-promocao="true"] {
    border: 2px solid transparent;
    background: linear-gradient(135deg, #fff, #f8f9fa);
}

.produto-card[data-promocao="true"]:hover {
    border-color: #ff6b6b;
}

.link-product {
    text-decoration: none;
}