/* 
 * Market Premium Design System
 * Apple-inspired minimalist design for marketplace
 * Version: 1.0
 * Last Updated: December 2025
 */

/* ============================================
   ANIMATIONS
   ============================================ */

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

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(74, 196, 243, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(74, 196, 243, 0.5);
    }
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* ============================================
   PREMIUM CARDS
   ============================================ */

.premium-card-link {
    display: block;
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.premium-card {
    height: 100%;
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 
                0 1px 3px rgba(0, 0, 0, 0.03), 
                0 0 0 1px rgba(0, 0, 0, 0.01);
    cursor: pointer;
}

.premium-card-link:hover .premium-card {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08), 
                0 4px 8px rgba(0, 0, 0, 0.04);
    border-color: rgba(74, 196, 243, 0.2);
}

/* Image Wrapper */
.premium-image-wrapper {
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
}

.premium-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card-link:hover .premium-image-wrapper img {
    transform: scale(1.05);
}

/* Overlay */
.premium-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(15, 23, 42, 0.02) 100%);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.premium-card-link:hover .premium-overlay {
    opacity: 1;
}

/* Card Animation Delays */
.card-delay-0 {
    animation: cardSlideUp 0.6s ease-out backwards;
    animation-delay: 0s;
}

.card-delay-1 {
    animation: cardSlideUp 0.6s ease-out backwards;
    animation-delay: 0.1s;
}

.card-delay-2 {
    animation: cardSlideUp 0.6s ease-out backwards;
    animation-delay: 0.2s;
}

.card-delay-3 {
    animation: cardSlideUp 0.6s ease-out backwards;
    animation-delay: 0.3s;
}

/* ============================================
   BADGES
   ============================================ */

.premium-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    animation: badgePulse 2s ease-in-out infinite;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.premium-badge-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: dotPulse 2s ease-in-out infinite;
}

/* Badge Variants */
.badge-available {
    background: linear-gradient(135deg, #4AC4F3 0%, #3ba5d1 100%);
    box-shadow: 0 4px 12px rgba(74, 196, 243, 0.3);
}

.badge-new {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.badge-used {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ============================================
   GLASSMORPHISM FILTERS
   ============================================ */

.glass-filters {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(74, 196, 243, 0.1);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.glass-filters:hover {
    box-shadow: 0 8px 32px rgba(74, 196, 243, 0.12);
    border-color: rgba(74, 196, 243, 0.2);
}

/* ============================================
   FORM CONTROLS
   ============================================ */

.form-control {
    border-radius: 12px;
    border: 1px solid rgba(203, 213, 225, 0.5);
    padding: 0.75rem 1rem;
    min-height: 45px;
    line-height: 1.5;
    appearance: auto;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #4AC4F3;
    box-shadow: 0 0 0 4px rgba(74, 196, 243, 0.1);
    outline: none;
    background: white;
}

.form-control:hover {
    border-color: rgba(74, 196, 243, 0.3);
}

.form-label-premium {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

.market-hero-title {
    font-size: 3rem;
    color: #0f172a;
    font-weight: 300;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.market-brand-title {
    margin-bottom: 0.5rem;
    color: #0f172a;
    font-weight: 400;
    font-size: 1.125rem;
    letter-spacing: -0.01em;
    position: relative;
    padding-left: 1rem;
}

.market-brand-dot {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #4AC4F3;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(74, 196, 243, 0.6);
}

.market-specs {
    margin-bottom: 1.5rem;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 300;
    padding-left: 1rem;
}

.market-specs span + span::before {
    content: "•";
    margin: 0 0.5rem;
    opacity: 0.3;
}

.market-price-label {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.market-price-value {
    font-size: 1.75rem;
    font-weight: 300;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.market-price-value-bold {
    font-weight: 600;
}

.market-price-unit {
    font-size: 0.875rem;
    font-weight: 300;
    color: #64748b;
}

/* ============================================
   BACKGROUNDS
   ============================================ */

.market-page-bg {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    min-height: 100vh;
}

.market-hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 280px;
    background-image: radial-gradient(circle, rgba(74, 196, 243, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    opacity: 0.4;
}

.market-hero-gradient {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(74, 196, 243, 0.15) 0%, rgba(74, 196, 243, 0.05) 50%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================
   SEPARATORS
   ============================================ */

.market-separator {
    margin-bottom: 3rem;
}

.market-separator-inner {
    position: relative;
    padding-bottom: 1.5rem;
}

.market-separator-line {
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(74, 196, 243, 0.3) 20%, 
        rgba(74, 196, 243, 0.5) 50%, 
        rgba(74, 196, 243, 0.3) 80%, 
        transparent 100%);
}

.market-separator-label {
    position: absolute;
    top: -0.625rem;
    left: 0;
    background: white;
    padding-right: 1rem;
    color: #4AC4F3;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-premium {
    background: linear-gradient(135deg, #4AC4F3 0%, #2D9CDB 100%);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(74, 196, 243, 0.25);
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 196, 243, 0.35);
    color: white;
    text-decoration: none;
}

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

.btn-clear-filters {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.2);
    transition: all 0.3s ease;
}

/* ============================================
   SUGGESTION BADGE
   ============================================ */

.country-suggestion-badge {
    background: linear-gradient(135deg, rgba(74, 196, 243, 0.1) 0%, rgba(74, 196, 243, 0.05) 100%);
    border: 1px solid rgba(74, 196, 243, 0.3);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(74, 196, 243, 0.1);
}

.country-suggestion-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: #4AC4F3;
}

.country-suggestion-text {
    color: #0f172a;
    font-weight: 400;
}

.country-suggestion-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-suggestion-accept {
    background: linear-gradient(135deg, #4AC4F3 0%, #2D9CDB 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(74, 196, 243, 0.3);
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-suggestion-accept:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(74, 196, 243, 0.4);
    color: white;
    text-decoration: none;
}

.btn-suggestion-dismiss {
    background: transparent;
    border: 1px solid rgba(74, 196, 243, 0.5);
    color: #4AC4F3;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-suggestion-dismiss:hover {
    background: rgba(74, 196, 243, 0.05);
    border-color: #4AC4F3;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .premium-card-link:hover .premium-card {
        transform: none;
    }

    .market-hero-title {
        font-size: 2rem !important;
    }

    .glass-filters {
        padding: 1.5rem !important;
    }

    .market-hero-pattern {
        height: 200px;
    }

    .market-hero-gradient {
        width: 400px;
        height: 400px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.market-container-padding {
    padding: 2rem 0;
    position: relative;
}

.market-hero-padding {
    margin-bottom: 3.5rem;
    text-align: center;
    position: relative;
    padding: 2rem 0;
}

.market-content-padding {
    padding: 1.5rem;
}

.market-border-top {
    border-top: 1px solid #f1f5f9;
    padding-top: 1rem;
}

.market-cta-section {
    margin-top: 5rem;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}
/* ============================================
   PAGINATION PREMIUM
   ============================================ */

.pagination-premium {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 4rem 0 2rem;
}

.pagination-premium .pagination {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-premium .page-item {
    list-style: none;
}

.pagination-premium .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.75rem;
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 12px;
    color: #64748b;
    font-weight: 400;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.pagination-premium .page-link:hover {
    background: rgba(74, 196, 243, 0.05);
    border-color: rgba(74, 196, 243, 0.3);
    color: #4AC4F3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 196, 243, 0.15);
}

.pagination-premium .page-item.active .page-link {
    background: linear-gradient(135deg, #4AC4F3 0%, #2D9CDB 100%);
    border-color: #4AC4F3;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(74, 196, 243, 0.3);
}

.pagination-premium .page-item.disabled .page-link {
    background: #f8fafc;
    border-color: rgba(226, 232, 240, 0.4);
    color: #cbd5e1;
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-premium .page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

/* Flechas prev/next */
.pagination-premium .page-item:first-child .page-link,
.pagination-premium .page-item:last-child .page-link {
    font-weight: 500;
}