/* ==========================================================
   SELLER STORE
   CLEAN PRODUCT STORE DESIGN
========================================================== */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: #f5f5f5;
    color: #222;
    font-family: Arial, Helvetica, sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
select {
    font: inherit;
}


/* ==========================================================
   HEADER
========================================================== */

.seller-store-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;
    min-height: 64px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 28px;

    background: #fff;

    border-bottom: 1px solid #eee;

    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.seller-store-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.seller-store-menu-button {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #ddd;
    border-radius: 6px;

    background: #fff;

    font-size: 22px;
    cursor: pointer;
}

.seller-store-logo {
    color: #f4511e;

    font-size: 22px;
    font-weight: 800;
}

.seller-store-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.seller-view-store-button,
.seller-add-product-button {
    min-height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 15px;

    border-radius: 5px;

    font-size: 13px;
    font-weight: 700;
}

.seller-view-store-button {
    border: 1px solid #ddd;
    background: #fff;
}

.seller-add-product-button {
    background: #f4511e;
    border: 1px solid #f4511e;
    color: #fff;
}


/* ==========================================================
   MAIN
========================================================== */

.seller-store-main {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto;

    padding: 20px;
}


/* ==========================================================
   WELCOME
========================================================== */

.seller-store-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;
    padding: 22px;

    background: #fff;

    border-radius: 8px;

    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.seller-store-welcome span {
    color: #f4511e;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1px;
}

.seller-store-welcome h1 {
    margin: 5px 0;

    font-size: 27px;
}

.seller-store-welcome p {
    margin: 0;

    color: #777;

    font-size: 13px;
}

.seller-welcome-add-button {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0 18px;

    border-radius: 5px;

    background: #f4511e;
    color: #fff;

    font-size: 13px;
    font-weight: 700;
}


/* ==========================================================
   STATISTICS
========================================================== */

.seller-store-stats {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 12px;

    margin-bottom: 18px;
}

.seller-stat-card {
    padding: 18px;

    background: #fff;

    border-radius: 7px;

    box-shadow: 0 2px 7px rgba(0,0,0,.06);
}

.seller-stat-card span {
    display: block;

    color: #777;

    font-size: 12px;
}

.seller-stat-card strong {
    display: block;

    margin-top: 7px;

    font-size: 24px;
}


/* ==========================================================
   TOOLBAR
========================================================== */

.seller-product-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    padding: 16px;

    background: #fff;

    border-radius: 8px 8px 0 0;
}

.seller-product-toolbar-left h2 {
    margin: 0;

    font-size: 19px;
}

.seller-product-toolbar-left span {
    display: block;

    margin-top: 4px;

    color: #888;

    font-size: 11px;
}

.seller-product-toolbar-right {
    display: flex;
    gap: 8px;
}

.seller-search-wrapper {
    width: 230px;
    height: 38px;

    display: flex;
    align-items: center;

    padding: 0 10px;

    border: 1px solid #ddd;
    border-radius: 5px;
}

.seller-search-wrapper input {
    width: 100%;

    border: 0;
    outline: none;
}

.seller-product-filter {
    height: 38px;

    padding: 0 10px;

    border: 1px solid #ddd;
    border-radius: 5px;

    background: #fff;
}


/* ==========================================================
   PRODUCT AREA
========================================================== */

.seller-products-section {
    width: 100%;

    padding: 12px;

    background: #f5f5f5;
}


/* ==========================================================
   PRODUCT GRID
========================================================== */

.seller-products-grid,
#sellerProductsGrid {
    width: 100%;

    display: grid !important;

    grid-template-columns:
        repeat(2, minmax(0, 1fr)) !important;

    gap: 10px !important;

    padding: 0 !important;
}


/* ==========================================================
   PRODUCT CARD
========================================================== */

.seller-product-card {
    width: 100% !important;
    min-width: 0;

    overflow: hidden;

    background: #fff !important;

    border: 1px solid #e5e5e5 !important;

    border-radius: 7px !important;

    box-shadow:
        0 2px 7px rgba(0,0,0,.08) !important;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.seller-product-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 5px 14px rgba(0,0,0,.12) !important;
}


/* ==========================================================
   IMAGE
========================================================== */

.seller-product-image {
    position: relative;

    width: 100% !important;

    height: auto !important;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: #f3f3f3;
}

.seller-product-image img {
    width: 100% !important;
    height: 100% !important;

    display: block;

    object-fit: cover !important;
}


/* ==========================================================
   PRODUCT INFO
========================================================== */

.seller-product-info {
    width: 100%;

    padding: 10px !important;

    background: #fff;
}


/* ==========================================================
   CATEGORY
========================================================== */

.seller-product-category {
    display: block;

    width: 100%;

    margin: 0 0 5px;

    color: #777 !important;

    font-size: 11px !important;
    font-weight: 400 !important;

    line-height: 1.3;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* ==========================================================
   PRODUCT NAME
========================================================== */

.seller-product-name {
    margin: 0 0 8px !important;

    min-height: 38px;

    color: #222 !important;

    font-size: 14px !important;
    font-weight: 600 !important;

    line-height: 1.35;

    display: -webkit-box;

    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}


/* ==========================================================
   PRICE
========================================================== */

.seller-product-price {
    margin: 0 0 5px;

    color: #111 !important;

    font-size: 17px !important;
    font-weight: 800 !important;
}

.seller-product-seller-price {
    margin-bottom: 4px;

    color: #777 !important;

    font-size: 11px !important;
}

.seller-product-old-price {
    color: #999 !important;

    font-size: 11px !important;

    text-decoration: line-through;
}


/* ==========================================================
   STOCK
========================================================== */

.seller-product-stock {
    margin: 4px 0 9px;

    color: #666 !important;

    font-size: 11px !important;
}

.seller-product-stock.in-stock {
    color: #188038 !important;
}

.seller-product-stock.out-of-stock {
    color: #d93025 !important;
}


/* ==========================================================
   META
========================================================== */

.seller-product-meta {
    display: flex;

    justify-content: space-between;

    gap: 5px;

    margin-top: 7px;

    padding-top: 7px;

    border-top: 1px solid #eee;
}

.seller-product-meta span,
.seller-product-meta strong {
    font-size: 10px;

    color: #777;
}


/* ==========================================================
   ACTIONS
========================================================== */

.seller-product-actions {
    width: 100%;

    display: grid !important;

    grid-template-columns:
        1fr 1fr !important;

    gap: 6px !important;

    padding: 0 10px 10px !important;

    background: #fff;
}


/* ==========================================================
   ALL PRODUCT BUTTONS
========================================================== */

.seller-product-actions a,
.seller-product-actions button,
.seller-product-view,
.seller-product-edit,
.seller-product-action {
    width: 100% !important;

    min-height: 34px !important;

    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    padding: 0 6px !important;

    border-radius: 5px !important;

    font-size: 11px !important;
    font-weight: 600 !important;

    cursor: pointer;

    text-align: center;

    text-decoration: none;
}


/* VIEW */

.seller-product-view {
    background: #f4511e !important;

    border: 1px solid #f4511e !important;

    color: #fff !important;
}


/* EDIT */

.seller-product-edit {
    background: #fff !important;

    border: 1px solid #ccc !important;

    color: #333 !important;
}


/* GENERIC PRIMARY BUTTON */

.seller-product-action.primary {
    background: #f4511e !important;

    border: 1px solid #f4511e !important;

    color: #fff !important;
}


/* ==========================================================
   STATUS
========================================================== */

.seller-product-status {
    position: absolute;

    top: 7px;
    left: 7px;

    z-index: 5;

    padding: 4px 7px;

    border-radius: 4px;

    background: #fff;

    color: #188038;

    font-size: 9px;

    font-weight: 700;

    box-shadow:
        0 1px 5px rgba(0,0,0,.12);
}

.seller-product-status.pending {
    color: #b36b00;
}

.seller-product-status.out-of-stock {
    color: #d93025;
}


/* ==========================================================
   DISCOUNT
========================================================== */

.seller-product-discount {
    position: absolute;

    top: 7px;
    right: 7px;

    z-index: 5;

    padding: 4px 6px;

    border-radius: 4px;

    background: #f4511e;

    color: #fff;

    font-size: 9px;
    font-weight: 700;
}


/* ==========================================================
   LOADING
========================================================== */

.seller-products-loading {
    min-height: 250px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    color: #777;
}

.seller-store-spinner {
    width: 30px;
    height: 30px;

    margin-bottom: 10px;

    border: 3px solid #ddd;

    border-top-color: #f4511e;

    border-radius: 50%;

    animation: spin .8s linear infinite;
}

@keyframes spin {

    to {
        transform: rotate(360deg);
    }

}


/* ==========================================================
   EMPTY
========================================================== */

.seller-products-empty,
.seller-products-no-results {
    width: 100%;

    padding: 50px 20px;

    text-align: center;

    background: #fff;

    border-radius: 7px;
}

.seller-products-empty h2,
.seller-products-no-results h2 {
    margin: 10px 0;

    font-size: 18px;
}

.seller-products-empty p,
.seller-products-no-results p {
    color: #777;

    font-size: 12px;
}


/* ==========================================================
   PAGINATION
========================================================== */

.seller-product-pagination {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 5px;

    padding: 15px;

    background: #fff;
}

.seller-product-page-button {
    min-width: 32px;
    height: 32px;

    border: 1px solid #ddd;

    border-radius: 5px;

    background: #fff;

    cursor: pointer;
}

.seller-product-page-button.active {
    background: #f4511e;

    border-color: #f4511e;

    color: #fff;
}


/* ==========================================================
   SIDEBAR
========================================================== */

.seller-store-sidebar {
    position: fixed;

    top: 0;
    left: 0;

    z-index: 2000;

    width: 280px;
    height: 100vh;

    padding: 20px;

    background: #fff;

    box-shadow:
        5px 0 20px rgba(0,0,0,.15);
}

.seller-sidebar-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    padding-bottom: 15px;

    border-bottom: 1px solid #eee;
}

.seller-sidebar-header button {
    border: 0;

    background: transparent;

    font-size: 25px;

    cursor: pointer;
}

.seller-sidebar-navigation {
    display: flex;

    flex-direction: column;

    gap: 4px;

    margin-top: 15px;
}

.seller-sidebar-navigation a {
    padding: 13px;

    border-radius: 5px;

    color: #555;

    font-size: 13px;
}

.seller-sidebar-navigation a.active,
.seller-sidebar-navigation a:hover {
    background: #fff1eb;

    color: #f4511e;
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 700px) {

    .seller-store-header {
        min-height: 58px;

        padding: 9px 12px;
    }

    .seller-store-logo {
        font-size: 18px;
    }

    .seller-view-store-button {
        display: none;
    }

    .seller-add-product-button {
        min-height: 36px;

        padding: 0 10px;

        font-size: 11px;
    }


    .seller-store-main {
        padding: 10px 0 40px;
    }


    .seller-store-welcome {
        margin: 0 10px 12px;

        padding: 16px;

        flex-direction: column;

        align-items: flex-start;
    }

    .seller-store-welcome h1 {
        font-size: 22px;
    }

    .seller-welcome-add-button {
        width: 100%;
    }


    .seller-store-stats {
        margin: 0 10px 12px;

        grid-template-columns:
            repeat(2, 1fr);

        gap: 8px;
    }

    .seller-stat-card {
        padding: 13px;
    }

    .seller-stat-card strong {
        font-size: 20px;
    }


    .seller-product-toolbar {
        margin: 0 10px;

        flex-direction: column;

        align-items: stretch;
    }

    .seller-product-toolbar-right {
        width: 100%;
    }

    .seller-search-wrapper {
        width: 100%;
        flex: 1;
    }


    .seller-products-section {
        padding: 8px 10px;
    }


    .seller-products-grid,
    #sellerProductsGrid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        gap: 8px !important;

        padding: 0 !important;
    }


    .seller-product-image {
        aspect-ratio: 1 / 1 !important;
    }


    .seller-product-info {
        padding: 8px !important;
    }


    .seller-product-category {
        font-size: 10px !important;
    }


    .seller-product-name {
        min-height: 36px;

        font-size: 13px !important;
    }


    .seller-product-price {
        font-size: 16px !important;
    }


    .seller-product-seller-price,
    .seller-product-stock {
        font-size: 10px !important;
    }


    .seller-product-actions {
        padding: 0 8px 8px !important;

        gap: 5px !important;
    }


    .seller-product-actions a,
    .seller-product-actions button,
    .seller-product-view,
    .seller-product-edit {
        min-height: 32px !important;

        font-size: 10px !important;
    }

}


/* ==========================================================
   VERY SMALL PHONE
========================================================== */

@media (max-width: 380px) {

    .seller-products-section {
        padding-left: 6px;
        padding-right: 6px;
    }

    .seller-products-grid,
    #sellerProductsGrid {
        gap: 6px !important;
    }

    .seller-product-info {
        padding: 7px !important;
    }

    .seller-product-name {
        font-size: 12px !important;
    }

    .seller-product-price {
        font-size: 15px !important;
    }

}


/* ==========================================================
   HIDDEN
========================================================== */

[hidden] {
    display: none !important;
}

