@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #ee4d2d;
    --primary-light: #ff5722;
    --accent: #ffce3d;
    --bg-body: #f5f5f5;
    --bg-surface: #ffffff;
    --text-main: #2c2c2c;
    --text-muted: #666666;
    --text-light: #ffffff;
    --border: #e5e5e5;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
}

/* Marketplace Header */
.mp-header {
    background: #ee4d2d;
    padding: 10px 15px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mp-search-container {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

.mp-back-btn,
.mp-icon {
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
}

.mp-search-wrapper {
    flex: 1;
    background: #fff;
    height: 38px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 10px;
}

.mp-search-wrapper input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.95rem;
    color: #333;
}

.mp-header-icons {
    display: flex;
    gap: 15px;
}

/* Store Banner */
.store-banner {
    background: url('https://images.unsplash.com/photo-1555041469-a586c61ea9bc?auto=format&fit=crop&q=80&w=1000') center/cover;
    height: 180px;
    position: relative;
    overflow: hidden;
}

.store-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px 15px;
}

.store-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

.store-logo {
    width: 60px !important;
    height: 60px !important;
    border-radius: 8px;
    background: transparent;
    object-fit: contain;
    padding: 2px;
}

.store-details {
    color: white;
    flex: 1;
}

.store-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.store-stats {
    display: flex;
    gap: 8px;
    font-size: 0.75rem;
    opacity: 0.9;
    align-items: center;
}

.mall-badge {
    background: #d0011b;
    color: white;
    padding: 1px 4px;
    border-radius: 2px;
    font-weight: 700;
    font-size: 0.65rem;
}

/* Tabs */
.store-tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid #efefef;
    position: sticky;
    top: 58px;
    z-index: 999;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    text-decoration: none;
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    cursor: pointer;
    transition: color 0.2s;
}

.tab-item:hover {
    color: #ee4d2d;
}

.tab-item.active {
    color: #ee4d2d;
    font-weight: 600;
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: #ee4d2d;
}

/* Sort Bar */
.sort-bar-container {
    background: #f5f5f5;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.sort-bar {
    display: flex;
    background: white;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 2px;
}

.sort-item {
    flex: 1;
    padding: 12px 5px;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    color: #333;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.sort-item:hover {
    color: #ee4d2d;
}

.sort-item.active {
    color: #ee4d2d;
    border-bottom: 2px solid #ee4d2d;
    background: #fafafa;
}

/* Product Grid */
.mp-container {
    background: #f5f5f5;
    min-height: 100vh;
    padding-bottom: 20px;
}

.mp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 8px;
}

@media (min-width: 768px) {
    .mp-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1200px;
        margin: 0 auto;
        gap: 15px;
    }
}

.mp-product-card {
    background: white;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    height: 100%;
}

.mp-img-wrapper {
    position: relative;
    padding-top: 100%;
}

.mp-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mp-info {
    padding: 8px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mp-title {
    font-size: 0.8rem;
    line-height: 1.4;
    max-height: 2.8rem;
    height: auto;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #333;
    margin-bottom: 4px;
}

.mp-price {
    color: #ee4d2d;
    font-size: 1rem;
    font-weight: 600;
    margin-top: auto;
}

/* Detail Page Specifics */
.detail-mp-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    z-index: 1001;
    transition: background 0.3s;
}

.detail-mp-header.scrolled {
    background: white;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.header-circle-btn {
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
}

.scrolled .header-circle-btn {
    background: transparent;
    color: #ee4d2d;
}

.mp-detail-main {
    background: #f5f5f5;
}

.mp-detail-info-card {
    background: white;
    padding: 15px;
    margin-bottom: 8px;
}

.mp-main-price {
    color: #ee4d2d;
    font-size: 1.8rem;
    font-weight: 700;
}

.mall-ori-badge {
    background: #ee4d2d;
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 2px;
}

.mp-detail-name {
    font-size: 1rem;
    font-weight: 500;
    color: #333;
    margin-top: 10px;
}

.btn-variant {
    border: 1px solid #ddd;
    background: white;
    padding: 8px 15px;
    border-radius: 2px;
    font-size: 0.85rem;
    cursor: pointer;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.spec-label {
    color: #757575;
}

/* Gallery Controls */
.main-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #fff;
}

.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.btn-prev {
    left: 10px;
}

.btn-next {
    right: 10px;
}

/* Desktop Detail Redesign */
@media (min-width: 992px) {
    .mp-detail-main {
        padding: 40px 0;
    }

    .detail-mp-header {
        display: none !important;
    }

    .p-detail-wrapper {
        display: flex;
        gap: 40px;
        align-items: flex-start;
        background: white;
        padding: 30px;
        max-width: 1200px;
        margin: 0 auto;
        box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    }

    .gallery-col {
        width: 450px;
        flex-shrink: 0;
    }

    .info-col {
        flex: 1;
    }

    .main-image-container {
        height: 450px !important;
    }

    .desktop-thumbs-pc {
        display: flex;
        gap: 10px;
        margin-top: 15px;
        overflow-x: auto;
    }

    .thumb-item-pc {
        width: 82px;
        height: 82px;
        border: 2px solid transparent;
        cursor: pointer;
    }

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

    .thumb-item-pc.active {
        border-color: #ee4d2d;
    }

    .specs-grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 20px !important;
        background: #fafafa !important;
    }

    .mp-main-price {
        font-size: 2.2rem;
    }

    .desktop-nav-breadcrumb {
        max-width: 1200px;
        margin: 0 auto 15px;
        font-size: 0.85rem;
        color: #555;
    }
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 12px 20px;
    border-radius: 2px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
}

/* Image Preview Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.modal img {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    user-select: none;
}

#previewCaption {
    color: white;
    margin-top: 15px;
    font-size: 1rem;
    text-align: center;
    padding: 0 20px;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.nav-btn-modal {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    font-size: 30px;
    padding: 20px 10px;
    cursor: pointer;
    z-index: 10001;
    transition: background 0.2s;
}

.nav-btn-modal:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-btn-modal.prev {
    left: 10px;
}

.nav-btn-modal.next {
    right: 10px;
}

/* Category List Styling */
.category-chips {
    display: flex;
    flex-direction: column;
    background: white;
    width: 100%;
}

.category-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.category-list-item:active {
    background: #f9f9f9;
}

.cat-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cat-img-box {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
}

.cat-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cat-text {
    display: flex;
    flex-direction: column;
}

.cat-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
}

.cat-count {
    font-size: 0.75rem;
    color: #999;
    margin-top: 2px;
}

.cat-arrow {
    color: #ccc;
    font-size: 0.8rem;
}

/* Hide banner on specific tabs if needed */
body.tab-kategori-active .store-banner,
body.tab-kategori-active .sort-bar-container {
    display: none;
}

body.tab-kategori-active .store-tabs {
    position: sticky;
    top: 58px;
}

@media (min-width: 992px) {
    .category-chips {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        background: transparent;
        padding: 20px 0;
        max-width: 1200px;
        margin: 0 auto;
    }

    .category-list-item {
        background: white;
        border: 1px solid #eee;
        border-radius: 8px;
    }
}

/* Footer Styling */
footer {
    background: #2c2c2c;
    color: #ffffff;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.footer-col {
    flex: 1;
}

.footer-col h3 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ee4d2d;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: #ee4d2d;
    transform: translateY(-3px);
}

.copyright {
    max-width: 1200px;
    margin: 60px auto 0;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #777;
    font-size: 0.85rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .footer-col {
        min-width: 200px;
    }
}

/* Specific Footer Elements */
.brand {
    color: #ffffff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand img {
    height: 45px;
    background: white;
    padding: 4px;
    border-radius: 6px;
}

.brand span {
    font-size: 1.2rem;
    font-weight: 700;
}

footer p {
    color: #b0b0b0;
    line-height: 1.8;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    color: #b0b0b0;
    font-size: 0.9rem;
}

.contact-item i {
    color: #ee4d2d;
    font-size: 1rem;
    margin-top: 4px;
    width: 20px;
    text-align: center;
}

.contact-item b {
    color: #ffffff;
}

@media (min-width: 992px) {
    .footer-content {
        flex-wrap: nowrap;
    }
}