/**
 * Frontend Styles
 */

.scp-marketplace-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Listings grid: wrapper is the grid container for multiple columns */
.scp-marketplace-listings-grid,
.scp-marketplace-listing-grid {
    margin: 20px 0;
}

.scp-marketplace-listings-grid > .scp-marketplace-listings-wrapper,
.scp-marketplace-listings-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

@media (min-width: 769px) and (max-width: 1023px) {
    .scp-marketplace-listings-grid > .scp-marketplace-listings-wrapper,
    .scp-marketplace-listings-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .scp-marketplace-listings-grid > .scp-marketplace-listings-wrapper,
    .scp-marketplace-listings-wrapper {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .scp-marketplace-listings-grid > .scp-marketplace-listings-wrapper,
    .scp-marketplace-listings-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

.scp-marketplace-listing-item,
.scp-marketplace-listing-card {
    background: var(--scp-card-background, #ffffff);
    overflow: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    color: var(--scp-text, #111827);
}

/* Dark mode for marketplace listings */
body.scp-dark-mode-active .scp-marketplace-listing-item,
body.scp-dark-mode-active .scp-marketplace-listing-card,
html.scp-dark-mode-active .scp-marketplace-listing-item,
html.scp-dark-mode-active .scp-marketplace-listing-card,
body.dark-mode .scp-marketplace-listing-item,
body.dark-mode .scp-marketplace-listing-card,
html.dark-mode .scp-marketplace-listing-item,
html.dark-mode .scp-marketplace-listing-card {
    background: var(--scp-card-background, #18191a) !important;
    color: var(--scp-text, #ffffff) !important;
}

.scp-marketplace-listing-item:hover,
.scp-marketplace-listing-card:hover {
    transform: scale(1.02);
    opacity: 0.95;
    z-index: 10;
}

.scp-marketplace-listing-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f3f4f6;
}

.scp-marketplace-listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.scp-marketplace-listing-item:hover .scp-marketplace-listing-image img,
.scp-marketplace-listing-card:hover .scp-marketplace-listing-image img {
    transform: scale(1.05);
}

/* ========== QUICK WINS FEATURES STYLING ========== */

/* Comparison Button - no box/border, outline style */
.scp-compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 0;
    color: var(--scp-text, #111827);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s, color 0.2s;
    margin: 0 4px 0 0;
}

.scp-compare-btn:hover {
    background: transparent;
    color: var(--scp-accent, #22c55e);
    opacity: 0.9;
}

.scp-compare-btn.in-compare {
    background: transparent;
    color: var(--scp-accent, #22c55e);
}

.scp-compare-btn.max-reached:not(.in-compare) {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Comparison Page */
.scp-compare-page {
    padding: 20px;
    background: var(--scp-card-background, #ffffff);
    border-radius: 8px;
    margin: 20px 0;
}

.scp-compare-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--scp-border, #e5e7eb);
}

.scp-compare-table-wrapper {
    overflow-x: auto;
}

.scp-compare-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--scp-card-background, #ffffff);
}

.scp-compare-table th,
.scp-compare-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--scp-border, #e5e7eb);
}

.scp-compare-table .compare-listing {
    text-align: center;
    vertical-align: top;
    min-width: 200px;
    position: relative;
}

.scp-compare-table .compare-listing-image img {
    width: 100%;
    max-width: 150px;
    height: auto;
    border-radius: 6px;
    margin-bottom: 10px;
}

.scp-remove-compare {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

/* Wishlist Button */
.scp-wishlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--scp-card-background, #ffffff);
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 6px;
    color: var(--scp-text, #111827);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin: 4px;
}

.scp-wishlist-btn:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

.scp-wishlist-btn.in-wishlist {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* Recently Viewed - grid layout, light card background */
.scp-recently-viewed-section {
    margin: 20px 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.scp-recently-viewed-section.scp-recently-viewed-grid .scp-recently-viewed-list.scp-recently-viewed-grid-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.scp-recently-viewed-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: background 0.2s, border-color 0.2s;
}

.scp-recently-viewed-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.scp-recently-viewed-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

/* Price Alert Button */
.scp-price-alert-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--scp-card-background, #ffffff);
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 6px;
    color: var(--scp-text, #111827);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin: 4px;
}

.scp-price-alert-btn:hover {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #d97706;
}

.scp-price-alert-btn.has-alert {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #d97706;
}

/* Single Listing - Social Actions (Share, Save, Compare) */
/* Single listing: compact actions row, no borders/boxes, outline icons only */
.scp-listing-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 8px 0;
}
.scp-marketplace-listing-social-section {
    display: flex;
    align-items: center;
    gap: 2px;
}
.scp-marketplace-listing-compare-section {
    display: flex;
    align-items: center;
    gap: 2px;
}
.scp-listing-social-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}
.scp-listing-social-actions button,
.scp-marketplace-listing-compare-section .scp-compare-btn,
.scp-marketplace-listing-compare-section .scp-wishlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 13px;
    border-radius: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--scp-text, #374151);
    cursor: pointer;
    transition: opacity 0.2s, color 0.2s;
}
.scp-listing-social-actions button .like-icon,
.scp-listing-social-actions button .comment-icon,
.scp-listing-social-actions button .reaction-icon,
.scp-listing-social-actions button .share-icon,
.scp-listing-social-actions button .bookmark-icon,
.scp-compare-btn .compare-icon,
.scp-wishlist-btn .wishlist-icon {
    width: 16px;
    height: 16px;
    font-size: 16px;
    flex-shrink: 0;
}
.scp-listing-social-actions button:hover,
.scp-marketplace-listing-compare-section .scp-compare-btn:hover,
.scp-marketplace-listing-compare-section .scp-wishlist-btn:hover {
    background: transparent !important;
    border: none !important;
    opacity: 0.8;
}
.scp-view-compare-link {
    margin-left: 2px;
    font-size: 13px;
}

/* Social Share Dropdown */
.scp-social-share-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: var(--scp-card-background, #ffffff);
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    min-width: 180px;
    z-index: 1000;
}

.scp-social-share-dropdown a,
.scp-social-share-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    border: none;
    text-align: left;
    color: var(--scp-text, #111827);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.scp-social-share-dropdown a:hover,
.scp-social-share-dropdown button:hover {
    background: var(--scp-border, #e5e7eb);
}

/* Listing Tags */
.scp-listing-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.scp-listing-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}
.scp-listing-feature-item .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #22c55e;
}
.scp-listing-rooms-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}
.scp-listing-rooms-list li {
    padding: 6px 0;
    border-bottom: 1px solid #e5e7eb;
}
.scp-listing-rooms-list li:last-child {
    border-bottom: none;
}

.scp-listing-edit-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s;
}
.scp-listing-edit-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}

.scp-listing-tags-section {
    margin: 20px 0;
    padding: 15px;
    background: var(--scp-card-background, #ffffff);
    border-radius: 8px;
    border: 1px solid var(--scp-border, #e5e7eb);
}

.scp-listing-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.scp-listing-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--scp-background, #f9fafb);
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 20px;
    font-size: 13px;
    color: var(--scp-text, #111827);
}

.scp-listing-tag .scp-remove-tag {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--scp-secondary, #6b7280);
    color: #ffffff;
    border: none;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 0;
}

/* Vendor Follow Button */
.scp-vendor-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--scp-card-background, #ffffff);
    border: 2px solid var(--scp-accent, #22c55e);
    border-radius: 6px;
    color: var(--scp-accent, #22c55e);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.scp-vendor-follow-btn:hover {
    background: var(--scp-accent, #22c55e);
    color: #ffffff;
}

.scp-vendor-follow-btn.following {
    background: var(--scp-accent, #22c55e);
    color: #ffffff;
}

/* Verification Badge */
.scp-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.scp-verified-badge.badge-large {
    padding: 10px 18px;
    font-size: 15px;
}

/* Collections */
.scp-collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.scp-collection-item {
    padding: 20px;
    background: var(--scp-background, #f9fafb);
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 8px;
    transition: all 0.2s;
}

.scp-collection-item:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Dark Mode Support */
body.scp-dark-mode-active .scp-compare-btn,
body.scp-dark-mode-active .scp-wishlist-btn,
body.scp-dark-mode-active .scp-price-alert-btn,
body.scp-dark-mode-active .scp-vendor-follow-btn {
    background: var(--scp-card-background, #18191a);
    border-color: var(--scp-border, #3a3b3c);
    color: var(--scp-text, #ffffff);
}

body.scp-dark-mode-active .scp-compare-btn:hover,
body.scp-dark-mode-active .scp-wishlist-btn:hover,
body.scp-dark-mode-active .scp-price-alert-btn:hover {
    background: var(--scp-accent, #22c55e);
    color: #ffffff;
}

body.scp-dark-mode-active .scp-social-share-dropdown {
    background: var(--scp-card-background, #18191a);
    border-color: var(--scp-border, #3a3b3c);
}

body.scp-dark-mode-active .scp-social-share-dropdown a,
body.scp-dark-mode-active .scp-social-share-dropdown button {
    color: var(--scp-text, #ffffff);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .scp-compare-table-wrapper {
        overflow-x: scroll;
    }
    
    .scp-compare-table .compare-listing {
        min-width: 150px;
    }
    
    .scp-listing-social-actions {
        flex-direction: column;
    }
    
    .scp-listing-social-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .scp-collections-grid {
        grid-template-columns: 1fr;
    }
    
    .scp-social-share-dropdown {
        left: auto;
        right: 0;
    }
}

/* ========== ADVANCED SEARCH STYLES ========== */

/* Price Range Slider */
.scp-price-slider-container {
    margin: 20px 0;
}

.scp-price-slider-wrapper {
    position: relative;
    margin: 20px 0;
}

.scp-price-slider {
    position: relative;
    height: 6px;
    background: var(--scp-border, #e5e7eb);
    border-radius: 3px;
}

.scp-price-slider-track {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--scp-border, #e5e7eb);
    border-radius: 3px;
}

.scp-price-slider-range {
    position: absolute;
    height: 100%;
    background: var(--scp-accent, #22c55e);
    border-radius: 3px;
    z-index: 1;
}

.scp-price-slider-input {
    position: absolute;
    width: 100%;
    height: 6px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    z-index: 2;
    margin: 0;
    padding: 0;
}

.scp-price-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--scp-accent, #22c55e);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.scp-price-slider-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--scp-accent, #22c55e);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.scp-price-inputs {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.scp-price-input-group {
    flex: 1;
}

.scp-price-input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
    color: var(--scp-secondary, #6b7280);
    font-weight: 500;
}

.scp-price-input-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 6px;
    font-size: 14px;
}

.scp-price-display {
    text-align: center;
    margin-top: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--scp-text, #111827);
}

.scp-price-separator {
    margin: 0 10px;
    color: var(--scp-secondary, #6b7280);
}

/* Location Autocomplete */
.scp-location-filter-wrapper {
    position: relative;
}

.scp-location-autocomplete-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 6px;
    font-size: 14px;
}

.scp-location-autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--scp-card-background, #ffffff);
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 5px;
    display: none;
}

.scp-autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--scp-border, #e5e7eb);
    transition: background 0.2s;
}

.scp-autocomplete-item:hover {
    background: var(--scp-border, #e5e7eb);
}

.scp-autocomplete-item:last-child {
    border-bottom: none;
}

.scp-location-radius-wrapper {
    margin-top: 15px;
}

.scp-location-radius-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--scp-text, #111827);
}

.scp-location-radius-wrapper select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 6px;
    font-size: 14px;
}

/* Custom Fields Filters */
.scp-custom-fields-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.scp-custom-field-filter {
    padding: 15px;
    background: var(--scp-background, #f9fafb);
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 6px;
}

.scp-custom-field-filter label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--scp-text, #111827);
}

.scp-custom-field-filter select,
.scp-custom-field-filter input[type="text"],
.scp-custom-field-filter input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 6px;
    font-size: 14px;
}

.scp-checkbox-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.scp-checkbox-filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.scp-number-range-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.scp-number-range-filter input {
    flex: 1;
}

.scp-number-range-filter span {
    color: var(--scp-secondary, #6b7280);
}

/* Dark Mode */
body.scp-dark-mode-active .scp-price-slider-track,
body.scp-dark-mode-active .scp-price-slider {
    background: var(--scp-border, #3a3b3c);
}

body.scp-dark-mode-active .scp-location-autocomplete-results {
    background: var(--scp-card-background, #18191a);
    border-color: var(--scp-border, #3a3b3c);
}

body.scp-dark-mode-active .scp-autocomplete-item:hover {
    background: var(--scp-border, #3a3b3c);
}

body.scp-dark-mode-active .scp-custom-field-filter {
    background: var(--scp-card-background, #18191a);
    border-color: var(--scp-border, #3a3b3c);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .scp-price-inputs {
        flex-direction: column;
    }
    
    .scp-custom-fields-filters {
        grid-template-columns: 1fr;
    }
    
    .scp-number-range-filter {
        flex-direction: column;
        align-items: stretch;
    }
}

.scp-marketplace-featured-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--scp-primary-color, #1d4ed8);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.scp-marketplace-listing-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 8px;
}

.scp-marketplace-listing-content h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.scp-marketplace-listing-content h3 a {
    color: var(--scp-text-color, #1f2937);
    text-decoration: none;
    transition: color 0.2s ease;
}

.scp-marketplace-listing-content h3 a:hover {
    color: var(--scp-primary-color, #1d4ed8);
}

.scp-marketplace-listing-excerpt {
    font-size: 0.8rem;
    color: var(--scp-text-secondary, #6b7280);
    margin: 0;
    line-height: 1.4;
}

.scp-marketplace-listing-location {
    font-size: 0.75rem;
    color: var(--scp-text-secondary, #9ca3af);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.scp-marketplace-listing-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--scp-primary-color, #1d4ed8);
    margin: auto 0 0 0;
    padding-top: 8px;
    border-top: 1px solid var(--scp-border-color, #e5e7eb);
}

.scp-marketplace-listing-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--scp-text-secondary, #6b7280);
}

.scp-marketplace-rating-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.scp-marketplace-rating-stars .star {
    color: #ffc107;
    font-size: 16px;
}

.scp-marketplace-rating-stars .star.empty {
    color: #ddd;
}

/* 5-star rating used everywhere (single listing, cards, compare, reviews) */
.scp-rating-stars.scp-marketplace-rating-stars,
.scp-marketplace-listing-reviews .scp-marketplace-review-rating .scp-rating-stars,
.scp-marketplace-listing-reviews .scp-marketplace-review-rating .scp-marketplace-rating-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.scp-rating-stars .star,
.scp-marketplace-review-rating .star {
    color: #ffc107;
    font-size: 14px;
}
.scp-rating-stars .star.empty,
.scp-marketplace-review-rating .star.empty {
    color: #e5e7eb;
}

/* Sidebar: price only, no duplicate booking form */
.scp-sidebar-price-only .scp-marketplace-price-display {
    margin-bottom: 8px;
}
.scp-sidebar-booking-note {
    font-size: 12px;
    color: var(--scp-text-secondary, #6b7280);
    margin: 0 0 12px 0;
}

.scp-marketplace-booking-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.scp-marketplace-booking-form .form-group {
    margin-bottom: 15px;
}

.scp-marketplace-booking-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.scp-marketplace-booking-form {
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin: 20px 0;
}

.scp-marketplace-booking-form h3 {
    margin-top: 0;
    color: var(--scp-text, #111827);
}

.scp-marketplace-booking-form input,
.scp-marketplace-booking-form select,
.scp-marketplace-booking-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    color: #111827;
}

.scp-marketplace-booking-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--scp-text, #111827);
}

.scp-marketplace-booking-form .form-group {
    margin-bottom: 20px;
}

.scp-marketplace-booking-form button[type="submit"] {
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.scp-booking-addons-section {
    margin: 20px 0;
    padding: 15px;
    background: #f3f4f6;
    border-radius: 8px;
}

.scp-addons-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.scp-addon-item {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #ffffff;
    transition: all 0.2s;
}

.scp-addon-item:hover {
    border-color: var(--scp-accent, #22c55e);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.scp-addon-checkbox {
    display: flex;
    align-items: start;
    gap: 12px;
    cursor: pointer;
}

.scp-addon-checkbox input[type="checkbox"] {
    margin-top: 4px;
    cursor: pointer;
    width: auto;
}

.scp-addon-info {
    flex: 1;
}

.scp-addon-info strong {
    display: block;
    margin-bottom: 4px;
    color: var(--scp-text, #111827);
}

.scp-addon-info small {
    display: block;
    color: var(--scp-secondary, #6b7280);
    font-size: 12px;
    margin-bottom: 4px;
}

.scp-addon-price {
    color: var(--scp-accent, #22c55e);
    font-weight: 600;
    font-size: 14px;
}

.scp-addon-quantity {
    margin-top: 10px;
    padding-left: 28px;
}

.scp-addon-quantity input {
    width: 80px;
    padding: 6px;
    border: 1px solid var(--scp-border, #e5e7eb);
    border-radius: 4px;
}

.scp-room-capacity-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--scp-secondary, #6b7280);
    font-style: italic;
}

.scp-booking-total-preview {
    margin-top: 25px;
    padding: 20px;
    background: #f3f4f6;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.scp-booking-total-preview h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--scp-text, #111827);
}

.scp-booking-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scp-booking-line-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--scp-border, #e5e7eb);
}

.scp-booking-line-item:last-child {
    border-bottom: none;
    padding-top: 12px;
    border-top: 2px solid var(--scp-border, #e5e7eb);
}

.scp-booking-total {
    font-size: 18px;
}

.scp-total-price {
    color: var(--scp-accent, #22c55e);
}

.scp-marketplace-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.scp-marketplace-btn:hover {
    background: #005a87;
}

.scp-marketplace-btn-primary {
    background: #0073aa;
}

.scp-marketplace-btn-success {
    background: #46b450;
}

.scp-marketplace-btn-danger {
    background: #dc3232;
}

/* ========== MARKETPLACE DASHBOARD NAV (simplified, icons, mobile drawer) ========== */
.scp-marketplace-dashboard {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    margin: 0;
    position: relative;
}

/* Layout spans full grid so trigger/backdrop (hidden on desktop) don't leave empty column */
.scp-marketplace-dashboard .scp-settings-layout {
    grid-column: 1 / -1;
}

/* Mobile menu trigger – hidden on desktop, no empty box */
.scp-dashboard-nav-trigger {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 12px;
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    border: 1px solid var(--scp-border-color, #e5e7eb);
    border-radius: 10px;
    background: var(--scp-card-background, #fff);
    color: var(--scp-text, #111827);
    cursor: pointer;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.scp-dashboard-nav-trigger-icon {
    width: 22px;
    height: 18px;
    position: relative;
}
.scp-dashboard-nav-trigger-icon::before,
.scp-dashboard-nav-trigger-icon::after,
.scp-dashboard-nav-trigger-icon { background: currentColor; }
.scp-dashboard-nav-trigger-icon::before,
.scp-dashboard-nav-trigger-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 1px;
}
.scp-dashboard-nav-trigger-icon::before { top: 0; }
.scp-dashboard-nav-trigger-icon::after { bottom: 0; }
.scp-dashboard-nav-trigger-icon { top: 50%; margin-top: -1px; }

/* Backdrop for mobile drawer */
.scp-dashboard-nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.scp-marketplace-dashboard.scp-dashboard-nav-open .scp-dashboard-nav-backdrop {
    opacity: 1;
    visibility: visible;
}

/* Nav items: icon + label, min tap size */
.scp-marketplace-dashboard-nav .scp-dashboard-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 14px;
    text-align: left;
    width: 100%;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--scp-text, #374151);
    font-weight: 500;
    font-size: 0.9375rem;
}
.scp-marketplace-dashboard-nav .scp-nav-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.scp-marketplace-dashboard-nav .scp-nav-icon svg {
    width: 20px;
    height: 20px;
}
.scp-marketplace-dashboard-nav .scp-dashboard-nav-item:hover {
    background: var(--scp-bg-hover, #f3f4f6);
    color: var(--scp-text, #111827);
    border-color: var(--scp-border-color, #e5e7eb);
}
.scp-marketplace-dashboard-nav .scp-dashboard-nav-item.is-active {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}
.scp-marketplace-dashboard-nav .scp-dashboard-nav-item.is-active .scp-nav-icon {
    color: #1d4ed8;
}

/* Primary nav group */
.scp-dashboard-nav-primary {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* More: flat grouped list (no accordion) */
.scp-dashboard-nav-group.scp-dashboard-more {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--scp-border-color, #e5e7eb);
}
.scp-dashboard-nav-group-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--scp-text-muted, #6b7280);
    margin-bottom: 8px;
    padding: 0 2px;
}
.scp-dashboard-nav-group-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.scp-dashboard-nav-group-items .scp-dashboard-nav-item {
    padding-left: 14px;
}

/* Drawer on desktop: normal sidebar */
.scp-dashboard-nav-drawer {
    display: flex;
    flex-direction: column;
    min-width: 260px;
    max-width: 280px;
}

.scp-marketplace-dashboard-sidebar {
    background: var(--scp-card-background, #ffffff);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--scp-border-color, #e5e7eb);
    position: relative;
    z-index: 100 !important;
    isolation: isolate;
}

.scp-marketplace-dashboard-sidebar * {
    box-sizing: border-box;
}

.scp-marketplace-dashboard-sidebar .scp-settings-nav,
.scp-marketplace-dashboard-sidebar .scp-marketplace-dashboard-nav {
    position: relative;
    z-index: 101 !important;
    pointer-events: auto !important;
}

.scp-marketplace-dashboard-sidebar button {
    pointer-events: auto !important;
    cursor: pointer !important;
}

body.scp-dark-mode-active .scp-marketplace-dashboard-sidebar,
html.scp-dark-mode-active .scp-marketplace-dashboard-sidebar,
body.dark-mode .scp-marketplace-dashboard-sidebar,
html.dark-mode .scp-marketplace-dashboard-sidebar {
    background: var(--scp-card-background, #18191a);
    border-color: var(--scp-border-color, #3a3b3c);
}

body.scp-dark-mode-active .scp-dashboard-nav-group-label,
html.scp-dark-mode-active .scp-dashboard-nav-group-label,
body.dark-mode .scp-dashboard-nav-group-label,
html.dark-mode .scp-dashboard-nav-group-label {
    color: var(--scp-text-muted, #9ca3af);
}

.scp-marketplace-dashboard-content {
    background: var(--scp-card-background, #ffffff);
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--scp-border-color, #e5e7eb);
}

body.scp-dark-mode-active .scp-marketplace-dashboard-content,
html.scp-dark-mode-active .scp-marketplace-dashboard-content,
body.dark-mode .scp-marketplace-dashboard-content,
html.dark-mode .scp-marketplace-dashboard-content {
    background: var(--scp-card-background, #18191a);
    border-color: var(--scp-border-color, #3a3b3c);
}

.scp-marketplace-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 30px 0;
    width: 100%;
    align-items: stretch;
}

/* Default: 2 columns on small screens (mobile landscape and up) */
@media (min-width: 480px) {
    .scp-marketplace-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* 3 columns on tablets */
@media (min-width: 768px) {
    .scp-marketplace-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* 4 columns on desktop */
@media (min-width: 1024px) {
    .scp-marketplace-stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
}

/* 5+ columns on very wide screens */
@media (min-width: 1600px) {
    .scp-marketplace-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 24px;
    }
}

.scp-marketplace-stat-card {
    background: var(--scp-card-background, #ffffff);
    padding: 28px 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--scp-border-color, #e5e7eb);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 140px;
    width: 100%;
}

.scp-marketplace-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.scp-marketplace-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body.scp-dark-mode-active .scp-marketplace-stat-card,
html.scp-dark-mode-active .scp-marketplace-stat-card,
body.dark-mode .scp-marketplace-stat-card,
html.dark-mode .scp-marketplace-stat-card {
    background: var(--scp-card-background, #18191a);
    border-color: var(--scp-border-color, #3a3b3c);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.scp-marketplace-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 10px 0;
    line-height: 1;
}

body.scp-dark-mode-active .scp-marketplace-stat-value,
html.scp-dark-mode-active .scp-marketplace-stat-value,
body.dark-mode .scp-marketplace-stat-value,
html.dark-mode .scp-marketplace-stat-value {
    background: linear-gradient(135deg, #a78bfa 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.scp-marketplace-stat-label {
    color: var(--scp-text-secondary, #6b7280);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.scp-marketplace-search-form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.scp-marketplace-search-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.scp-marketplace-map-container {
    width: 100%;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
}

.scp-marketplace-messages {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.scp-marketplace-messages-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
}

.scp-marketplace-message {
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    background: #f9f9f9;
}

.scp-marketplace-message.sent {
    background: #e3f2fd;
    margin-left: 20%;
}

.scp-marketplace-message.received {
    background: #f5f5f5;
    margin-right: 20%;
}

.scp-marketplace-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin: 20px 0;
}

.scp-marketplace-calendar-day {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.scp-marketplace-calendar-day.available {
    background: #e8f5e9;
}

.scp-marketplace-calendar-day.unavailable {
    background: #ffebee;
    cursor: not-allowed;
}

.scp-marketplace-calendar-day.selected {
    background: #0073aa;
    color: #fff;
}

.scp-marketplace-time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.scp-marketplace-time-slot {
    padding: 10px;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.scp-marketplace-time-slot.available {
    background: #e8f5e9;
}

.scp-marketplace-time-slot.available:hover {
    background: #c8e6c9;
    border-color: #0073aa;
}

.scp-marketplace-time-slot.booked {
    background: #ffebee;
    cursor: not-allowed;
    opacity: 0.5;
}

.scp-marketplace-time-slot.selected {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Dark Mode */
body.scp-marketplace-dark-mode {
    background: #1a1a1a;
    color: #e0e0e0;
}

body.scp-marketplace-dark-mode .scp-marketplace-listing-card {
    background: #2a2a2a;
    border-color: #3a3a3a;
}

body.scp-marketplace-dark-mode .scp-marketplace-dashboard-content,
/* Payment Options Styles */
.scp-marketplace-payment-options {
    margin-top: 20px;
    padding: 20px;
    background: var(--scp-card-background, #f9fafb);
    border-radius: 12px;
    border: 1px solid var(--scp-border-color, #e5e7eb);
}

.scp-marketplace-payment-options h4 {
    margin: 0 0 15px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--scp-text, #111827);
}

.scp-payment-methods-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.scp-payment-method-item {
    padding: 15px;
    background: var(--scp-card-background, #ffffff);
    border-radius: 8px;
    border: 1px solid var(--scp-border-color, #e5e7eb);
}

.scp-payment-method-item strong {
    display: block;
    margin-bottom: 8px;
    color: var(--scp-text, #111827);
    font-size: 0.95rem;
}

.scp-payment-method-item p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: var(--scp-text-secondary, #6b7280);
}

.scp-upi-id {
    font-family: monospace;
    background: #f3f4f6;
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-block;
    font-weight: 600;
    color: var(--scp-primary-color, #667eea);
}

.scp-copy-upi {
    margin-top: 8px;
    font-size: 0.85rem;
    padding: 6px 12px;
}

.scp-qr-code-display {
    margin: 10px 0;
    text-align: center;
}

.scp-qr-code-display img {
    border-radius: 8px;
}

.scp-stat-clickable {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.scp-stat-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.scp-marketplace-dark-mode .scp-marketplace-stat-card {
    background: #2a2a2a;
}

/* Marketplace Dashboard Sections - Proper Hiding */
.scp-settings-section[aria-hidden="true"] {
    display: none !important;
}

.scp-settings-section[aria-hidden="false"],
.scp-settings-section.is-active {
    display: block;
}

/* Modal Enhancements */
.scp-content-modal {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.scp-content-modal.active .scp-modal-content {
    filter: none !important;
    -webkit-filter: none !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
    z-index: 100003 !important;
}

.scp-modal-content {
    background: var(--scp-card-background, #ffffff);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--scp-border-color, #e5e7eb);
    position: relative;
    z-index: 100003;
    pointer-events: auto;
}

body.scp-dark-mode-active .scp-modal-content,
html.scp-dark-mode-active .scp-modal-content,
body.dark-mode .scp-modal-content,
html.dark-mode .scp-modal-content {
    background: var(--scp-card-background, #18191a);
    border-color: var(--scp-border-color, #3a3b3c);
}

.scp-modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--scp-border-color, #e5e7eb);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.scp-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--scp-text, #111827);
}

.scp-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--scp-text-secondary, #6b7280);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scp-modal-close:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.scp-modal-body {
    padding: 28px;
}

/* Mobile: drawer + trigger */
@media (max-width: 900px) {
    .scp-marketplace-dashboard {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .scp-dashboard-nav-trigger {
        display: flex;
        order: -1;
    }
    .scp-dashboard-nav-backdrop {
        display: block;
    }
    .scp-dashboard-nav-drawer {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 9999;
        width: min(320px, 85vw);
        max-width: 320px;
        background: var(--scp-card-background, #fff);
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        padding: 20px 16px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        border-radius: 0;
    }
    .scp-marketplace-dashboard.scp-dashboard-nav-open .scp-dashboard-nav-drawer {
        transform: translateX(0);
    }
    .scp-dashboard-nav-drawer {
        flex-direction: column !important;
    }
    .scp-dashboard-nav-drawer .scp-dashboard-nav-item {
        flex: none !important;
        width: 100% !important;
        text-align: left !important;
    }
    .scp-settings-layout {
        flex-direction: column;
    }
    .scp-settings-panels {
        order: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .scp-marketplace-dashboard-sidebar {
        order: 2;
    }
    
    .scp-marketplace-dashboard-content {
        padding: 24px 20px;
    }
    
    .scp-marketplace-listing-grid {
        grid-template-columns: 1fr;
    }
    
    /* Keep stats horizontal on tablets - 2 columns */
    .scp-marketplace-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .scp-modal-content {
        border-radius: 0;
        margin: 0;
        min-height: 100vh;
    }
    
    .scp-modal-header {
        padding: 20px;
    }
    
    .scp-modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    /* Single column only on very small screens */
    .scp-marketplace-stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .scp-marketplace-stat-value {
        font-size: 2rem;
    }
    
    .scp-modal-header h2 {
        font-size: 1.25rem;
    }
}

/* ========== LISTING TYPE BADGES AND STYLES ========== */
.scp-listing-type-badge,
.scp-listing-category-badge,
.scp-listing-sub-category-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 10px;
    vertical-align: middle;
    color: #fff;
}

/* Badges as links: no underline, clickable */
.scp-listing-badges a.scp-listing-type-badge,
.scp-listing-badges a.scp-listing-category-badge,
.scp-listing-badges a.scp-listing-sub-category-badge {
    text-decoration: none !important;
    cursor: pointer;
    color: inherit;
}

.scp-listing-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.scp-listing-header .scp-listing-badges {
    margin-left: 0;
    margin-top: 10px;
}

.scp-listing-header .scp-listing-type-badge,
.scp-listing-header .scp-listing-category-badge,
.scp-listing-header .scp-listing-sub-category-badge {
    margin-left: 0;
    margin-top: 0;
}

/* Category badge colors */
.scp-category-service {
    /* No color for service category */
}

.scp-category-rent {
    /* No color for rent category */
}

.scp-category-event {
    /* No color for event category */
}

.scp-category-ad {
    /* No color for ad category */
}

.scp-category-product {
    /* No color for product category */
}

/* Sub-category badge (lighter, smaller) */
.scp-listing-sub-category-badge {
    background-color: rgba(0, 0, 0, 0.1) !important;
    color: #333;
    font-size: 10px;
    padding: 3px 8px;
}

/* Type-specific badge colors */
.scp-type-product {
    background: #e8f4f8;
    color: #0066cc;
}

.scp-type-service {
    background: #fff4e6;
    color: #cc6600;
}

.scp-type-hotel {
    background: #e8f0ff;
    color: #0066ff;
}

.scp-type-homestay {
    background: #f0f8e8;
    color: #00aa00;
}

.scp-type-lodge {
    background: #f0e8f0;
    color: #9900cc;
}

.scp-type-rental {
    background: #ffe8f0;
    color: #cc0066;
}

.scp-type-accommodation {
    background: #f8f8e8;
    color: #aaaa00;
}

.scp-type-experience {
    background: #e8fff0;
    color: #00cc66;
}

.scp-type-digital {
    background: #ffe8ff;
    color: #cc00cc;
}

.scp-type-room {
    background: #e8e8f0;
    color: #6666cc;
}

/* Dark mode for type badges */
body.scp-dark-mode-active .scp-listing-type-badge,
html.scp-dark-mode-active .scp-listing-type-badge,
body.dark-mode .scp-listing-type-badge,
html.dark-mode .scp-listing-type-badge {
    opacity: 0.9;
}

body.scp-dark-mode-active .scp-type-product,
html.scp-dark-mode-active .scp-type-product,
body.dark-mode .scp-type-product,
html.dark-mode .scp-type-product {
    background: rgba(0, 102, 204, 0.2);
    color: #66b3ff;
}

body.scp-dark-mode-active .scp-type-service,
html.scp-dark-mode-active .scp-type-service,
body.dark-mode .scp-type-service,
html.dark-mode .scp-type-service {
    background: rgba(204, 102, 0, 0.2);
    color: #ffb366;
}

body.scp-dark-mode-active .scp-type-hotel,
html.scp-dark-mode-active .scp-type-hotel,
body.dark-mode .scp-type-hotel,
html.dark-mode .scp-type-hotel {
    background: rgba(0, 102, 255, 0.2);
    color: #66aaff;
}

body.scp-dark-mode-active .scp-type-homestay,
html.scp-dark-mode-active .scp-type-homestay,
body.dark-mode .scp-type-homestay,
html.dark-mode .scp-type-homestay {
    background: rgba(0, 170, 0, 0.2);
    color: #66ff66;
}

body.scp-dark-mode-active .scp-type-lodge,
html.scp-dark-mode-active .scp-type-lodge,
body.dark-mode .scp-type-lodge,
html.dark-mode .scp-type-lodge {
    background: rgba(153, 0, 204, 0.2);
    color: #cc66ff;
}

body.scp-dark-mode-active .scp-type-rental,
html.scp-dark-mode-active .scp-type-rental,
body.dark-mode .scp-type-rental,
html.dark-mode .scp-type-rental {
    background: rgba(204, 0, 102, 0.2);
    color: #ff66cc;
}

body.scp-dark-mode-active .scp-type-accommodation,
html.scp-dark-mode-active .scp-type-accommodation,
body.dark-mode .scp-type-accommodation,
html.dark-mode .scp-type-accommodation {
    background: rgba(170, 170, 0, 0.2);
    color: #ffff66;
}

body.scp-dark-mode-active .scp-type-experience,
html.scp-dark-mode-active .scp-type-experience,
body.dark-mode .scp-type-experience,
html.dark-mode .scp-type-experience {
    background: rgba(0, 204, 102, 0.2);
    color: #66ffcc;
}

body.scp-dark-mode-active .scp-type-digital,
html.scp-dark-mode-active .scp-type-digital,
body.dark-mode .scp-type-digital,
html.dark-mode .scp-type-digital {
    background: rgba(204, 0, 204, 0.2);
    color: #ff66ff;
}

body.scp-dark-mode-active .scp-type-room,
html.scp-dark-mode-active .scp-type-room,
body.dark-mode .scp-type-room,
html.dark-mode .scp-type-room {
    background: rgba(102, 102, 204, 0.2);
    color: #9999ff;
}

/* Listing cards with type-specific styling */
.scp-marketplace-listing-item[data-listing-type] .scp-listing-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    margin: 0;
}

/* Type-specific sections in single listings */
.scp-listing-type-section {
    margin: 30px 0;
    padding: 20px;
    background: var(--scp-card-background, #ffffff);
    border: 1px solid var(--scp-border-color, #e5e7eb);
    border-radius: 12px;
}

.scp-listing-type-section h3 {
    margin: 0 0 20px;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--scp-text, #111827);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--scp-border-color, #e5e7eb);
}

.scp-listing-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.scp-listing-detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.scp-detail-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--scp-text-secondary, #6b7280);
}

.scp-detail-value {
    font-size: 1rem;
    color: var(--scp-text, #111827);
}
.scp-detail-value .woocommerce-Price-amount,
.scp-detail-value .amount,
.scp-detail-value bdi {
    font-weight: 500;
}

.scp-listing-detail-empty {
    margin: 10px 0 0;
    color: var(--scp-text-secondary, #6b7280);
    font-style: normal;
}

/* Hotel-specific styles */
.scp-hotel-details,
.scp-service-details,
.scp-property-details {
    background: var(--scp-card-background, #ffffff);
    border: 1px solid var(--scp-border-color, #e5e7eb);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.scp-hotel-detail-item,
.scp-service-detail-item,
.scp-property-spec {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.scp-check-times {
    display: flex;
    gap: 20px;
    margin: 15px 0;
}

.scp-amenities-list,
.scp-days-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.scp-amenities-list li,
.scp-days-list li {
    padding: 8px 12px;
    background: var(--scp-background, #f9fafb);
    border-radius: 6px;
    border: 1px solid var(--scp-border-color, #e5e7eb);
}

.scp-property-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.scp-feature-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #e8f4f8;
    color: #0066cc;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 5px 5px 5px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .scp-listing-details-grid {
        grid-template-columns: 1fr;
    }
    
    .scp-property-specs {
        grid-template-columns: 1fr;
    }
    
    .scp-amenities-list,
    .scp-days-list {
        grid-template-columns: 1fr;
    }
    
    .scp-check-times {
        flex-direction: column;
        gap: 10px;
    }
}

/* ========== SINGLE LISTING PAGE (WooCommerce-style layout) ========== */
/* Single listing and archive - ensure light backgrounds */
.scp-single-listing-outer {
    padding: 24px 0 48px;
    background: #f9fafb;
}

.scp-marketplace-archive {
    background: #f9fafb;
    padding: 24px 20px 48px;
}

/* Archive / Browse Listings: layout and header */
.scp-marketplace-archive,
.scp-listings-archive-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 40px;
    background: var(--scp-page-background, #ffffff);
}
.scp-marketplace-archive .scp-archive-header,
.scp-listings-archive-wrapper .scp-archive-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--scp-border, #e5e7eb);
}
.scp-marketplace-archive .scp-archive-title,
.scp-listings-archive-wrapper .scp-archive-title {
    margin: 0 0 8px;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--scp-text, #111827);
    line-height: 1.3;
}
.scp-marketplace-archive .scp-archive-description,
.scp-listings-archive-wrapper .scp-archive-description {
    margin: 0;
    font-size: 0.95rem;
    color: var(--scp-text-secondary, #6b7280);
}
@media (max-width: 768px) {
    .scp-marketplace-archive,
    .scp-listings-archive-wrapper {
        padding: 16px 16px 32px;
    }
    .scp-marketplace-archive .scp-archive-title,
    .scp-listings-archive-wrapper .scp-archive-title {
        font-size: 1.5rem;
    }
}

/* Single listing page: container and background (override theme black) */
.scp-single-listing-outer.scp-container-wrapper,
.scp-container-wrapper.scp-single-listing-outer {
    background: #ffffff !important;
    min-height: 100vh;
}
.scp-marketplace-single-listing.scp-single-listing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Single listing: top row = left gallery, right summary (WooCommerce style) */
.scp-listing-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
    margin-bottom: 32px;
}

.scp-listing-gallery-column {
    min-width: 0;
}

.scp-listing-summary-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Gallery: main image + thumbnails below */
.scp-listing-gallery-woo {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.scp-listing-gallery-main {
    position: relative;
    aspect-ratio: 4/3;
    background: #f3f4f6;
    overflow: hidden;
}

.scp-listing-gallery-main-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.scp-listing-gallery-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}

.scp-listing-gallery-main-link:hover .scp-listing-gallery-main-img {
    opacity: 0.95;
}

.scp-listing-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #e5e7eb;
}

.scp-listing-gallery-thumb {
    width: 64px;
    height: 64px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color 0.2s, opacity 0.2s;
}

.scp-listing-gallery-thumb:hover {
    opacity: 0.9;
}

.scp-listing-gallery-thumb.active {
    border-color: #22c55e;
}

.scp-listing-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.scp-listing-gallery-placeholder .scp-listing-gallery-main {
    display: flex;
    align-items: center;
    justify-content: center;
}

.scp-listing-no-image {
    color: #9ca3af;
    font-size: 14px;
}

.scp-listing-summary-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
}

.scp-listing-summary-booking {
    margin-top: 8px;
}

/* Summary: single "Book now" CTA (full form is in sidebar) */
.scp-listing-summary-booking-cta .scp-book-now-cta {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: opacity 0.2s;
}
.scp-listing-summary-booking-cta .scp-book-now-cta:hover {
    opacity: 0.9;
}

/* Sidebar: one booking form only */
.scp-marketplace-booking-widget .scp-marketplace-booking-form-inline {
    margin-top: 16px;
}
.scp-marketplace-booking-widget .scp-marketplace-booking-form-inline .scp-marketplace-booking-form {
    max-width: 100%;
}
.scp-marketplace-booking-widget .scp-add-to-cart-btn {
    margin-top: 16px;
    width: 100%;
}

/* Rating stars: ensure visible (single listing + reviews) */
.scp-rating-stars-wrapper,
.scp-marketplace-rating .scp-rating-stars,
.scp-marketplace-review-rating .scp-rating-stars {
    display: inline-flex !important;
    align-items: center;
    gap: 2px;
}
.scp-rating-stars-wrapper .star,
.scp-marketplace-rating .star,
.scp-marketplace-review-rating .star {
    color: #f59e0b !important;
    font-size: 1rem !important;
    line-height: 1;
}
.scp-rating-stars-wrapper .star.empty,
.scp-marketplace-rating .star.empty,
.scp-marketplace-review-rating .star.empty {
    color: #e5e7eb !important;
}
.scp-marketplace-rating .scp-review-count {
    margin-left: 4px;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Single listing: alignment and layout */
.scp-marketplace-single-listing .scp-listing-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}
.scp-marketplace-single-listing .scp-listing-summary-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.scp-marketplace-single-listing .scp-listing-header {
    margin-bottom: 0;
}
.scp-marketplace-single-listing .scp-marketplace-listing-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}
@media (max-width: 1023px) {
    .scp-marketplace-single-listing .scp-listing-top-row {
        grid-template-columns: 1fr;
    }
}

/* Lightbox */
.scp-listing-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s;
}

.scp-listing-lightbox.scp-lightbox-open {
    display: flex;
    opacity: 1;
}

.scp-listing-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
    transition: background 0.2s;
}

.scp-listing-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.scp-listing-lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scp-listing-lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Legacy gallery class (keep for compatibility) */
.scp-marketplace-single-listing .scp-marketplace-listing-gallery {
    width: 100%;
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.scp-marketplace-single-listing .scp-marketplace-listing-gallery img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

/* Reviews section */
.scp-listing-reviews-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.scp-listing-reviews-title {
    margin: 0 0 16px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.scp-listing-reviews-empty {
    color: #6b7280;
    margin: 0 0 16px;
}

.scp-marketplace-listing-reviews .scp-marketplace-review-item {
    padding: 16px 0;
    border-bottom: 1px solid #e5e7eb;
}

.scp-marketplace-listing-reviews .scp-marketplace-review-item:last-child {
    border-bottom: none;
}

.scp-marketplace-single-listing .scp-marketplace-listing-content-wrapper.scp-single-listing-columns {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
    margin-top: 0;
}

.scp-marketplace-single-listing.scp-sidebar-left .scp-marketplace-listing-content-wrapper.scp-single-listing-columns {
    grid-template-columns: 360px 1fr;
}

.scp-marketplace-single-listing.scp-sidebar-left .scp-marketplace-listing-content-wrapper .scp-marketplace-listing-main {
    order: 2;
}

.scp-marketplace-single-listing.scp-sidebar-left .scp-marketplace-listing-content-wrapper .scp-marketplace-listing-sidebar {
    order: 1;
}

.scp-marketplace-single-listing .scp-marketplace-listing-main {
    min-width: 0;
}

.scp-marketplace-single-listing .scp-marketplace-listing-sidebar.scp-single-listing-sidebar {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.scp-marketplace-single-listing .scp-sidebar-card {
    background: var(--scp-card-background, #ffffff);
    border: 1px solid var(--scp-border-color, #e5e7eb);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.scp-marketplace-single-listing .scp-listing-widget-area.scp-listing-widget-sidebar {
    margin-bottom: 0;
}

.scp-marketplace-single-listing .scp-listing-widget-area .scp-listing-widget {
    margin-bottom: 20px;
}

.scp-marketplace-single-listing .scp-listing-widget-area .scp-listing-widget:last-child {
    margin-bottom: 0;
}

/* Ensure booking widget and form have light backgrounds (override theme vars) */
.scp-marketplace-booking-widget,
.scp-marketplace-booking-widget.scp-sidebar-card,
.scp-marketplace-single-listing .scp-marketplace-booking-widget {
    background: #ffffff;
}

.scp-marketplace-booking-widget input,
.scp-marketplace-booking-widget select,
.scp-marketplace-booking-widget textarea,
.scp-marketplace-booking-form input,
.scp-marketplace-booking-form select,
.scp-marketplace-booking-form textarea {
    background: #ffffff !important;
    color: #111827 !important;
    border-color: #e5e7eb;
}

.scp-marketplace-single-listing .scp-marketplace-booking-widget.scp-sidebar-card .scp-marketplace-price-display {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.scp-marketplace-single-listing .scp-marketplace-booking-widget .scp-marketplace-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--scp-text, #111827);
}

.scp-marketplace-single-listing .scp-marketplace-recently-viewed-sidebar.scp-sidebar-card {
    background: #ffffff;
}

.scp-marketplace-single-listing .scp-marketplace-recently-viewed-sidebar.scp-recently-viewed-grid .scp-recently-viewed-list,
.scp-marketplace-single-listing .scp-marketplace-recently-viewed-sidebar.scp-recently-viewed-grid .scp-recently-viewed-list.scp-recently-viewed-grid-inner {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.scp-marketplace-single-listing .scp-marketplace-recently-viewed-sidebar .scp-recently-viewed-item {
    background: #f9fafb;
    border: 1px solid var(--scp-border-color, #e5e7eb);
    border-radius: 8px;
}

.scp-marketplace-single-listing .scp-listing-header {
    margin-bottom: 16px;
}

.scp-marketplace-single-listing .scp-marketplace-listing-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px;
    color: var(--scp-text, #111827);
}

.scp-marketplace-single-listing .scp-marketplace-listing-description {
    margin: 24px 0;
    line-height: 1.65;
    color: var(--scp-text, #111827);
}

.scp-marketplace-single-listing .scp-marketplace-listing-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--scp-text-secondary, #6b7280);
}

.scp-marketplace-single-listing .scp-marketplace-listing-meta .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Single listing: top row responsive – stack gallery above summary */
@media (max-width: 1023px) {
    .scp-listing-top-row {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 24px;
    }
}

/* Single listing: mobile – stack sidebar below */
@media (max-width: 1023px) {
    .scp-marketplace-single-listing .scp-marketplace-listing-content-wrapper.scp-single-listing-columns {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    
    .scp-marketplace-single-listing.scp-sidebar-left .scp-marketplace-listing-content-wrapper.scp-single-listing-columns {
        grid-template-columns: 1fr;
    }
    
    .scp-marketplace-single-listing.scp-sidebar-left .scp-marketplace-listing-content-wrapper .scp-marketplace-listing-main,
    .scp-marketplace-single-listing.scp-sidebar-left .scp-marketplace-listing-content-wrapper .scp-marketplace-listing-sidebar {
        order: unset;
    }
    
    .scp-marketplace-single-listing .scp-marketplace-listing-sidebar.scp-single-listing-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .scp-marketplace-single-listing.scp-single-listing-container {
        padding: 0 16px;
    }
    
    .scp-marketplace-single-listing .scp-marketplace-listing-title {
        font-size: 1.5rem;
    }
    
.scp-marketplace-single-listing .scp-marketplace-recently-viewed-sidebar.scp-recently-viewed-grid .scp-recently-viewed-list,
.scp-marketplace-single-listing .scp-marketplace-recently-viewed-sidebar.scp-recently-viewed-grid .scp-recently-viewed-list.scp-recently-viewed-grid-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== PAGE LAYOUT & DESIGN (Single + Archive) ========== */

/* Single listing: full-width background, centered content */
.scp-single-listing-outer.scp-container-wrapper {
    padding: 32px 0 56px;
    background: #ffffff !important;
}
.scp-marketplace-single-listing.scp-single-listing-container {
    padding: 0 24px;
    max-width: 1200px;
    margin: 0 auto;
}
.scp-marketplace-single-listing .scp-listing-top-row {
    margin-bottom: 40px;
    gap: 40px;
}
.scp-marketplace-single-listing .scp-marketplace-listing-description {
    font-size: 1rem;
    line-height: 1.7;
    margin: 28px 0 32px;
    padding: 0;
    color: var(--scp-text, #111827);
}
.scp-marketplace-single-listing .scp-marketplace-listing-description p {
    margin: 0 0 1em;
}
.scp-marketplace-single-listing .scp-marketplace-listing-description p:last-child {
    margin-bottom: 0;
}

/* Single listing: section spacing and cards */
.scp-marketplace-single-listing .scp-marketplace-listing-attributes,
.scp-marketplace-single-listing .scp-marketplace-listing-map {
    margin: 24px 0;
}
.scp-marketplace-single-listing .scp-listing-type-section {
    margin: 28px 0;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.scp-marketplace-single-listing .scp-listing-type-section h3 {
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 1.2rem;
    font-weight: 600;
    color: #111827;
}

/* Single listing: actions row (Share, Save, Compare) – compact, outline only, no box/borders */
.scp-marketplace-single-listing .scp-listing-actions-row {
    margin: 24px 0 20px;
    padding: 16px 0;
    gap: 8px;
}
.scp-marketplace-single-listing .scp-marketplace-listing-social-section,
.scp-marketplace-single-listing .scp-marketplace-listing-compare-section {
    gap: 4px;
}
.scp-marketplace-single-listing .scp-listing-social-actions button,
.scp-marketplace-single-listing .scp-marketplace-listing-compare-section .scp-compare-btn,
.scp-marketplace-single-listing .scp-marketplace-listing-compare-section .scp-wishlist-btn {
    padding: 6px 10px;
    gap: 6px;
    font-size: 13px;
}

/* Single listing: sidebar card and booking note */
.scp-marketplace-single-listing .scp-marketplace-booking-widget.scp-sidebar-card {
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.scp-marketplace-single-listing .scp-sidebar-booking-note {
    margin: 12px 0 16px;
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.4;
}
.scp-marketplace-single-listing .scp-add-to-cart-btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
}

/* Archive / Browse Listings: layout and design */
.scp-marketplace-archive,
.scp-listings-archive-wrapper {
    background: #f8f9fa;
    padding: 32px 24px 48px;
    max-width: 1200px;
    margin: 0 auto;
}
.scp-marketplace-archive .scp-archive-header,
.scp-listings-archive-wrapper .scp-archive-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #e5e7eb;
}
.scp-marketplace-archive .scp-archive-title,
.scp-listings-archive-wrapper .scp-archive-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}
.scp-marketplace-archive .scp-archive-description,
.scp-listings-archive-wrapper .scp-archive-description {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}
.scp-marketplace-archive .scp-marketplace-listings-wrapper,
.scp-marketplace-archive .scp-marketplace-listing-grid,
.scp-listings-archive-wrapper .scp-marketplace-listings-wrapper {
    margin-top: 0;
}

@media (max-width: 768px) {
    .scp-single-listing-outer.scp-container-wrapper {
        padding: 20px 0 40px;
    }
    .scp-marketplace-single-listing.scp-single-listing-container {
        padding: 0 16px;
    }
    .scp-marketplace-archive,
    .scp-listings-archive-wrapper {
        padding: 20px 16px 32px;
    }
    .scp-marketplace-archive .scp-archive-title,
    .scp-listings-archive-wrapper .scp-archive-title {
        font-size: 1.5rem;
    }
}

/* ========== CRITICAL SINGLE LISTING PAGE DESIGN (override theme) ========== */
.scp-single-listing-page.scp-container-wrapper,
.scp-single-listing-page.scp-single-listing-outer {
    background: #ffffff !important;
    min-height: 100vh !important;
    padding: 24px 0 48px !important;
    box-sizing: border-box !important;
}
.scp-single-listing-page .scp-marketplace-single-listing.scp-single-listing-container {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    box-sizing: border-box !important;
}
.scp-single-listing-page .scp-listing-top-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 32px !important;
    align-items: start !important;
    margin-bottom: 32px !important;
}
.scp-single-listing-page .scp-listing-gallery-column {
    min-width: 0 !important;
}
.scp-single-listing-page .scp-listing-summary-column {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    min-width: 0 !important;
}
.scp-single-listing-page .scp-marketplace-listing-content-wrapper.scp-single-listing-columns {
    display: grid !important;
    grid-template-columns: 1fr 360px !important;
    gap: 32px !important;
    align-items: start !important;
}
.scp-single-listing-page .scp-marketplace-listing-main {
    min-width: 0 !important;
}
.scp-single-listing-page .scp-marketplace-listing-sidebar.scp-single-listing-sidebar {
    position: sticky !important;
    top: 24px !important;
}
.scp-single-listing-page .scp-marketplace-listing-title {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    margin: 0 0 12px !important;
    color: #111827 !important;
    line-height: 1.3 !important;
}
.scp-single-listing-page .scp-listing-summary-price {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
}
.scp-single-listing-page .scp-marketplace-booking-widget.scp-sidebar-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 24px !important;
}
@media (max-width: 1023px) {
    .scp-single-listing-page .scp-listing-top-row {
        grid-template-columns: 1fr !important;
    }
    .scp-single-listing-page .scp-marketplace-listing-content-wrapper.scp-single-listing-columns {
        grid-template-columns: 1fr !important;
    }
    .scp-single-listing-page .scp-marketplace-listing-sidebar.scp-single-listing-sidebar {
        position: static !important;
    }
}
@media (max-width: 768px) {
    .scp-single-listing-page .scp-marketplace-single-listing.scp-single-listing-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    .scp-single-listing-page .scp-marketplace-listing-title {
        font-size: 1.5rem !important;
    }
}

/* ========== BREADCRUMBS (Archive + Single Listing) ========== */
.scp-archive-breadcrumb,
.scp-listing-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 0;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--scp-text-secondary, #6b7280);
}
.scp-archive-breadcrumb a,
.scp-listing-breadcrumb a {
    color: var(--scp-text, #111827);
    text-decoration: none;
}
.scp-archive-breadcrumb a:hover,
.scp-listing-breadcrumb a:hover {
    text-decoration: underline;
}
.scp-archive-breadcrumb .scp-breadcrumb-sep,
.scp-listing-breadcrumb .scp-breadcrumb-sep {
    margin: 0 6px;
    color: #9ca3af;
    pointer-events: none;
}
.scp-archive-breadcrumb .scp-breadcrumb-current,
.scp-listing-breadcrumb .scp-breadcrumb-current {
    color: var(--scp-text, #111827);
    font-weight: 500;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.scp-marketplace-archive .scp-archive-breadcrumb {
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}
.scp-marketplace-single-listing .scp-listing-breadcrumb {
    margin-bottom: 12px;
}