/* LS Usato - Frontend Styles */

.ls-usato-dashboard {
    max-width: 960px;
    margin: 0 auto;
    font-family: inherit;
}

.ls-usato-nav {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ls-usato-nav a {
    padding: 10px 18px;
    text-decoration: none;
    color: #555;
    border-radius: 4px 4px 0 0;
    font-weight: 500;
    transition: background .2s;
}

.ls-usato-nav a:hover,
.ls-usato-nav a.active {
    background: #0073aa;
    color: #fff;
}

.ls-field {
    margin-bottom: 16px;
}

.ls-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.ls-field input,
.ls-field textarea,
.ls-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.ls-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ls-btn-primary {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
}

.ls-btn-primary:hover { background: #005a87; }

.ls-btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}

.ls-btn-sm {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 3px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    text-decoration: none;
    color: #333;
}

.ls-btn-danger { border-color: #e44; color: #e44; }
.ls-btn-danger:hover { background: #e44; color: #fff; }

.ls-usato-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.ls-usato-table th,
.ls-usato-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-size: 14px;
}

.ls-usato-table th { background: #f8f8f8; font-weight: 600; }

.ls-counter {
    background: #0073aa;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 13px;
}

.status-ok { color: #2e7d32; font-weight: 600; }
.status-pending { color: #e65100; }
.status-draft { color: #888; }

.ls-notice {
    background: #f0f7ff;
    border-left: 4px solid #0073aa;
    padding: 10px 14px;
    margin-bottom: 16px;
    border-radius: 0 4px 4px 0;
}

.ls-notice-error {
    background: #fff0f0;
    border-left-color: #e44;
}

.ls-usato-message .success { color: #2e7d32; font-weight: 600; }
.ls-usato-message .error { color: #c62828; font-weight: 600; }

/* Modal */
#ls-tracking-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ls-modal-inner {
    background: #fff;
    padding: 28px;
    border-radius: 8px;
    width: 460px;
    max-width: 95vw;
}

.ls-modal-inner h4 { margin-top: 0; font-size: 18px; }

/* Store page */
.ls-store-header {
    border-bottom: 2px solid #eee;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.ls-store-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.ls-product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.ls-product-card img { width: 100%; border-radius: 4px; }
.ls-product-card h4 { font-size: 14px; margin: 8px 0 4px; }
.ls-price { color: #0073aa; font-weight: 700; }

/* Register form */
.ls-usato-register {
    max-width: 520px;
    margin: 0 auto;
}

/* Warning */
.ls-warning { color: #e65100; }

@media (max-width: 600px) {
    .ls-field-row { grid-template-columns: 1fr; }
    .ls-usato-table { font-size: 12px; }
    .ls-usato-nav a { padding: 8px 12px; font-size: 13px; }
}

/* Favorites */
.ls-store-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.ls-favorite-btn {
    background: #fff;
    border: 2px solid #ddd;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all .2s;
}

.ls-favorite-btn:hover,
.ls-favorite-btn.active {
    border-color: #e44;
    color: #e44;
    background: #fff5f5;
}

.ls-store-meta { color: #888; font-size: 13px; margin: 4px 0 0; }
.ls-condition { font-size: 12px; color: #888; margin: 4px 0; }

/* Wallet */
.ls-wallet-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ls-wallet-card {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.ls-wallet-card-main { background: #e8f4fd; border-color: #0073aa; }
.ls-wallet-card-pending { background: #fff8e1; border-color: #f9a825; }

.ls-wallet-label { font-size: 13px; color: #666; margin-bottom: 8px; }
.ls-wallet-amount { font-size: 28px; font-weight: 700; color: #333; }
.ls-wallet-card-main .ls-wallet-amount { color: #0073aa; }
.ls-wallet-card-pending .ls-wallet-amount { color: #f57f17; }
.ls-wallet-card small { display: block; color: #888; font-size: 11px; margin-top: 6px; }

/* Reviews */
.ls-store-reviews { margin-top: 40px; border-top: 2px solid #eee; padding-top: 24px; }

.ls-rating-summary { font-size: 14px; margin-left: 8px; }
.ls-store-rating { margin-top: 4px; }

.ls-review-item {
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 0;
}

.ls-review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.ls-review-date { color: #aaa; font-size: 12px; margin-left: auto; }
.ls-review-comment { color: #444; margin: 0; font-size: 14px; }

.ls-review-form {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.ls-review-form h4 { margin-top: 0; }

.ls-star-picker { font-size: 28px; cursor: pointer; margin-bottom: 12px; }
.ls-star-pick { cursor: pointer; transition: transform .1s; }
.ls-star-pick:hover { transform: scale(1.2); }

#ls-review-comment {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 12px;
    box-sizing: border-box;
}

/* Section header */
.ls-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ls-section-header h3 { margin: 0; }

/* Settings info box */
.ls-settings-info {
    background: #f0f7ff;
    border-left: 4px solid #0073aa;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}
.ls-settings-info p { margin: 4px 0; font-size: 14px; }

/* Store meta row */
.ls-store-meta-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; color: #666; font-size: 13px; }
.ls-store-description { color: #555; margin: 8px 0 0; }

/* Product card */
.ls-product-card-body { padding: 10px 8px; }
.ls-btn-sm-full { display: block; text-align: center; margin-top: 8px; padding: 6px; }

/* Readonly input */
.ls-readonly { background: #f5f5f5 !important; color: #555; }

/* Form actions */
.ls-form-actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; }

/* Empty state */
.ls-empty-state { text-align: center; padding: 40px 20px; color: #888; }
.ls-empty-state .ls-btn-primary { display: inline-block; margin-top: 12px; }

/* Warning button */
.ls-btn-warning { border-color: #e65100 !important; color: #e65100 !important; }

/* Withdrawal box */
.ls-withdrawal-box {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}
.ls-withdrawal-box h4 { margin-top: 0; }
.ls-withdrawal-message { margin-top: 10px; }

/* Vendor name on product page */
.ls-product-vendor {
    margin: 8px 0 12px;
    font-size: 14px;
    color: #555;
}
.ls-product-vendor a { color: #0073aa; text-decoration: none; }
.ls-product-vendor a:hover { text-decoration: underline; }

/* Clothing section */
.ls-clothing-section {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.ls-clothing-section h4 { margin: 0 0 8px; font-size: 15px; }

/* Product details on single product page */
.ls-product-details {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 12px 0;
}
.ls-detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}
.ls-detail-row:last-child { border-bottom: none; }
.ls-detail-label { color: #666; min-width: 90px; font-weight: 600; }
.ls-detail-value { color: #333; }
.ls-size-badge {
    background: #0073aa;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
}

/* Nascondi messaggio cashback temporaneamente per prodotti usato - override via JS */

/* Shipping info on product page */
.ls-shipping-info {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 8px 0 12px;
    background: #f9f9f9;
}
.ls-shipping-info h5 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
}
.ls-shipping-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}
.ls-shipping-row:last-child { border-bottom: none; }
.ls-shipping-icon { font-size: 16px; min-width: 22px; }
.ls-shipping-label { flex: 1; color: #444; }
.ls-shipping-price { font-weight: 700; color: #0073aa; }
.ls-protection-row .ls-shipping-price { color: #2e7d32; }

/* Shipping choice radio buttons */
.ls-shipping-title-row { border-bottom: 1px solid #eee; padding-bottom: 8px; margin-bottom: 6px; }

.ls-shipping-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin: 4px 0;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all .15s;
    font-size: 14px;
    background: #fff;
    white-space: nowrap;
    overflow: hidden;
}
.ls-shipping-option:hover { border-color: #0073aa; background: #f0f7ff; }
.ls-shipping-option.ls-shipping-selected { border-color: #0073aa; background: #e8f4fd; }
.ls-shipping-option input[type=radio] { margin: 0; accent-color: #0073aa; flex-shrink: 0; }
.ls-shipping-text { flex: 1; display: inline; }
.ls-shipping-label { font-weight: 600; display: inline; margin-right: 6px; }
.ls-shipping-price { font-weight: 700; color: #0073aa; white-space: nowrap; }
.ls-protection-row { margin-top: 6px; border-top: 1px solid #eee; padding-top: 6px; }

/* ── MARKET GRID stile Vinted ─────────────────────────────────────── */
.ls-market-wrap { width: 100% !important; }

/* Filtri - riga orizzontale */
.ls-market-wrap .ls-market-filters {
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.06) !important;
}

.ls-market-wrap .ls-filter-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    align-items: flex-end !important;
}

.ls-market-wrap .ls-filter-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    flex: 1 1 120px !important;
    min-width: 100px !important;
    max-width: 200px !important;
}

.ls-market-wrap .ls-filter-group label {
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #888 !important;
    text-transform: uppercase !important;
    letter-spacing: .5px !important;
    margin: 0 !important;
    display: block !important;
}

.ls-market-wrap .ls-filter-group select {
    width: 100% !important;
    padding: 7px 10px !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    background: #fafafa !important;
    cursor: pointer !important;
    height: auto !important;
    line-height: normal !important;
    box-shadow: none !important;
    color: #333 !important;
}

.ls-market-wrap .ls-filter-group select:focus {
    border-color: #0073aa !important;
    outline: none !important;
    background: #fff !important;
    box-shadow: none !important;
}

.ls-market-wrap .ls-filter-reset {
    padding: 7px 14px !important;
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    color: #666 !important;
    white-space: nowrap !important;
    align-self: flex-end !important;
    height: auto !important;
    line-height: normal !important;
}

/* Header risultati */
.ls-market-wrap .ls-market-header { margin-bottom: 12px !important; }
.ls-market-wrap .ls-results-count { font-size: 13px !important; color: #888 !important; }

/* Griglia 4 colonne */
.ls-market-wrap .ls-market-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Card */
.ls-market-wrap .ls-product-card-market {
    background: #fff !important;
    border: 1px solid #e8e8e8 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    transition: box-shadow .2s, transform .2s !important;
    display: flex !important;
    flex-direction: column !important;
    width: auto !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ls-market-wrap .ls-product-card-market:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.12) !important;
    transform: translateY(-2px) !important;
}

.ls-market-wrap .ls-card-image-wrap {
    position: relative !important;
    display: block !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    background: #f5f5f5 !important;
    width: 100% !important;
}

.ls-market-wrap .ls-card-image-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform .3s !important;
    display: block !important;
}

.ls-market-wrap .ls-product-card-market:hover .ls-card-image-wrap img { transform: scale(1.04) !important; }

.ls-market-wrap .ls-card-no-image {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 40px !important;
    color: #ccc !important;
    min-height: 180px !important;
}

.ls-market-wrap .ls-card-condition-badge {
    position: absolute !important;
    top: 8px !important;
    left: 8px !important;
    background: rgba(0,0,0,.65) !important;
    color: #fff !important;
    font-size: 11px !important;
    padding: 3px 8px !important;
    border-radius: 12px !important;
}

.ls-market-wrap .ls-card-body {
    padding: 10px 12px 12px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.ls-market-wrap .ls-card-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.ls-market-wrap .ls-card-title a { color: #222 !important; text-decoration: none !important; }
.ls-market-wrap .ls-card-title a:hover { color: #0073aa !important; }

.ls-market-wrap .ls-card-desc {
    font-size: 12px !important;
    color: #666 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.ls-market-wrap .ls-read-more { color: #0073aa !important; font-size: 11px !important; text-decoration: none !important; }

.ls-market-wrap .ls-card-meta {
    display: flex !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

.ls-market-wrap .ls-card-size {
    background: #0073aa !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 2px 8px !important;
    border-radius: 10px !important;
}

.ls-market-wrap .ls-card-color {
    background: #f0f0f0 !important;
    color: #555 !important;
    font-size: 11px !important;
    padding: 2px 8px !important;
    border-radius: 10px !important;
}

.ls-market-wrap .ls-card-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: auto !important;
    padding-top: 8px !important;
    border-top: 1px solid #f0f0f0 !important;
}

.ls-market-wrap .ls-card-price {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #222 !important;
}

.ls-market-wrap .ls-card-vendor {
    font-size: 11px !important;
    color: #0073aa !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100px !important;
}

/* Load more */
.ls-market-wrap .ls-load-more-wrap { text-align: center !important; margin-top: 24px !important; }
.ls-market-wrap .ls-load-more {
    background: #0073aa !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 32px !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
}

/* Loading / no results */
.ls-market-wrap .ls-loading,
.ls-market-wrap .ls-no-results {
    grid-column: 1 / -1 !important;
    text-align: center !important;
    padding: 40px !important;
    color: #888 !important;
    font-size: 15px !important;
}

/* Mobile 2 colonne */
@media (max-width: 768px) {
    .ls-market-wrap .ls-market-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .ls-market-wrap .ls-filter-group { max-width: none !important; flex: 1 1 calc(50% - 5px) !important; }
    .ls-market-wrap .ls-card-body { padding: 8px 10px 10px !important; }
    .ls-market-wrap .ls-card-price { font-size: 14px !important; }
}

/* ── PAGINA ACQUISTA ORA ───────────────────────────────────── */
.ls-buy-now-product-btn {
    display: block;
    width: 100%;
    background: #0073aa;
    color: #fff !important;
    text-align: center;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    margin: 8px 0;
    transition: background .2s;
}
.ls-buy-now-product-btn:hover { background: #005a87; color: #fff !important; }

.ls-buy-now-page { max-width: 500px; margin: 0 auto; padding: 20px 0 40px; }
.ls-buy-now-page h2 { font-size: 22px; margin-bottom: 20px; }

.ls-buy-now-product-card {
    display: flex;
    gap: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}
.ls-buy-now-product-img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.ls-buy-now-product-details h3 { margin: 0 0 4px; font-size: 16px; }
.ls-buy-now-vendor { color: #888; font-size: 13px; margin: 4px 0; }
.ls-buy-now-price { font-size: 20px; font-weight: 700; color: #222; margin: 0; }

.ls-buy-now-shipping-choice { margin-bottom: 20px; }
.ls-buy-now-shipping-choice h4 { font-size: 15px; margin-bottom: 10px; }

.ls-buy-now-summary {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}
.ls-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}
.ls-summary-row:last-child { border-bottom: none; }
.ls-summary-total { font-weight: 700; font-size: 16px; margin-top: 4px; }

.ls-proceed-btn {
    display: block;
    width: 100%;
    background: #2e7d32;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.ls-proceed-btn:hover { background: #1b5e20; }
.ls-buy-now-note { font-size: 12px; color: #aaa; text-align: center; margin-top: 8px; }

/* ── FORM REGISTRAZIONE VENDITORE ────────────────────────────── */
.ls-usato-register { max-width: 560px; margin: 0 auto; padding: 20px 0; }
.ls-usato-register h2 { font-size: 24px; margin-bottom: 6px; }
.ls-usato-register > p { color: #666; margin-bottom: 24px; }

.ls-register-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}
.ls-register-section h4 { margin: 0 0 14px; font-size: 15px; color: #333; }
.ls-field-note { font-size: 12px; color: #888; margin: -8px 0 12px; }

.ls-field-row { display: flex; gap: 12px; }
.ls-field-row .ls-field { flex: 1; }

.ls-field { margin-bottom: 12px; }
.ls-field label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 4px; }
.ls-field input, .ls-field textarea, .ls-field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color .15s;
}
.ls-field input:focus, .ls-field textarea:focus { border-color: #0073aa; outline: none; }
.ls-field-check label { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; cursor: pointer; }
.ls-field-check input { width: auto; margin-top: 2px; }

.ls-btn-large { width: 100%; padding: 14px; font-size: 16px; margin-top: 8px; }

/* Image preview grid */
.ls-image-preview-grid { display:flex !important; flex-direction:row !important; flex-wrap:wrap !important; gap:8px !important; margin-bottom:10px !important; }
.ls-img-thumb { position:relative !important; width:90px !important; height:90px !important; flex-shrink:0 !important; }
.ls-img-thumb img { width:90px !important; height:90px !important; object-fit:cover !important; border-radius:6px !important; display:block !important; }
.ls-img-remove { position:absolute !important; top:-5px !important; right:-5px !important; background:#e44 !important; color:#fff !important; border:none !important; border-radius:50% !important; width:18px !important; height:18px !important; font-size:9px !important; cursor:pointer !important; display:flex !important; align-items:center !important; justify-content:center !important; padding:0 !important; line-height:1 !important; z-index:1 !important; }
