:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    min-height: 400px;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
}

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
    border-color: var(--primary-color);
}

/* Product Cards */
.product-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}

/* Store Banner */
.store-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #6f42c1, #8b5cf6);
    color: white;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.store-banner i {
    margin-right: 4px;
}

/* Store Banner no topo do card */
.store-banner-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #000000;
    color: white;
    padding: 6px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
    border-radius: 0;
}

.store-banner-top.online {
    background: #000000;
    color: white;
}

.store-banner-top.fisica {
    background: #000000;
    color: white;
}

.store-banner-top.default {
    background: #000000;
    color: white;
}

/* Badge de cashback no canto */
.cashback-badge-corner {
    position: absolute;
    top: 50px; /* Ajustado para compensar a faixa da loja */
    right: 8px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 6px 8px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    min-width: 35px;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-cashback 2s infinite;
}

/* Badge de desconto no canto */
.discount-badge-corner {
    position: absolute;
    top: 50px; /* Ajustado para compensar a faixa da loja */
    right: 8px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 6px 8px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    min-width: 35px;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Badge de cashback na parte inferior */
.cashback-badge-bottom {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.65rem;
    font-weight: 700;
    text-align: center;
    z-index: 9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    animation: pulse-cashback 2s infinite;
}

/* Destaque do cashback no corpo */
.cashback-highlight .badge {
    animation: glow-green 2s ease-in-out infinite alternate;
    font-size: 0.8rem;
    padding: 6px 10px;
}

@keyframes pulse-cashback {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
    }
}

@keyframes glow-green {
    from {
        box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
    }
    to {
        box-shadow: 0 0 10px rgba(40, 167, 69, 0.8);
    }
}

/* Cashback Badge Enhanced */
.top-highlight-badge.cashback-badge {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    animation: glow 2s ease-in-out infinite alternate;
    border: 2px solid rgba(255,255,255,0.3);
}

@keyframes glow {
    from {
        box-shadow: 0 6px 18px rgba(255,107,53,0.4);
    }
    to {
        box-shadow: 0 6px 25px rgba(255,107,53,0.8);
    }
}

.cashback-info .badge {
    animation: pulse-subtle 3s ease-in-out infinite;
}

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

.product-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    margin-top: 25px; /* Espaço para a faixa da loja */
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--warning-color);
    color: var(--dark-color);
    padding: 5px 8px;
    border-radius: 50%;
    font-size: 0.9rem;
    z-index: 2;
    animation: pulse 2s infinite;
}

/* Unified top highlight (discount or cashback) */
.top-highlight-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    z-index: 2;
}
.top-highlight-badge.cashback {
    background: linear-gradient(135deg, #0dcaf0, #20c997);
}
.top-highlight-badge.discount {
    background: linear-gradient(135deg, #ff5f6d, #ffc371);
}

/* Cashback highlights */
.cashback-badge-lg {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0dcaf0, #20c997);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    z-index: 2;
}
.cashback-badge-lg i {
    font-size: 1.25rem;
}

.cashback-callout {
    background: linear-gradient(135deg, #0dcaf0, #20c997);
    color: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.cashback-callout .icon {
    font-size: 2rem;
    line-height: 1;
}
.cashback-callout .value {
    font-size: 1.1rem;
    font-weight: 800;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.product-title {
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    height: 2.8em;
}

.original-price {
    font-size: 0.9rem;
}

.promotional-price {
    font-size: 1.2rem;
}

.coupon-code {
    position: relative;
}

.copy-coupon {
    transition: all 0.3s ease;
}

.copy-coupon:hover {
    transform: scale(1.1);
}

.expired-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.expired-text {
    color: white;
    text-align: center;
    font-weight: bold;
}

/* Admin Styles */
.admin-sidebar {
    min-height: calc(100vh - 56px);
    background: var(--dark-color);
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 12px 20px;
    border-radius: 0;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: var(--primary-color);
    color: white;
}

.admin-sidebar .nav-link i {
    width: 20px;
    margin-right: 10px;
}

/* Form Styles */
.form-floating > label {
    color: var(--secondary-color);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Upload Area */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(0,123,255,0.05);
}

.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(0,123,255,0.1);
}

/* Statistics Cards */
.stat-card {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: 15px;
    padding: 25px;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.stat-card.success {
    background: linear-gradient(135deg, var(--success-color), #1e7e34);
}

.stat-card.warning {
    background: linear-gradient(135deg, var(--warning-color), #e0a800);
    color: var(--dark-color);
}

.stat-card.danger {
    background: linear-gradient(135deg, var(--danger-color), #bd2130);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        min-height: 300px;
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .product-image-container {
        height: 150px;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

/* Search Highlight */
.search-highlight {
    background: yellow;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: #dee2e6;
}

.pagination .page-link:hover {
    color: #0056b3;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Social Links */
.social-links a {
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* Coupon Cards */
.coupon-card {
    transition: all 0.3s ease;
    position: relative;
    border-radius: 12px !important;
    overflow: hidden;
}

.coupon-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

.coupon-card .card-img-top {
    transition: transform 0.3s ease;
    border-radius: 0;
}

.coupon-card:hover .card-img-top {
    transform: scale(1.05);
}

.coupon-card.border-3 {
    position: relative;
    border: 3px solid #ffc107 !important;
}

.coupon-card.border-3::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #ffc107, #fd7e14, #ffc107);
    border-radius: 15px;
    z-index: -1;
    opacity: 0.7;
}

.coupon-code-display {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.coupon-code-display:hover {
    transform: scale(1.02);
}

.coupon-code-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.coupon-card:hover .coupon-code-display::before {
    left: 100%;
}

.letter-spacing {
    letter-spacing: 2px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1rem;
}

/* Badge positioning */
.badge {
    border-radius: 6px !important;
    font-weight: 600;
}

/* Rating stars */
.text-warning .fa-star {
    color: #ffc107 !important;
}

/* Card hover effects */
.coupon-card .btn {
    transition: all 0.3s ease;
}

.coupon-card:hover .btn-warning {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    border-color: #fd7e14;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.coupon-card:hover .btn-outline-primary {
    background-color: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Product Coupon Cards */
.product-coupon-card {
    transition: all 0.3s ease;
    position: relative;
    border-radius: 12px !important;
    overflow: hidden;
}

.product-coupon-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,123,255,0.15) !important;
}

.product-coupon-card .card-img-top {
    transition: transform 0.3s ease;
    border-radius: 0;
}

.product-coupon-card:hover .card-img-top {
    transform: scale(1.05);
}

.product-coupon-card .card-header {
    border-bottom: 2px solid rgba(0,123,255,0.1);
}

.product-coupon-card .coupon-code-display {
    background: rgba(0,123,255,0.1) !important;
    border-color: #007bff !important;
}

.product-coupon-card:hover .btn-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.product-coupon-card:hover .btn-outline-success {
    background-color: #28a745;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Admin Notification Badges */
.sidebar .nav-link .badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.stat-card .badge {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-3px); }
    60% { transform: translateY(-2px); }
}

/* Alert cards for pending notifications */
.alert .badge {
    font-size: 0.8rem;
    font-weight: 600;
}

.alert-warning .badge.bg-warning {
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.alert-info .badge.bg-info {
    box-shadow: 0 2px 4px rgba(13, 202, 240, 0.3);
}

/* Pending product/coupon row highlighting */
.pending-item {
    border-left: 4px solid #ffc107 !important;
    background-color: rgba(255, 193, 7, 0.05) !important;
}

.pending-item:hover {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

/* Pending status badge with pulsing dot */
.badge.bg-warning .position-absolute {
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% { 
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Modern Statistics Cards */
.modern-stat-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px 25px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(10px);
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.modern-stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modern-stat-card .card-icon {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
}

.modern-stat-card .card-content {
    z-index: 2;
    position: relative;
}

.modern-stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modern-stat-card .stat-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.modern-stat-card .stat-subtitle {
    font-size: 0.85rem;
    color: #718096;
    font-weight: 500;
}

.modern-stat-card .card-decoration {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    opacity: 0.1;
    transition: all 0.3s ease;
}

/* Individual card colors */
.products-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
}

.products-card .card-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.products-card .stat-number {
    background: #ffffff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.products-card .stat-label,
.products-card .stat-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.products-card .card-decoration {
    background: rgba(255, 255, 255, 0.1);
}

.categories-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
}

.categories-card .card-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.categories-card .stat-number {
    background: #ffffff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.categories-card .stat-label,
.categories-card .stat-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.categories-card .card-decoration {
    background: rgba(255, 255, 255, 0.1);
}

.views-card {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
}

.views-card .card-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.views-card .stat-number {
    background: #ffffff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.views-card .stat-label,
.views-card .stat-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.views-card .card-decoration {
    background: rgba(255, 255, 255, 0.1);
}

.clicks-card {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
}

.clicks-card .card-icon {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

.clicks-card .stat-number {
    background: #ffffff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.clicks-card .stat-label,
.clicks-card .stat-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.clicks-card .card-decoration {
    background: rgba(255, 255, 255, 0.1);
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.modern-stat-card:hover .card-icon {
    transform: scale(1.1);
}

.modern-stat-card:hover .card-decoration {
    opacity: 0.2;
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modern-stat-card {
        height: 160px;
        padding: 25px 20px;
    }
    
    .modern-stat-card .stat-number {
        font-size: 2rem;
    }
    
    .modern-stat-card .card-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .modern-stat-card {
        height: 140px;
        padding: 20px 15px;
    }
    
    .modern-stat-card .stat-number {
        font-size: 1.8rem;
    }
    
    .modern-stat-card .stat-label {
        font-size: 1rem;
    }
}
