/* ============================================================
   Diilzo — Store Page Redesign
   Modern, compact, AJAX-driven store/supplier page
   ============================================================ */

/* ── Page Container ───────────────────────────────────────────── */
.dz-sp-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

/* ── Hero Banner ──────────────────────────────────────────────── */
.dz-sp-hero {
    position: relative;
    background: linear-gradient(135deg, #32C700 0%, #008525 50%, #008525 100%);
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    margin-top: 16px;
    overflow: hidden;
    min-height: 220px;
}
.dz-sp-hero-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.55) 100%);
    backdrop-filter: blur(1px);
    min-height: 220px;
    display: flex;
    align-items: flex-end;
}
.dz-sp-hero-inner {
    max-width: 1248px;
    margin: 0 auto;
    padding: 28px 24px;
    display: flex;
    gap: 20px;
    align-items: flex-end;
    flex-wrap: wrap;
    width: 100%;
    color: #fff;
}

/* Logo */
.dz-sp-logo-wrap { flex-shrink: 0; }
.dz-sp-logo {
    width: 88px;
    height: 88px;
    border-radius: 14px;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    background: #fff;
}
.dz-sp-logo-fallback {
    width: 88px;
    height: 88px;
    border-radius: 14px;
    background: #fff;
    color: #32C700;
    font-size: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* Hero info */
.dz-sp-hero-info { flex: 1; min-width: 240px; }
.dz-sp-hero-info h1 {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 4px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.dz-sp-tagline {
    font-size: 14px;
    opacity: 0.92;
    margin: 0 0 10px;
}
.dz-sp-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    opacity: 0.95;
}
.dz-sp-meta-item { display: flex; align-items: center; gap: 4px; }
.dz-sp-meta-item i { font-size: 12px; opacity: 0.85; }
.dz-sp-meta-item strong { font-weight: 700; }

/* Badges */
.dz-sp-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}
.dz-sp-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.dz-sp-badge-gold { background: linear-gradient(135deg, #F59E0B, #F59E0B); color: #fff; }
.dz-sp-badge-verified { background: #16a34a; color: #fff; }
.dz-sp-badge-pending { background: #f59e0b; color: #fff; }
.dz-sp-badge-ta { background: #2563eb; color: #fff; }
.dz-sp-badge-type { background: rgba(255,255,255,0.2); color: #fff; border: 1px solid rgba(255,255,255,0.35); }
.dz-sp-badge-year { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.25); }

/* Hero actions */
.dz-sp-hero-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.dz-sp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    font-family: inherit;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    white-space: nowrap;
}
.dz-sp-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.dz-sp-btn-contact {
    background: #fff;
    color: #32C700;
}
.dz-sp-btn-contact:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.2); }
.dz-sp-btn-rfq {
    background: #16a34a;
    color: #fff;
}
.dz-sp-btn-rfq:hover { background: #15803d; transform: translateY(-1px); }
.dz-sp-btn-follow {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.5);
}
.dz-sp-btn-follow:hover { background: rgba(255,255,255,0.3); }
.dz-sp-btn-follow.following {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}
.dz-sp-btn-edit {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
}

/* ── Quick Stats Bar ──────────────────────────────────────────── */
.dz-sp-stats-bar {
    display: flex;
    gap: 0;
    margin-top: 16px;
    background: #fff;
    border-radius: 12px;
    padding: 14px 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    flex-wrap: wrap;
}
.dz-sp-stat {
    flex: 1;
    min-width: 110px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 14px;
    border-right: 1px solid #f0f0f0;
    justify-content: center;
}
.dz-sp-stat:last-child { border-right: none; }
.dz-sp-stat i {
    font-size: 18px;
    color: #32C700;
    opacity: 0.8;
}
.dz-sp-stat div { display: flex; flex-direction: column; }
.dz-sp-stat strong {
    font-size: 16px;
    font-weight: 800;
    color: #0A2E1A;
    line-height: 1.2;
}
.dz-sp-stat span {
    font-size: 11px;
    color: #888;
}

/* ── Body + Tabs ──────────────────────────────────────────────── */
.dz-sp-body {
    margin-top: 16px;
}
.dz-sp-tabs {
    display: flex;
    gap: 4px;
    background: #fff;
    border-radius: 12px 12px 0 0;
    padding: 6px 6px 0;
    border-bottom: 2px solid #f5f5f5;
    overflow-x: auto;
}
.dz-sp-tab {
    padding: 12px 20px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    border-radius: 8px 8px 0 0;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.dz-sp-tab i { font-size: 13px; }
.dz-sp-tab em {
    font-style: normal;
    font-size: 11px;
    background: #f0f0f0;
    color: #666;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 700;
}
.dz-sp-tab:hover { color: #32C700; }
.dz-sp-tab.active {
    color: #32C700;
    border-bottom-color: #32C700;
    background: #DCF5EC;
}
.dz-sp-tab.active em { background: #32C700; color: #fff; }

/* Tab panes */
.dz-sp-tab-pane {
    display: none;
    background: #fff;
    border-radius: 0 0 12px 12px;
    padding: 20px;
    min-height: 300px;
}
.dz-sp-tab-pane.active { display: block; }

/* ── Products Toolbar ─────────────────────────────────────────── */
.dz-sp-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.dz-sp-search {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.dz-sp-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 14px;
}
.dz-sp-search input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
    font-family: inherit;
}
.dz-sp-search input:focus { border-color: #32C700; }
.dz-sp-toolbar-right {
    display: flex;
    gap: 8px;
    align-items: center;
}
.dz-sp-select {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    background: #fff;
    font-family: inherit;
    transition: border-color 0.15s;
}
.dz-sp-select:focus { border-color: #32C700; }

/* ── Product Grid ─────────────────────────────────────────────── */
.dz-sp-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
    transition: opacity 0.2s;
}
.dz-sp-product-card {
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    background: #fff;
    display: block;
}
.dz-sp-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: #C5E8D5;
}
.dz-sp-product-img {
    width: 100%;
    height: 170px;
    overflow: hidden;
    background: #fafafa;
    position: relative;
}
.dz-sp-product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}
.dz-sp-product-card:hover .dz-sp-product-img img { transform: scale(1.05); }
.dz-sp-product-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ddd;
    font-size: 38px;
}
.dz-sp-product-featured {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #32C700;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}
.dz-sp-product-body {
    padding: 10px 12px 12px;
}
.dz-sp-product-body h4 {
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #333;
}
.dz-sp-product-cat {
    font-size: 10px;
    color: #aaa;
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.dz-sp-product-price {
    font-size: 16px;
    font-weight: 800;
    color: #32C700;
}
.dz-sp-product-moq {
    display: inline-block;
    margin-top: 4px;
    background: #eaf3ff;
    color: #1890ff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* ── Infinite Scroll ──────────────────────────────────────────── */
.dz-sp-sentinel { padding: 20px; text-align: center; }
.dz-sp-loading {
    color: #888;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
}
.dz-sp-end-msg {
    text-align: center;
    padding: 20px;
    color: #aaa;
    font-size: 13px;
}
.dz-sp-end-msg i { color: #16a34a; margin-right: 4px; }

/* ── Empty State ──────────────────────────────────────────────── */
.dz-sp-empty {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}
.dz-sp-empty i { font-size: 48px; margin-bottom: 12px; display: block; }
.dz-sp-empty h3 { font-size: 16px; margin: 0 0 4px; color: #555; }
.dz-sp-empty p { font-size: 13px; margin: 0; }
.dz-sp-empty-inline { padding: 30px 20px; }
.dz-sp-empty-inline i { font-size: 32px; }
.dz-sp-muted { color: #aaa; }

/* ── About Tab ────────────────────────────────────────────────── */
.dz-sp-about-desc {
    margin-bottom: 20px;
}
.dz-sp-about-desc h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dz-sp-about-desc h3 i { color: #32C700; }
.dz-sp-about-desc p {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}
.dz-sp-about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    background: #fafafa;
    border-radius: 10px;
    padding: 18px;
}
.dz-sp-about-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.dz-sp-about-item i {
    color: #32C700;
    font-size: 14px;
    margin-top: 2px;
    flex-shrink: 0;
}
.dz-sp-about-item div { display: flex; flex-direction: column; }
.dz-sp-about-item strong { font-size: 12px; color: #888; font-weight: 600; }
.dz-sp-about-item span { font-size: 14px; color: #333; }
.dz-sp-about-item a { color: #32C700; text-decoration: none; }
.dz-sp-about-item a:hover { text-decoration: underline; }

/* ── Reviews Tab ──────────────────────────────────────────────── */
.dz-sp-reviews { display: flex; flex-direction: column; gap: 16px; }

.dz-sp-review-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafafa;
    border-radius: 10px;
    padding: 18px 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.dz-sp-review-score {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dz-sp-review-score strong {
    font-size: 36px;
    font-weight: 800;
    color: #32C700;
}
.dz-sp-review-stars {
    font-size: 16px;
    color: #F59E0B;
    letter-spacing: 2px;
}
.dz-sp-review-score span {
    font-size: 13px;
    color: #888;
}
.dz-sp-btn-write-review {
    background: #32C700;
    color: #fff;
    padding: 10px 20px;
}
.dz-sp-btn-write-review:hover { background: #00C732; }

/* Review form */
.dz-sp-review-form {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 18px;
}
.dz-sp-review-form h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 12px;
}
.dz-sp-review-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.dz-sp-review-rating label { font-size: 13px; font-weight: 600; color: #555; }
.dz-sp-star-input { display: flex; gap: 4px; }
.dz-sp-star-input i {
    font-size: 22px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.15s;
}
.dz-sp-star-input i:hover,
.dz-sp-star-input i.active { color: #F59E0B; }
.dz-sp-review-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
    margin-bottom: 12px;
}
.dz-sp-review-form textarea:focus { border-color: #32C700; }
.dz-sp-review-form-actions { display: flex; gap: 8px; justify-content: flex-end; }
.dz-sp-btn-cancel {
    background: #f5f5f5;
    color: #666;
    padding: 8px 18px;
}
.dz-sp-btn-cancel:hover { background: #eee; }
.dz-sp-btn-submit {
    background: #32C700;
    color: #fff;
    padding: 8px 18px;
}
.dz-sp-btn-submit:hover { background: #00C732; }
.dz-sp-btn-outline {
    background: #fff;
    color: #32C700;
    border: 1.5px solid #32C700;
    padding: 8px 18px;
}
.dz-sp-btn-outline:hover { background: #DCF5EC; }

/* Review list */
.dz-sp-review-list { display: flex; flex-direction: column; gap: 12px; }
.dz-sp-review-item {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 14px 16px;
}
.dz-sp-review-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.dz-sp-review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #DCF5EC;
    color: #32C700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.dz-sp-review-head strong { font-size: 14px; }
.dz-sp-review-stars-small {
    font-size: 12px;
    color: #F59E0B;
    letter-spacing: 1px;
}
.dz-sp-review-date {
    margin-left: auto;
    font-size: 11px;
    color: #aaa;
}
.dz-sp-review-item p {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    margin: 0;
}

.dz-sp-load-more {
    text-align: center;
    padding: 12px;
}

/* ── Modal Hint ───────────────────────────────────────────────── */
.dz-sp-modal-hint {
    font-size: 13px;
    color: #888;
    margin: 0 0 14px;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    .dz-sp-page { padding: 0 10px 30px; }
    .dz-sp-hero { border-radius: 10px; margin-top: 10px; min-height: 180px; }
    .dz-sp-hero-overlay { min-height: 180px; }
    .dz-sp-hero-inner { padding: 20px 14px; gap: 14px; }
    .dz-sp-logo, .dz-sp-logo-fallback { width: 64px; height: 64px; font-size: 28px; border-radius: 10px; }
    .dz-sp-hero-info h1 { font-size: 20px; }
    .dz-sp-tagline { font-size: 13px; }
    .dz-sp-meta { gap: 10px; font-size: 12px; }
    .dz-sp-hero-actions { width: 100%; }
    .dz-sp-btn { flex: 1; justify-content: center; padding: 9px 14px; font-size: 12px; }

    .dz-sp-stats-bar { padding: 10px 4px; }
    .dz-sp-stat { min-width: 90px; padding: 4px 8px; gap: 6px; }
    .dz-sp-stat i { font-size: 15px; }
    .dz-sp-stat strong { font-size: 14px; }
    .dz-sp-stat span { font-size: 10px; }

    .dz-sp-tabs { padding: 4px 4px 0; }
    .dz-sp-tab { padding: 10px 14px; font-size: 13px; }
    .dz-sp-tab span { display: none; }
    .z-sp-tab i { font-size: 16px; }
    .dz-sp-tab em { display: inline; }

    .dz-sp-tab-pane { padding: 14px; }

    .dz-sp-toolbar { flex-direction: column; align-items: stretch; }
    .dz-sp-toolbar-right { flex-direction: row; }
    .dz-sp-select { flex: 1; font-size: 12px; }

    .dz-sp-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .dz-sp-product-img { height: 130px; }
    .dz-sp-product-body { padding: 8px 10px 10px; }
    .dz-sp-product-body h4 { font-size: 12px; }
    .dz-sp-product-price { font-size: 14px; }

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

    .dz-sp-review-summary { flex-direction: column; align-items: flex-start; }
    .dz-sp-review-score strong { font-size: 28px; }
}

@media (max-width: 400px) {
    .dz-sp-product-grid { grid-template-columns: 1fr; }
    .dz-sp-stats-bar { flex-direction: column; gap: 8px; }
    .dz-sp-stat { border-right: none; border-bottom: 1px solid #f0f0f0; padding-bottom: 8px; }
    .dz-sp-stat:last-child { border-bottom: none; }
}
