/* Marketplace Page Specific Styles */
.marketplace-page {
    background-color: #0a0a0a;
    color: #ffffff;
}

/* Marketplace Hero */
.marketplace-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                url('https://images.unsplash.com/photo-1441986300917-64674bd600d8?ixlib=rb-4.0.3&auto=format&fit=crop&w=1950&q=80') center/cover no-repeat;
    padding: 120px 0;
    text-align: center;
    position: relative;
    margin: 0;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Push content down below the navbar */
    padding-top: 120px;
    margin-top: 0;
    box-sizing: border-box;
}

.marketplace-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Archivo Black', sans-serif;
}

.marketplace-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* How It Works Section */
.how-it-works {
    padding: 80px 0;
    background-color: #111;
    margin-bottom: 60px;
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.step-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 40px 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
    font-family: 'Archivo Black', sans-serif;
}

.step-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #ffffff;
}

.step-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0;
}

/* Featured Designs */
.featured-designs {
    padding: 80px 0;
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.view-all a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.3s ease;
}

.view-all a:hover {
    opacity: 0.8;
}

.designs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.design-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.design-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.design-image {
    width: 100%;
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.design-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.design-card:hover .design-overlay {
    opacity: 1;
}

.design-actions {
    display: flex;
    gap: 10px;
}

.design-info {
    padding: 20px;
}

.design-title {
    font-size: 1.1rem;
    margin: 0 0 5px;
    color: #ffffff;
}

.design-author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

.design-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
    margin: 10px 0 0;
}

/* Categories Section */
.categories-section {
    padding: 80px 0;
    background-color: #111;
    margin-bottom: 60px;
}

.categories-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.category-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.category-card h3 {
    padding: 20px;
    margin: 0;
    text-align: center;
    font-size: 1.2rem;
}

/* Sell CTA Section */
.sell-cta {
    padding: 100px 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.1) 0%, rgba(0, 0, 0, 0.8) 100%);
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.sell-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?ixlib=rb-4.0.3&auto=format&fit=crop&w=1950&q=80') center/cover no-repeat;
    opacity: 0.3;
    z-index: -1;
}

.sell-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sell-cta p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: #1a1a1a;
    border-radius: 8px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 0;
}

.close-modal:hover {
    color: white;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: white;
    font-family: 'Archivo', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.price-input {
    display: flex;
    align-items: center;
    gap: 5px;
}

.price-input span {
    font-size: 1.1rem;
    opacity: 0.8;
}

.price-input input {
    flex: 1;
}

.upload-area {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: var(--accent-color);
    background: rgba(255, 20, 147, 0.05);
}

.upload-area i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
    display: block;
}

.upload-area p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

.upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

.product-types {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 35px;
    margin-bottom: 0;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 25px;
    width: 25px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--accent-color);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 9px;
    top: 5px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.terms {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.terms a {
    color: var(--accent-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.terms a:hover {
    opacity: 0.8;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    grid-column: 1 / -1;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Styles */
@media (max-width: 992px) {
    .steps-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
    
    .step-card {
        max-width: 100%;
    }
    
    .designs-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .marketplace-hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        width: 100%;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
}

@media (max-width: 576px) {
    .marketplace-hero h1 {
        font-size: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .view-all {
        width: 100%;
    }
    
    .view-all a {
        justify-content: space-between;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* User Authentication Section */
.user-auth-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
    padding-right: 20px;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 4px;
}

.btn-outline {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-menu {
    position: relative;
    cursor: pointer;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}

.dropdown-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 10px;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 5px 0;
}

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

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

.btn-payment {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-payment:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .user-auth-section {
        display: none;
    }
    
    .header-text {
        font-size: 1.2rem;
        margin-left: 10px;
    }
    
    /* Mobile Menu */
    .mobile-menu {
        width: 85%;
    }
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: #1a1a1a;
    z-index: 10000 !important; /* Ensure it stays on top of everything */
    transition: all 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    padding: 20px 0;
}

.mobile-menu.active {
    left: 0;
}

.mobile-logo {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-links li a {
    display: block;
    padding: 12px 25px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.mobile-nav-links li a:hover,
.mobile-nav-links li a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ff3366;
}

/* Cart Sidebar */
#cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 380px;
    height: 100%;
    background: #1a1a1a;
    z-index: 1001;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
}

#cart-sidebar.active {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-cart {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

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

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.cart-item-details {
    flex: 1;
}

.cart-item h4 {
    margin: 0 0 5px 0;
    font-size: 0.95rem;
}

.cart-item-price {
    color: #4CAF50;
    font-weight: 600;
    margin-bottom: 8px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
}

.quantity-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.remove-item {
    position: absolute;
    top: 10px;
    right: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 1rem;
}

.remove-item:hover {
    color: #ff4d4d;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.checkout-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    #cart-sidebar {
        max-width: 100%;
    }
}

/* Simple Mobile Menu Z-Index Fix for Marketplace */
/* Mobile menu styles are now in navigation.css */

.marketplace-page .hamburger {
    z-index: 100000 !important;
    position: relative !important;
}

.marketplace-page .overlay {
    z-index: 998 !important;
}

.marketplace-page .modal {
    z-index: 99998 !important;
}
