/* Grid flexível para produtos ilimitados */
.best-seller {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 24px;
}

@media (max-width: 1200px) {
    .best-seller {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .best-seller {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .best-seller {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Estilos para cards de produtos */
.produto-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 12px 16px 12px;
}

.produto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-image-container {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
    /* background: #f8f9fa; removido para fundo transparente */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.produto-card:hover .product-image-container img {
    transform: scale(1.08);
}

.produto-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.produto-info h3,
.name-of-p p {
    font-size: 14px;
    margin-bottom: 16px;
    color: var(--light-black);
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    max-height: 4.2em;
    width: 100%;
}

@media (max-width: 600px) {
    .name-of-p p {
        -webkit-line-clamp: 2;
        line-clamp: 2;
        max-height: 2.8em;
        margin-bottom: 18px;
    }
    .rating {
        margin-top: 2px;
        margin-bottom: 8px;
        font-size: 1.08rem;
        padding: 3px 8px;
    }
}

@media (max-width: 600px) {
    .name-of-p p {
        -webkit-line-clamp: 2;
        line-clamp: 2;
        max-height: 2.8em;
    }
}

.price-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    width: 100%;
}

.current-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-label {
    font-size: 0.9rem;
    color: #666;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2ecc71;
    white-space: nowrap;
}

.installment.sem-juros {
    color: #2ecc71;
    font-weight: 700;
}
.installment.com-juros {
    color: #666;
    font-weight: 700;
}

.old-price {
    font-size: 0.95rem;
    color: #a29f9f;
    text-decoration: line-through;
}

.installment {
    font-size: 0.9rem;
    color: #666;
}

.installment.sem-juros {
    color: #2ecc71;
    font-weight: 500;
}

.installment.com-juros {
    color: #666;
}

.savings-tag {
    background-color: #ffedd5;
    color: #c2410c;
    border: 1px dashed #fb923c;
    border-radius: 4px;
    padding: 4px 8px;
    margin: 8px 0;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.savings-icon {
    font-size: 1.1rem;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
    justify-content: center;
    width: 100%;
}

.tag {
    background: #f8f9fa;
    color: #495057;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
    font-weight: 700;
    text-transform: uppercase;
    margin: 2px 0;
    letter-spacing: 0.7px;
    transition: background 0.2s, color 0.2s;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Tag para informações de referência (ex: data da cotação) */
.info-ref-tag {
    background: #f4f4f7;
    color: #888;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.82rem;
    border: 1px dashed #cbd5e1;
    font-weight: 500;
    text-transform: none;
    margin: 2px 0;
    letter-spacing: 0.3px;
    display: inline-block;
    box-shadow: none;
}

 
.tag.LANCAMENTO, .tag[title*="LANÇAMENTO"] {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #38bdf8;
}

.tag.FRETEGRATIS, .tag[title*="FRETE GRÁTIS"] {
    background: #e0ffe0;
    color: #229a00;
    border-color: #4ade80;
}

.tag.PRONTAENTREGA, .tag[title*="PRONTA ENTREGA"] {
    background: #fffbe7;
    color: #b45309;
    border-color: #fde68a;
}

.tag.EXCLUSIVO, .tag[title*="EXCLUSIVO"] {
    background: #f3e8ff;
    color: #7c3aed;
    border-color: #c4b5fd;
}

.tag.ECOFRIENDLY, .tag[title*="ECO FRIENDLY"] {
    background: #e6f4ea;
    color: #15803d;
    border-color: #6ee7b7;
}

.tag.LIMITADO, .tag[title*="LIMITADO"] {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.tag.OFERTARELAMPAGO, .tag[title*="OFERTA RELÂMPAGO"] {
    background: #fff7ed;
    color: #ea580c;
    border-color: #fdba74;
    animation: tag-pulse 1s infinite alternate;
}

.tag.GARANTIAESTENDIDA, .tag[title*="GARANTIA ESTENDIDA"] {
    background: #e0e7ff;
    color: #3730a3;
    border-color: #818cf8;
}

.tag.MELHORAVALIADO, .tag[title*="MELHOR AVALIADO"] {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

.tag.PARCELASEMJUR0S, .tag[title*="PARCELA SEM JUROS"] {
    background: #fefce8;
    color: #a16207;
    border-color: #fde68a;
}

.tag.CASHBACK, .tag[title*="CASHBACK"]  {
    background: #f0fdfa;
    color: #0e7490;
    border-color: #67e8f9;
}

.tag.NOVIDADE, .tag[title*="NOVIDADE"]  {
    background: #f3e8ff;
    color: #a21caf;
    border-color: #f0abfc;
}

.tag.MAIS-VENDIDO, .tag[title*="MAIS VENDIDO"]  {
	background: linear-gradient(45deg, #ff8a00, #ff4e50);
	color: #fff;
	border: none;
	position: relative;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	flex-direction: row;
	gap: 6px;
	padding: 4px 12px;
	font-weight: 600;
	font-size: 13px;
	line-height: 1;
	white-space: nowrap;
	overflow: visible;
	box-shadow: 0 2px 4px rgba(255, 138, 0, 0.2);
}

.tag.NOVO, .tag[title*="NOVO!"]  {
	background: linear-gradient(45deg, #43e97b, #38f9d7);
	color: #0d9488;
	border: none;
	position: relative;
	display: inline-flex;
	align-items: center;
	flex-direction: row;
	gap: 6px;
	padding: 4px 12px;
	font-weight: 600;
	font-size: 13px;
	line-height: 1;
	white-space: nowrap;
	overflow: visible;
	box-shadow: 0 2px 4px rgba(67, 233, 123, 0.15);
}

.tag.SOMENTEONLINE, .tag[title*="SOMENTE ONLINE"] {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.tag.RECOMENDADO, .tag[title*="RECOMENDADO"]  {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #7dd3fc;
}

.tag.BLACKFRIDAY, .tag[title*="BLACK FRIDAY"]  {
    background: #000;
    color: #fff;
    border-color: #ff4e50;
}

.tag.DIADASMAES, .tag[title*="DIA DAS MÃES"] {
    background: #fff0f6;
    color: #be185d;
    border-color: #f9a8d4;
}

@keyframes tag-pulse {
    from {
        box-shadow: 0 0 0 0 #fdba74;
    }

    to {
        box-shadow: 0 0 8px 2px #fdba74;
    }
}

.buy-now {
    margin-top: 8px;
    width: 100%;
}

.buy-now-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(45deg, #ff4e50, #f9d423);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.buy-now-btn:hover {
    color: var(--primary-color);
    background: #fff;
    border: 1px solid var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 78, 80, 0.15);
    transition: all 0.3s ease;
}

.buy-now-btn:hover a {
    color: var(--primary-color);
}

.buy-now-btn a {
    color: white;
    text-decoration: none;
    display: block;
    width: 100%;
}

.product-details-link {
    margin-top: 10px;
    width: 100%;
}

.product-details-link-btn {
    color: #2980b9;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
    justify-content: center;
}

.product-details-link-btn:hover {
    color: var(--primary-color);
}

.rating {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
    margin-top: 10px;
    color: #ffc107;
    font-size: 1.25rem;
    background: #fffbe7;
    border-radius: 20px;
    padding: 4px 12px;
    box-shadow: 0 1px 4px rgba(255, 193, 7, 0.08);
    font-weight: 600;
    transition: font-size 0.2s, padding 0.2s, margin 0.2s;
}
.rating .bx-star,
.rating .bx-star-half,
.rating .bx-star-fill {
    margin: 0 1px;
    font-size: 1.2em;
    vertical-align: middle;
    color: #FFC107 !important;
}
.rating .rating-count {
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    margin-left: 4px;
    vertical-align: middle;
}
@media (max-width: 600px) {
    .rating {
        font-size: 1.05rem;
        padding: 3px 8px;
        gap: 2px;
        margin-bottom: 8px;
        margin-top: 10px !important;
    }
    .rating .bx-star,
    .rating .bx-star-half,
    .rating .bx-star-fill {
        font-size: 1em;
        margin: 0 0.5px;
    }
    .rating .rating-count {
        font-size: 0.85rem;
        margin-left: 2px;
    }
}

.rating .rating-count {
    color: #666;
    font-size: 0.95rem;
    margin-left: 5px;
    font-weight: 500;
}

.rating .bx-star, .rating .bx-star-half, .rating .bx-star-fill {
    margin: 0 1px;
    font-size: 1.2em;
}


.rating-count {
    color: #666;
    font-size: 0.9rem;
}

/* Skeleton Loading */
.skeleton {
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
}

.skeleton-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
    animation: shimmer 1.5s infinite;
}

.skeleton-text {
    height: 20px;
    margin: 10px 0;
    background: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
    animation: shimmer 1.5s infinite;
}

.skeleton-button {
    height: 40px;
    margin: 20px;
    background: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: 200px 0;
    }
}

/* Fim das tags personalizadas */
.produtos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px;
    justify-items: center;
}

/* Media queries */
@media (max-width: 1200px) {
    .produtos-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .product-image-container {
        height: 240px;
    }

    .produtos-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }

    .produto-info h3,
    .name-of-p p {
        font-size: 1.1rem;
    }

    .price {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .product-image-container {
        height: 220px;
    }

    .produtos-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }

    .produto-info {
        padding: 15px;
    }

    .buy-now-btn {
        padding: 12px;
        font-size: 0.95rem;
    }
}

/* Estilos para categorias (moved from original style.css to here for consolidation) */
.categoria-container {
    padding: 40px 0;
    margin-bottom: 50px;
}

.categoria-title {
    text-align: center;
    margin-bottom: 30px;
}

.categoria-title h2 {
    font-size: 2rem;
    color: var(--light-black);
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.categoria-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--primary-color);
}