/* =========================================
   Marketplace Frontend Styles (Customers)
   ========================================= */

.market-store-wrap {
    background: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1c1e21;
    width: 100%;
    min-height: 100vh;
    direction: rtl;
}

/* --- Header (Facebook Style) --- */
.store-fb-header {
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    position: relative;
}
.store-cover {
    height: 300px;
    background-color: #333;
    background-size: cover;
    background-position: center;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}
.store-header-bar {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 30px 20px;
    display: flex;
    align-items: flex-end;
    position: relative;
    height: 60px;
}
.store-identity {
    display: flex;
    align-items: flex-end;
    position: absolute;
    bottom: 15px;
    right: 30px;
    gap: 20px;
}
.store-profile-pic {
    width: 130px; height: 130px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative; z-index: 2;
}
.store-profile-pic img { width: 100%; height: 100%; object-fit: cover; }
.store-main-title { margin: 0 0 15px 0; font-size: 2rem; font-weight: bold; color: #000; }
.store-meta-badges .badge {
    background: rgba(255,255,255,0.9); border: 1px solid #ddd;
    padding: 5px 12px; border-radius: 20px; font-size: 0.85rem;
    margin-left: 8px; display: inline-block; margin-top: 10px; color: #333; font-weight: 500;
}

/* --- Layout Grid --- */
.store-grid-layout {
    width: 90%; max-width: 1100px; margin: 0 auto;
    display: grid; grid-template-columns: 300px 1fr;
    gap: 20px; align-items: start; padding-bottom: 50px;
}
@media (max-width: 900px) {
    .store-grid-layout { grid-template-columns: 1fr; }
    .store-cover { width: 100%; border-radius: 0; }
    .store-identity { position: static; flex-direction: column; align-items: center; margin-top: -60px; width: 100%; text-align: center; }
    .store-header-bar { height: auto; display: block; }
}

/* --- Widgets --- */
.store-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); padding: 15px; margin-bottom: 15px; }
.store-sidebar-right h3 { margin-top: 0; font-size: 1.1rem; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 15px; }
.store-sidebar-right ul { list-style: none; padding: 0; margin: 0; }
.store-sidebar-right li { margin-bottom: 10px; font-size: 0.95rem; color: #4b4f56; }
.doc-link { display: block; background: #f8f9fa; padding: 8px; margin-top: 5px; border-radius: 4px; text-decoration: none; color: #333; font-size: 0.9rem; text-align: center; border: 1px solid #eee; }

/* Contact Form */
.market-contact-form input, .market-contact-form textarea { width: 100%; margin-bottom: 8px; padding: 8px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }
.market-contact-form button { width: 100%; background: #42b72a; color: #fff; border: none; padding: 8px; border-radius: 4px; cursor: pointer; font-weight: bold; }

/* Map */
#store-map-canvas { height: 200px; width: 100%; border-radius: 4px; }

/* --- Filters (Horizontal) --- */
.filter-bar-card { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 15px; }
.filter-top { display: flex; flex-grow: 2; min-width: 200px; gap: 5px; }
.filter-top input { width: 100%; }
.filter-bottom { display: flex; flex-grow: 3; gap: 10px; align-items: center; }
.filter-bar-card input, .filter-bar-card select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; background: #f0f2f5; font-size: 0.95rem; height: 40px; box-sizing: border-box; }
#filter-cat, #filter-sort { min-width: 130px; flex-grow: 1; }
#filter-min-price, #filter-max-price { width: 80px; text-align: center; }
#market-apply-filters { background: #1877f2; color: #fff; border: none; padding: 0 20px; border-radius: 6px; cursor: pointer; font-weight: bold; height: 40px; white-space: nowrap; }
@media (max-width: 768px) { .filter-bar-card { flex-direction: column; align-items: stretch; } .filter-bottom { flex-wrap: wrap; } }

/* --- Products Grid --- */
.market-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.market-card-ajax { background: #fff; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.1); overflow: hidden; transition: transform 0.2s; }
.market-card-ajax:hover { transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.card-img { height: 180px; display: flex; align-items: center; justify-content: center; background: #fff; border-bottom: 1px solid #eee; }
.card-img img { max-height: 100%; max-width: 100%; object-fit: contain; }
.card-body { padding: 12px; text-align: center; }
.card-body h3 { font-size: 1rem; margin: 0 0 5px 0; color: #050505; }
.card-meta { color: #65676b; font-size: 0.9rem; margin-bottom: 10px; }
.card-btn { display: inline-block; width: 100%; background: #e4e6eb; color: #050505; padding: 8px 0; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.card-btn:hover { background: #d8dadf; }

/* --- Add to Cart Button States --- */
.market-add-to-cart-btn {
    cursor: pointer;
    border: none;
    transition: background 0.3s;
    background: #1877f2;
    color: #fff;
    width: 100%;
    padding: 8px 0;
    border-radius: 6px;
    font-weight: 600;
}
.market-add-to-cart-btn:hover { background: #166fe5; }

/* כפתור "צפה באפשרויות" למוצרים עם וריאציות */
.card-btn.btn-view {
    background: #e4e6eb;
    color: #050505;
}
.card-btn.btn-view:hover { background: #d8dadf; }

/* מצב טעינה */
.market-add-to-cart-btn.loading {
    background: #b0b3b8;
    cursor: not-allowed;
    opacity: 0.8;
}

/* מצב הצלחה */
.market-add-to-cart-btn.success {
    background: #42b72a; /* Green */
}

/* קישורים בתמונה ובכותרת - הסרת קו תחתון וצבע */
.card-img-link { display: block; text-decoration: none; color: inherit; }
.card-body h3 a { text-decoration: none; color: #050505; }
.card-body h3 a:hover { text-decoration: underline; }

/* --- Toast Notification --- */
.market-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.market-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* יישור האייקון בתוך הכפתור */
.market-add-to-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* רווח בין הטקסט לאייקון */
}

/* התאמת גודל ומיקום האייקון */
.market-add-to-cart-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px; 
    margin-top: 2px; /* תיקון מיקרו ליישור אנכי */
}
