/*
 * Modern Catalog CSS - Autoparts
 * Design moderno com animações e micro-interações
 */

/* ============================================
   1. CARDS DE PRODUTOS MODERNOS
   ============================================ */

.product-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0f0f0;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: transparent;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary, #254e88), #ff6b6b);
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover::before {
    opacity: 1;
}

/* Imagem do produto com zoom no hover */
.product-card .product-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 1rem;
}

.product-card .product-image-wrapper img {
    transition: transform 0.4s ease;
}

.product-card:hover .product-image-wrapper img {
    transform: scale(1.1);
}

/* Overlay de ações rápidas no hover */
.product-card .quick-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.product-card:hover .quick-actions {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
}

.quick-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    color: #333;
}

.quick-action-btn:hover {
    transform: scale(1.1);
    color: var(--primary, #254e88);
}

.quick-action-btn.favorited {
    color: #ff4757;
}

/* Badges do produto */
.product-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.badge-promo {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
}

.badge-new {
    background: linear-gradient(135deg, #4ecdc4, #44b3ab);
    color: white;
}

.badge-destaque {
    background: linear-gradient(135deg, #ffa502, #ff7f00);
    color: white;
}

.badge-estoque-baixo {
    background: linear-gradient(135deg, #ffd93d, #f9ca24);
    color: #333;
}

/* Indicador de estoque */
.stock-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}

.stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: stockPulse 2s infinite;
}

@keyframes stockPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.stock-high .stock-dot { background: #2ecc71; }
.stock-high { color: #27ae60; }

.stock-medium .stock-dot { background: #f39c12; }
.stock-medium { color: #e67e22; }

.stock-low .stock-dot { background: #e74c3c; }
.stock-low { color: #c0392b; }

/* Avaliação com estrelas */
.rating-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 6px 0;
}

.rating-stars i {
    font-size: 12px;
    color: #ffd700;
}

.rating-stars .empty {
    color: #ddd;
}

.rating-text {
    font-size: 11px;
    color: #888;
    margin-left: 4px;
}

/* Preço com desconto */
.price-wrapper {
    position: relative;
}

.price-old {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}

.price-new {
    font-size: 22px;
    font-weight: 800;
    color: #e74c3c;
}

.discount-percent {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 8px;
}

/* Botão Adicionar ao Carrinho */
.btn-add-cart {
    background: linear-gradient(135deg, var(--primary, #254e88), #1e3f6e);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-add-cart::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;
}

.btn-add-cart:hover::before {
    width: 300px;
    height: 300px;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 78, 136, 0.4);
}

.btn-add-cart.added {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    animation: cartSuccess 0.5s ease;
}

@keyframes cartSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Botão WhatsApp */
.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.btn-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp.shake {
    animation: whatsappShake 0.5s ease;
}

@keyframes whatsappShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

/* Botão Ver Detalhes */
.btn-details {
    background: white;
    color: var(--primary, #254e88);
    border: 2px solid var(--primary, #254e88);
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.btn-details:hover {
    background: var(--primary, #254e88);
    color: white;
}

/* ============================================
   2. BENEFÍCIOS / TRUST BADGES
   ============================================ */

.trust-badges {
    background: #ffffff;
    padding: 40px 0;
    margin: 40px 0;
}

.trust-badge-item {
    text-align: center;
    padding: 20px;
    color: #000000;
    transition: transform 0.3s ease;
}

.trust-badge-item:hover {
    transform: translateY(-5px);
}

.trust-badge-icon {
    width: 70px;
    height: 70px;
    background: var(--primary, #254e88);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 28px;
    color: #ffffff;
}

.trust-badge-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 5px;
    color: #000000;
}

.trust-badge-text {
    font-size: 13px;
    color: #000000;
}

/* ============================================
   3. BANNER MODERNIZADO
   ============================================ */

#banner-carousel {
    position: relative;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.banner-content {
    text-align: center;
    color: white;
    padding: 20px;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.banner-title {
    font-size: clamp(28px, 5vw, 56px);
    font-weight: 900;
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

.banner-subtitle {
    font-size: clamp(16px, 2.5vw, 22px);
    opacity: 0.95;
    margin-bottom: 25px;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
}

.banner-cta {
    display: inline-block;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

.banner-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.5);
}

/* Countdown Timer */
.banner-countdown {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    border-radius: 10px;
    min-width: 80px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.countdown-number {
    font-size: 32px;
    font-weight: 900;
    display: block;
    line-height: 1;
}

.countdown-label {
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* ============================================
   4. ORDENAÇÃO
   ============================================ */
.sort-dropdown {
    position: relative;
}

.sort-btn {
    background: white;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.sort-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 100;
    display: none;
}

.sort-menu.show {
    display: block;
    animation: fadeIn 0.2s ease;
}

.sort-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.sort-option:hover {
    background: #f8f9fa;
}

.sort-option.active {
    background: var(--primary, #254e88);
    color: white;
}

/* ============================================
   5. CARDS DE MARCAS MELHORADOS
   ============================================ */

.brand-card {
    position: relative;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    border: 2px solid #f0f0f0;
}

.brand-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary, #254e88);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.brand-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary, #254e88) 0%, #1e3f6e 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.brand-card:hover .brand-card-bg {
    opacity: 0.1;
}

.brand-card-content {
    position: relative;
    padding: 30px;
    text-align: center;
}

.brand-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin: 0 auto 15px;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.brand-card:hover .brand-logo {
    filter: grayscale(0%);
    transform: scale(1.1);
}

.brand-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 5px;
}

.brand-products-count {
    font-size: 13px;
    color: #888;
}

.brand-view-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    background: var(--primary, #254e88);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.brand-card:hover .brand-view-btn {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   6. SKELETON LOADING
   ============================================ */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #f8f8f8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    height: 380px;
}

.skeleton-image {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.skeleton-title {
    height: 20px;
    width: 80%;
    margin-bottom: 10px;
}

.skeleton-text {
    height: 14px;
    width: 60%;
    margin-bottom: 8px;
}

.skeleton-price {
    height: 28px;
    width: 40%;
    margin-bottom: 15px;
}

.skeleton-button {
    height: 42px;
    width: 100%;
    border-radius: 8px;
}

/* ============================================
   7. DEPOIMENTOS / REVIEWS
   ============================================ */

.testimonials-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 60px 0;
}

.testimonial-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 60px;
    color: var(--primary, #254e88);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary, #254e88);
}

.testimonial-author {
    flex: 1;
}

.testimonial-name {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 2px;
}

.testimonial-role {
    font-size: 13px;
    color: #888;
}

.testimonial-rating {
    display: flex;
    gap: 3px;
}

.testimonial-rating i {
    color: #ffd700;
    font-size: 14px;
}

.testimonial-text {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    font-style: italic;
}

.testimonial-product {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #888;
}

/* ============================================
   8. MODAL QUICK VIEW
   ============================================ */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

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

.quick-view-modal {
    background: white;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.quick-view-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

@media (max-width: 768px) {
    .quick-view-content {
        grid-template-columns: 1fr;
    }
}

.quick-view-gallery {
    padding: 30px;
    background: #f8f9fa;
}

.main-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 15px;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary, #254e88);
}

.quick-view-details {
    padding: 30px;
}

.quick-view-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.quick-view-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.quick-view-code {
    color: #888;
    font-size: 14px;
    margin-bottom: 15px;
}

.quick-view-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.quick-view-price {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.quick-view-price .price-new {
    font-size: 32px;
}

.quick-view-info {
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    width: 150px;
    color: #666;
}

.info-value {
    flex: 1;
    color: #333;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: var(--primary, #254e88);
    color: white;
    border-color: var(--primary, #254e88);
}

.quantity-input {
    width: 70px;
    height: 40px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
}

.quick-view-actions {
    display: flex;
    gap: 15px;
}

.quick-view-actions .btn-add-cart {
    flex: 1;
}

/* ============================================
   9. ANIMAÇÕES E MICRO-INTERAÇÕES
   ============================================ */

/* Fade In para produtos */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpItem 0.6s ease forwards;
}

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

/* Confetti ao adicionar ao carrinho */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    pointer-events: none;
    z-index: 9999;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Ripple effect para botões */
.ripple-btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top-color: var(--primary, #254e88);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
    max-width: 350px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid #27ae60;
}

.toast.error {
    border-left: 4px solid #e74c3c;
}

.toast.info {
    border-left: 4px solid #3498db;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast.success .toast-icon {
    background: #27ae60;
    color: white;
}

.toast.error .toast-icon {
    background: #e74c3c;
    color: white;
}

.toast.info .toast-icon {
    background: #3498db;
    color: white;
}

/* ============================================
   10. RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
    .trust-badges {
        padding: 30px 0;
    }

    .trust-badge-item {
        padding: 15px 10px;
    }

    .trust-badge-icon {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .banner-countdown {
        flex-wrap: wrap;
    }

    .countdown-item {
        min-width: 60px;
        padding: 10px 15px;
    }

    .countdown-number {
        font-size: 24px;
    }

    .quick-view-modal {
        max-height: 95vh;
    }

    .toast-container {
        left: 10px;
        right: 10px;
    }

    .toast {
        max-width: none;
    }
}
