/* =========================================
   ECOMANIAS - PREMIUM COMPONENTS v2
   High-Conversion UI Elements
   ========================================= */

/* === BUTTONS - CONVERSION OPTIMIZED === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 1.4rem 2.8rem;
    font-family: inherit;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

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

.btn:hover::before {
    left: 100%;
}

/* Primary - Main CTA */
.btn-primary {
    background: var(--gradient-brand);
    color: var(--white);
    box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 44px -10px rgba(5, 150, 105, 0.5);
}

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

/* CTA - High Urgency */
.btn-cta {
    background: var(--gradient-cta);
    color: var(--white);
    box-shadow: var(--shadow-cta);
    font-size: 1.6rem;
    padding: 1.6rem 3.2rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.btn-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 48px -10px rgba(245, 158, 11, 0.5);
}

/* Pulsing CTA Animation */
.btn-pulse {
    animation: cta-pulse 2s ease-in-out infinite;
}

@keyframes cta-pulse {

    0%,
    100% {
        box-shadow: var(--shadow-brand);
    }

    50% {
        box-shadow: 0 14px 48px -8px rgba(5, 150, 105, 0.6);
    }
}

/* Secondary */
.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--green-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Ghost - For dark backgrounds */
.btn-ghost {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

/* Large Button */
.btn-lg {
    padding: 1.8rem 3.6rem;
    font-size: 1.7rem;
}

/* Icon Button */
.btn-icon {
    width: 4.8rem;
    height: 4.8rem;
    padding: 0;
    border-radius: var(--radius-full);
    background: var(--white);
    color: var(--text-secondary);
    box-shadow: var(--shadow-md);
}

.btn-icon:hover {
    background: var(--green-50);
    color: var(--primary);
    transform: scale(1.08);
}

.btn-icon svg {
    width: 2.2rem;
    height: 2.2rem;
}

/* === CARDS - PREMIUM STYLE === */
.card {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03), rgba(5, 150, 105, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 24px 48px -12px rgba(16, 185, 129, 0.2), 0 8px 24px -8px rgba(0, 0, 0, 0.1);
    border-color: var(--green-200);
}

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

.card-image {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: linear-gradient(145deg, #f8fdfb, #e8f5ef);
}

.card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.05) 100%);
    pointer-events: none;
}

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

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

.card-body {
    padding: var(--space-5);
    text-align: center;
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--eco-forest-800);
    margin-bottom: var(--space-3);
    line-height: 1.35;
    letter-spacing: -0.01em;
}

/* Product Card - Flexbox Layout for Consistent Button Alignment */
.product-card {
    background: linear-gradient(180deg, #ffffff 0%, #fafffe 100%);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card .card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card .card-body {
    padding: var(--space-4) var(--space-4) var(--space-3);
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.8rem;
    font-size: 1.4rem;
    transition: color 0.3s ease;
    margin-bottom: var(--space-2);
}

.product-card:hover .card-title {
    color: var(--primary);
}

.product-card .price {
    margin-top: auto;
    padding-top: var(--space-2);
}

/* Card Link */
.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Premium Price Display */
.product-card .price {
    flex-direction: column;
    gap: 0.3rem;
    align-items: center;
}

.product-card .price-compare {
    font-size: 1.2rem;
    color: var(--gray-400);
    text-decoration: line-through;
    font-weight: 400;
}

.product-card .price-current {
    font-size: 1.9rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--eco-mint-600) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Add to Cart Button */
.btn-add-cart {
    width: calc(100% - var(--space-6));
    margin: var(--space-2) var(--space-3) var(--space-4);
    padding: 1.2rem 1.6rem;
    font-size: 1.35rem;
    font-weight: 600;
    gap: 0.8rem;
    border-radius: var(--radius-xl);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-add-cart::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.product-card:hover .btn-add-cart {
    transform: scale(1.03);
    box-shadow: 0 8px 24px -8px rgba(5, 150, 105, 0.4);
}

.product-card:hover .btn-add-cart::after {
    opacity: 1;
}

/* Add to Cart overlay on hover */
.product-card .card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-4);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    transform: translateY(100%);
    transition: transform var(--duration-normal) var(--ease-out);
}

.product-card:hover .card-overlay {
    transform: translateY(0);
}

/* Category Card - Premium Styling */
.category-card {
    text-align: center;
    background: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.category-card .card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.category-card .card-image {
    aspect-ratio: 1/1;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card .card-image img {
    border-radius: 0;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(16, 185, 129, 0.2);
}

.category-card:hover .card-image img {
    transform: scale(1.08);
}

.category-card .card-body {
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
}

.category-card .category-icon {
    font-size: 2rem;
    margin-bottom: var(--space-1);
}

.category-card .card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--eco-forest-800);
}

.category-card .category-count {
    font-size: 1.2rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* Category Button */
.btn-category {
    width: calc(100% - var(--space-6));
    margin: 0 var(--space-3) var(--space-4);
    padding: 1rem 1.4rem;
    font-size: 1.3rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
    transition: all 0.3s ease;
}

.btn-category:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.02);
}

/* === BADGES - PREMIUM CONVERSION TRIGGERS === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--radius-full);
    white-space: nowrap;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.card-badge {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    z-index: 10;
    transform: rotate(-2deg);
    animation: badge-appear 0.5s ease-out;
}

@keyframes badge-appear {
    from {
        opacity: 0;
        transform: rotate(-5deg) scale(0.8);
    }

    to {
        opacity: 1;
        transform: rotate(-2deg) scale(1);
    }
}

.card-badge-right {
    left: auto;
    right: var(--space-3);
    transform: rotate(2deg);
}

.badge-sale {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {

    0%,
    100% {
        transform: rotate(-2deg) scale(1);
    }

    50% {
        transform: rotate(-2deg) scale(1.08);
    }
}

.badge-eco {
    background: linear-gradient(135deg, var(--eco-mint-500) 0%, var(--primary) 50%, var(--eco-forest-600) 100%);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.badge-new {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #6366f1 100%);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.badge-hot {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 50%, #dc2626 100%);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: badge-shake 0.5s ease-in-out infinite;
}

@keyframes badge-shake {

    0%,
    100% {
        transform: rotate(-2deg);
    }

    25% {
        transform: rotate(-4deg);
    }

    75% {
        transform: rotate(0deg);
    }
}

.badge-free-shipping {
    background: linear-gradient(135deg, var(--eco-mint-100), var(--eco-forest-100));
    color: var(--eco-forest-700);
    border: 1px solid var(--eco-forest-300);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

/* === PRICES - CLEAR HIERARCHY === */
.price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.price-current {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.price-compare {
    font-size: 1.4rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.price-savings {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    background: var(--green-100);
    color: var(--green-700);
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: var(--radius-full);
}

/* Installments */
.price-installments {
    font-size: 1.3rem;
    color: var(--text-tertiary);
    width: 100%;
    margin-top: var(--space-1);
}

.price-installments strong {
    color: var(--primary);
}

/* === RATING === */
.rating {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.rating-star {
    color: var(--amber-500);
}

.rating-star.empty {
    color: var(--gray-300);
}

.rating-count {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-left: var(--space-2);
}

/* === FORMS - CONVERSION FOCUSED === */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.form-input {
    width: 100%;
    padding: 1.4rem 1.6rem;
    font-family: inherit;
    font-size: 1.5rem;
    color: var(--text-primary);
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: all var(--duration-fast) var(--ease-out);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring-brand);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Input Group */
.input-group {
    display: flex;
    border-radius: var(--radius-full);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--white);
}

.input-group .form-input {
    border-radius: var(--radius-full) 0 0 var(--radius-full);
    border: none;
    box-shadow: none;
}

.input-group .btn {
    border-radius: 0 var(--radius-full) var(--radius-full) 0;
    flex-shrink: 0;
}

/* === ICONS === */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon svg {
    width: 2.4rem;
    height: 2.4rem;
}

.icon-circle {
    width: 7rem;
    height: 7rem;
    border-radius: var(--radius-full);
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
}

.icon-circle svg {
    width: 3rem;
    height: 3rem;
}

.icon-circle.green {
    background: linear-gradient(135deg, var(--green-400), var(--green-600));
    color: var(--white);
    box-shadow: 0 8px 24px -8px rgba(16, 185, 129, 0.5);
}

.icon-circle.blue {
    background: linear-gradient(135deg, var(--blue-500), var(--indigo-500));
    color: var(--white);
    box-shadow: 0 8px 24px -8px rgba(59, 130, 246, 0.5);
}

.icon-circle.orange {
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
    color: var(--white);
    box-shadow: 0 8px 24px -8px rgba(245, 158, 11, 0.5);
}

.icon-circle.red {
    background: linear-gradient(135deg, var(--red-500), var(--red-600));
    color: var(--white);
    box-shadow: 0 8px 24px -8px rgba(239, 68, 68, 0.5);
}

/* === AVATAR === */
.avatar {
    width: 5.2rem;
    height: 5.2rem;
    border-radius: var(--radius-full);
    overflow: hidden;
    background: linear-gradient(135deg, var(--green-200), var(--green-400));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 3px solid var(--white);
    box-shadow: var(--shadow-md);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initials {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--green-700);
}

/* === VERIFIED BADGE === */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    background: var(--green-100);
    color: var(--green-700);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.verified-badge svg {
    width: 1.4rem;
    height: 1.4rem;
}

/* === STATS === */
.stat {
    text-align: center;
}

.stat-value {
    font-size: 3.6rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 1.4rem;
    color: var(--text-tertiary);
    margin-top: var(--space-1);
}

/* === CHIP/TAG === */
.chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 0.8rem 1.4rem;
    background: var(--gray-100);
    color: var(--text-secondary);
    font-size: 1.3rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.chip:hover,
.chip.active {
    background: var(--primary);
    color: var(--white);
}

/* === COUNTDOWN TIMER === */
.countdown {
    display: flex;
    gap: var(--space-2);
    justify-content: center;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-3);
    background: var(--white);
    border-radius: var(--radius-lg);
    min-width: 6rem;
    box-shadow: var(--shadow-sm);
}

.countdown-value {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.countdown-label {
    font-size: 1.1rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: var(--space-1);
}

/* === GUARANTEE BADGE === */
.guarantee {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    background: var(--green-50);
    border: 2px solid var(--green-300);
    border-radius: var(--radius-xl);
}

.guarantee-icon {
    width: 5.6rem;
    height: 5.6rem;
    background: var(--gradient-brand);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.guarantee-icon svg {
    width: 2.8rem;
    height: 2.8rem;
}

.guarantee-text h4 {
    font-size: 1.6rem;
    margin-bottom: var(--space-1);
    color: var(--green-800);
}

.guarantee-text p {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin: 0;
}