
/* ============================================
   SEARCH FORM
   ============================================ */

.search-form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 100%;
    margin-top: 1rem;
}

.search-form {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1rem;
    flex-grow: 1;
    min-width: 0;
    max-width: fit-content;
}

.search-form .search-field {
    flex: 1 1 0;
    min-width: 0;
}

.search-form .search-field select,
.search-form .search-field input {
    width: 100%;
    padding: 0.95rem;
    font-size: 1rem;
    border-radius: 6px;
    box-sizing: border-box;
}

.search-form-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.search-form-buttons .main-btn {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    border-radius: 6px;
    max-width: 180px;
    flex-shrink: 0;
    cursor: pointer;
}

.main-btn {
    background: #2563EB;
    color: #fff;
    border: none;
    padding: 16px 32px;
    border-radius: 5px;
    cursor: pointer;
    display: block;
    margin: 0 auto;
}

.create-listing {
    display: block;
    margin: 0 auto;
    background-color: #fff;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 9px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    max-width: fit-content;
}

.create-listing:hover {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}


/* ============================================
   PROFILE PAGE (COMPLETE REDESIGN)
   ============================================ */

.profile-page {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.profile-username {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2rem;
}

/* Stats Grid */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

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

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 600;
}

.text-success {
    color: #10b981;
}

.text-warning {
    color: #f59e0b;
}

.text-info {
    color: #3b82f6;
}

.text-primary {
    color: #2563EB;
}


/* Two Column Layout */
.profile-main {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Listings Section */
.listings-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
}

.listings-section h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.listing-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.listing-card:hover {
    background: #f3f4f6;
    border-color: #2563EB;
}

.listing-card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.listing-card-title a {
    color: #1f2937;
    text-decoration: none;
}

.listing-card-title a:hover {
    color: #2563EB;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.bg-success {
    background: #dcfce7;
    color: #166534;
}

.bg-warning {
    background: #fef3c7;
    color: #92400e;
}

.bg-info {
    background: #dbeafe;
    color: #1e40af;
}

.text-muted {
    color: #6b7280;
    font-size: 0.9rem;
}

.listing-meta {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0.5rem 0;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.quick-actions .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

.quick-actions form {
    display: inline-block;
    margin: 0;
}

.btn-outline {
    background: transparent;
    border: 2px solid #2563EB;
    color: #2563EB;
    margin-right: 0.5rem;
}

.btn-outline:hover {
    background: #2563EB;
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
    border-radius: 0.375rem;
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid #6b7280;
    color: #6b7280;
}

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

.btn-outline-success {
    background: transparent;
    border: 2px solid #10b981;
    color: #10b981;
}

.btn-outline-success:hover {
    background: #10b981;
    color: white;
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid #ef4444;
    color: #ef4444;
}

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

/* Notifications Section */
.notifications-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
}

.notifications-section h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.notification-item {
    background: #eff6ff;
    border-left: 4px solid #2563EB;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
}

.notification-item small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

.archive-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.archive-box p {
    margin-bottom: 0.75rem;
    color: #4b5563;
}

/* Settings Section */
.settings-section {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.settings-section h3 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 1rem;
}

.alert-info {
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-info .btn {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-5 {
    margin-top: 1.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .profile-main {
        grid-template-columns: 1fr;
    }

    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions {
        flex-direction: column;
    }

    .quick-actions .btn,
    .quick-actions form {
        width: 100%;
    }

    .quick-actions form button {
        width: 100%;
    }
}


/* ============================================
   LISTING GRID
   ============================================ */

.listing-section {
    margin: 40px 20px;
    padding: 0.5rem;
}

.listing-section h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: 20px;
}

.no-listing-tip{
    color:white;
}

.listing-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.listing-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.15);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
}

.listing-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.listing-item h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.listing-item p {
    font-size: 1rem;
    color: var(--text);
    margin: 5px 0;
    font-weight: bold;
}

.listing-item img {
    width: 100%;
    border-radius: 8px;
    margin: 12px 0;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.listing-item .listing-price {
    color: #1e40af;
    font-size: 20px;
    font-weight: bold;
}
/* ============================================
   LISTING DETAIL PAGE
   ============================================ */

.listing-detail {
    background: #fff;
    border: 3px solid #7cb5f9;
    border-radius: 16px;
    padding: 2rem;
    max-width: 1100px;
    margin: 2rem auto;
    box-shadow:
        0 0 0 1px rgba(124, 181, 249, 0.35),
        0 14px 36px rgba(124, 181, 249, 0.45);
    position: relative;
}

.product-container {
    display: flex;
    gap: 3rem;
}

.product-image img {
    width: 480px;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

.product-info {
    flex: 1;
    min-width: 0;
}

.product-title {
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: .3rem;
}

.product-seller {
    font-size: 1rem;
    color: #6366f1;
    margin-bottom: 1rem;
}

.product-status {
    margin-bottom: 1rem;
}

.status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: .9rem;
    font-weight: 600;
    display: inline-block;
}

.available { background: #d1fae5; color: #065f46; }
.pending   { background: #dbeafe; color: #1e40af; }
.sold      { background: #e5e7eb; color: #374151; }

.price-section {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 1rem 0;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: #2563EB;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
}

.details-grid p {
    margin: 0;
    font-size: 0.95rem;
}

.description {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #4b5563;
}

/* ── Actions ── */
.actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.actions form {
    width: 100%;
}

.btn-wide {
    display: block;
    width: 100%;
    padding: 14px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-wide:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.helper-text {
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .listing-detail {
        padding: 1rem;
        margin: 1rem;
        border-radius: 12px;
    }

    .product-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .product-image img {
        width: 100%;
        max-height: 300px;
        object-fit: cover;
    }

    .product-title {
        font-size: 1.4rem;
    }

    .current-price {
        font-size: 1.6rem;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .listing-detail {
        margin: 0.5rem;
        padding: 0.75rem;
    }

    .btn-wide {
        font-size: 0.95rem;
        padding: 12px 16px;
    }
}


/* ============================================
   DELETE PAGE
   ============================================ */

#delete-container {
    max-width: 500px;
    margin: 60px auto;
    padding: 25px 30px;
    background-color: #fef2f2;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.3);
    text-align: center;
}

#delete-title {
    color: #b91c1c;
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 30px;
}

#delete-form button#delete-btn {
    background-color: #ef4444;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-right: 15px;
}

#delete-form button#delete-btn:hover {
    background-color: #b91c1c;
}

#cancel-btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    background-color: #9ca3af;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

#cancel-btn:hover {
    background-color: #6b7280;
}

/* ============================================
   DELETE PAGE
   ============================================ */

#delete-container {
    max-width: 500px;
    margin: 60px auto;
    padding: 25px 30px;
    background-color: #fef2f2;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(248, 113, 113, 0.3);
    text-align: center;
}

#delete-title {
    color: #b91c1c;
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 30px;
}

#delete-form button#delete-btn {
    background-color: #ef4444;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-right: 15px;
}

#delete-form button#delete-btn:hover {
    background-color: #b91c1c;
}

#cancel-btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    background-color: #9ca3af;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

#cancel-btn:hover {
    background-color: #6b7280;
}
/* ============================================
   CREATE LISTING (STEP 1 & PROGRESS)
   ============================================ */

.d-flex.justify-content-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #495057;
}

.progress-step.active {
    background: var(--primary);
    color: #fff;
}

.progress-step.done {
    background: #10b981;
    color: #fff;
}

.me-3 {
    margin-right: 0.75rem;
}

.policies-box {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
}

.policies-box h5 {
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.policies-box p {
    margin-bottom: 0.5rem;
}

.policies-box a {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

/* ============================================
   CREATE LISTING (STEP 2 & 3)
   ============================================ */
.form-wrapper {
    max-width: 600px;
    margin: 3rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-family: sans-serif;
    border: 2px solid #2563EB;
    box-sizing: border-box;
    overflow: hidden; /* Prevents content overflow */
}

/* Ensure all children respect box-sizing */
.form-wrapper * {
    box-sizing: border-box;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress-step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    background: #e5e7eb;
    color: #6b7280;
    flex-shrink: 0;
}

.progress-step.done {
    background: #2563EB;
    color: white;
}

.progress-step.active {
    background: #2563EB;
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.2);
}

.form-wrapper h3 {
    margin-bottom: 0.5rem;
}

.form-wrapper p {
    margin-bottom: 1.5rem;
    color: #555;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.form-group label {
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 0.375rem;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: calc(50% - 0.5rem);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    width: 100%;
}

.form-actions .btn {
    flex: 1;
    max-width: 48%;
}

/* Mobile: Stack buttons vertically */
@media (max-width: 768px) {
    .form-wrapper {
        margin: 2rem 1rem;
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
        max-width: 100%;
    }
    
    .form-row .form-group {
        min-width: 100%;
    }
}

.btn {
    padding: 0.6rem 1.25rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    text-align: center;
    display: inline-block;
    text-decoration: none;
}

.btn-primary {
    background: #2563EB;
    color: #fff;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.confirmation-card {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.fee-breakdown {
    background: #f9f9f9;
    border-radius: 0.5rem;
    padding: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.35em 0.6em;
    font-size: 0.875em;
    font-weight: 500;
    border-radius: 0.25rem;
    background-color: #ffc107;
    color: #212529;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.col-md-6 {
    flex: 1 1 calc(50% - 1rem);
    min-width: 200px;
}

.btn-outline-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-success {
    background: #28a745;
    color: #fff;
}

#s3-btn{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ============================================
   MESSAGES PAGE
   ============================================ */

.messages-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.messages-header {
    margin-bottom: 2rem;
}

.messages-header h1 {
    font-size: 2rem;
    color: #1f2937;
}

.unread-badge {
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
}

.activity-card.unread {
    background: #eff6ff;
    border-left: 4px solid #2563EB;
}

.activity-message {
    font-size: 1rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.activity-time {
    font-size: 0.85rem;
    color: #9ca3af;
}

.no-messages {
    text-align: center;
    padding: 4rem 2rem;
    background: #f9fafb;
    border-radius: 12px;
}

.message-thread {
  max-width: 720px;
  margin: 2rem auto;
  padding: 1.75rem;
  background: #ffffff;
  border-radius: 18px;

  /* neon blue glow */
  box-shadow:
    0 0 0 1px rgba(60, 120, 255, 0.25),
    0 12px 30px rgba(60, 120, 255, 0.35),
    0 0 40px rgba(60, 120, 255, 0.25);

  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: #111;
}

.thread-header h2 {
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
  color: #0a0a0a;
}

.thread-header p {
  font-size: 1rem;
  color: #444;
}

/* Meta info */
.thread-meta {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: #f6f8ff;
  font-size: 0.9rem;
  color: #333;
}

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

/* Contact Card */
.contact-card {
  padding: 1rem;
  border-radius: 16px;
  background: #f9fbff;
  border: 1px solid rgba(60, 120, 255, 0.25);
}

.contact-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.contact-card p {
  font-size: 0.95rem;
  color: #222;
  word-break: break-word;
}

.thread-footer a {
  font-size: 0.9rem;
  text-decoration: none;
  color: #3c78ff;
  font-weight: 500;
}

.thread-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .message-thread {
    margin: 1rem;
    padding: 1.4rem;
  }

  .thread-header h2 {
    font-size: 1.2rem;
  }
}

.thread-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #3c78ff;
  background: rgba(60, 120, 255, 0.1);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.thread-sub {
  font-size: 0.95rem;
  color: #555;
  max-width: 60ch;
}

/* Meta row layout */
.thread-meta {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
}

.thread-meta div {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}

.thread-meta strong {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
}

.contact-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #3c78ff;
}

.contact-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #666;
}


/* ============================================
   MY LISTINGS PAGE
   ============================================ */

.my-listings-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

.tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.tab:hover {
    color: #2563EB;
}

.tab.active {
    color: #2563EB;
    border-bottom-color: #2563EB;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.listing-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.listing-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.listing-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f3f4f6;
}

.listing-content {
    padding: 1.25rem;
}

.listing-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.listing-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2563EB;
    margin-bottom: 0.75rem;
}

.listing-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.listing-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.status-published {
    background: #dcfce7;
    color: #166534;
}

.status-draft {
    background: #f3f4f6;
    color: #6b7280;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-sold {
    background: #dbeafe;
    color: #1e40af;
}

.listing-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.interested-buyers {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.interested-buyers-title {
    font-weight: 600;
    color: #1e40af;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.buyer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: white;
    border-radius: 6px;
    margin-bottom: 0.25rem;
}

.buyer-name {
    font-weight: 600;
    color: #374151;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ============================================
   UPDATE LISTING PAGE
   ============================================ */

#update-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 25px 30px;
    background-color: #f3f4f6;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
    width: 90%;
    box-sizing: border-box;
}

#update-title {
    text-align: center;
    color: #2563EB;
    font-weight: 800;
    font-size: 2.2rem;
    margin-bottom: 30px;
}

#update-form p {
    margin-bottom: 18px;
}

#update-form input[type="text"],
#update-form input[type="number"],
#update-form input[type="file"],
#update-form textarea,
#update-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1.05rem;
    transition: border-color 0.3s ease;
}

#update-form input[type="text"]:focus,
#update-form input[type="number"]:focus,
#update-form input[type="file"]:focus,
#update-form textarea:focus,
#update-form select:focus {
    border-color: #2563EB;
    outline: none;
}

#update-btn {
    background-color: #2563EB;
    color: #fff;
    font-weight: 700;
    padding: 14px 30px;
    width: 100%;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

#update-btn:hover {
    background-color: #1e40af;
}

/* ============================================
   HOMEPAGE REVAMP — additive styles only
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&display=swap');

/* --- Hero overhaul --- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 90px 0 70px;
    background: #0f172a;
    background-image:
        radial-gradient(ellipse 80% 60% at 60% 0%, rgba(99,102,241,0.35) 0%, transparent 70%),
        radial-gradient(ellipse 50% 40% at 10% 80%, rgba(139,92,246,0.2) 0%, transparent 60%);
}


/* Subtle dot-grid texture */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}


.hero-eyebrow {
    display: inline-block;
    background: rgba(99,102,241,0.25);
    color: #a5b4fc;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.35rem 1rem;
    border-radius: 100px;
    border: 1px solid rgba(165,180,252,0.25);
    margin-bottom: 0.5rem;
    animation: heroFade 0.6s ease both;
}

.hero-text {
    text-align: center;
    animation: heroFade 0.7s ease both;
}

.hero h1 {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 1rem;
    color: #fff;
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.1rem;
    color: #94a3b8;
    margin: 0;
    max-width: 520px;
    margin: 0 auto;
}

/* Search form on dark bg */
.search-form-wrapper {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    backdrop-filter: blur(8px);
    animation: heroFade 0.9s ease both;
}

.search-form .search-field select,
.search-form .search-field input {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 8px;
}

.search-form .search-field select option {
    background: #1e293b;
    color: #fff;
}

.search-form .search-field input::placeholder {
    color: #64748b;
}

/* Stats strip */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    animation: heroFade 1.1s ease both;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-num {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero-stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,0.12);
}
/* Chip wrapper — single chip, top left corner */
.hero-chips {
    position: absolute;
    top: 1.25rem;
    left: 1.5rem;
    z-index: 2;
    pointer-events: none;
}

/* Base chip */
.hero-chip {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 100px;
    backdrop-filter: blur(4px);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.hero-chip img {
    width: 24px;
    height: 18px;
    border-radius: 3px;
    object-fit: cover;
}

/* Mobile */
@media (max-width: 640px) {
    .hero-chips {
        top: 0.75rem;
        left: 1rem;
    }
}

/* --- Listings section revamp --- */
.listing-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.listing-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.75rem;
}

.listing-section-header h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.listing-section-cta {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2563EB;
    text-decoration: none;
    transition: gap 0.2s;
}

.listing-section-cta:hover {
    text-decoration: underline;
}

/* Listing cards — 3 columns desktop, 1 column mobile */
.listing-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.listing-item {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.listing-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.listing-img-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #f1f5f9;
}

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

.listing-item:hover .listing-img-wrap img {
    transform: scale(1.04);
}

.listing-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(15,23,42,0.75);
    color: #e2e8f0;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.listing-item-body {
    padding: 0.9rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.listing-item-body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.listing-institution {
    font-size: 0.78rem;
    color: #6b7280;
    margin: 0 0 0.2rem;
}

.listing-meta {
    font-size: 0.78rem;
    color: #94a3b8;
    margin: 0 0 0.6rem;
}

.listing-price {
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    color: #2563EB;
    margin: auto 0 0;
}

/* Empty state */
.listing-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.listing-empty-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

/* Notifications strip */
#notifications-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Mobile */
@media (max-width: 640px) {
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        text-align: center;
    }

    .hero-stat-divider {
        display: none;
    }

    .stat-num {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .listing-section-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .listing-list {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .product-container {
        flex-direction: column;
    }

    .product-image {
        width: 100%;
        order: -1;
    }

    .product-image img {
        width: 100%;
        max-width: 100%;
        height: 260px;
        object-fit: cover;
        border-radius: 12px;
    }

    .product-info {
        padding: 0;
    }

    .policies-box {
        padding: 0.75rem 1rem;
    }

    .policies-box h5 {
        font-size: 1rem;
    }

    .policies-box p,
    .policies-box b p {
        font-size: 0.82rem;
        line-height: 1.5;
    }

    .container.my-5 {
        padding: 1rem;
        margin: 1.5rem auto;
    }

    .progress-step {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

/* --- University request page --- */
 .request-wrapper {
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding: 3rem 1rem;
    }
 
    .request-card {
        background: #fff;
        border: 2px solid #dbeafe;
        border-radius: 16px;
        padding: 2.5rem;
        width: 100%;
        max-width: 520px;
        box-shadow: 0 8px 24px rgba(30, 64, 175, 0.1);
    }
 
    .request-header h1 {
        font-size: 1.8rem;
        font-weight: 700;
        color: #1e40af;
        margin-bottom: 0.4rem;
    }
 
    .request-header p {
        color: #6b7280;
        font-size: 0.95rem;
        margin-bottom: 1.75rem;
    }
 
    .form-group {
        margin-bottom: 1.25rem;
    }
 
    .form-group label {
        display: block;
        font-weight: 600;
        font-size: 0.9rem;
        color: #1e293b;
        margin-bottom: 0.4rem;
    }
 
    .form-group .form-control {
        width: 100%;
        padding: 12px 14px;
        font-size: 0.95rem;
        border: 2px solid #e2e8f0;
        border-radius: 8px;
        box-sizing: border-box;
        transition: border-color 0.2s ease;
        color: #1e293b;
    }
 
    .form-group .form-control:focus {
        border-color: #1e40af;
        outline: none;
    }
 
    .btn-submit {
        width: 100%;
        padding: 13px;
        background-color: #1e40af;
        color: #fff;
        font-size: 1rem;
        font-weight: 600;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        margin-top: 0.5rem;
        transition: background-color 0.2s ease, transform 0.2s ease;
    }
 
    .btn-submit:hover {
        background-color: #1d4ed8;
        transform: translateY(-1px);
    }
 
    .alert {
        padding: 12px 16px;
        border-radius: 8px;
        margin-bottom: 1.25rem;
        font-size: 0.9rem;
        font-weight: 500;
    }
 
    .alert-success {
        background: #d1fae5;
        color: #065f46;
        border-left: 4px solid #10b981;
    }
 
    .alert-error {
        background: #fee2e2;
        color: #991b1b;
        border-left: 4px solid #ef4444;
    }
 
    .back-link {
        text-align: center;
        margin-top: 1.25rem;
        font-size: 0.9rem;
    }
 
    .back-link a {
        color: #1e40af;
        text-decoration: none;
        font-weight: 600;
    }
 
    .back-link a:hover {
        text-decoration: underline;
    }

 @media (max-width: 600px) {
        .request-wrapper {
            padding: 1.5rem 0.75rem;
        }
 
        .request-card {
            padding: 1.5rem 1.25rem;
            border-radius: 12px;
        }
 
        .request-header h1 {
            font-size: 1.4rem;
        }
 
        .request-header p {
            font-size: 0.9rem;
        }
 
        .form-group .form-control {
            font-size: 0.9rem;
            padding: 10px 12px;
        }
 
        .btn-submit {
            font-size: 0.95rem;
            padding: 12px;
        }
    }
 
    @media (max-width: 400px) {
        .request-card {
            padding: 1.25rem 1rem;
        }
 
        .request-header h1 {
            font-size: 1.25rem;
        }
    }

    /* --- Announcement Banner --- */
    .announcement {
    background-color: #1e40af;
    color: #ffffff;
    text-align: center;
    padding: 15px 2rem;
    font-size: 0.95rem;
    line-height: 1.5;
    width: 100%;
    box-sizing: border-box;
}

.announcement p {
    margin: 0;
}

.announcement strong {
    font-weight: 700;
}

.announcement a {
    color: #bfdbfe;
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.2s ease;
}

.announcement a:hover {
    color: #ffffff;
}

@media (max-width: 600px) {
    .announcement {
        font-size: 0.85rem;
        padding: 8px 1rem;
    }
}
