/**
 * Marketplace Premium eCommerce Design System
 * Inspired by Amazon, Shopify, and modern Global Marketplaces
 */

:root {
    /* Marketplace Color Palette */
    --market-dark: #131921;
    --market-sub-dark: #232f3e;
    --market-accent: #febd69;
    --market-accent-hover: #f3a847;
    --market-blue: #007185;
    --market-red: #cc0c39;
    --market-bg: #eaeded;
    --market-card-bg: #ffffff;
    --market-text: #0f1111;
    --market-text-light: #565959;
    --market-link: #007185;
    
    /* UI Tokens */
    --market-radius: 4px;
    --market-shadow: 0 4px 12px rgba(0,0,0,0.1);
    --market-shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
}

body.store-premium {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--market-bg) !important;
    color: var(--market-text);
    line-height: 1.5;
}

/* --- Marketplace Header (3-Tier) --- */
.marketplace-header {
    background: var(--market-dark);
    color: #fff;
}

.marketplace-main-nav {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    gap: 15px;
}

.marketplace-search-wrap {
    flex-grow: 1;
    display: flex;
    background: #fff;
    border-radius: 4px;
    height: 40px;
    overflow: hidden;
}

.marketplace-search-cat {
    background: #f3f3f3;
    border-right: 1px solid #ddd;
    color: #555;
    padding: 0 15px;
    font-size: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.marketplace-search-input {
    flex-grow: 1;
    border: none;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
}

.marketplace-search-btn {
    background: var(--market-accent);
    color: var(--market-text);
    border: none;
    width: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
}

.marketplace-search-btn:hover { background: var(--market-accent-hover); }

.marketplace-nav-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5px 10px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
}

.marketplace-nav-item:hover { border-color: #fff; }

.nav-line-1 { font-size: 12px; color: #ccc; }
.nav-line-2 { font-size: 14px; font-weight: 700; }

.marketplace-sub-nav {
    background: var(--market-sub-dark);
    display: flex;
    align-items: center;
    padding: 5px 15px;
    gap: 20px;
    font-size: 14px;
}

.sub-nav-link {
    color: #fff;
    text-decoration: none;
    padding: 5px;
    border: 1px solid transparent;
}

.sub-nav-link:hover { border-color: #fff; }

/* --- Marketplace Hero --- */
.marketplace-hero {
    position: relative;
    background: #e3e6e6;
    margin-bottom: -150px;
}

.marketplace-hero-img {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 70%, rgba(0,0,0,0));
}

.marketplace-quick-cards {
    position: relative;
    z-index: 10;
    margin-top: -300px;
    padding: 0 20px;
}

.quick-card {
    background: #fff;
    padding: 20px;
    height: 100%;
    box-shadow: var(--market-shadow);
}

.quick-card h4 { font-size: 18px; margin-bottom: 15px; font-weight: 700; }

.card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.grid-item {
    text-decoration: none;
    color: inherit;
}

.grid-item img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    margin-bottom: 5px;
}

.grid-item span { font-size: 12px; }

/* --- Marketplace Product Cards --- */
.marketplace-pcard {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    transition: transform 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.marketplace-pcard:hover { transform: scale(1.02); }

.pcard-img-wrap {
    aspect-ratio: 1/1;
    background: #f8f8f8;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcard-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pcard-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pcard-rating {
    color: #ffa41c;
    font-size: 12px;
    margin-bottom: 8px;
}

.pcard-price {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: flex-start;
}

.pcard-price .currency { font-size: 12px; margin-top: 4px; }

.pcard-deal {
    background: var(--market-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 2px;
    display: inline-block;
    margin-bottom: 8px;
}

/* --- Mobile Bottom Nav --- */
.marketplace-mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 1000;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #555;
    font-size: 10px;
}

.mobile-nav-item i { font-size: 22px; margin-bottom: 2px; }
.mobile-nav-item.active { color: var(--market-blue); }

/* --- Footer --- */
.marketplace-footer {
    background: var(--market-sub-dark);
    color: #fff;
    margin-top: 50px;
}

.footer-back-to-top {
    background: #37475a;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    font-size: 13px;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding: 40px 15px;
    max-width: 1000px;
    margin: 0 auto;
}

.footer-col h6 { font-size: 16px; margin-bottom: 15px; font-weight: 700; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #ddd; text-decoration: none; font-size: 13px; }
.footer-col ul li a:hover { text-decoration: underline; }

.footer-bottom {
    background: var(--market-dark);
    padding: 30px;
    text-align: center;
    font-size: 12px;
    color: #ccc;
}

/* Utilities */
.reveal-up { animation: revealUp 0.6s ease-out forwards; }
@keyframes revealUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.store-page-px { padding-left: 20px; padding-right: 20px; }
@media (max-width: 768px) { .store-page-px { padding-left: 10px; padding-right: 10px; } }
