:root {
    --primary-bg: #0a0a0c;
    --accent-blue: #31A8FF;
    --accent-orange: #FF9A00;
    --border-color: rgba(255, 255, 255, 0.12);
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    /* Heavy Glass Base */
    --card-bg: rgba(255, 255, 255, 0.03);
}

body {
    background-color: var(--primary-bg);
    background-image: radial-gradient(circle at 50% 0%, #202020, #050505);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    padding-top: 80px;
    min-height: 100vh;
}

.page-wrapper {
    width: 90%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 0;
}

.content-container {
    width: 100%;
}

/* Profile Header and Navigation styles moved to global_ui.css */

/* Controls */
.controls-section {
    display: flex;
    flex-direction: column;
    margin-bottom: 2.5rem;
    width: 100%;
}

.filters-row {
    width: 100%;
}

.filter-tabs {
    display: flex;
    width: 100%;
    cursor: grab;
    user-select: none;
    overflow-x: auto;
    scrollbar-width: none;
    background-color: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    gap: 0.5rem;
    padding: 0 5px;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tabs.grabbing {
    cursor: grabbing;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    /* Prepare for active border */
    color: var(--text-secondary);
    padding: 0.5rem 1.2rem;
    margin: 0.5rem 0.3rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    white-space: nowrap;
}

.filter-btn:hover {
    background: #212020;
    color: #fff;
}

.filter-btn.active {
    background: #212020;
    color: #fff;
    border: 1px solid #fff;
    /* Portfolio "Neat" Style */
}

/* Grid Animations */
.market-card.new-item {
    animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-grid {
    display: grid;
    gap: 0.2rem;
    transition: all 0.5s ease;
    width: 100%;
}

/* Default Grid View (2 cols mobile, 3 tablet, 4 desktop) */
.grid-view-1 {
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
    .grid-view-1 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .grid-view-1 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1921px) {
    .grid-view-1 {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Cards */
.project-card {
    background-color: var(--card-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.5s ease-out forwards;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: #444;
    border-style: dashed;
}

.project-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: #000;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .project-img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(3px);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.view-btn {
    padding: 0.8rem 1.5rem;
    background-color: var(--text-primary);
    color: var(--primary-bg);
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    transform: translateY(20px);
    transition: transform 0.3s, background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-card:hover .view-btn {
    transform: translateY(0);
}

.view-btn:hover {
    background-color: var(--accent-blue);
    color: #fff;
}

.project-info {
    padding: 1.25rem;
}

.project-title {
    color: var(--text-primary);
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 0;
}

.project-cat {
    color: var(--accent-blue);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   Product Detail Page Styles 
   =========================== */
.product-container {
    padding: 0 1rem;
}

.breadcrumb {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: var(--accent-blue);
}

.breadcrumb .current {
    color: #fff;
}

/* Reusing Premium Card Styles */
.product-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 900px) {
    .product-layout {
        grid-template-columns: 1fr;
    }
}

/* Left: Media */
.product-media {
    background: var(--card-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 0;
    /* Square aesthetic */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s;
}

.product-media:hover {
    border-color: #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.main-product-img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 0;
}

/* Right: Info */
.product-info-panel {
    display: flex;
    flex-direction: column;
}

.product-title-large {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    font-weight: 800;
    background: linear-gradient(to right, #e0e0e0, #888);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.product-meta {
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.category-tag {
    padding: 0.4rem 1rem;
    background-color: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(5px);
    border: 1px solid #333;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.category-tag:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    border-style: dashed;
}

/* Price Box - Premium Card Style */
.price-box {
    background: var(--card-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    padding: 2rem;
    border-radius: 0;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.price-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: #333;
    border-style: dashed;
}

.price-label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.price-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-orange);
    text-shadow: 0 0 15px rgba(255, 154, 0, 0.2);
}

/* Buy Button - Matching 'Contact Me' style */
.buy-btn-large {
    display: block;
    width: 100%;
    padding: 1.2rem;
    background-color: #1a1a1a;
    color: #e0e0e0;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    border-radius: 0;
    transition: all 0.3s ease;
    border: 1px solid #333;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
}

.buy-btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
    background-color: #222;
    color: #fff;
    border-style: dashed;
    border-width: 1px;
}

.license-info {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Social Share */
.social-share {
    display: flex;
    gap: 1rem;
    align-items: center;
    color: #888;
    margin-top: auto;
}

.social-share a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #333;
    background: #1a1a1a;
    color: #888;
    text-decoration: none;
    transition: all 0.3s;
}

.social-share a:hover {
    background: #e0e0e0;
    color: #000;
    transform: translateY(-3px);
    border-style: dashed;
}

/* Description Section - Info Card Style */
.product-description-section {
    max-width: 100%;
    background: var(--card-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    margin-bottom: 4rem;
    transition: all 0.3s;
}

.product-description-section:hover {
    border-color: #333;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-style: dashed;
}

.product-description-section h3 {
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    color: #e0e0e0;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.desc-content {
    line-height: 1.8;
    color: #ccc;
    font-size: 1.05rem;
}

/* Similar Products */
.similar-products h3 {
    color: #e0e0e0;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
}

.similar-products {
    margin-top: 4rem;
}

/* Gallery Styles */
.product-gallery-grid {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
    scrollbar-width: none;
}

.product-gallery-grid::-webkit-scrollbar {
    display: none;
}

.gallery-thumb {
    width: 90px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: 0.3s;
    flex-shrink: 0;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb:hover {
    opacity: 1;
    border-color: #555;
}

.gallery-thumb.active {
    border-color: var(--accent-blue);
    opacity: 1;
    transform: scale(1.05);
}

.main-product-img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 6px;
}

/* ===========================
   New Market Card Design
   =========================== */
/* Card is now an anchor tag */
.market-card {
    background-color: var(--card-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    position: relative;
    border-radius: var(--radius-sm);
    text-decoration: none;
    /* Remove underline */
    color: inherit;
    cursor: pointer;
}

.market-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: #444;
}

.market-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
}

.market-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.market-card:hover .market-card-image img {
    transform: scale(1.05);
    /* Subtle zoom */
}

/* Overlay removed as per user request */

.market-card-body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    background: linear-gradient(to bottom, #1a1a1a, #161616);
}

.market-card-title {
    font-size: 0.95rem;
    /* Reduced from 1.1rem */
    font-weight: 600;
    color: #e0e0e0;
    margin: 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Limit to 2 lines */
    -webkit-box-orient: vertical;
}

.market-card-title a {
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.2s;
}

.market-card-title a:hover {
    color: #fff;
}

.market-card-category {
    font-size: 0.85rem;
    color: #888;
    display: flex;
    align-items: center;
}

.market-card-category .cat-text {
    color: #888;
    margin-left: 4px;
}

.market-card-footer {
    padding: 0.8rem 1rem;
    background-color: #121212;
    border-top: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.market-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-size: 0.8rem;
    color: #666;
}

.market-price-tag {
    background-color: #e35d18;
    /* Reference orange */
    color: white;
    padding: 4px 8px;
    border-radius: 2px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.2s;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.market-price-tag:hover {
    background-color: #ff6a20;
}

/* ===========================
   Mobile Responsiveness
   =========================== */
@media (max-width: 1024px) {
    .page-wrapper {
        width: 94%;
        padding: 1rem 0;
    }

    .product-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-media {
        padding: 5px;
    }

    .main-product-img {
        aspect-ratio: auto;
        height: auto;
        object-fit: contain;
    }

    .gallery-thumb {
        width: 70px;
        height: 50px;
    }

    .product-info-panel {
        gap: 0;
    }

    .product-title-large {
        font-size: 1.75rem;
        /* Reduced from 2.5rem */
        line-height: 1.2;
    }

    .product-meta {
        margin-bottom: 1.5rem;
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .price-box {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .price-amount {
        font-size: 2rem;
        /* Reduced from 2.5rem */
    }

    .buy-btn-large {
        padding: 1rem;
        font-size: 1rem;
    }

    .product-description-section {
        padding: 1.5rem;
        margin-bottom: 2.5rem;
    }

    .product-description-section h3,
    .similar-products h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .desc-content {
        font-size: 0.95rem;
    }

    .similar-products {
        margin-top: 2rem;
    }

    /* Adjust breadcrumb for small screens */
    .breadcrumb {
        font-size: 0.8rem;
        margin-bottom: 1rem;
        flex-wrap: wrap;
    }
}