/* Re-Find Marketplace Styles */

.refind-btn {
    display: inline-block;
    padding: 10px 18px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}
.refind-btn:hover { background: #333; color: #fff; }
.refind-btn-secondary { background: #ddd; color: #1a1a1a; }
.refind-btn-secondary:hover { background: #ccc; }

.refind-error { color: #c0392b; }
.refind-success { color: #27ae60; }

/* Forms */
.refind-form label { font-weight: 600; }
.refind-form input, .refind-form select, .refind-form textarea {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 4px;
    box-sizing: border-box;
}

/* Marketplace filters */
.refind-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    align-items: center;
}
.refind-filters input, .refind-filters select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Grid */
.refind-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.refind-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.refind-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.refind-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
    overflow: hidden;
}
.refind-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.refind-no-image, .refind-no-image-small {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #eee;
    color: #999;
    font-size: 13px;
}
.refind-no-image-small { aspect-ratio: 1/1; width: 60px; height: 60px; }
.refind-card-info { padding: 10px; }
.refind-card-info h3 { margin: 0 0 4px; font-size: 14px; }
.refind-card-price { font-weight: 700; margin: 0; }
.refind-sold .refind-card-image img { opacity: 0.4; }
.refind-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #1a1a1a;
    color: #fff;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 3px;
}

.refind-pagination { margin-top: 24px; text-align: center; }
.refind-pagination .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
    color: #1a1a1a;
}
.refind-pagination .page-numbers.current { background: #1a1a1a; color: #fff; }

/* Dashboard */
.refind-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}
.refind-dashboard-table th, .refind-dashboard-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: middle;
}
.refind-dash-thumb img, .refind-no-image-small { border-radius: 4px; }
.refind-status {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    text-transform: uppercase;
}
.refind-status-available { background: #e8f5e9; color: #27ae60; }
.refind-status-reserved { background: #fff8e1; color: #f39c12; }
.refind-status-sold { background: #fdecea; color: #c0392b; }

.refind-link {
    color: #1a1a1a;
    text-decoration: underline;
    font-size: 13px;
    margin-right: 8px;
}
.refind-link-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
}
.refind-link-danger { color: #c0392b; }

/* Single listing */
.refind-single-listing { margin-bottom: 24px; }
.refind-single-price { font-size: 28px; font-weight: 700; margin: 0; }
.refind-attributes { list-style: none; padding: 0; margin: 12px 0; }
.refind-attributes li { padding: 4px 0; border-bottom: 1px solid #f0f0f0; }
.refind-seller { color: #666; font-size: 14px; }
.refind-single-action { margin-top: 20px; }
.refind-badge-large {
    display: inline-block;
    background: #1a1a1a;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 700;
}

/* Auth pages */
.refind-auth-wrap { max-width: 420px; margin: 0 auto; }
.refind-auth-wrap h2 { margin-bottom: 20px; }

/* Dashboard tabs */
.refind-dash-header { margin-bottom: 16px; }
.refind-dash-tabs { display: flex; gap: 4px; border-bottom: 2px solid #eee; margin-bottom: 24px; }
.refind-tab {
    padding: 10px 18px;
    text-decoration: none;
    color: #666;
    border-radius: 4px 4px 0 0;
    font-size: 14px;
    position: relative;
}
.refind-tab:hover { color: #1a1a1a; }
.refind-tab-active { color: #1a1a1a; font-weight: 700; border-bottom: 2px solid #1a1a1a; margin-bottom: -2px; }

/* Unread badge */
.refind-unread-badge {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    padding: 1px 6px;
    margin-left: 4px;
    font-weight: 700;
}

/* Messaging */
.refind-contact-seller { margin-top: 32px; padding-top: 24px; border-top: 1px solid #eee; }
.refind-messages-wrap { display: flex; gap: 0; border: 1px solid #eee; border-radius: 6px; overflow: hidden; min-height: 400px; }

.refind-thread-list { width: 220px; min-width: 220px; border-right: 1px solid #eee; background: #fafafa; overflow-y: auto; }
.refind-thread-item {
    display: block;
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 13px;
    position: relative;
}
.refind-thread-item:hover { background: #f0f0f0; }
.refind-thread-active { background: #fff; font-weight: 700; }
.refind-thread-listing { display: block; color: #999; font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.refind-thread-panel { flex: 1; display: flex; flex-direction: column; padding: 16px; }
.refind-thread-header { margin-bottom: 12px; font-weight: 700; }
.refind-thread-header a { color: #1a1a1a; }

.refind-thread-messages { flex: 1; overflow-y: auto; margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.refind-msg-bubble { max-width: 75%; padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.refind-msg-bubble small { display: block; font-size: 11px; color: #999; margin-top: 4px; }
.refind-msg-bubble p { margin: 0; }
.refind-msg-mine { background: #1a1a1a; color: #fff; align-self: flex-end; border-bottom-right-radius: 3px; }
.refind-msg-mine small { color: #aaa; }
.refind-msg-theirs { background: #f0f0f0; color: #1a1a1a; align-self: flex-start; border-bottom-left-radius: 3px; }

.refind-reply-form textarea { padding: 8px; border: 1px solid #ccc; border-radius: 4px; resize: vertical; }

/* Price breakdown */
.refind-price-breakdown { background: #f9f9f9; border: 1px solid #eee; border-radius: 6px; padding: 12px 16px; margin: 12px 0; }
.refind-price-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.refind-price-row:not(:last-child) { border-bottom: 1px solid #eee; }
.refind-price-total { font-weight: 700; font-size: 16px; padding-top: 8px; }

/* Modal */
.refind-modal {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
}
.refind-modal-box {
    background: #fff; border-radius: 8px; padding: 28px;
    width: 90%; max-width: 520px; max-height: 90vh;
    overflow-y: auto; position: relative;
}
.refind-modal-close {
    position: absolute; top: 12px; right: 16px;
    background: none; border: none; font-size: 22px;
    cursor: pointer; color: #666; line-height: 1;
}
.refind-modal-box h3 { margin: 0 0 20px; }

/* Delivery options */
.refind-delivery-options { display: flex; gap: 12px; margin-bottom: 20px; }
.refind-delivery-option {
    flex: 1; border: 2px solid #eee; border-radius: 6px;
    padding: 12px; cursor: pointer; text-align: center; font-size: 14px;
}
.refind-delivery-option input { margin-right: 6px; }
.refind-delivery-fields { margin-bottom: 16px; }
.refind-delivery-fields input { padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }

/* Paketomat list */
#refind-paketomat-list { max-height: 220px; overflow-y: auto; border: 1px solid #eee; border-radius: 4px; margin-top: 8px; }
.refind-shop-item { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; cursor: pointer; font-size: 13px; }
.refind-shop-item:hover { background: #f5f5f5; }
.refind-shop-selected { background: #e8f5e9; }
#refind-selected-shop { margin-top: 8px; font-size: 13px; }

/* Search bar */
.refind-search-bar { display:flex; gap:8px; }
.refind-search-input { flex:1; padding:10px 14px; border:2px solid #1a1a1a; border-radius:4px; font-size:15px; }
.refind-search-btn { padding:10px 20px; background:#1a1a1a; color:#fff; border:none; border-radius:4px; cursor:pointer; font-size:15px; }
.refind-search-btn:hover { background:#333; }

/* Card wrap + heart */
.refind-card-wrap { position:relative; }
.refind-heart-btn {
    position:absolute; top:8px; right:8px; z-index:2;
    background:rgba(255,255,255,0.9); border:none; border-radius:50%;
    width:32px; height:32px; font-size:18px; line-height:32px; text-align:center;
    cursor:pointer; color:#999; transition:color 0.2s, transform 0.15s;
    text-decoration:none; display:block;
}
.refind-heart-btn:hover { transform:scale(1.15); color:#e74c3c; }
.refind-hearted { color:#e74c3c !important; }

/* Seller profile */
.refind-profile { max-width:900px; }
.refind-profile-header { display:flex; gap:20px; align-items:flex-start; margin-bottom:32px; padding-bottom:24px; border-bottom:1px solid #eee; }
.refind-profile-avatar img { border-radius:50%; }
.refind-profile-info h2 { margin:0 0 8px; }
.refind-profile-meta { color:#666; font-size:14px; }
.refind-stars { color:#f39c12; letter-spacing:2px; }

/* Reviews */
.refind-reviews { display:flex; flex-direction:column; gap:16px; margin-top:12px; }
.refind-review-item { border:1px solid #eee; border-radius:6px; padding:16px; }
.refind-review-header { display:flex; align-items:center; gap:10px; margin-bottom:8px; }
.refind-review-header img { border-radius:50%; }
.refind-review-comment { margin:8px 0; }
.refind-review-listing { color:#999; margin:0; }
.refind-review-done { background:#f9f9f9; padding:10px; border-radius:4px; }

/* Star picker */
.refind-star-picker { display:flex; flex-direction:row-reverse; justify-content:flex-end; gap:4px; margin-bottom:12px; }
.refind-star-picker input { display:none; }
.refind-star-picker label { font-size:28px; color:#ddd; cursor:pointer; }
.refind-star-picker input:checked ~ label,
.refind-star-picker label:hover,
.refind-star-picker label:hover ~ label { color:#f39c12; }

/* Wallet */
.refind-wallet { max-width:600px; }
.refind-wallet-balance { background:#1a1a1a; color:#fff; border-radius:8px; padding:24px; margin-bottom:24px; display:flex; justify-content:space-between; align-items:center; }
.refind-wallet-label { font-size:14px; opacity:0.8; }
.refind-wallet-amount { font-size:32px; font-weight:700; }
.refind-wallet-tab-balance { font-size:12px; background:#eee; padding:2px 6px; border-radius:3px; margin-left:4px; }
.refind-wallet-note { color:#999; font-size:13px; }
.refind-credit { color:#27ae60; font-weight:600; }
.refind-debit  { color:#e74c3c; font-weight:600; }
.refind-withdraw-form { background:#f9f9f9; border-radius:6px; padding:20px; margin-bottom:24px; }

/* Order cards in purchases tab */
.refind-order-card { border:1px solid #eee; border-radius:6px; padding:16px; margin-bottom:16px; }
.refind-order-top { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:12px; }
.refind-tracking { font-size:13px; color:#666; margin:8px 0; }
.refind-tracking a { margin-left:8px; }
.refind-review-section { margin-top:16px; padding-top:16px; border-top:1px solid #f0f0f0; }
.refind-review-section h4 { margin:0 0 12px; }
