
.marketplace {
    max-width: 1280px;
    margin: auto;
    padding: 32px 20px 60px;
    color: #202124;
}

.marketplace * {
    box-sizing: border-box;
}

.marketplace a {
    text-decoration: none;
    color: inherit;
}

.mp-breadcrumb {
    font-size: 13px;
    color: #666;
    margin-bottom: 22px;
}

.mp-breadcrumb a:hover {
    color: #e55b19;
}

.mp-heading {
    margin-bottom: 26px;
}

.mp-heading h1 {
    font-size: clamp(25px, 4vw, 34px);
    margin: 0 0 8px;
}

.mp-muted {
    color: #737373;
    font-size: 14px;
}

.mp-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.mp-sidebar,
.mp-panel {
    border: 1px solid #eaeaea;
    background: white;
    border-radius: 12px;
    padding: 20px;
}

.mp-sidebar h3 {
    font-size: 17px;
    margin: 0 0 16px;
}

.mp-sidebar a {
    display: block;
    padding: 10px 12px;
    border-radius: 7px;
    font-size: 14px;
    margin-bottom: 3px;
}

.mp-sidebar a:hover,
.mp-sidebar a.active {
    background: #fff0e8;
    color: #d94c0c;
}

.mp-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.mp-search {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 550px;
}

.mp-input {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    font: inherit;
    min-width: 0;
}

.mp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: #e55b19;
    color: white !important;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.mp-button:hover {
    background: #c7470b;
}

.mp-button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.mp-button-outline {
    background: white;
    color: #d94c0c !important;
    border: 1px solid #e55b19;
}

.mp-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.mp-card {
    background: white;
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
    min-width: 0;
}

.mp-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,.09);
    transform: translateY(-3px);
}

.mp-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    background: #f7f7f7;
    overflow: hidden;
}

.mp-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mp-placeholder {
    color: #aaa;
    font-size: 14px;
    text-align: center;
}

.mp-card-body {
    padding: 15px;
}

.mp-card-category {
    color: #888;
    font-size: 12px;
    margin-bottom: 7px;
}

.mp-card h3 {
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 12px;
    min-height: 44px;
}

.mp-price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 12px;
}

.mp-price strong {
    font-size: 20px;
}

.mp-mrp {
    text-decoration: line-through;
    color: #999;
    font-size: 13px;
}

.mp-discount {
    color: #188038;
    font-size: 12px;
    font-weight: 700;
}

.mp-stock {
    color: #188038;
    font-size: 12px;
    margin-bottom: 12px;
}

.mp-out {
    color: #c62828;
}

.mp-card .mp-button {
    width: 100%;
}

.mp-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.mp-category-card {
    border: 1px solid #e9e9e9;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
    background: white;
    transition: .2s;
}

.mp-category-card:hover {
    border-color: #e55b19;
    transform: translateY(-3px);
}

.mp-category-card .mp-image {
    aspect-ratio: 1.3;
}

.mp-category-card h3 {
    font-size: 16px;
    padding: 15px;
    margin: 0;
}

.mp-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

.mp-main-image {
    border: 1px solid #eee;
    border-radius: 12px;
    background: #fafafa;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.mp-main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.mp-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
}

.mp-thumbnails button {
    flex: 0 0 78px;
    width: 78px;
    height: 78px;
    padding: 4px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 8px;
    cursor: pointer;
}

.mp-thumbnails button:hover {
    border-color: #e55b19;
}

.mp-thumbnails img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mp-detail-info h1 {
    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.3;
    margin: 10px 0 18px;
}

.mp-detail-price {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 14px;
}

.mp-detail-description {
    line-height: 1.8;
    color: #555;
    margin: 22px 0;
}

.mp-purchase {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 22px 0;
}

.mp-quantity {
    width: 90px;
}

.mp-empty {
    padding: 65px 20px;
    text-align: center;
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 12px;
    color: #777;
}

.mp-section-title {
    font-size: 24px;
    margin: 32px 0 22px;
}

@media (max-width: 1000px) {
    .mp-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mp-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .mp-layout,
    .mp-detail {
        grid-template-columns: 1fr;
    }

    .mp-sidebar {
        display: none;
    }

    .mp-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .marketplace {
        padding: 22px 14px 45px;
    }
}

@media (max-width: 420px) {
    .mp-grid {
        gap: 10px;
    }

    .mp-card-body {
        padding: 10px;
    }

    .mp-card h3 {
        font-size: 13px;
    }

    .mp-price strong {
        font-size: 17px;
    }
}