/**
 * Unified Article Card Styles
 * Shared styles for article cards across all pages
 */

/* Articles Container */

.articles-container{
    margin: 10px;
}

.article-card-container {
    min-width: 250px !important;
    max-width: 330px !important;
    margin-bottom: 15px;
}

/* Article Card Container */
.article-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: white;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    width: 100%;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Article Image Container */
.article-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.article-card-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Badges */
.article-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ad0707;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.stock-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #2f3ba5;
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.stock-badge.bg-success {
    background: #28a745 !important;
}

.stock-badge.bg-warning {
    background: #ffc107 !important;
    color: #000 !important;
}

.stock-badge.bg-danger {
    background: #dc3545 !important;
}

.stock-badge.bg-info {
    background: #17a2b8 !important;
}

.discount-badge {
    top: 15px;
    right: 15px;
    z-index: 3;
}

/* Gentle shimmer effect */
@keyframes goldShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Article Content */
.article-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ad0707;
    margin-bottom: 0.5rem;
}

.article-price del {
    opacity: 0.7;
    text-decoration: line-through;
    margin-left: 0.5rem;
}

.article-reference {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.article-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5rem;
}

.article-excerpt {
    color: #6c757d;
    margin-bottom: 1.25rem;
    flex-grow: 1;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: 0.5rem;
}

/* Add to Cart Button */
.add-to-cart-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #ad0707 0%, #e01616 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(246, 25, 25, 0.25);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.add-to-cart-btn:hover:not(:disabled)::before {
    width: 300px;
    height: 300px;
}

.add-to-cart-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.add-to-cart-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 16px rgba(246, 25, 25, 0.4);
    background: linear-gradient(135deg, #e01616 0%, #c01414 100%);
}

.add-to-cart-btn:hover:not(:disabled) i {
    transform: scale(1.1) rotate(-5deg);
}

.add-to-cart-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(246, 25, 25, 0.3);
}

.add-to-cart-btn:disabled,
.add-to-cart-btn.add-to-cart-disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.add-to-cart-btn:disabled:hover,
.add-to-cart-btn.add-to-cart-disabled:hover {
    transform: none;
    box-shadow: none;
}

.add-to-cart-btn.added {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    animation: addToCartSuccess 0.5s ease;
}

.add-to-cart-btn.added i {
    transform: scale(1.2);
}

@keyframes addToCartSuccess {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15) rotate(5deg);
    }
    100% {
        transform: scale(1);
    }
}

/* View Details Button */
.view-details-btn {
    background: transparent;
    color: #ad0707;
    border: 1px solid #ad0707;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.view-details-btn i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.view-details-btn:hover {
    background: #ad0707;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(246, 25, 25, 0.3);
    text-decoration: none;
}

.view-details-btn:hover i {
    transform: translateX(3px);
}



/* Responsive Adjustments - Only for specific component needs */
@media (max-width: 768px) {
    .article-image {
        height: 280px;
    }
    
    .article-footer {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }
    
    .view-details-btn {
        flex-grow: 1;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .article-image {
        height: 300px;
    }
    
    .article-content {
        padding: 1.25rem;
    }
    
    .article-price {
        font-size: 1.4rem;
    }
    
    .article-title {
        font-size: 1.05rem;
    }
    
    .add-to-cart-btn {
        width: 44px;
        height: 44px;
    }
    
    .add-to-cart-btn i {
        font-size: 1rem;
    }
}