/* styles.css - Updated with 2x2 product image grid and enhanced layouts */

:root {
    --primary-red: #e63946;
    --primary-purple: #6a4c9c;
    --white: #ffffff;
    --light-gray: #f4f4f4;
    --dark-gray: #333333;
    --success-green: #4CAF50;
    --warning-orange: #ff9800;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.2);
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --border-radius-xl: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background: #fafafa;
}

/* Header Styles */
.header-container {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-purple));
    color: var(--white);
    padding: 1rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.round-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-purple);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.round-logo:hover {
    transform: scale(1.05);
}

.title-section h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    margin-bottom: 0.25rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.vision {
    font-size: clamp(0.8rem, 3vw, 1rem);
    opacity: 0.9;
}


/* Search Container - Subtle integration with header */
.search-container {
    margin-top: 0.5rem;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .search-container {
        margin-top: 0;
        margin-left: auto;
        margin-right: 0;
    }
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 40px;
    padding: 0.25rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.search-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

#searchInput {
    flex: 1;
    padding: 0.6rem 1rem;
    border: none;
    background: transparent;
    color: white;
    font-size: 0.9rem;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

#searchInput:focus {
    outline: none;
}

.search-btn {
    background: var(--primary-purple);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-right: 0.25rem;
}

.search-btn:hover {
    background: var(--primary-red);
    transform: scale(1.05);
}

/* Search Results Header */
.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-red));
    border-radius: var(--border-radius-lg);
    color: white;
}

.search-results-header h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-results-header h3 span {
    background: white;
    color: var(--primary-purple);
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.clear-search-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.no-results i {
    font-size: 3rem;
    color: var(--light-gray);
    margin-bottom: 1rem;
}

.no-results h3 {
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.no-results p {
    color: #666;
    margin-bottom: 1rem;
}

.no-results .btn {
    display: inline-block;
    margin-top: 1rem;
}

/* Search Highlight */
.search-highlight {
    background: #fff3cd;
    color: #856404;
    padding: 0 2px;
    border-radius: 3px;
    font-weight: 500;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .search-container {
        margin-top: 1rem;
    }
    
    .search-wrapper {
        width: 100%;
    }
    
    .search-results-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}



/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-purple);
    transition: color 0.3s ease;
}

.hamburger:hover {
    color: var(--primary-red);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-purple);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-purple);
}

.nav-link:hover::after {
    width: 100%;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius-md);
    padding: 0.5rem 0;
    min-width: 220px;
    display: none;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--dark-gray);
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background: var(--light-gray);
    color: var(--primary-purple);
    padding-left: 1.5rem;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.section-header h2 {
    color: var(--dark-gray);
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-purple));
    border-radius: 2px;
}

.btn-back {
    background: var(--light-gray);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: var(--primary-purple);
    color: white;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.category-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover .category-image {
    transform: scale(1.1);
}

.category-info {
    padding: 1rem;
    position: relative;
    background: white;
}

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

.category-count {
    font-size: 0.8rem;
    color: var(--primary-purple);
    font-weight: 500;
}

.notification-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--primary-red);
    color: var(--white);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.product-card {
    background: var(--white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-images {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.product-card:hover .product-main-image {
    transform: scale(1.1);
}

.image-count {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    backdrop-filter: blur(5px);
}

.product-info {
    padding: 1rem;
}

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

.product-price {
    color: var(--primary-purple);
    font-weight: bold;
    font-size: 1.3rem;
    margin: 0.5rem 0;
}

.product-seller {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.product-date {
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.5rem;
}

.chat-notification {
    background: var(--primary-red);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 2;
    animation: pulse 2s infinite;
}

.free-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--success-green);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 2;
}

.expiring-badge {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: var(--warning-orange);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 2;
}

/* Product Detail - Enhanced with 2x2 image grid */
.product-detail-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.product-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-gray);
}

.product-header h2 {
    font-size: 2rem;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.product-sku {
    color: #666;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Product Images Grid - 2x2 layout */
.product-images-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns exactly */
    gap: 15px;
    margin: 1.5rem 0;
    padding: 10px;
    background: var(--light-gray);
    border-radius: var(--border-radius-lg);
}

.product-image-item {
    position: relative;
    aspect-ratio: 1 / 1; /* Square aspect ratio */
    overflow: hidden;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
    border: 3px solid white;
}

.product-image-item:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-purple);
    z-index: 5;
}

.product-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-image-item:hover img {
    transform: scale(1.1);
}

/* Product Info Grid */
.product-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .product-info-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Product Description */
.product-description {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
}

.product-description h3 {
    color: var(--primary-purple);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-description p {
    line-height: 1.8;
    color: #4a5568;
}

/* Product Price */
.product-price-large {
    background: linear-gradient(135deg, var(--primary-purple), #4158D0);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-price-large h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.product-price-large .price {
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* Product Meta Information */
.product-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    margin: 1.5rem 0;
}

.meta-item {
    text-align: center;
    padding: 0.5rem;
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
}

.meta-label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-purple);
}

/* Seller Information */
.seller-info {
    background: linear-gradient(135deg, #f8fafc, #edf2f7);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    margin: 1.5rem 0;
    border: 1px solid #e2e8f0;
}

.seller-info h3 {
    color: var(--primary-purple);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.seller-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.seller-detail-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
}

.seller-detail-item i {
    color: var(--primary-purple);
    font-size: 1.2rem;
    width: 24px;
}

/* Chat Section */
.chat-section {
    background: white;
    border: 2px solid var(--light-gray);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    margin-top: 2rem;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chat-header h3 {
    color: var(--primary-purple);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-messages {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: var(--border-radius-md);
    margin-bottom: 1rem;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius-md);
    max-width: 80%;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.chat-message.own-message {
    background: var(--primary-purple);
    color: white;
    margin-left: auto;
}

.chat-message.other-message {
    background: white;
    border: 1px solid #e2e8f0;
}

.message-sender {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    opacity: 0.9;
}

.message-time {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.chat-input {
    display: flex;
    gap: 0.5rem;
}

.chat-input textarea {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius-md);
    resize: none;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.chat-input textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
}

.chat-input button {
    padding: 0 1.5rem;
    background: var(--primary-purple);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-input button:hover {
    background: var(--primary-red);
    transform: translateY(-2px);
}

/* New badge for messages */
.new-badge {
    background: var(--primary-red);
    color: white;
    padding: 0.15rem 0.3rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.6rem;
    margin-left: 0.5rem;
    animation: pulse 2s infinite;
}

/* Forms */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(106, 76, 156, 0.1);
}

/* Buttons */
.btn {
    background: var(--primary-purple);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    background: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-back {
    background: var(--light-gray);
    color: var(--dark-gray);
}

.btn-back:hover {
    background: var(--dark-gray);
    color: white;
}

/* Dashboard */
.dashboard-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1.5rem;
}

.dashboard-sidebar {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.dashboard-sidebar h3 {
    color: var(--primary-purple);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-gray);
}

.dashboard-menu {
    list-style: none;
}

.dashboard-menu li {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: var(--border-radius-md);
    transition: all 0.3s ease;
    margin-bottom: 0.25rem;
}

.dashboard-menu li:hover {
    background: var(--light-gray);
    color: var(--primary-purple);
    padding-left: 1.5rem;
}

.dashboard-menu li.active {
    background: var(--primary-purple);
    color: white;
}

.dashboard-content {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius-md);
    border: 1px solid #e2e8f0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--light-gray);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark-gray);
}

td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

tr:hover {
    background: #f8fafc;
}

.thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
}

/* Payment Options */
.payment-options {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

.payment-option {
    border: 2px solid #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.payment-option:hover {
    border-color: var(--primary-purple);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.payment-option.selected {
    border-color: var(--primary-purple);
    background: #f0f5ff;
}

.payment-option h4 {
    color: var(--primary-purple);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.payment-option p {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-gray);
}

.payment-option small {
    color: #666;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 2rem 1rem;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.footer-content i {
    margin-right: 0.5rem;
    color: var(--primary-red);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: var(--border-radius-xl);
    max-width: 500px;
    width: 90%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--light-gray);
}

.close:hover {
    color: var(--dark-gray);
    background: #e2e8f0;
    transform: rotate(90deg);
}

/* Image expansion modal */
.image-expand-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.image-expand-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.image-expand-modal img.zoomed {
    transform: scale(1.5);
    cursor: zoom-out;
}

.image-expand-modal .close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.image-expand-modal .close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

/* Rate Limit Warning */
.rate-limit-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-lg);
    margin: 0 1rem 1.5rem 1rem;
    display: none;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.rate-limit-warning i {
    font-size: 1.5rem;
    color: #856404;
}

.rate-limit-warning span {
    flex: 1;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top: 4px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Responsive Design */
@media (max-width: 1024px) {
    .product-images-grid {
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block !important;
        z-index: 1002;
        position: relative;
        padding: 10px;
        margin: -5px;
    }

    .nav-menu {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        z-index: 1001;
        max-height: 80vh;
        overflow-y: auto;
        border-top: 3px solid var(--primary-purple);
        animation: slideDown 0.3s ease;
    }

    .nav-menu.active {
        display: flex !important;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .nav-menu li {
        width: 100%;
        margin: 0.15rem 0;
    }

    .nav-link {
        display: block;
        padding: 0.7rem 1rem !important;
        width: 100%;
        text-align: left;
        border-radius: var(--border-radius-md);
        font-size: 1rem;
        transition: all 0.2s ease;
    }

    .nav-link:hover {
        background: var(--light-gray);
        padding-left: 1.5rem !important;
    }

    .nav-link::after {
        display: none;
    }

    /* Special styling for New Ad button in dropdown */
    #newAdLink {
        margin: 0.5rem 0 0 0;
        text-align: center;
        justify-content: center;
        padding: 0.7rem !important;
        width: 100%;
        display: inline-flex;
        background: linear-gradient(135deg, var(--primary-purple), var(--primary-red));
        color: white !important;
        font-weight: 600;
    }

    #newAdLink:hover {
        background: linear-gradient(135deg, var(--primary-red), var(--primary-purple));
        transform: translateY(-2px);
    }

    .dropdown {
        position: relative;
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 0;
        display: none;
        background: var(--light-gray);
        margin: 0.25rem 0 0.25rem 0.5rem;
        border-radius: var(--border-radius-md);
        width: calc(100% - 0.5rem);
        animation: slideDown 0.2s ease;
    }

    .dropdown.active .dropdown-menu {
        display: block !important;
    }

    .dropdown-menu a {
        padding: 0.6rem 1.5rem !important;
        font-size: 0.95rem;
    }

    .dropdown-menu a:hover {
        background: var(--primary-purple);
        color: white !important;
        padding-left: 2rem !important;
    }

    /* Remove overlay since we're using dropdown style */
    .menu-overlay {
        display: none !important;
    }

    /* Adjust nav-container for mobile */
    .nav-container {
        position: relative;
        z-index: 1002;
        flex-wrap: wrap;
    }

    /* Ensure user info is properly positioned */
    .user-info {
        margin-left: auto;
    }

    /* Rest of your mobile styles */
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: sticky;
        top: 70px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .product-header h2 {
        font-size: 1.5rem;
    }

    .product-price-large .price {
        font-size: 2rem;
    }

    .chat-message {
        max-width: 90%;
    }

    .chat-input {
        flex-direction: column;
    }

    .chat-input button {
        padding: 0.75rem;
    }

    .modal-content {
        margin: 10% auto;
        padding: 1.5rem;
        width: 95%;
    }
}

/* Small screen adjustments */
@media (max-width: 480px) {
    .nav-menu {
        padding: 0.75rem;
    }
    
    .nav-link {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.95rem;
    }
    
    #newAdLink {
        padding: 0.6rem !important;
    }
}

/* Additional fix for very small screens */
@media (max-width: 480px) {
    .nav-menu {
        width: 85%;
    }
    
    .hamburger {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .product-images-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
        gap: 10px;
    }

    .product-image-item {
        aspect-ratio: 16 / 9; /* Wider aspect ratio on mobile */
    }

    .product-info-grid {
        grid-template-columns: 1fr;
    }

    .product-meta {
        grid-template-columns: 1fr;
    }

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

    .logo-section {
        justify-content: center;
        text-align: center;
    }

    .title-section h1 {
        font-size: 1.3rem;
    }

    .category-card {
        margin-bottom: 0.5rem;
    }

    .btn {
        width: 100%;
    }

    .table-container {
        font-size: 0.85rem;
    }

    th, td {
        padding: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .chat-section,
    .btn,
    .modal,
    .footer-content i {
        display: none;
    }

    .product-detail-container {
        box-shadow: none;
        padding: 1rem;
    }

    .product-images-grid {
        break-inside: avoid;
    }
}

/* Touch-friendly targets for mobile */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .category-card,
    .product-card,
    .dashboard-menu li,
    .payment-option {
        cursor: default;
        -webkit-tap-highlight-color: transparent;
    }

    .btn:hover,
    .category-card:hover,
    .product-card:hover {
        transform: none;
    }

    .product-image-item {
        cursor: default;
    }
}

/* New Ad menu item styling - Compact version */
#newAdLink {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-red));
    color: white !important;
    padding: 0.25rem 0.9rem !important;
    border-radius: 30px;
    margin-left: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#newAdLink i {
    margin-right: 5px;
    font-size: 0.8rem;
}

#newAdLink:hover {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-purple));
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(106, 76, 156, 0.3);
}

#newAdLink:hover::after {
    width: 0; /* Remove the underline effect */
}

/* Mobile adjustment for New Ad menu */
@media (max-width: 768px) {
    #newAdLink {
        margin-left: 0;
        margin-top: 0.5rem;
        text-align: center;
        justify-content: center;
        padding: 0.5rem !important;
        width: 100%;
    }
}

/* Optional: Adjust the nav-menu gap to accommodate the new item */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem; /* Slightly reduced from 1.5rem */
    align-items: center;
}

/* Make other nav links slightly more compact */
.nav-link {
    font-size: 0.95rem;
    padding: 0.25rem 0;
}

/* Adjust dropdown menu to match new sizing */
.dropdown-menu {
    min-width: 200px;
    font-size: 0.9rem;
}

.dropdown-menu a {
    padding: 0.5rem 1rem;
}
/* Glowing effect */
#signupLink {
    color: var(--primary-purple) !important;
    font-weight: 600 !important;
    padding: 0.25rem 0.5rem !important;
    margin-left: 0.5rem;
    position: relative;
    z-index: 1;
}

#signupLink::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(106, 76, 156, 0.2), transparent 70%);
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#signupLink:hover {
    color: var(--primary-red) !important;
}

#signupLink:hover::before {
    opacity: 1;
}

#signupLink:hover::after {
    width: 0;
}

/* Mobile adjustment */
@media (max-width: 768px) {
    #signupLink {
        margin-left: 0;
        margin-top: 0.5rem;
        text-align: center;
        justify-content: center;
        padding: 0.7rem !important;
        width: 100%;
    }
}
/* Add to your styles.css - Combined Subtle Effects */

.header-container {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-purple));
    animation: subtleBreathing 8s ease-in-out infinite;
}

/* Background gradient shift */
.header-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        transparent 20%, 
        rgba(255,255,255,0.1) 50%, 
        transparent 80%);
    background-size: 200% 200%;
    animation: shimmerWave 10s linear infinite;
    pointer-events: none;
}

/* Floating particles */
.header-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.1) 2px, transparent 2px),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.1) 3px, transparent 3px),
        radial-gradient(circle at 40% 80%, rgba(255,255,255,0.1) 2px, transparent 2px),
        radial-gradient(circle at 90% 20%, rgba(255,255,255,0.1) 4px, transparent 4px),
        radial-gradient(circle at 10% 60%, rgba(255,255,255,0.1) 2px, transparent 2px);
    background-size: 300px 300px;
    animation: floatParticles 20s linear infinite;
    pointer-events: none;
}

/* Keyframes */
@keyframes subtleBreathing {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.98;
    }
}

@keyframes shimmerWave {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

@keyframes floatParticles {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 300px 300px;
    }
}

/* Ensure content stays above effects */
.logo-section {
    position: relative;
    z-index: 2;
}

/* Optional: Add hover effect for interactivity */
.header-container:hover::before {
    animation-duration: 5s;
}

/* Image upload styles */
#imagePreview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 120px;
}

#imagePreview div {
    position: relative;
    transition: transform 0.2s;
}

#imagePreview div:hover {
    transform: scale(1.05);
}

#imagePreview div:hover button {
    opacity: 1;
}

#imagePreview button {
    opacity: 0.7;
    transition: opacity 0.2s;
}

#imagePreview button:hover {
    background: var(--primary-red) !important;
    transform: scale(1.1);
}

#imagePreview .add-more-btn {
    border: 2px dashed #999;
    transition: all 0.3s;
}

#imagePreview .add-more-btn:hover {
    border-color: var(--primary-purple);
    color: var(--primary-purple);
    background: #f0f0f0;
}

/* Submit button disabled state */
#submitProductBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

#submitProductBtn:disabled:hover {
    transform: none;
    box-shadow: none;
}


/* Dynamic Marquee Ticker Styles - Crypto-Free Version */
.ticker-container {
    background: linear-gradient(90deg, var(--primary-purple), var(--primary-red));
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 999;
    font-size: 0.85rem;
    overflow: hidden;
    height: 36px;
    display: flex;
    align-items: center;
}

.ticker-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

.ticker-static {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    z-index: 2;
}

.ticker-label {
    font-size: 0.8rem;
    text-transform: uppercase;
}

.ticker-items {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
}

.ticker-track {
    display: flex;
    align-items: center;
    height: 100%;
    animation: tickerMove 40s linear infinite;
    white-space: nowrap;
    width: fit-content;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes tickerMove {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0 20px;
    color: white;
    font-size: 0.85rem;
    height: 100%;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.ticker-item i {
    margin-right: 6px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.ticker-item .label {
    font-weight: 500;
    margin-right: 6px;
    opacity: 0.8;
}

.ticker-item .value {
    font-weight: 700;
    color: #fff;
}

.ticker-item .trend-up {
    color: #4ade80;
    margin-left: 5px;
    font-size: 0.75rem;
}

.ticker-item .trend-down {
    color: #f87171;
    margin-left: 5px;
    font-size: 0.75rem;
}

.ticker-loading {
    display: flex;
    align-items: center;
    height: 100%;
    color: white;
    padding: 0 20px;
    font-style: italic;
    opacity: 0.8;
}

/* Currency items */
.ticker-item.currency {
    background: rgba(255, 255, 255, 0.05);
}

/* Stats items */
.ticker-item.stats {
    background: rgba(106, 76, 156, 0.3);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .ticker-container {
        height: 32px;
        font-size: 0.75rem;
    }
    
    .ticker-static {
        padding: 0 12px;
    }
    
    .ticker-label {
        font-size: 0.7rem;
    }
    
    .ticker-item {
        padding: 0 12px;
        font-size: 0.75rem;
    }
    
    .ticker-item i {
        margin-right: 4px;
        font-size: 0.8rem;
    }
    
    @keyframes tickerMove {
        0% { transform: translateX(0); }
        100% { transform: translateX(-70%); }
    }
}

@media (max-width: 480px) {
    .ticker-static {
        display: none;
    }
    
    .ticker-items {
        width: 100%;
    }
    
    .ticker-item {
        padding: 0 10px;
    }
}

/* Pulse animation for new products */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ticker-item.new-product {
    animation: pulse 2s infinite;
    background: rgba(74, 222, 128, 0.15);
}
