@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ============================================
   HEADER ACTIONS
============================================ */
.header-actions {
    display: flex;
    gap: 12px;
}

.btn-danger {
    background: #EF4444;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #DC2626;
    transform: translateY(-2px);
}

/* ============================================
   STATS BAR
============================================ */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
    border-radius: 12px;
    border: 1px solid #475569;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-item i {
    font-size: 32px;
    color: #10B981;
    background: rgba(16, 185, 129, 0.2);
    padding: 12px;
    border-radius: 12px;
}

.stat-item div {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #F8FAFC;
}

.stat-label {
    font-size: 13px;
    color: #94A3B8;
}

/* ============================================
   FILTERS BAR
============================================ */
.filters-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748B;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: #1E293B;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #F8FAFC;
    font-size: 14px;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.filter-controls {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 12px 16px;
    background: #1E293B;
    border: 1px solid #334155;
    border-radius: 8px;
    color: #F8FAFC;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:hover {
    border-color: #10B981;
}

.filter-select:focus {
    outline: none;
    border-color: #10B981;
}

/* ============================================
   CARDS GRID
============================================ */
.favoritos-info {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #1E293B;
}

.favoritos-info p {
    color: #94A3B8;
    font-size: 14px;
}

.favoritos-info span {
    color: #10B981;
    font-weight: 600;
    font-size: 16px;
}

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

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #64748B;
    animation: fadeIn 0.5s ease;
}

.empty-state h3 {
    font-size: 20px;
    color: #CBD5E1;
    margin: 20px 0 8px 0;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 24px;
}

/* ============================================
   PRODUCT CARD
============================================ */
.product-card {
    background: #1E293B;
    border: 1px solid #334155;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
    animation: slideIn 0.5s ease;
}

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

.product-card:hover {
    border-color: #10B981;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.2);
}

.card-image {
    position: relative;
    width: 100%;
    height: 240px;
    background: #0F172A;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.badge-discount {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #EF4444;
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

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

.badge-esgotado {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: #94A3B8;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.btn-remover-fav {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
}

.btn-remover-fav:hover {
    background: #DC2626;
    transform: scale(1.1) rotate(10deg);
}

.card-body {
    padding: 16px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: #F8FAFC;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 20px;
    max-height: 40px;
}

.badge-indicado {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
    border-radius: 4px;
    font-size: 11px;
    margin-right: 6px;
}

.card-desc {
    font-size: 13px;
    color: #94A3B8;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 18px;
    max-height: 36px;
}

.card-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.price-old {
    font-size: 14px;
    color: #64748B;
    text-decoration: line-through;
}

.price-current {
    font-size: 20px;
    font-weight: 700;
    color: #10B981;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.btn-card {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-ver {
    background: #10B981;
    color: white;
}

.btn-ver:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-ver:disabled {
    background: #334155;
    color: #64748B;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ============================================
   SKELETON LOADING
============================================ */
.skeleton-card {
    background: #1E293B;
    border-radius: 12px;
    overflow: hidden;
}

.skeleton-image {
    width: 100%;
    height: 240px;
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.skeleton-body {
    padding: 16px;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-line.short {
    width: 60%;
}

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

/* ============================================
   TOAST NOTIFICATION
============================================ */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1E293B;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-color: #10B981;
}

.toast.success i {
    color: #10B981;
}

.toast.error {
    border-color: #EF4444;
}

.toast.error i {
    color: #EF4444;
}

.toast i {
    font-size: 20px;
}

.toast span {
    color: #F8FAFC;
    font-size: 14px;
}

/* ============================================
   ANIMATIONS
============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-left {
        margin-bottom: 12px;
    }
    
    .header-actions {
        flex-direction: column;
    }
    
    .stats-bar {
        grid-template-columns: 1fr;
    }
    
    .filters-bar {
        flex-direction: column;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }
}