/* @itZEN-CONFIG SECURITY=strict VERSIONING=timestamp LOG=enable */
/* @itZEN-FILE FILE CSS articles_by_categorie | PATH=/assets/sections/articles_by_categorie/css/articles_by_categorie.css | VERSION=2025-04-20-1538 | STATUS=UNIFIED_LAYOUT_OK */

#articles-list {
    padding: 30px;
}

#articles-list h1 {
    font-size: 2.2em;
    margin-bottom: 20px;
    text-align: center;
}

#filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

#filter-bar button {
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    background: #eeeeee;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.2s;
}

#filter-bar button:hover {
    background: #cccccc;
}

#filter-bar button.active {
    background: #4caf50;
    color: white;
}

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

.article-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, box-shadow 0.2s;
    align-items: center;
    position: relative;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 18px rgba(0,0,0,0.08);
}

.article-card h2,
.article-title {
    font-size: 1.1em;
    font-weight: 500;
    margin: 5px 0;
    text-align: center;
}

.article-price {
    font-size: 1rem;
    font-weight: 400;
    color: #444;
    text-align: center;
    margin-bottom: 8px;
}

.article-card .labels {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.article-card .label {
    background: #f0f0f0;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.85em;
}

.article-card img.article-image,
.article-image {
    height: 200px;
    object-fit: cover;
    max-width: 100%;
    width: auto;
    border-radius: 10px;
    margin: 0 auto;
}

.card-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 10px;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    width: 100%;
}

.add-to-cart {
    background: #4caf50;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    flex: 1;
    margin-right: 5px;
}

.add-to-cart:hover {
    background: #45a045;
}

.show-details {
    background: #2196f3;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s;
}

.show-details:hover {
    background: #1976d2;
}

#article-details-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

#article-details-popup .popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    min-width: 300px;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: relative;
}

#article-details-popup .close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    cursor: pointer;
    font-size: 1.5em;
}

.info-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    cursor: pointer;
    color: #007bff;
    font-size: 1.5rem;
}

/* === ZENBLOCK RESPONSIVE ARTICLES === */
@media (max-width: 768px) {
  .articles-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .article-card {
    padding: 12px;
    border-radius: 12px;
  }

  .add-to-cart,
  .show-details {
    font-size: 0.9em;
    padding: 8px;
  }

  .article-price {
    font-size: 0.95rem;
  }
}
