/* ==========================================================================
   ── CSS Variables & Theme Definitions ──
   ========================================================================== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #1a1a2e;
    --text-secondary: #666666;
    --text-tertiary: #1d1d1d;
    --border-color: #e5e7eb;
    --header-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #ffffff;
    --hero-gradient: linear-gradient(180deg, #F0F4FF 0%, #FDFBF7 100%);
    --section-gradient: linear-gradient(180deg, #F0F4FF 0%, #FDFBF7 100%);
}

html[data-theme="dark"] {
    --bg-primary: #1a1a2e;
    --bg-secondary: #2d2d44;
    --bg-tertiary: #3a3a52;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-tertiary: #d0d0d0;
    --border-color: #404060;
    --header-bg: rgba(26, 26, 46, 0.98);
    --card-bg: #2d2d44;
    --hero-gradient: linear-gradient(180deg, #1e3a8a 0%, #1a1a2e 100%);
    --section-gradient: linear-gradient(180deg, #1e3a8a 0%, #1a1a2e 100%);
}

/* ==========================================================================
   ── Global Resets & Layout ──
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    padding: 0;
    margin: 0;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
}

main {
    padding: 120px 20px 40px;
}

a {
    text-decoration: none;
}

/* ==========================================================================
   ── Structural Sections ──
   ========================================================================== */
#hero {
    background: var(--hero-gradient);
    padding: 100px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#category {
    background: var(--bg-primary);
    padding: 100px 20px;
}

#howitworks {
    background: var(--section-gradient);
    padding: 100px 20px;
}

#footer {
    background: var(--section-gradient);
    padding: 100px 20px;
    outline: 1px solid var(--border-color);
    margin-top: 100px;
}

/* ==========================================================================
   ── Header & Navigation ──
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%; 
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
}

.nav-links ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links li a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    font-family: Arial, Helvetica, sans-serif;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: #1A6FE8;
}

/* Messages/Orders nav links + unread badge (Facebook-style red dot/counter) */
.nav-link-has-badge {
    position: relative;
}

.nav-link-badge {
    position: absolute;
    top: -8px;
    right: -14px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #e11d48;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    line-height: 16px;
    text-align: center;
    border-radius: 999px;
    box-shadow: 0 0 0 2px var(--header-bg);
}

.header-title {
    font-size: 25px;
    font-weight: bold;
    font-family: 'Arial Black', Arial, Helvetica, sans-serif;
    gap: -10px;
    margin-left: 50px;
}

.header-title a {
    color: #1A6FE8;
    text-decoration: none;
}

.dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background-color: gold;
    border-radius: 50%;
    margin-left: 2px;   
}

.nav-buttons-container {
    display: flex;
    gap: 15px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Dark Mode Toggle Component */
.dark-mode-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    color: var(--text-primary);
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
}

/* Navigation Buttons */
.btn.login a {
    color: #1A6FE8;
    text-decoration: none;
}

.btn.sign-up a {
    color: white;
    text-decoration: none;
}

.btn.login {
    padding: 8px 16px;
    background-color: transparent;
    border: 2px solid #1A6FE8;
    color: #1A6FE8;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
}

.btn.login:hover {
    background-color: var(--bg-primary);
    color: white;
}

.btn.sign-up {
    padding: 8px 16px;
    background-color: #1A6FE8;
    border: none;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
}

.btn.sign-up:hover {
    background-color: #1A6FE8;
    color: white;
}

/* ==========================================================================
   ── Hero Components ──
   ========================================================================== */
.hero-content {
     margin-top: 50px;
}

.hero-slogan {
    font-size: 9px;
    font-weight: bold;
    color: #1A6FE8;
    margin-bottom: 20px;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    background-color: var(--bg-primary);
    padding: 5px 10px;
    border-radius: 20px;
    border: var(--border-color);
    outline: 1px solid var(--border-color);
}

.hero-title {
    font-size: 65px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-family: 'Arial Black', Arial, Helvetica, sans-serif;
}

.speed {
    font-size: 65px;
    color: #1A6FE8;
    margin-bottom: 30px;
    font-family: 'Arial', sans-serif;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-family: 'Arial', sans-serif;
}

.hero-btn-container {
    display: flex;
    justify-content: center;
    gap: 20px;
}


.hero-button1 {
    color: white;
    font-size: 16px;
}

.hero-button1 {
    padding: 15px 30px;
    background-color: #1A6FE8;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
}

.hero-button1:hover {
    background-color: #0D4FB5;
    color: white;
}

.hero-button1:hover  {
    color: white;
}

.hero-button2  {
    color: #1A6FE8;
    font-size: 16px;
}

.hero-button2 {
    padding: 15px 30px;
    background-color: var(--card-bg);
    border: none;
    outline: 2px solid #1A6FE8;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
}

/* ==========================================================================
   ── Core Grid Modules ──
   ========================================================================== */
.category-title {
    font-size: 30px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-family: 'Arial Black', Arial, Helvetica, sans-serif;
    text-align: center;
}

.category-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    text-align: center;
    font-family: 'Arial', sans-serif;
}

.category-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
    flex-wrap: wrap;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.category-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 300px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-family: 'Arial Black', Arial, Helvetica, sans-serif;
}

/* How It Works Modules */
.howitworks-title {
    font-size: 30px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 20px;
    font-family: 'Arial Black', Arial, Helvetica, sans-serif;
}

.howitworks-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-family: 'Arial', sans-serif;
}

.howitworks-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
    flex-wrap: wrap;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.howitworks-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 300px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-number {
    font-size: 30px;
    font-weight: bold;
    color: #1A6FE8;
    margin-bottom: 10px;
    font-family: 'Arial Black', Arial, Helvetica, sans-serif;
    text-align: left;
}

.card-title {
    text-align: left;
}

.card-description {
    font-size: 16px;
    color: var(--text-secondary);
    font-family: 'Arial', sans-serif;
    text-align: left;
}

/* Call To Action Container */
.section4-container {
    display: flex;
    gap: 30px;
    margin-top: 50px;
    flex-wrap: wrap;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    background: #1A6FE8;
    border-radius: 30px;
}

.section4-content1 {
    text-align: left;
    margin-top: 50px;
    flex: 1 1 380px;
}

.section4-title1 {
    font-size: 50px;
    font-weight: bold;
    color: white;
    margin-bottom: 20px;
    font-family: 'Arial Black', Arial, Helvetica, sans-serif;
}

.yourmarketplace {
    font-size: 50px;
    color: gold;
    margin-bottom: 40px;
    font-family: 'Arial Black', sans-serif;
}

.section4-description1 {
    font-size: 18px;
    color: white;
    margin-bottom: 40px;
    font-family: 'Arial', sans-serif;
}

.section4-btn {
    padding: 15px 30px;
    background-color: #ffffff;
    border: none;
    color: #1A6FE8;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
}

.section4-btn:hover {
    background-color: gold;
    color: black;
}

.section4-content2 {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1 1 380px;
}

.section4-cards {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 50px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.section4-card {
    background-color: #1862d0;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 500px;
    padding: 20px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-title2 {
    font-size: 18px;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: rgb(224, 224, 224);
}

.card-description2 {
    font-size: 15px;
    font-family: Arial, Helvetica, sans-serif;
    color: #b4b4b4;
}

/* ==========================================================================
   ── Footer Architecture ──
   ========================================================================== */
.footer-container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-content1,
.footer-content2,
.footer-content3 {
    flex: 1 1 240px;
    min-width: 240px;
}

.footer-title {
    font-size: 30px;
    font-weight: bold;
    color: #1A6FE8;
    margin: 0 0 20px 0;
    font-family: 'Arial Black', Arial, Helvetica, sans-serif;
}

.dot2 {
    display: inline-block;
    width: 5px;
    height: 5px;
    background-color: gold;
    border-radius: 50%;
    margin-left: 6px;
}

.footer-description {
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text-secondary);
    max-width: 340px;
}

.footer-title2 {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    font-family: 'Arial Black', Arial, Helvetica, sans-serif;
}

.footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links li a {
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 16px;
    font-family: Arial, Helvetica, sans-serif;
}

.footer-links li a:hover {
    text-decoration: underline;
}

.footer-description2 {
    font-size: 16px;
    margin: 0;
    color: var(--text-tertiary);
    line-height: 1.6;
    font-family: Arial, Helvetica, sans-serif;
}

.footer-email {
    color: #1A6FE8;
    font-weight: bold;
}

/* ==========================================================================
   ── Marketplace Subsystem ──
   ========================================================================== */
.marketplace-title {
    font-size: 30px;
    font-weight: bold;
    color: var(--text-primary);
    margin-top: 100px;
    font-family: 'Arial Black', Arial, Helvetica, sans-serif;
    margin-left: 50px;
}   

.marketplace-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-family: 'Arial', sans-serif;
    margin-left: 50px;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 1400px;
    margin: 0 50px;
}

.search-bar {
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    font-size: 16px;
    flex: 1;
    min-width: 0;
    outline: none;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.search-bar:focus {
    border-color: #1A6FE8;
}

.search-btn {
    padding: 10px 20px;
    background-color: #1A6FE8;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
}

.search-btn:hover {
    background-color: #0D4FB5;
}

.category-grid2 {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin: 20px auto 0;
    max-width: 1400px;
    padding: 0 20px;
}

.category-card2 {
    background-color: var(--card-bg);
    border-radius: 10px;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 300px;
    height: 70px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card2:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-title {
    font-size: 18px;
}

/* Listings & Empty State Module */
#listings {
    padding: 100px 20px;
    background: var(--bg-primary);
}

.listings-title {
    font-size: 30px;
    font-weight: bold;
    color: var(--text-primary);
    font-family: 'Arial Black', Arial, sans-serif;
    text-align: center;
    margin-bottom: 40px;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    border: 2px dashed var(--border-color);
    border-radius: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.empty-text {
    font-size: 18px;
    color: var(--text-secondary);
    font-family: Arial, sans-serif;
    margin-bottom: 20px;
}

.empty-btn {
    padding: 12px 30px;
    background-color: #1A6FE8;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
}

.empty-btn:hover {
    background-color: #0D4FB5;
}

/* Grid Layout Products */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    width: 250px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.product-name {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.product-price {
    font-size: 18px;
    color: #1A6FE8;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-btn {
    padding: 8px 20px;
    background-color: #1A6FE8;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 14px;
}

/* Sign-up Multi-options Layout */
.signup1-content {
    margin-top: 150px;
    text-align: center;
}

.signup1-title {
    font-size: 50px;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text-primary);
}

.signup1-description {
    font-size: 18px;
    font-family: Arial, Helvetica, sans-serif;
    margin-top: 20px;
    color: var(--text-secondary);
}

.signup1-btn-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 50px;
}

.signup1-button1 a {
    color: white;
    font-size: 16px;
}

.signup1-button1 {
    padding: 15px 30px;
    background-color: #1A6FE8;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
}

.signup1-button1:hover {
    background-color: #0D4FB5;
    color: white;
}

.signup1-button1:hover a {
    color: white;
}

.signup1-button2 a {
    color: #1A6FE8;
    font-size: 16px;
}

.signup1-button2 {
    padding: 15px 30px;
    background-color: var(--card-bg);
    border: none;
    outline: 2px solid #1A6FE8;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 30px;
}

/* ==========================================================================
   ── Authentication Interfaces ──
   ========================================================================== */
#login,
#signup {
    max-width: 530px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    padding: 40px 36px;
}

.login-title,
.signup-title {
    font-size: 32px;
    margin-bottom: 8px;
    font-weight: 800;
}

.login-description,
.signup-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.5;
}

.login-card,
.signup-card {
    display: grid;
    gap: 18px;
}

form {
    display: grid;
    gap: 18px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    font-size: 16px;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="email"]:focus,
input[type="password"]:focus {
    border-color: #1A6FE8;
    box-shadow: 0 0 0 4px rgba(26, 110, 232, 0.12);
}

button[type="submit"],
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    background-color: #1A6FE8;
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

button[type="submit"]:hover,
button.btn:hover {
    background-color: #144faa;
    transform: translateY(-1px);
}

.login-card p,
.signup-card p {
    font-size: 15px;
    color: var(--text-secondary);
    text-align: center;
}

.login-card p a,
.signup-card p a {
    color: #1A6FE8;
    font-weight: 700;
}

.error-message {
    color: #b91c1c;
    font-size: 14px;
    min-height: 20px;
    text-align: center;
}

/* ==========================================================================
   ── Listing Forms ──
   ========================================================================== */
.create-listing-page {
    min-height: 100vh;
    background: var(--bg-secondary);
    padding: 120px 20px 60px;
    display: flex;
    justify-content: center;
}

.create-listing-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    padding: 40px 36px;
    width: 100%;
    max-width: 680px;
    height: fit-content;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-family: 'Arial Black', Arial, sans-serif;
}

.page-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: Arial, sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #1A6FE8;
    box-shadow: 0 0 0 4px rgba(26, 110, 232, 0.10);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.required {
    color: #e53e3e;
}

.form-hint,
.char-count {
    font-size: 12px;
    color: #94A3B8;
    margin-top: 4px;
}

.char-count {
    text-align: right;
}

.image-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 14px;
    padding: 20px;
    background: var(--bg-tertiary);
    transition: border-color 0.2s ease;
}

.image-upload-area:hover {
    border-color: #1A6FE8;
}

.image-upload-placeholder {
    text-align: center;
    cursor: pointer;
    color: #64748B;
}

.upload-icon {
    font-size: 30px;
}

.image-upload-placeholder p {
    font-size: 14px;
    margin-top: 6px;
}

.image-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.image-preview-wrap {
    position: relative;
}

.image-preview-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1A6FE8;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-primary {
    padding: 13px 28px;
    background-color: #1A6FE8;
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
    background-color: #144faa;
    transform: translateY(-1px);
}

.btn-ghost {
    padding: 13px 28px;
    background-color: transparent;
    color: #64748B;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-ghost:hover {
    border-color: #1A6FE8;
    color: #1A6FE8;
}

.success-msg {
    color: #15803d;
    font-size: 14px;
    text-align: center;
    margin-top: 8px;
}

/* ==========================================================================
   ── Specialized Product Profiles ──
   ========================================================================== */
.product-page {
    min-height: 100vh;
    background: var(--bg-secondary);
    padding: 100px 40px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    color: #64748B;
    gap: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: #1A6FE8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.page-error {
    text-align: center;
    padding: 100px 20px;
}

.page-error h2 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.product-page-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.07);
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-main-img-wrap {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.product-main-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.product-main-img:hover {
    transform: scale(1.02);
}

.product-img-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.product-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.product-thumb:hover,
.product-thumb.active {
    border-color: #1A6FE8;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-category,
.badge-condition {
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.badge-category {
    background: #EFF6FF;
    color: #1A6FE8;
}

.badge-condition {
    background: #F0FDF4;
    color: #15803d;
}

.product-page-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: 'Arial Black', Arial, sans-serif;
    line-height: 1.3;
}

.product-page-price {
    font-size: 32px;
    font-weight: 800;
    color: #1A6FE8;
}

.product-description-block {
    background: var(--bg-secondary);
    border-radius: 14px;
    padding: 16px 20px;
    border: 1px solid var(--border-color);
}

.product-description-block h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-description-block p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.product-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #64748B;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-full {
    width: 100%;
}

.btn-secondary {
    padding: 13px 28px;
    background-color: transparent;
    color: #1A6FE8;
    border: 2px solid #1A6FE8;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: #1A6FE8;
    color: white;
}

.product-safety-note {
    font-size: 13px;
    color: #64748B;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 10px;
    padding: 10px 14px;
}

.seller-card-section,
.more-from-seller-section {
    margin-top: 48px;
}

.section-heading {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: 'Arial Black', Arial, sans-serif;
    margin-bottom: 20px;
}

.seller-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px 28px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    flex-wrap: wrap;
}

.seller-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #1A6FE8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 800;
    flex-shrink: 0;
    overflow: hidden;
}

.seller-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.seller-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.seller-card-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.seller-uni {
    font-size: 14px;
    color: #64748B;
}

.seller-bio {
    font-size: 14px;
    color: var(--text-secondary);
}

.seller-stats {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #64748B;
    margin-top: 6px;
}

/* ==========================================================================
   ── Checkout System ──
   ========================================================================== */
.checkout-page {
    min-height: 100vh;
    background: var(--bg-secondary);
    padding: 100px 20px 60px;
    max-width: 1100px;
    margin: 0 auto;
}

.checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    gap: 0;
}

.checkout-step {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.checkout-step.active {
    opacity: 1;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--border-color);
    color: #64748B;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.checkout-step.active .step-num {
    background: #1A6FE8;
    color: white;
}

.checkout-step.done .step-num {
    background: #15803d;
    color: white;
}

.step-label {
    font-size: 14px;
    font-weight: 600;
    color: #64748B;
}

.checkout-step.active .step-label {
    color: var(--text-primary);
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border-color);
    margin: 0 12px;
    max-width: 80px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
}

.checkout-form-col {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.07);
}

.checkout-heading {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px;
    font-family: 'Arial Black', Arial, sans-serif;
}

.checkout-subtext {
    font-size: 14px;
    color: #64748B;
    margin-bottom: 20px;
}

.checkout-product-row {
    display: flex;
    gap: 16px;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 24px;
}

.checkout-product-thumb {
    width: 90px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.checkout-product-row h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.checkout-back-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: #64748B;
    text-decoration: none;
}

.checkout-back-link:hover {
    color: #1A6FE8;
}

.confirm-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}

.confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    gap: 12px;
}

.confirm-row:last-child {
    border-bottom: none;
}

.confirm-row span {
    color: #64748B;
    flex-shrink: 0;
}

.confirm-row strong {
    color: var(--text-primary);
    text-align: right;
}

.checkout-safety {
    font-size: 13px;
    color: #64748B;
    background: #FFFBEB;
    border: 1px solid #FDE68A;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.checkout-summary-col {
    position: sticky;
    top: 100px;
}

.order-summary-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.order-summary-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-family: 'Arial Black', Arial, sans-serif;
}

.summary-product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #64748B;
    padding: 8px 0;
}

.summary-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.summary-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-note {
    font-size: 12px;
    color: #94A3B8;
    margin-top: 12px;
    text-align: center;
    line-height: 1.5;
}

.checkout-success-panel {
    text-align: center;
    padding: 80px 20px;
    background: var(--card-bg);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.07);
    max-width: 560px;
    margin: 0 auto;
}

.success-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.checkout-success-panel h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.checkout-success-panel p {
    font-size: 15px;
    color: #64748B;
    line-height: 1.6;
    margin-bottom: 8px;
}

.success-sub a {
    color: #1A6FE8;
    font-weight: 600;
}

/* ==========================================================================
   ── Live Messaging Center ──
   ========================================================================== */
.messages-page {
    height: 100vh;
    padding-top: 70px;
    background: var(--bg-secondary);
    overflow: hidden;
}

.messages-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 100%;
}

.conversations-sidebar {
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-heading {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    padding: 24px 20px 16px;
    border-bottom: 1px solid var(--border-color);
    font-family: 'Arial Black', Arial, sans-serif;
}

#conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.conversation-item:hover {
    background: var(--bg-secondary);
}

.conversation-item.active {
    background: #EFF6FF;
    border-left: 3px solid #1A6FE8;
}

html[data-theme="dark"] .conversation-item.active {
    background: #233554;
}

.conv-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1A6FE8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.conv-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.conv-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.conv-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-preview {
    font-size: 13px;
    color: #94A3B8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-area {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-secondary);
}

.chat-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94A3B8;
    gap: 12px;
}

.chat-placeholder span {
    font-size: 48px;
}

.chat-placeholder p {
    font-size: 16px;
}

.chat-window {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.chat-header-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1A6FE8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}

.chat-header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.chat-header-link {
    font-size: 13px;
    color: #1A6FE8;
    text-decoration: none;
}

.chat-header-link:hover {
    text-decoration: underline;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.chat-msg-mine {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-msg-theirs {
    align-self: flex-start;
    align-items: flex-start;
}

.msg-bubble {
    padding: 10px 16px;
    border-radius: 18px;
    font-size: 15px;
    line-height: 1.5;
    word-break: break-word;
}

.chat-msg-mine .msg-bubble {
    background: #1A6FE8;
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-msg-theirs .msg-bubble {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}

.msg-time {
    font-size: 11px;
    color: #94A3B8;
    margin-top: 4px;
    padding: 0 4px;
}

.chat-input-row {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.chat-input-row input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 15px;
    outline: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: border-color 0.2s ease;
}

.chat-input-row input:focus {
    border-color: #1A6FE8;
    box-shadow: 0 0 0 4px rgba(26, 110, 232, 0.10);
}

.chat-send-btn {
    padding: 12px 24px;
    border-radius: 999px;
    flex-shrink: 0;
}

/* ==========================================================================
   ── Order Tracking Profiles ──
   ========================================================================== */
.orders-page {
    min-height: 100vh;
    background: var(--bg-secondary);
    padding: 100px 40px 60px;
    max-width: 900px;
    margin: 0 auto;
}

.orders-tabs {
    display: flex;
    gap: 8px;
    margin: 24px 0 32px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 6px;
    width: fit-content;
}

.tab-btn {
    padding: 10px 28px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background: #1A6FE8;
    color: white;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px 24px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease;
    flex-wrap: wrap;
}

.order-card:hover {
    transform: translateY(-2px);
}

.order-img {
    width: 80px;
    height: 65px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.order-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-title a {
    color: var(--text-primary);
    text-decoration: none;
}

.order-title a:hover {
    color: #1A6FE8;
}

.order-meta {
    font-size: 13px;
    color: #64748B;
    line-height: 1.5;
}

.order-meta a {
    color: #1A6FE8;
    text-decoration: none;
    font-weight: 600;
}

.order-date {
    font-size: 12px;
    color: #94A3B8;
    margin-top: 4px;
}

.order-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.order-price {
    font-size: 18px;
    font-weight: 800;
    color: #1A6FE8;
}

.order-status {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #FEF9C3;
    color: #854D0E;
}

.status-confirmed {
    background: #DBEAFE;
    color: #1D4ED8;
}

.status-completed {
    background: #DCFCE7;
    color: #15803D;
}

.status-cancelled {
    background: #FEE2E2;
    color: #B91C1C;
}

.order-msg-btn {
    padding: 8px 18px;
    font-size: 13px;
    border-radius: 999px;
    white-space: nowrap;
}

/* ==========================================================================
   ── User Account Management Profiles ──
   ========================================================================== */
.profile-page {
    min-height: 100vh;
    background: var(--bg-secondary);
    padding: 100px 40px 60px;
    max-width: 1000px;
    margin: 0 auto;
}

.profile-header-card {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px 36px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.07);
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.profile-avatar-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: #1A6FE8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 800;
    overflow: hidden;
    border: 3px solid var(--border-color);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload-btn {
    font-size: 12px;
    color: #1A6FE8;
    cursor: pointer;
    font-weight: 600;
    text-align: center;
    padding: 4px 10px;
    border: 1px solid #1A6FE8;
    border-radius: 999px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.avatar-upload-btn:hover {
    background: #1A6FE8;
    color: white;
}

.profile-header-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-header-info h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: 'Arial Black', Arial, sans-serif;
}

.profile-uni {
    font-size: 14px;
    color: #64748B;
    font-weight: 600;
}

.profile-bio {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 4px;
}

.profile-details {
    font-size: 13px;
    color: #64748B;
    margin-top: 4px;
}

.profile-stats {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.stat-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 20px;
    min-width: 80px;
}

.stat-number {
    font-size: 22px;
    font-weight: 800;
    color: #1A6FE8;
    font-family: 'Arial Black', Arial, sans-serif;
}

.stat-label {
    font-size: 12px;
    color: #94A3B8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.edit-profile-form {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px 36px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.07);
    margin-bottom: 32px;
}

.edit-profile-form h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 24px;
    font-family: 'Arial Black', Arial, sans-serif;
}

.profile-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 6px;
    width: fit-content;
}

.tab-content {
    min-height: 200px;
}

.review-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.review-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #1A6FE8;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    flex-shrink: 0;
}

.review-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.review-date {
    font-size: 12px;
    color: #94A3B8;
}

.review-stars {
    font-size: 16px;
    margin-bottom: 8px;
}

.review-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.badge-inactive {
    background: #FEE2E2;
    color: #B91C1C;
}

.product-img-wrap {
    position: relative;
}

.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: #1A6FE8;
    color: white;
}

.product-card-body {
    padding: 10px 4px 4px;
}

.product-seller {
    font-size: 12px;
    color: #94A3B8;
    margin-bottom: 8px;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

/* Shared Micro-interaction Shimmers */
.skeleton-card {
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border-color) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 8px;
}

.skeleton-img {
    width: 100%;
    height: 180px;
    border-radius: 10px;
}

.skeleton-line {
    height: 14px;
    border-radius: 6px;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==========================================================================
   ── Global Media Queries ──
   ========================================================================== */

/* ---- Tablet & below (~900px): collapse two-column layouts to one ---- */
@media (max-width: 900px) {
    main {
        padding: 130px 16px 40px;
    }

    /* Header/nav: allow it to wrap onto a second line instead of overflowing */
    .navbar {
        flex-wrap: wrap;
        justify-content: center;
        padding: 12px 16px;
        row-gap: 10px;
    }

    .header-title {
        margin-left: 0;
        font-size: 22px;
        flex: 1 1 auto;
        text-align: center;
    }

    .nav-links {
        order: 3;
        width: 100%;
    }

    .nav-links ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 18px;
    }

    .nav-buttons {
        flex: 1 1 auto;
    }

    .nav-buttons-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Hero */
    .hero-content {
        margin-top: 20px;
    }

    .hero-title,
    .speed {
        font-size: 42px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-btn-container {
        flex-direction: column;
        width: 100%;
    }

    .hero-button1,
    .hero-button2 {
        width: 100%;
    }

    /* Section 4 CTA */
    .section4-container {
        text-align: center;
    }

    .section4-content1 {
        text-align: center;
        margin-top: 30px;
    }

    .section4-title1,
    .yourmarketplace {
        font-size: 36px;
    }

    .section4-content2 {
        margin-top: 10px;
        margin-bottom: 30px;
        width: 100%;
    }

    .section4-card {
        width: 100%;
        max-width: 500px;
    }

    /* Marketplace */
    .marketplace-title,
    .marketplace-description {
        margin-left: 20px;
        margin-right: 20px;
    }

    .search-container {
        margin: 0 20px;
    }

    /* Two-column page layouts collapse to one */
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .checkout-summary-col {
        position: static;
        order: -1;
    }

    .product-page-grid {
        grid-template-columns: 1fr;
        padding: 24px;
        gap: 28px;
    }

    .messages-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 180px 1fr;
    }

    .conversations-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .messages-page {
        padding-top: 130px;
        height: 100vh;
    }

    /* Page wrappers that assumed a single-line header */
    .profile-page,
    .orders-page,
    .product-page,
    .checkout-page,
    .create-listing-page {
        padding-top: 130px;
    }

    .create-listing-card,
    .checkout-form-col,
    .edit-profile-form,
    .profile-header-card {
        padding: 28px 22px;
    }

    .seller-card {
        flex-direction: column;
        text-align: center;
    }

    .seller-card-info {
        align-items: center;
    }
}

/* ---- Phones (~600px and below) ---- */
@media (max-width: 600px) {
    .hero-title,
    .speed {
        font-size: 32px;
    }

    .category-title,
    .howitworks-title,
    .marketplace-title {
        font-size: 24px;
    }

    .category-card,
    .howitworks-card {
        width: 100%;
        max-width: 340px;
    }

    .category-card2 {
        width: calc(50% - 8px);
        height: auto;
        padding: 14px;
    }

    .marketplace-title,
    .marketplace-description {
        margin-left: 10px;
        margin-right: 10px;
        text-align: center;
    }

    .search-container {
        margin: 0 10px;
        flex-wrap: wrap;
    }

    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-row-3 {
        gap: 8px;
    }

    .form-row-3 select {
        padding: 10px 8px;
        font-size: 13px;
    }

    .product-page,
    .checkout-page,
    .orders-page,
    .profile-page,
    .create-listing-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .product-main-img {
        height: 240px;
    }

    .profile-header-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .profile-header-info {
        align-items: center;
        text-align: center;
    }

    .profile-stats {
        justify-content: center;
    }

    .order-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .order-right {
        align-items: flex-start;
        width: 100%;
    }

    .conv-preview {
        max-width: 55vw;
    }

    .chat-msg {
        max-width: 85%;
    }

    .footer-container {
        gap: 30px;
        text-align: center;
        justify-content: center;
    }

    .footer-content1,
    .footer-content2,
    .footer-content3 {
        min-width: 100%;
        align-items: center;
    }

    .footer-description {
        max-width: none;
        margin: 0 auto;
    }

    .footer-links {
        display: inline-block;
        text-align: left;
    }
}

@media (max-width: 780px) {
    .footer-container {
        gap: 30px;
    }
    .footer-title,
    .footer-title2 {
        font-size: 24px;
    }
    .footer-description,
    .footer-description2,
    .footer-links li a {
        font-size: 15px;
    }
}

/* ==========================================================================
   ── Messages: unread indicator & read receipts ──
   ========================================================================== */
.conversation-item.unread .conv-name {
    font-weight: 800;
    color: var(--text-primary);
}

.conversation-item.unread .conv-preview {
    font-weight: 700;
    color: var(--text-primary);
}

.unread-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1A6FE8;
    flex-shrink: 0;
    margin-left: auto;
}

.msg-tick {
    margin-left: 4px;
    color: #94A3B8;
    font-size: 12px;
}

.msg-tick-read {
    color: #1A6FE8;
}