/* Shop system */
.profile-shop-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    color: #0f6fec;
    text-decoration: none;
}

.shop-page .layout-grid {
    display: block;
    max-width: none;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.shop-page .layout-grid > .sidebar {
    display: none !important;
}

.shop-page .main-content {
    width: 100%;
    max-width: none;
    padding: 0;
}

.shop-page-shell,
.shop-item-detail-shell {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 18px 22px 90px;
}

.shop-hero-card {
    overflow: hidden;
    background: #fff;
    border-radius: 26px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .12);
    border: 1px solid rgba(148, 163, 184, .22);
    margin-bottom: 18px;
}

.shop-hero-banner {
    position: relative;
    height: clamp(220px, 28vw, 390px);
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #2563eb);
}

.shop-hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.01);
}

.shop-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, .08) 0%, rgba(15, 23, 42, .62) 100%);
}

.shop-hero-top {
    position: absolute;
    inset: 18px 18px auto 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.shop-back-profile,
.shop-owner-settings-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    color: #0f172a;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(15,23,42,.16);
}

.shop-hero-info {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 18px;
    padding: 0 24px 24px;
    margin-top: -58px;
    z-index: 3;
}

.shop-hero-avatar {
    width: 128px;
    height: 128px;
    object-fit: cover;
    border-radius: 34px;
    border: 6px solid #fff;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15,23,42,.18);
    flex: 0 0 auto;
}

.shop-hero-copy {
    min-width: 0;
    padding-top: 64px;
}

.shop-hero-copy h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1;
    color: #0f172a;
    letter-spacing: -.04em;
}

.shop-tagline {
    margin: 8px 0 0;
    color: #475569;
    font-size: 17px;
    font-weight: 700;
}

.shop-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    color: #64748b;
    font-weight: 800;
}

.shop-hero-meta span,
.shop-hero-meta a {
    color: #334155;
}

.shop-layout {
    display: grid;
    grid-template-columns: minmax(250px, 310px) minmax(0, 1fr) minmax(260px, 330px);
    gap: 18px;
    align-items: start;
}

.shop-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 86px;
    max-height: calc(100vh - 104px);
    overflow: auto;
    padding-bottom: 10px;
}

.shop-sidebar::-webkit-scrollbar,
.shop-side-list::-webkit-scrollbar {
    width: 7px;
}

.shop-sidebar::-webkit-scrollbar-thumb,
.shop-side-list::-webkit-scrollbar-thumb {
    background: rgba(100,116,139,.34);
    border-radius: 999px;
}

.shop-panel,
.shop-filter-card,
.shop-empty-state,
.shop-settings-card,
.shop-item-detail {
    background: #fff;
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 24px;
    box-shadow: 0 16px 42px rgba(15,23,42,.09);
}

.shop-panel {
    padding: 18px;
}

.shop-panel h2,
.shop-panel h3,
.shop-section-title h2,
.shop-settings-head h2 {
    margin: 0;
    color: #0f172a;
    letter-spacing: -.025em;
}

.shop-owner-panel {
    text-align: center;
}

.shop-panel-avatar {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: 0 10px 28px rgba(15,23,42,.15);
    margin-bottom: 10px;
}

.shop-owner-panel p {
    color: #64748b;
    font-weight: 800;
    margin: 4px 0 12px;
}

.shop-about {
    color: #475569;
    text-align: left;
    line-height: 1.45;
    border-top: 1px solid #e2e8f0;
    padding-top: 12px;
    margin-top: 12px;
}

.shop-contact-list {
    display: grid;
    gap: 9px;
    margin-top: 14px;
    text-align: left;
}

.shop-contact-list a,
.shop-contact-list span {
    display: block;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f8fafc;
    color: #334155;
    text-decoration: none;
    font-weight: 800;
    word-break: break-word;
}

.shop-filter-card {
    padding: 16px;
    margin-bottom: 18px;
}

.shop-filter-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(150px, .45fr) minmax(150px, .45fr) auto;
    gap: 10px;
    align-items: center;
}

.shop-filter-form input,
.shop-filter-form select,
.shop-settings-form input,
.shop-settings-form textarea,
.shop-settings-form select,
.shop-item-form input,
.shop-item-form textarea,
.shop-item-form select {
    width: 100%;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    padding: 12px 13px;
    background: #f8fafc;
    color: #0f172a;
    font: inherit;
    outline: none;
}

.shop-filter-form input:focus,
.shop-filter-form select:focus,
.shop-settings-form input:focus,
.shop-settings-form textarea:focus,
.shop-settings-form select:focus,
.shop-item-form input:focus,
.shop-item-form textarea:focus,
.shop-item-form select:focus {
    border-color: #0f6fec;
    box-shadow: 0 0 0 4px rgba(15,111,236,.12);
    background: #fff;
}

.shop-filter-form button,
.shop-primary-btn {
    border: 0;
    border-radius: 14px;
    padding: 12px 17px;
    background: linear-gradient(135deg, #0f6fec, #2563eb);
    color: #fff;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(37,99,235,.24);
}

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

.shop-section-title span {
    padding: 8px 12px;
    border-radius: 999px;
    background: #eaf2ff;
    color: #0f6fec;
    font-weight: 900;
}

.shop-items-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.shop-item-card {
    overflow: hidden;
    background: #fff;
    border-radius: 24px;
    border: 1px solid rgba(148,163,184,.22);
    box-shadow: 0 16px 38px rgba(15,23,42,.08);
    transition: transform .16s ease, box-shadow .16s ease;
}

.shop-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 54px rgba(15,23,42,.12);
}

.shop-item-image-link {
    position: relative;
    display: block;
    height: 230px;
    overflow: hidden;
    background: #e2e8f0;
}

.shop-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shop-sale-badge,
.shop-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-weight: 950;
    font-size: 12px;
    box-shadow: 0 10px 22px rgba(239,68,68,.28);
}

.shop-status-badge {
    left: auto;
    right: 12px;
    background: #0f172a;
}

.shop-item-body {
    padding: 15px;
}

.shop-item-title-row h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.2;
}

.shop-item-title-row a {
    color: #0f172a;
    text-decoration: none;
}

.shop-item-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 8px;
}

.shop-item-price strong,
.shop-item-detail-price strong {
    font-size: 20px;
    color: #0f6fec;
}

.shop-item-price span,
.shop-item-detail-price span {
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 800;
}

.shop-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.shop-item-tags span {
    padding: 6px 9px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}

.shop-item-body p {
    color: #64748b;
    margin: 10px 0 0;
    line-height: 1.4;
}

.shop-item-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 900;
}

.shop-small-danger {
    border: 0;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 999px;
    padding: 7px 10px;
    font-weight: 950;
    cursor: pointer;
}

.shop-side-list {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow: auto;
    padding-right: 3px;
}

.shop-side-item {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    padding: 8px;
    border-radius: 16px;
    background: #f8fafc;
    text-decoration: none;
    color: #0f172a;
    align-items: center;
}

.shop-side-item img {
    width: 62px;
    height: 62px;
    object-fit: cover;
    border-radius: 14px;
}

.shop-side-item strong {
    display: block;
    font-size: 13px;
    line-height: 1.2;
}

.shop-side-item small {
    color: #0f6fec;
    font-weight: 950;
}

.shop-side-empty,
.shop-empty-state {
    padding: 24px;
    color: #64748b;
    text-align: center;
}

.shop-owner-tools label,
.shop-settings-form label,
.shop-item-form label {
    display: block;
    margin: 10px 0 6px;
    color: #334155;
    font-weight: 900;
}

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

.shop-checkbox-row {
    display: flex !important;
    gap: 9px;
    align-items: center;
}

.shop-checkbox-row input {
    width: auto !important;
}

.shop-upload-inline {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin: 12px 0;
}

.shop-item-preview {
    width: 92px;
    height: 92px;
    border-radius: 18px;
    object-fit: cover;
    background: #e2e8f0;
}

.shop-file-btn {
    display: inline-flex !important;
    margin: 0 !important;
    cursor: pointer;
}

.shop-file-btn input {
    display: none;
}

.shop-file-btn span {
    display: inline-flex;
    border-radius: 14px;
    padding: 10px 13px;
    background: #0f172a;
    color: #fff;
    font-weight: 950;
}

.shop-upload-progress {
    position: relative;
    overflow: hidden;
    height: 12px;
    border-radius: 999px;
    background: #e2e8f0;
    margin-top: 10px;
}

.shop-upload-progress b {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #0f6fec, #22c55e);
    border-radius: 999px;
    transition: width .16s ease;
}

.shop-upload-progress span {
    position: absolute;
    inset: -20px 0 auto;
    font-size: 11px;
    font-weight: 900;
    color: #64748b;
}

.shop-form-status {
    margin-top: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.shop-settings-card {
    margin-top: 18px;
    padding: 20px;
}

.shop-settings-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
}

.shop-settings-head p {
    margin: 5px 0 0;
    color: #64748b;
    font-weight: 700;
}

.shop-settings-view-link {
    white-space: nowrap;
    border-radius: 999px;
    padding: 10px 14px;
    background: #0f172a;
    color: #fff;
    text-decoration: none;
    font-weight: 950;
}

.shop-settings-upload-card {
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 14px;
    background: #f8fafc;
}

.shop-settings-preview img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    background: #e2e8f0;
}

.shop-settings-avatar-preview img {
    width: 140px;
    height: 140px;
    border-radius: 34px;
}

.shop-settings-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.shop-settings-upload-actions button {
    border: 0;
    border-radius: 12px;
    padding: 9px 11px;
    background: #eaf2ff;
    color: #0f6fec;
    font-weight: 950;
    cursor: pointer;
}

.shop-settings-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.shop-item-detail-shell {
    max-width: 1180px;
}

.shop-item-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    overflow: hidden;
    margin-top: 14px;
}

.shop-item-detail-media {
    background: #e2e8f0;
    min-height: 520px;
}

.shop-item-detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shop-item-detail-copy {
    padding: 28px;
}

.shop-item-shop-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 999px;
    background: #f8fafc;
    text-decoration: none;
    color: #0f172a;
    font-weight: 950;
}

.shop-item-shop-link img {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 50%;
}

.shop-item-detail-copy h1 {
    margin: 20px 0 10px;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.03;
}

.shop-item-detail-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
}

.shop-item-description {
    margin-top: 18px;
    color: #334155;
    font-size: 16px;
    line-height: 1.55;
}

.shop-up-button {
    position: fixed;
    right: 22px;
    bottom: 88px;
    z-index: 1100;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: #0f172a;
    color: #fff;
    font-size: 24px;
    font-weight: 950;
    box-shadow: 0 16px 40px rgba(15,23,42,.28);
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.shop-up-button.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 1180px) {
    .shop-layout {
        grid-template-columns: 260px minmax(0, 1fr);
    }
    .shop-right-sidebar {
        grid-column: 1 / -1;
        position: static;
        max-height: none;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .shop-items-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .shop-page-shell,
    .shop-item-detail-shell {
        padding: 10px 10px 86px;
    }
    .shop-hero-card {
        border-radius: 20px;
    }
    .shop-hero-info {
        align-items: center;
        padding: 0 16px 18px;
        margin-top: -44px;
    }
    .shop-hero-avatar {
        width: 92px;
        height: 92px;
        border-radius: 25px;
        border-width: 4px;
    }
    .shop-hero-copy {
        padding-top: 48px;
    }
    .shop-layout,
    .shop-right-sidebar,
    .shop-item-detail {
        display: block;
    }
    .shop-sidebar {
        position: static;
        max-height: none;
        overflow: visible;
        margin-bottom: 14px;
    }
    .shop-filter-form,
    .shop-form-row,
    .shop-settings-grid,
    .shop-settings-upload-grid {
        grid-template-columns: 1fr;
    }
    .shop-items-grid {
        grid-template-columns: 1fr;
    }
    .shop-item-image-link {
        height: 260px;
    }
    .shop-settings-head {
        display: block;
    }
    .shop-settings-view-link {
        margin-top: 12px;
        display: inline-flex;
    }
    .shop-item-detail-media {
        min-height: 320px;
    }
    .shop-item-detail-copy {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .shop-hero-top {
        inset: 10px;
        flex-wrap: wrap;
    }
    .shop-hero-banner {
        height: 240px;
    }
    .shop-hero-info {
        display: block;
        text-align: center;
    }
    .shop-hero-avatar {
        margin: 0 auto 10px;
    }
    .shop-hero-copy {
        padding-top: 0;
    }
    .shop-hero-meta {
        justify-content: center;
    }
}


.profile-banner {
    position: relative;
}

.profile-banner-shop-link {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 15px;
    border-radius: 999px;
    background: rgba(15,23,42,.88);
    color: #fff;
    text-decoration: none;
    font-weight: 950;
    box-shadow: 0 16px 34px rgba(15,23,42,.24);
    backdrop-filter: blur(8px);
}

.profile-banner-shop-link:hover {
    background: #0f6fec;
    color: #fff;
}

@media (max-width: 760px) {
    .profile-banner-shop-link {
        right: 12px;
        bottom: 12px;
        padding: 9px 12px;
        font-size: 13px;
    }
}
