/* --- assets/css/components.css --- */

/* --- כפתורים (Buttons) --- */
.btn {
    display: inline-block;
    background-color: black;
    color: white;
    padding: 12px 35px;
    border: 1px solid black;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
}

.btn:hover {
    background-color: #333;
    border-color: #333;
}

.btn-minimal {
    display: inline-block;
    padding: 8px 20px;
    margin: 0 5px;
    color: #777;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #ddd;
    border-radius: 30px;
    transition: all 0.3s;
}

.btn-minimal:hover, .btn-minimal.active {
    border-color: black;
    background-color: black;
    color: white;
}

/* --- רשת המוצרים (Product Grid) - התיקון הקריטי --- */
.product-grid {
    display: grid;
    /* השורה הזו אחראית שהמוצרים יהיו בשורה ולא אחד מתחת לשני */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 40px 20px; /* רווח בין השורות והטורים */
    width: 100%;
}

/* --- כרטיס מוצר (Product Card) --- */
.product-card {
    position: relative;
    cursor: pointer;
    text-align: center;
    background: transparent;
}

/* תמונת המוצר */
.product-image {
    width: 100%;
    aspect-ratio: 1 / 1; /* ריבוע מושלם */
    background-color: #f4f4f4;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden; /* חובה כדי שהזום לא יצא מהגבולות */
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* אנימציית זום */
    display: block;
}

/* אפקט זום במעבר עכבר */
.product-card:hover .product-image img {
    transform: scale(1.08);
}

/* שכבת "הוסף להזמנה" שקופצת מלמטה */
.add-to-cart-overlay {
    position: absolute;
    bottom: -50px; /* מוחבא למטה כברירת מחדל */
    left: 0;
    width: 100%;
    background: white;
    color: black;
    text-align: center;
    padding: 12px 0;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: bottom 0.3s ease-in-out;
    border-top: 1px solid #eee;
    z-index: 2;
}

/* הצגת הכפתור במעבר עכבר */
.product-card:hover .add-to-cart-overlay {
    bottom: 0;
}

/* פרטי המוצר */
.product-info {
    transition: opacity 0.3s;
}

.product-card:hover .product-info {
    opacity: 0.6; /* החלשת הטקסט כדי לתת פוקוס לתמונה */
}

.product-info h4 {
    margin: 10px 0 5px;
    font-size: 1.1rem;
    font-weight: 400;
    color: black;
}

.product-info .price {
    font-weight: 700;
    font-size: 1rem;
    color: #777;
}

/* תגית "חדש" */
.badge-new {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: black;
    color: white;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
}

/* קטגוריות — מוגדרות ב-home.css בלבד */

/* --- טפסים (Forms) --- */
input, textarea, select {
    width: 100%;
    padding: 15px;
    border: 1px solid #e5e5e5;
    background: #f9f9f9;
    margin-bottom: 20px;
    font-family: inherit;
    font-size: 1rem;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: black;
    background: white;
}