/* Custom Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

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

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

/* Header Scroll Effect */
.header-scrolled {
    background: rgba(10, 10, 11, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(39, 39, 42, 0.5);
}

/* Navigation Links */
.nav-link {
    color: #a1a1aa;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #22c55e, #10b981);
    border-radius: 1px;
}

.mobile-nav-link {
    color: #a1a1aa;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    color: #ffffff;
    background: #1c1c21;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #000;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4);
    filter: brightness(1.1);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    border: 1px solid #27272a;
    color: #ffffff;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #1c1c21;
    border-color: #3f3f46;
}

/* Search Input */
.search-input {
    background: #1c1c21;
    border: 1px solid #27272a;
    color: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    outline: none;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.search-input::placeholder {
    color: #71717a;
}

/* Filter Buttons */
.filter-btn {
    padding: 0.5rem 1rem;
    background: #1c1c21;
    border: 1px solid #27272a;
    color: #a1a1aa;
    font-weight: 500;
    border-radius: 9999px;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: #27272a;
    color: #ffffff;
}

.filter-btn.active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: #22c55e;
    color: #000;
}

/* Product Card */
.product-card {
    background: #141417;
    border: 1px solid #27272a;
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    border-color: #22c55e;
    box-shadow: 0 12px 40px rgba(34, 197, 94, 0.15);
}

.product-card-image {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #1c1c21 0%, #27272a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-card-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(34, 197, 94, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

/* Product Badge */
.product-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 9999px;
    letter-spacing: 0.025em;
}

.product-badge.novo {
    background: #22c55e;
    color: #000;
}

.product-badge.promo {
    background: #f97316;
    color: #000;
}

.product-badge.top {
    background: #3b82f6;
    color: #fff;
}

.product-badge.esgotado {
    background: #ef4444;
    color: #fff;
}

/* Price Styles */
.price-original {
    color: #71717a;
    text-decoration: line-through;
    font-size: 0.875rem;
}

.price-current {
    color: #22c55e;
    font-weight: 700;
}

.price-pix {
    color: #a1a1aa;
    font-size: 0.75rem;
}

/* Category Card */
.category-card {
    background: #141417;
    border: 1px solid #27272a;
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-card:hover {
    background: #1c1c21;
    border-color: #22c55e;
    transform: translateY(-2px);
}

.category-card-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.75rem;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.category-card:hover .category-card-icon {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.1) 100%);
}

.category-card-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #22c55e;
}

/* Cart Sidebar */
.cart-panel-open {
    transform: translateX(0) !important;
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #1c1c21;
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
}

.cart-item-image {
    width: 4rem;
    height: 4rem;
    background: #27272a;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    color: #22c55e;
    font-weight: 600;
}

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

.cart-item-quantity button {
    width: 1.5rem;
    height: 1.5rem;
    background: #27272a;
    border: none;
    border-radius: 0.25rem;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cart-item-quantity button:hover {
    background: #3f3f46;
}

.cart-item-remove {
    color: #71717a;
    cursor: pointer;
    transition: color 0.2s ease;
}

.cart-item-remove:hover {
    color: #ef4444;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #71717a;
}

.empty-state svg {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    opacity: 0.5;
}

/* Toast Notification */
.toast {
    background: #141417;
    border: 1px solid #27272a;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease;
    max-width: 350px;
}

.toast.success {
    border-left: 4px solid #22c55e;
}

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

.toast.info {
    border-left: 4px solid #3b82f6;
}

.toast-close {
    margin-left: auto;
    cursor: pointer;
    color: #71717a;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: #ffffff;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #1c1c21 25%, #27272a 50%, #1c1c21 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

/* Search Result Item */
.search-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.search-result-item:hover {
    background: #1c1c21;
}

.search-result-item:not(:last-child) {
    border-bottom: 1px solid #27272a;
}

.search-result-image {
    width: 2.5rem;
    height: 2.5rem;
    background: #27272a;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-result-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-price {
    color: #22c55e;
    font-weight: 600;
    margin-left: auto;
    flex-shrink: 0;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #141417;
}

::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}

/* Selection Color */
::selection {
    background: rgba(34, 197, 94, 0.3);
    color: #ffffff;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Styles */
*:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Badge Glow Effect */
.badge-glow {
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

/* Delivery Badge */
.delivery-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #22c55e;
}

/* Buyers Badge */
.buyers-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #71717a;
}

/* Mercado Pago Brick */
.mp-brick-container {
    background: #1c1c21;
    border-radius: 0.75rem;
    padding: 1rem;
}

.mp-brick-container iframe {
    background: transparent !important;
}

/* Admin Tab */
.admin-tab {
    color: #a1a1aa;
    font-weight: 500;
    transition: all 0.15s ease;
}

.admin-tab:hover {
    background: #1c1c21;
    color: #ffffff;
}

.admin-tab.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
    color: #22c55e;
    border-left: 3px solid #22c55e;
}

.admin-mobile-tab {
    color: #71717a;
    transition: all 0.15s ease;
}

.admin-mobile-tab.active {
    color: #22c55e;
}

/* Banner Carousel Transition */
#bannerSlides {
    will-change: transform;
}
