/**
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License version 3.0
 * that is bundled with this package in the file LICENSE.txt
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 *
 * @author Webkul IN
 * @copyright Since 2010 Webkul
 * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
 */

/* ═══════════════════════════════════
   SELLER PROFILE PAGE – NEW DESIGN
   Prefix: sp-  (seller profile)
   ═══════════════════════════════════ */

:root {
    --sp-accent: #013E4A;
    --sp-accent-light: #1a4a4a;
    --sp-text-main: #1a2222;
    --sp-text-muted: #6b7b7b;
    --sp-border: #e4eaea;
    --sp-surface: #ffffff;
    --sp-page-bg: #f4f7f7;
}

/* ── PAGE HEADER ── */
.sp-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 2rem 2rem 0 2rem;
}

.sp-page-header h1 {
    font-size: 24px;
    font-weight: 500;
    color: #2E2E2E;
    margin-bottom: 3px;
}

.sp-page-header p {
    font-size: 13px;
    color: var(--sp-text-muted);
}

.sp-header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── BUTTONS ── */
.sp-btn-outline {
    background: #F8FCFF;
    border: 1.5px solid #013E4A;
    color: var(--sp-accent);
    border-radius: 30px;
    padding: 10px 18px;
    font-size: 13px;
    cursor: pointer;
    transition: background .18s, color .18s;
    text-decoration: none;
    width: 140px;
    text-align: center;
    font-weight: 500;
    display: inline-block;
    line-height: 1.5;
    height: 40px;
}

.sp-btn-outline:hover {
    background: var(--sp-accent);
    color: #fff;
}

.sp-btn-primary {
    background: #013E4A;
    border: 1.5px solid #013E4A;
    color: #fff;
    border-radius: 30px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .18s;
    text-decoration: none;
    width: 140px;
    text-align: center;
    display: inline-block;
    line-height: 1.5;
    height: 40px;
}

.sp-btn-primary:hover {
    background: var(--sp-accent-light);
    color: #fff;
}

/* ── PROFILE CARD ── */
.sp-card {
    background: var(--sp-surface);
    border-radius: 12px;
    border: 1px solid var(--sp-border);
    overflow: hidden;
    margin: 0 2rem 28px 2rem;
}

.sp-banner-wrap {
    position: relative;
}

.sp-banner {
    height: 160px;
    overflow: hidden;
}

.sp-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-banner-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0f0f0 0%, #c8dede 100%);
}

.sp-avatar-wrap {
    position: absolute;
    top: 110px;
    left: 32px;
}

.sp-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: #d0dede;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.sp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sp-avatar i {
    font-size: 38px;
    color: #9ab5b5;
}

/* ── FIELD BOXES ── */
.sp-fields {
    padding: 0 24px 24px;
    margin-top: 4rem;
}

.sp-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.sp-field-box {
    border: 1px solid #E0E0E0;
    border-radius: 8px !important;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    background: #FFFFFF;
}

.sp-field-box .label {
    font-size: 13px !important;
    color: #2E2E2E !important;
    width: 150px;
    text-transform: none !important;
    font-weight: 400 !important;
}

.sp-field-box .value {
    color: #353536;
    font-weight: 500;
    font-size: 15px;
}

/* ── SOCIAL ROW ── */
.sp-social-row {
    display: flex;
    gap: 12px;
    padding: 0 24px 16px;
}

.sp-social-row a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--sp-accent);
    color: #fff;
    font-size: 16px;
    transition: background .18s;
}

.sp-social-row a:hover {
    background: var(--sp-accent-light);
    color: #fff;
}

/* ── RATING ── */
.sp-rating-row {
    padding: 0 24px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sp-rating-label {
    font-size: 13px;
    color: var(--sp-text-muted);
    font-weight: 500;
}

/* ── ABOUT SHOP ── */
.sp-about-shop {
    padding: 0 24px 20px;
    border-top: 1px solid var(--sp-border);
    margin-top: 10px;
    padding-top: 16px;
}

.sp-about-shop-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--sp-text-main);
    margin-bottom: 8px;
}

.sp-about-shop-content {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
}

/* ── SECTION BAR (products heading + view toggle) ── */
.sp-section-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
    padding: 2rem;
}

.sp-section-bar h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--sp-text-main);
}

.sp-section-bar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── TIME PERIOD SELECT ── */
.sp-time-select {
    border: 1px solid var(--sp-border);
    border-radius: 7px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--sp-text-main);
    background: #fff;
    cursor: pointer;
    outline: none;
    height: 34px;
}

.sp-time-select:focus {
    border-color: var(--sp-accent);
}

/* ── VIEW TOGGLE ── */
.sp-view-toggle {
    display: flex;
    border: 1px solid var(--sp-border);
    border-radius: 7px;
    overflow: hidden;
}

.sp-view-btn {
    background: transparent;
    border: none;
    padding: 6px 11px;
    font-size: 15px;
    color: var(--sp-text-muted);
    cursor: pointer;
    transition: background .15s, color .15s;
    line-height: 1;
}

.sp-view-btn.active {
    background: var(--sp-accent);
    color: #fff;
}

/* ── PRODUCT GRID ── */
.sp-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-bottom: 30px;
    padding: 0 2rem;
}

.sp-product-card {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 14px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    box-shadow: 0px 2px 4px 0px rgba(1, 45, 97, 0.24);
}

.sp-product-card:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.09);
}

.sp-product-img {
    width: 100%;
    height: 190px;
    overflow: hidden;
}

.sp-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sp-product-seller {
    font-size: 12px;
    color: #94a3b8;
    padding: 10px 10px 4px;
}

.sp-product-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    padding: 3px 10px;
    margin-bottom: 4px;
}

.sp-product-name a {
    color: inherit;
    text-decoration: none;
}

.sp-product-name a:hover {
    color: var(--sp-accent);
}

.sp-product-cat-row {
    margin-bottom: 16px;
    padding: 3px 10px;
}

.sp-product-cat-label {
    font-size: 13px;
    color: #94a3b8;
}

.sp-product-cat-val {
    font-size: 13px;
    color: #475569;
}

.sp-product-actions {
    background: #F5F5F5;
    display: flex;
    justify-content: center;
}

.sp-btn-view-lg {
    border: none;
    border-radius: 9999px;
    background: #013E4A;
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    margin: 1rem;
    width: 400px;
    text-align: center;
    text-decoration: none;
    display: block;
}

.sp-btn-view-lg:hover {
    background: var(--sp-accent-light);
    color: #fff;
}

.sp-product-price {
    font-weight: 700;
    font-size: 14px;
    color: var(--sp-text-main);
    padding: 2px 10px 6px;
}

.sp-retail-price {
    text-decoration: line-through;
    color: #aaa;
    font-weight: 400;
    font-size: 12px;
    margin-left: 6px;
}

.sp-product-on-sale-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: #f39d72;
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

/* ── TABLE / LIST VIEW ── */
.sp-products-table {
    background: var(--sp-surface);
    border-radius: 10px;
    border: 1px solid var(--sp-border);
    overflow: hidden;
    margin: 0 2rem 30px;
}

.sp-products-table table {
    width: 100%;
    border-collapse: collapse;
}

.sp-products-table thead tr {
    background: var(--sp-accent);
}

.sp-products-table thead th {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-align: left;
    letter-spacing: .04em;
}

.sp-products-table tbody tr {
    border-bottom: 1px solid var(--sp-border);
    transition: background .15s;
}

.sp-products-table tbody tr:last-child {
    border-bottom: none;
}

.sp-products-table tbody tr:hover {
    background: #f6fafa;
}

.sp-products-table tbody td {
    padding: 13px 16px;
    font-size: 14px;
    color: #353536;
    vertical-align: middle;
    font-weight: 500;
}

.sp-product-img-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 10px;
    vertical-align: middle;
}

.sp-btn-view-sm {
    background: #013E4A;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 18px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background .18s;
    text-decoration: none;
}

.sp-btn-view-sm:hover {
    background: var(--sp-accent-light);
    color: #fff;
}

/* ── PAGINATION ── */
.sp-pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 2rem 2rem;
}

.sp-pagination-bar .page-showing {
    font-size: 13px;
    color: var(--sp-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sp-pagination-bar .page-showing select {
    font-size: 13px;
    border: 1px solid var(--sp-border);
    border-radius: 5px;
    padding: 2px 6px;
    font-weight: 500;
}

.sp-pag-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.sp-pag-btn {
    background: transparent;
    border: 1px solid var(--sp-border);
    border-radius: 6px;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
    color: var(--sp-text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    white-space: nowrap;
    text-decoration: none;
}

.sp-pag-btn:hover {
    background: var(--sp-accent);
    color: #fff;
    border-color: var(--sp-accent);
}

.sp-pag-btn.active {
    background: var(--sp-accent);
    color: #fff;
    border-color: var(--sp-accent);
    font-weight: 700;
}

.sp-pag-btn.disabled,
.sp-pag-btn:disabled {
    opacity: .4;
    cursor: default;
    pointer-events: none;
}

.sp-pag-dots {
    font-size: 13px;
    color: var(--sp-text-muted);
    padding: 0 2px;
}

/* ── NO PRODUCTS ── */
.sp-no-items {
    text-align: center;
    padding: 40px 20px;
    color: var(--sp-text-muted);
    font-size: 14px;
    background: var(--sp-surface);
    border-radius: 10px;
    border: 1px solid var(--sp-border);
    margin: 0 2rem 20px;
}

/* ── ALERT MESSAGES ── */
.sp-alert {
    margin: 0 2rem 16px;
    border-radius: 8px;
    font-size: 14px;
}

/* ── REVIEWS SECTION (preserves existing review styles) ── */
.sp-reviews-section {
    margin: 0 2rem 28px;
}

.sp-reviews-section .wk-seller-profile-box {
    border-radius: 12px;
    border: 1px solid var(--sp-border);
    box-shadow: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 991px) {
    .sp-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .sp-field-row {
        grid-template-columns: 1fr;
    }

    .sp-products-grid {
        grid-template-columns: 1fr;
    }

    .sp-page-header {
        padding: 16px;
    }

    .sp-banner {
        height: 110px;
    }

    .sp-avatar {
        width: 72px;
        height: 72px;
    }

    .sp-avatar i {
        font-size: 30px;
    }

    .sp-avatar-wrap {
        top: 70px;
        left: 16px;
    }

    .sp-fields {
        margin-top: 3rem;
    }

    .sp-products-table thead th:nth-child(3),
    .sp-products-table tbody td:nth-child(3) {
        display: none;
    }

    .sp-card,
    .sp-products-grid,
    .sp-products-table,
    .sp-pagination-bar,
    .sp-section-bar,
    .sp-reviews-section,
    .sp-no-items {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

@media (max-width: 420px) {
    .sp-products-table thead th:nth-child(2),
    .sp-products-table tbody td:nth-child(2) {
        display: none;
    }
}

/* Override legacy styles that could conflict */
.sp-card .label,
.sp-field-box .label {
    color: #2E2E2E !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-transform: none !important;
}
.wk_custom_field_container .box-head {
    display: none;
}