/* Marketplace Styles - Consistent with site design */

/* Use site colors instead of marketplace-specific ones */
:root {
    --marketplace-primary: var(--primary);
    --marketplace-secondary: var(--secondary);
    --marketplace-light: var(--light);
    --marketplace-dark: var(--dark);
}

/* Custom Grid System for Listings */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 576px) {
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .listings-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .listings-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.listing-item {
    display: flex;
    flex-direction: column;
}

/* Filters Section */
.filters-card {
    background: var(--light);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.filters-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
    margin: 0;
}

.filter-group {
    flex: 1 1 150px;
    min-width: 150px;
}

.filter-group.search {
    flex: 2 1 250px;
    min-width: 250px;
}

.filter-group.button {
    flex: 0 0 auto;
    width: auto;
    min-width: auto;
}

/* Form Elements */
.form-label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 500;
    color: var(--dark);
    font-size: 0.875rem;
}

.form-select, .form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    background-color: white;
    color: var(--dark);
}

.form-select:focus, .form-control:focus {
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-rgb), 0.25);
}

.input-group {
    display: flex;
    width: 100%;
}

.input-group-text {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    background-color: var(--light);
    border: 1px solid var(--border);
    border-right: 0;
    border-radius: 0.25rem 0 0 0.25rem;
    color: var(--dark);
}

.input-group .form-control {
    border-left: 0;
    border-radius: 0 0.25rem 0.25rem 0;
}

/* Listing Cards */
.listing-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.listing-image {
    display: block;
    height: 200px;
    position: relative;
    background: var(--light);
    overflow: hidden;
    text-decoration: none;
}

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

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

.listing-image-placeholder {
    height: 200px;
    background-color: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grey);
    font-size: 3rem;
}

.listing-details {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.listing-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.listing-title a {
    color: var(--dark);
    text-decoration: none;
}

.listing-title a:hover {
    color: var(--primary);
}

.listing-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.listing-meta {
    margin-top: auto;
    font-size: 0.875rem;
}

/* View Page Layout */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-lg-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (max-width: 991px) {
    .col-lg-8, .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Card Components for View Page */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: white;
    background-clip: border-box;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    background-color: var(--light);
    border-bottom: 1px solid var(--border);
    border-top-left-radius: calc(0.25rem - 1px);
    border-top-right-radius: calc(0.25rem - 1px);
    font-weight: 600;
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    background-color: var(--light);
    border-top: 1px solid var(--border);
    border-bottom-right-radius: calc(0.25rem - 1px);
    border-bottom-left-radius: calc(0.25rem - 1px);
}

.sticky-top {
    position: sticky;
    top: 20px;
    z-index: 1020;
}

/* Image Gallery */
.img-fluid {
    max-width: 100%;
    height: auto;
}

.img-thumbnail {
    padding: 0.25rem;
    background-color: white;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
    max-width: 100%;
    height: auto;
}

.listing-main-image {
    max-height: 500px;
    width: 100%;
    object-fit: contain;
    background-color: var(--light);
    border-radius: 8px;
}

.listing-gallery-thumbnails {
    margin-bottom: 1.5rem;
}

.listing-gallery-thumbnails .gallery-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, border-color 0.2s ease;
    border: 2px solid transparent;
    border-radius: 4px;
    padding: 2px;
    background-color: var(--light);
}

.listing-gallery-thumbnails .gallery-thumbnail:hover {
    opacity: 1;
}

.listing-gallery-thumbnails .gallery-thumbnail.active {
    opacity: 1;
    border-color: var(--primary);
}

/* Status badges in hero */
.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 1rem;
}

.status-badge.sold {
    background-color: #dc3545;
    color: white;
}

.status-badge.unavailable {
    background-color: #6c757d;
    color: white;
}

/* Hero button styling */
.hero .btn-outline-light {
    margin-left: 1rem;
}

/* Admin controls */
.admin-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--light);
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary);
}

.status-form {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Error message styling */
.error-message {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #721c24;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

/* Utility classes needed for marketplace */
.d-flex { display: flex !important; }
.justify-content-end { justify-content: flex-end !important; }
.align-items-center { align-items: center !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.border-top { border-top: 1px solid var(--border) !important; }
.h-100 { height: 100% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }
.fw-bold { font-weight: 700 !important; }
.text-center { text-align: center !important; }
.text-muted { color: var(--grey) !important; }
.text-dark { color: var(--dark) !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.top-0 { top: 0 !important; }
.end-0 { right: 0 !important; }
.m-2 { margin: 0.5rem !important; }
.rounded { border-radius: 0.25rem !important; }
.d-inline { display: inline !important; }
.d-grid { display: grid !important; }
.small { font-size: 0.875em; }

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.bg-light { background-color: var(--light) !important; }
.bg-danger { background-color: #dc3545 !important; color: white; }
.bg-secondary { background-color: #6c757d !important; color: white; }

/* Button variants */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    color: white;
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: white;
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-light {
    color: white;
    border-color: white;
    background-color: transparent;
}

.btn-outline-light:hover {
    color: var(--primary);
    background-color: white;
    border-color: white;
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
    background-color: transparent;
}

.btn-outline-danger:hover {
    color: white;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    color: white;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Form controls */
.form-select-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

/* Alert styles */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Container for marketplace pages */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container { max-width: 540px; }
}

@media (min-width: 768px) {
    .container { max-width: 720px; }
}

@media (min-width: 992px) {
    .container { max-width: 960px; }
}

@media (min-width: 1200px) {
    .container { max-width: 1140px; }
}

/* Ensure breadcrumbs display properly */
.breadcrumb-nav {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 0;
    margin-bottom: 20px;
}

.breadcrumb {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.breadcrumb-item.active span {
    color: #495057;
    font-weight: 500;
}

.breadcrumb-separator {
    color: #6c757d;
    margin: 0 8px;
    user-select: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filters-form {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .filter-group,
    .filter-group.search,
    .filter-group.button {
        width: 100%;
        min-width: 100%;
        flex-basis: auto;
    }
    
    .listings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sticky-top {
        position: static;
    }
    
    .admin-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .breadcrumb-nav {
        padding: 8px 0;
        margin-bottom: 15px;
    }
    
    .breadcrumb {
        font-size: 0.85rem;
    }
    
    .breadcrumb-separator {
        margin: 0 6px;
    }
}

/* Form Layout - Replace Bootstrap Grid and Cards */
.listing-form {
    background: white;
    padding: 0;
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* Grid system for form */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-lg-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (max-width: 991px) {
    .col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
}

.g-3 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

.g-3 > * {
    padding-right: calc(var(--bs-gutter-x) * 0.5);
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    margin-top: var(--bs-gutter-y);
}

/* Form Cards */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: white;
    background-clip: border-box;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.card-header {
    padding: 1rem 1.25rem;
    margin-bottom: 0;
    background-color: var(--primary);
    color: white;
    border-bottom: 1px solid var(--border);
    border-top-left-radius: calc(0.5rem - 1px);
    border-top-right-radius: calc(0.5rem - 1px);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Form Elements */
.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-control, .form-select {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--dark);
    background-color: white;
    background-image: none;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus, .form-select:focus {
    color: var(--dark);
    background-color: white;
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(var(--primary-rgb), 0.25);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Form spacing */
.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.p-3 {
    padding: 1rem !important;
}

/* Background utilities */
.bg-light {
    background-color: var(--light) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.text-white {
    color: white !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--grey) !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-muted {
    color: var(--grey) !important;
}

.text-center {
    text-align: center !important;
}

.text-decoration-none {
    text-decoration: none !important;
}

/* Border utilities */
.border {
    border: 1px solid var(--border) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

.rounded {
    border-radius: 0.375rem !important;
}

/* Display utilities */
.d-flex {
    display: flex !important;
}

.d-grid {
    display: grid !important;
}

.d-none {
    display: none !important;
}

/* Flex utilities */
.align-items-center {
    align-items: center !important;
}

/* Font utilities */
.fs-4 {
    font-size: 1.5rem !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.small {
    font-size: 0.875em;
}

/* Image Upload Container */
.image-upload-container {
    border: 2px dashed var(--border);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.image-upload-container:hover {
    border-color: var(--primary);
    background-color: #f0f4f8;
}

.image-upload-container.border-primary {
    border-color: var(--primary);
}

.image-upload-container i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.image-upload-container p {
    margin: 0;
    color: var(--grey);
    font-size: 0.9rem;
}

.image-upload-container .mb-1 {
    margin-bottom: 0.25rem !important;
}

.image-upload-container .mb-2 {
    margin-bottom: 0.5rem !important;
}

/* Image Preview Container */
.image-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.image-preview {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.image-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-preview:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.image-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0.3rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview:hover .image-preview-overlay {
    opacity: 1;
}

.image-preview .primary-indicator {
    align-self: flex-start;
}

.image-preview .badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.image-preview .btn-danger {
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
    line-height: 1;
}

.image-preview.primary .primary-indicator {
    display: inline-block !important;
}

.image-preview.primary {
    border: 3px solid var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Form text */
.form-text {
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: var(--grey);
}

/* Info box */
.bg-light.p-3.mb-4.rounded.border {
    background-color: #e3f2fd !important;
    border-color: #2196f3 !important;
    border-left: 4px solid #2196f3 !important;
}

/* Button styling */
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
    border-radius: 0.5rem;
}

/* Icon spacing */
.me-1 {
    margin-right: 0.25rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

/* FontAwesome icon sizing */
.fa-2x {
    font-size: 2em;
}

/* Responsive form adjustments */
@media (max-width: 768px) {
    .image-upload-container {
        padding: 1.5rem;
    }
    
    .image-preview-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }
    
    .image-preview {
        width: 100px;
        height: 100px;
    }
}

/* Modern Product View Layout */
.product-section {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (max-width: 991px) {
    .product-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Product Gallery */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image-container {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    aspect-ratio: 1;
}

.main-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-image-container:hover .main-product-image {
    transform: scale(1.02);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.sold-overlay, .unavailable-overlay {
    background: #dc3545;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transform: rotate(-15deg);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.unavailable-overlay {
    background: #6c757d;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.thumbnail-gallery {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    background: white;
}

.thumbnail-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.thumbnail-item.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.3);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    background: var(--light);
    border-radius: 12px;
    color: var(--grey);
}

.no-image-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.product-header {
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--light);
}

.product-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.product-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Product Meta */
.product-meta {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 576px) {
    .meta-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.meta-item i {
    color: var(--primary);
    font-size: 1.1rem;
    margin-top: 0.2rem;
    width: 20px;
    text-align: center;
}

.meta-item div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-size: 0.85rem;
    color: var(--grey);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.meta-value {
    font-weight: 600;
    color: var(--dark);
}

/* Condition styling */
.condition-new {
    color: #28a745;
}

.condition-used_like_new {
    color: #17a2b8;
}

.condition-used_good {
    color: #ffc107;
}

.condition-used_fair {
    color: #fd7e14;
}

/* Product Specs */
.product-specs {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.product-specs h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light);
}

.specs-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light);
}

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

.spec-label {
    font-weight: 600;
    color: var(--grey);
}

.spec-value {
    font-weight: 700;
    color: var(--dark);
}

/* Seller Card */
.seller-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
}

.seller-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light);
}

.seller-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.seller-avatar {
    flex-shrink: 0;
}

.seller-avatar i {
    font-size: 3rem;
    color: var(--primary);
}

.seller-details {
    flex-grow: 1;
}

.seller-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.seller-since {
    font-size: 0.9rem;
    color: var(--grey);
    margin-bottom: 0.5rem;
}

.seller-phone {
    font-size: 0.9rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.seller-phone i {
    color: var(--primary);
}

.contact-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-contact {
    flex: 1;
    min-width: 150px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-phone {
    flex: 0 0 auto;
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-contact:hover, .btn-phone:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Description Section */
.description-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 3rem;
}

.description-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--light);
}

.description-content {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--dark);
}

.description-content p {
    margin-bottom: 1rem;
}

/* JavaScript function for image switching */
.js-image-switch {
    cursor: pointer;
}

/* Image Modal/Lightbox Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.image-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.2s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
}

.image-modal-close:hover {
    color: #ff6b6b;
    background: rgba(0, 0, 0, 0.7);
}

.modal-nav-arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10001;
}

.modal-nav-btn {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    pointer-events: all;
    margin: 0 20px;
}

.modal-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
    color: #4CAF50;
}

.modal-nav-btn:active {
    transform: scale(0.95);
}

.modal-image-counter {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10001;
}

.modal-actions {
    position: absolute;
    bottom: -50px;
    right: 0;
    z-index: 10001;
}

.modal-actions .btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-actions .btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    text-decoration: none;
}

/* Image zoom indicator */
.image-zoom-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.main-image-container:hover .image-zoom-indicator {
    opacity: 1;
}

.main-product-image {
    cursor: zoom-in;
}

.thumbnail-item img {
    cursor: zoom-in;
}

/* Mobile optimizations for modal */
@media (max-width: 768px) {
    .image-modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .modal-image {
        max-height: 85vh;
    }
    
    .image-modal-close {
        top: -40px;
        font-size: 2rem;
        width: 35px;
        height: 35px;
    }
    
    .modal-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        margin: 0 10px;
    }
    
    .modal-image-counter {
        bottom: -40px;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .modal-actions {
        bottom: -40px;
    }
    
    .modal-actions .btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .image-zoom-indicator {
        top: 10px;
        right: 10px;
        padding: 0.4rem;
        font-size: 0.9rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .image-zoom-indicator {
        opacity: 1;
    }
    
    .main-image-container:hover .image-zoom-indicator {
        opacity: 1;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .product-section {
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .product-title {
        font-size: 1.5rem;
    }
    
    .product-price {
        font-size: 1.8rem;
    }
    
    .contact-actions {
        flex-direction: column;
    }
    
    .btn-contact, .btn-phone {
        flex: 1;
        min-width: auto;
    }
    
    .thumbnail-gallery {
        justify-content: center;
    }
    
    .main-image-container {
        aspect-ratio: 4/3;
    }
}

/* Seller Profile Page Styles */
.seller-profile-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.seller-profile-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.seller-profile-card .seller-avatar {
    flex-shrink: 0;
}

.seller-profile-card .seller-avatar i {
    font-size: 4rem;
    color: var(--primary);
}

.seller-profile-card .seller-info h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.seller-profile-card .seller-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.seller-profile-card .meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--grey);
    font-size: 0.9rem;
}

.seller-profile-card .meta-item i {
    color: var(--primary);
    width: 16px;
}

.seller-stats {
    display: flex;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--grey);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

.seller-contact {
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Seller Profile Link in Product View */
.seller-profile-link {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.btn-seller-profile {
    width: 100%;
    padding: 0.75rem 1rem;
    font-weight: 600;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-seller-profile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* No listings message */
.no-listings-message {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.no-listings-message i {
    font-size: 4rem;
    color: var(--grey);
    margin-bottom: 1rem;
}

.no-listings-message h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.no-listings-message p {
    color: var(--grey);
    margin-bottom: 2rem;
}

/* Mobile responsive adjustments for seller profile */
@media (max-width: 768px) {
    .seller-profile-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .seller-stats {
        justify-content: center;
        gap: 1.5rem;
    }
    
    .seller-contact {
        flex-direction: column;
    }
    
    .seller-profile-card .seller-avatar i {
        font-size: 3rem;
    }
    
    .seller-profile-card .seller-info h2 {
        font-size: 1.5rem;
    }
}