@import url('../topNav.css');

:root {
    --shop-primary: #4c7cf2;
    --shop-primary-dark: #3567e4;
    --shop-accent: #f59e0b;
    --shop-success: #22c55e;
    --shop-danger: #ef4444;
    --shop-text: #1f2937;
    --shop-text-light: #6b7280;
    --shop-border: #e5e7eb;
    --shop-bg: #f5f7fb;
    --shop-card: #ffffff;
    --shop-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    --shop-radius: 16px;
}

body.shop-body {
    background: linear-gradient(180deg, #f7f9fc 0%, #eef3fb 100%);
}

.shop-page {
    max-width: 1380px;
    margin: 82px auto 24px;
    padding: 0 20px 32px;
    box-sizing: border-box;
}

.shop-hero {
    background: linear-gradient(135deg, #ffffff 0%, #edf3ff 55%, #f8fbff 100%);
    border: 1px solid rgba(76, 124, 242, 0.12);
    border-radius: 20px;
    box-shadow: var(--shop-shadow);
    padding: 26px 28px;
    margin-bottom: 18px;
}

.shop-hero-title {
    margin: 0 0 8px;
    font-size: 28px;
    color: var(--shop-text);
}

.shop-hero-desc {
    margin: 0;
    color: var(--shop-text-light);
    line-height: 1.7;
    font-size: 14px;
}

.shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.shop-action-group,
.shop-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.shop-panel {
    background: var(--shop-card);
    border: 1px solid var(--shop-border);
    border-radius: var(--shop-radius);
    box-shadow: var(--shop-shadow);
    padding: 18px;
}

.shop-search-box {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.shop-input,
.shop-select,
.shop-textarea {
    min-height: 40px;
    border: 1px solid #d7deea;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--shop-text);
    background: #fff;
    box-sizing: border-box;
}

.shop-textarea {
    min-height: 108px;
    padding: 12px 14px;
    resize: vertical;
}

.shop-input:focus,
.shop-select:focus,
.shop-textarea:focus {
    outline: none;
    border-color: rgba(76, 124, 242, 0.65);
    box-shadow: 0 0 0 4px rgba(76, 124, 242, 0.12);
}

.shop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #fff;
    color: var(--shop-text);
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.shop-btn.primary {
    background: linear-gradient(135deg, var(--shop-primary) 0%, var(--shop-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 10px 18px rgba(76, 124, 242, 0.22);
}

.shop-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 22px rgba(76, 124, 242, 0.28);
}

.shop-btn.secondary {
    border-color: #d9e1f2;
    background: #f8fbff;
    color: #4667aa;
}

.shop-btn.success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.24);
    color: #15803d;
}

.shop-btn.warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.24);
    color: #b45309;
}

.shop-btn.danger {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.24);
    color: #b91c1c;
}

.shop-btn:hover {
    transform: translateY(-1px);
}

.shop-entry-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.shop-entry-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(76, 124, 242, 0.14);
    border-radius: 16px;
    padding: 18px;
    text-decoration: none;
    color: var(--shop-text);
    box-shadow: 0 10px 24px rgba(76, 124, 242, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-entry-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(76, 124, 242, 0.12);
}

.shop-entry-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
}

.shop-entry-desc {
    margin: 0;
    color: var(--shop-text-light);
    font-size: 13px;
    line-height: 1.7;
}

.shop-goods-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.shop-goods-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e4e9f4;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shop-goods-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.09);
}

.shop-goods-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #f4f6fb;
}

.shop-goods-content {
    padding: 16px;
}

.shop-goods-name {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--shop-text);
    min-height: 50px;
}

.shop-goods-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--shop-text-light);
    font-size: 13px;
}

.shop-goods-price {
    color: #dc2626;
    font-size: 22px;
    font-weight: 700;
}

.shop-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.shop-tag.success {
    color: #15803d;
    background: rgba(34, 197, 94, 0.12);
}

.shop-tag.warning {
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
}

.shop-tag.danger {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.12);
}

.shop-tag.info {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.12);
}

.shop-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}

.shop-page-btn {
    min-width: 88px;
    min-height: 38px;
    border: 1px solid #d6deee;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    cursor: pointer;
}

.shop-page-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.shop-page-info {
    font-size: 14px;
    color: var(--shop-text-light);
}

.shop-empty {
    padding: 46px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}

.shop-empty-inline {
    padding: 24px 0;
    text-align: center;
    color: #94a3b8;
}

.shop-table-wrap {
    overflow-x: auto;
}

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

.shop-table th,
.shop-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #edf1f7;
    text-align: left;
    vertical-align: top;
    color: var(--shop-text);
    font-size: 14px;
}

.shop-table th {
    background: #f7f9fc;
    color: #64748b;
    font-weight: 600;
}

.shop-table tbody tr:hover td {
    background: #fafcff;
}

.shop-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shop-warning-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: linear-gradient(180deg, #fffdf7 0%, #fff8e7 100%);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 16px;
    padding: 16px 18px;
    color: #8a5a00;
    margin-bottom: 18px;
}

.shop-modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    padding: 20px;
    z-index: 1200;
}

.shop-modal {
    width: min(92vw, 760px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
    padding: 18px;
}

.shop-logistics-modal {
    width: min(92vw, 680px);
}

.shop-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.shop-modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--shop-text);
}

.shop-modal-close {
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.shop-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.shop-form-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shop-form-item.full {
    grid-column: 1 / -1;
}

.shop-form-item label {
    font-size: 14px;
    color: #475569;
}

.shop-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.shop-logistics-item {
    position: relative;
    padding: 14px 0 14px 18px;
    border-bottom: 1px solid #edf1f7;
}

.shop-logistics-item::before {
    content: '';
    position: absolute;
    top: 22px;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--shop-primary);
}

.shop-logistics-status {
    font-size: 16px;
    font-weight: 700;
    color: var(--shop-text);
}

.shop-logistics-time {
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
}

.shop-logistics-detail {
    margin-top: 8px;
    color: #475569;
    line-height: 1.7;
    font-size: 14px;
}

.shop-thumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.shop-thumb-item {
    position: relative;
    width: 92px;
    height: 92px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #d9e2f1;
    background: #f8fafc;
}

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

.shop-thumb-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.68);
    color: #fff;
    cursor: pointer;
}

@media (max-width: 1200px) {
    .shop-entry-grid,
    .shop-goods-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .shop-entry-grid,
    .shop-goods-grid,
    .shop-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .shop-page {
        padding: 0 14px 26px;
    }

    .shop-entry-grid,
    .shop-goods-grid,
    .shop-form-grid {
        grid-template-columns: 1fr;
    }

    .shop-toolbar {
        align-items: stretch;
    }

    .shop-action-group,
    .shop-filter-group,
    .shop-search-box {
        width: 100%;
    }

    .shop-input,
    .shop-select,
    .shop-btn {
        width: 100%;
    }
}
