/* StoreKitt — storefront additions (cart, checkout, success, flash, breadcrumbs)
   Built on the design tokens declared in main.css. */

/* ── Flash messages ── */
.flash-stack {
    position: fixed;
    top: 84px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}
.flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    font-size: 14px;
    font-weight: 500;
}
.flash-success { border-left: 3px solid var(--success); }
.flash-error { border-left: 3px solid var(--danger); }
.flash-info { border-left: 3px solid var(--accent-brand); }

/* ── Page shell for narrow content pages ── */
.page-shell { padding: 40px 0 72px; }
.page-shell-narrow { max-width: 920px; }
.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.page-head p { color: var(--ink-muted); margin-top: 6px; font-weight: 500; }

/* ── Cart / checkout layout ── */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
}
.cart-items { display: flex; flex-direction: column; gap: 14px; }
.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}
.cart-item-thumb {
    width: 64px; height: 48px; border-radius: var(--radius-sm); flex-shrink: 0;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-info strong { display: block; font-size: 15px; font-weight: 700; }
.cart-item-info span { font-size: 13px; color: var(--ink-muted); }
.cart-item-price { font-weight: 800; font-size: 15px; }

.summary-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-xs);
    position: sticky;
    top: calc(var(--header-h) + var(--mega-h) + 20px);
}
.summary-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 16px; }
.summary-row {
    display: flex; justify-content: space-between;
    padding: 8px 0; font-size: 14px; color: var(--ink-soft); font-weight: 500;
}
.summary-row.total {
    border-top: 1px solid var(--border-light);
    margin-top: 8px; padding-top: 16px;
    font-size: 18px; font-weight: 800; color: var(--ink);
}
.summary-divider { height: 1px; background: var(--border-light); margin: 8px 0; }

.gateway-options { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.gateway-option {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border: 1.5px solid var(--border);
    border-radius: var(--radius); cursor: pointer; transition: all var(--transition);
    font-weight: 600; font-size: 14px;
}
.gateway-option:hover { border-color: var(--ink-muted); }
.gateway-option input { accent-color: var(--accent-brand); }
.gateway-option.selected { border-color: var(--accent-brand); background: var(--accent-soft); }

.coupon-row { display: flex; gap: 8px; margin: 14px 0; }
.coupon-row .form-input { flex: 1; }

/* ── Payment success / download ── */
.success-wrap { max-width: 720px; margin: 0 auto; text-align: center; padding: 64px 0; }
.success-badge {
    width: 72px; height: 72px; border-radius: 50%;
    background: var(--success-soft); color: var(--success);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 24px; font-size: 32px;
}
.success-wrap h1 { font-size: 32px; font-weight: 800; letter-spacing: -1px; margin-bottom: 10px; }
.success-wrap > p { color: var(--ink-muted); font-size: 16px; margin-bottom: 32px; }
.download-list { display: flex; flex-direction: column; gap: 12px; text-align: left; margin-bottom: 32px; }
.download-row {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 20px; background: var(--surface);
    border: 1px solid var(--border-light); border-radius: var(--radius-lg);
}
.download-row-thumb { width: 56px; height: 42px; border-radius: var(--radius-sm); flex-shrink: 0; }
/* Square tile for logo thumbnails (logos are square-ish, not 4:3 like covers). */
.download-row-thumb-square { width: 48px; height: 48px; border: 1px solid var(--border-light); }
.download-row-info { flex: 1; }
.download-row-info strong { display: block; font-weight: 700; }
.download-row-info span { font-size: 13px; color: var(--ink-muted); }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 72px 24px; color: var(--ink-muted); }
.empty-state-icon { font-size: 40px; opacity: 0.3; margin-bottom: 12px; }
.empty-state h3 { font-size: 18px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }

/* ── Save button active state ── */
.product-action-btn.is-active { color: var(--danger); border-color: var(--danger); }

/* ── Pagination (Bootstrap-style markup from paginator) ── */
.pagination {
    display: flex; gap: 6px; list-style: none;
    justify-content: center; margin: 40px 0 0; padding: 0; flex-wrap: wrap;
}
.pagination .page-item .page-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600; color: var(--ink-soft); background: var(--surface);
}
.pagination .page-item.active .page-link { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .page-item.disabled .page-link { opacity: 0.4; }

/* ── Language switcher ── */
.lang-switch select {
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 6px 10px; font-size: 13px; font-weight: 600; background: var(--surface); cursor: pointer;
}

@media (max-width: 1024px) {
    .cart-layout { grid-template-columns: 1fr; }
    .summary-card { position: static; }
}

/* -- Form errors -- */
.form-error { font-size: 12px; color: var(--danger); margin-top: 6px; font-weight: 600; }

/* -- Contact page -- */
.contact-layout { display: grid; grid-template-columns: 1.4fr 0.6fr; gap: 32px; align-items: start; }
.contact-card {
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-xs);
}
.contact-aside { display: flex; flex-direction: column; gap: 16px; }
.contact-aside-item {
    display: flex; gap: 14px; align-items: flex-start; padding: 18px;
    background: var(--surface-alt); border: 1px solid var(--border-light); border-radius: var(--radius);
}
.contact-aside-icon {
    width: 38px; height: 38px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-brand);
}
.contact-aside-item strong { display: block; font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.contact-aside-item p { font-size: 13px; color: var(--ink-muted); }
.contact-aside-item a { color: var(--accent-brand); font-weight: 600; }

/* -- Product comments -- */
.comments-intro { color: var(--ink-muted); font-size: 14px; margin-bottom: 20px; }
.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment-card {
    padding: 18px 20px; background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius); box-shadow: var(--shadow-xs);
}
.comment-head { display: flex; align-items: center; gap: 12px; }
.comment-head-info { flex: 1; min-width: 0; }
.comment-head-info strong { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.comment-head-info time { font-size: 12px; color: var(--ink-muted); }
.comment-author-badge {
    font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 2px 8px; border-radius: var(--radius-full); background: var(--accent-soft); color: var(--accent-brand);
}
/* Verified buyer. Same shape/type as the author badge so it fits every theme;
   translucent green reads correctly on both light and dark themes. */
.comment-purchased-badge {
    font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 2px 8px; border-radius: var(--radius-full);
    background: rgba(22, 163, 74, 0.14); color: var(--success);
    margin-left: 4px;
}
.comment-body { margin: 10px 0 0 48px; font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
.comment-reply-btn {
    background: none; border: none; cursor: pointer; font-family: var(--font);
    font-size: 12px; font-weight: 700; color: var(--accent-brand); padding: 4px 8px;
}
.comment-reply { margin: 14px 0 0 48px; padding: 14px 16px; background: var(--surface-alt); border-radius: var(--radius-sm); }
.comment-reply .comment-body { margin-left: 48px; }
.comment-reply-form { margin: 14px 0 0 48px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* -- Message author (product sidebar) -- */
.author-message-block { margin-top: 12px; }
.author-message-form { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.author-message-note {
    font-size: 12px; color: var(--ink-muted); text-align: center;
    padding: 10px 12px; background: var(--surface-alt); border-radius: var(--radius-sm);
}

/* -- Affiliate promo card (product sidebar) -- */
.promo-affiliate-card {
    margin-top: 20px; padding: 22px; border-radius: var(--radius-lg);
    background: linear-gradient(145deg, var(--accent-soft), var(--surface));
    border: 1px solid var(--border-light);
}
.promo-affiliate-badge {
    display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px;
    padding: 4px 10px; border-radius: var(--radius-full); background: var(--accent-brand); color: #fff; margin-bottom: 10px;
}
.promo-affiliate-card h4 { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.promo-affiliate-card p { font-size: 13px; color: var(--ink-muted); margin-bottom: 14px; line-height: 1.5; }

/* -- Affiliate dashboard -- */
.aff-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.aff-stat {
    padding: 20px 22px; background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
}
.aff-stat span { font-size: 12px; font-weight: 600; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.aff-stat strong { display: block; font-size: 26px; font-weight: 800; margin-top: 6px; letter-spacing: -0.5px; }
.aff-stat-accent { background: var(--accent-soft); border-color: transparent; }
.aff-stat-accent strong { color: var(--accent-brand); }
.aff-link-card {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    padding: 24px 28px; margin-bottom: 28px; border-radius: var(--radius-lg);
    background: var(--surface); border: 1px solid var(--border-light); box-shadow: var(--shadow-xs);
}
.aff-link-card h3 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.aff-link-card p { font-size: 13px; color: var(--ink-muted); }
.aff-link-row { display: flex; gap: 10px; flex: 1; min-width: 320px; max-width: 520px; }
.aff-link-row .form-input { font-size: 13px; }
.aff-columns { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; align-items: start; }
.aff-panel {
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-xs);
}
.aff-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.aff-panel-head h3 { font-size: 16px; font-weight: 800; }
.aff-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.aff-table th {
    text-align: left; padding: 8px 10px; font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.4px; color: var(--ink-muted); border-bottom: 1px solid var(--border-light);
}
.aff-table td { padding: 10px; border-bottom: 1px solid var(--border-light); }
.aff-badge {
    display: inline-block; padding: 3px 10px; border-radius: var(--radius-full);
    font-size: 11px; font-weight: 700;
}
.aff-badge-approved { background: var(--success-soft); color: var(--success); }
.aff-badge-pending { background: var(--warning-soft); color: var(--warning); }
.aff-badge-rejected { background: var(--danger-soft); color: var(--danger); }

/* -- Messaging -- */
.dash-nav-badge {
    margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-full); background: var(--accent-brand); color: #fff;
    font-size: 11px; font-weight: 800;
}
.msg-list { display: flex; flex-direction: column; gap: 10px; }
.msg-row {
    display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px;
    background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg);
    transition: all var(--transition);
}
.msg-row:hover { border-color: var(--border); box-shadow: var(--shadow-sm); }
.msg-row-unread { border-left: 3px solid var(--accent-brand); }
.msg-row-main { flex: 1; min-width: 0; }
.msg-row-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.msg-row-top strong { font-size: 14px; font-weight: 700; }
.msg-row-top time { font-size: 12px; color: var(--ink-muted); flex-shrink: 0; }
.msg-row-subject { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-top: 2px; }
.msg-row-subject span { color: var(--ink-muted); font-weight: 500; }
.msg-row-preview { font-size: 13px; color: var(--ink-muted); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-row-side { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.msg-unread-pill {
    min-width: 22px; height: 22px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-full); background: var(--accent-brand); color: #fff; font-size: 11px; font-weight: 800;
}
.msg-closed-pill {
    padding: 3px 10px; border-radius: var(--radius-full); background: var(--surface-sunken);
    color: var(--ink-muted); font-size: 11px; font-weight: 700;
}
.msg-empty { text-align: center; padding: 48px 24px; background: var(--surface-alt); border-radius: var(--radius-lg); }
.msg-thread { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.msg-bubble-row { display: flex; gap: 12px; max-width: 78%; }
.msg-bubble-row.msg-mine { margin-left: auto; flex-direction: row-reverse; }
.msg-bubble {
    padding: 14px 18px; background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
}
.msg-mine .msg-bubble { background: var(--accent-soft); border-color: transparent; }
.msg-bubble-meta { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.msg-bubble-meta strong { font-size: 13px; font-weight: 700; }
.msg-bubble-meta time { font-size: 11px; color: var(--ink-muted); }
.msg-bubble p { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
.msg-reply-form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.msg-reply-form .form-input { width: 100%; }

@media (max-width: 1024px) {
    .contact-layout { grid-template-columns: 1fr; }
    .aff-stats-grid { grid-template-columns: 1fr 1fr; }
    .aff-columns { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .msg-bubble-row { max-width: 100%; }
    .comment-body, .comment-reply, .comment-reply-form { margin-left: 0; }
    .aff-stats-grid { grid-template-columns: 1fr; }
}

/* -- Header profile dropdown -- */
.profile-menu { position: relative; }
.profile-menu-btn {
    display: flex; align-items: center; gap: 6px; padding: 3px;
    background: none; border: none; cursor: pointer; font-family: var(--font);
    border-radius: var(--radius-full); position: relative;
}
.profile-menu-avatar {
    width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--border); transition: border-color var(--transition);
    display: inline-flex; align-items: center; justify-content: center;
}
.profile-menu-btn:hover .profile-menu-avatar { border-color: var(--accent-brand); }
.profile-menu-initials {
    background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: 0.4px;
}
.profile-menu-dot {
    position: absolute; top: 2px; right: 14px; width: 9px; height: 9px; border-radius: 50%;
    background: var(--danger); border: 2px solid var(--surface);
}
.profile-menu-chevron { color: var(--ink-muted); transition: transform var(--transition); }
.profile-menu.open .profile-menu-chevron { transform: rotate(180deg); }
.profile-menu-panel {
    position: absolute; top: calc(100% + 10px); right: 0; width: 240px; z-index: 200;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); overflow: hidden;
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: all 0.18s ease;
}
.profile-menu.open .profile-menu-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.profile-menu-head { padding: 14px 16px; border-bottom: 1px solid var(--border-light); }
.profile-menu-head strong { display: block; font-size: 14px; font-weight: 700; }
.profile-menu-head span { display: block; font-size: 12px; color: var(--ink-muted); overflow: hidden; text-overflow: ellipsis; }
.profile-menu-links { padding: 6px; display: flex; flex-direction: column; }
.profile-menu-links a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 10px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 600;
    color: var(--ink-soft); transition: all var(--transition);
}
.profile-menu-links a:hover { background: var(--surface-alt); color: var(--ink); }
.profile-menu-badge {
    min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-full); background: var(--accent-brand); color: #fff; font-size: 11px; font-weight: 800;
}
.profile-menu-signout { border-top: 1px solid var(--border-light); padding: 6px; }
.profile-menu-signout button {
    width: 100%; text-align: left; padding: 9px 10px; border-radius: var(--radius-sm);
    background: none; border: none; cursor: pointer; font-family: var(--font);
    font-size: 13.5px; font-weight: 600; color: var(--danger); transition: background var(--transition);
}
.profile-menu-signout button:hover { background: var(--danger-soft); }

/* -- Avatar upload (settings) -- */
.avatar-upload-row { display: flex; gap: 20px; align-items: flex-start; }
.avatar-preview {
    width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    border: 2px solid var(--border);
}
.avatar-preview-initials {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent); color: #fff; font-size: 22px; font-weight: 700;
}
.avatar-upload-controls { flex: 1; }
.avatar-upload-hint { font-size: 12px; color: var(--ink-muted); margin: 6px 0; }

/* -- Freelance / hire -- */
.hire-open-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: var(--radius-full);
    background: var(--success-soft); color: var(--success);
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.4px;
    vertical-align: middle;
}
.hire-open-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.profile-hire-cta {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    margin-top: 16px; padding: 14px 18px;
    background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius);
}
.profile-hire-cta p { font-size: 13.5px; color: var(--ink-soft); flex: 1; min-width: 220px; margin: 0; }
.product-hire-strip {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-top: 14px; padding: 12px 14px;
    background: var(--success-soft); border-radius: var(--radius-sm);
}
.product-hire-strip a { font-size: 13px; font-weight: 700; color: var(--success); }
.hire-seller-card {
    display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
    padding: 18px 22px; background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
}
.hire-seller-info { flex: 1; }
.hire-seller-info strong { display: block; font-size: 16px; font-weight: 800; }
.hire-seller-info > span { font-size: 13px; color: var(--ink-muted); }
.hire-freelancer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.hire-freelancer-card {
    display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
    padding: 26px 18px; background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); transition: all var(--transition);
}
.hire-freelancer-card:hover { border-color: var(--border); box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.hire-freelancer-card strong { font-size: 15px; font-weight: 700; }
.hire-freelancer-meta { font-size: 12.5px; color: var(--ink-muted); }

@media (max-width: 1024px) { .hire-freelancer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .hire-freelancer-grid { grid-template-columns: 1fr; } .avatar-upload-row { flex-direction: column; } }

/* -- New releases (compact list cards) -- */
.new-releases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 14px;
}
.nr-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.nr-card::before {
    content: '';
    position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--accent-brand);
    opacity: 0; transition: opacity var(--transition);
}
.nr-card:hover { border-color: var(--border); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.nr-card:hover::before { opacity: 1; }
.nr-thumb {
    width: 56px; height: 56px; flex-shrink: 0;
    border-radius: var(--radius-sm);
    display: flex; align-items: flex-end; padding: 5px;
}
.nr-thumb-tag {
    font-size: 10px; font-weight: 800; color: #fff;
    background: rgba(0, 0, 0, 0.28); padding: 1px 6px; border-radius: var(--radius-full);
}
.nr-body { flex: 1; min-width: 0; }
.nr-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.nr-cat {
    font-size: 11px; font-weight: 600; color: var(--ink-muted);
    text-transform: uppercase; letter-spacing: 0.3px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nr-new {
    font-size: 9px; font-weight: 800; letter-spacing: 0.5px;
    color: var(--success); background: var(--success-soft);
    padding: 2px 6px; border-radius: var(--radius-full); flex-shrink: 0;
}
.nr-title {
    font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.3; margin-bottom: 3px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nr-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-muted); min-width: 0; }
.nr-meta .nr-dot { opacity: 0.5; }
.nr-author { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nr-time { flex-shrink: 0; }
.nr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.nr-price { font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -0.3px; }
.nr-cta {
    font-size: 11px; font-weight: 700; color: var(--accent-brand);
    opacity: 0; transform: translateX(4px); transition: all var(--transition);
}
.nr-card:hover .nr-cta { opacity: 1; transform: translateX(0); }

@media (max-width: 640px) { .new-releases-grid { grid-template-columns: 1fr; } }

/* ════════════════════════════════════════════════════════════════════
   v1.1 additions — gallery images, star ratings, modals, chat UI,
   checkout inline auth, affiliate share, blog & help center, markdown
   ════════════════════════════════════════════════════════════════════ */

/* ── Tab nav polish (hide native scrollbar, keep swipe) ── */
.tab-nav { scrollbar-width: none; -ms-overflow-style: none; }
.tab-nav::-webkit-scrollbar { display: none; }
.tab-btn { position: relative; z-index: 1; cursor: pointer; }

/* ── Product logo next to title ── */
.product-title-row { display: flex; align-items: center; gap: 14px; }
.product-logo {
    width: 56px; height: 56px; border-radius: 14px; object-fit: cover;
    border: 1px solid var(--border-light); box-shadow: var(--shadow-xs); flex-shrink: 0;
    background: var(--surface);
}

/* ── Real-image gallery ── */
.gallery-main-image {
    display: block;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat;
    cursor: zoom-in;
}
.gallery-thumb-image {
    background-size: cover !important;
    background-position: center !important;
}

/* ── Markdown description body ── */
.markdown-body { color: var(--ink-soft); line-height: 1.75; font-size: 15px; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
    color: var(--ink); font-weight: 800; margin: 22px 0 10px; letter-spacing: -0.3px;
}
.markdown-body h1 { font-size: 22px; }
.markdown-body h2 { font-size: 19px; }
.markdown-body h3 { font-size: 17px; }
.markdown-body p { margin-bottom: 12px; }
.markdown-body ul, .markdown-body ol { margin: 0 0 14px 22px; }
.markdown-body li { margin-bottom: 6px; }
.markdown-body code {
    background: var(--surface-sunken); padding: 2px 6px; border-radius: 6px;
    font-size: 13px; font-family: ui-monospace, monospace;
}
.markdown-body pre { background: var(--surface-sunken); padding: 14px; border-radius: var(--radius); overflow-x: auto; margin-bottom: 14px; }
.markdown-body blockquote { border-left: 3px solid var(--border); padding-left: 14px; color: var(--ink-muted); margin-bottom: 14px; }
.markdown-body a { color: var(--accent-brand); font-weight: 600; }

/* ── Inline reviews after description ── */
.inline-reviews { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border-light); }
.inline-reviews h4 { font-size: 16px; font-weight: 800; margin-bottom: 16px; }
.inline-reviews .review-card { margin-bottom: 14px; }

/* ── Star rating input ── */
.star-rating { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-rating input { position: absolute; opacity: 0; pointer-events: none; }
.star-rating label {
    font-size: 26px; color: var(--border); cursor: pointer; transition: color 0.15s; line-height: 1;
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label { color: #f59e0b; }

/* ── Generic modal ── */
.sk-modal { position: fixed; inset: 0; z-index: 400; display: flex; align-items: center; justify-content: center; }
.sk-modal[hidden] { display: none; }
.sk-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 17, 21, 0.55); backdrop-filter: blur(2px); }
.sk-modal-panel {
    position: relative; background: var(--surface); border-radius: var(--radius-lg);
    padding: 24px; width: min(520px, calc(100vw - 32px)); max-height: min(86vh, 720px);
    overflow-y: auto; box-shadow: var(--shadow-lg, 0 24px 64px rgba(0,0,0,0.25));
}
.sk-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sk-modal-head h3 { font-size: 17px; font-weight: 800; }
.sk-modal-close {
    width: 30px; height: 30px; border: none; border-radius: 50%; background: var(--surface-sunken);
    font-size: 17px; cursor: pointer; color: var(--ink-muted); line-height: 1;
}
.sk-modal-close:hover { background: var(--border-light); color: var(--ink); }

/* ── Affiliate share card ── */
.affiliate-share-row { display: flex; gap: 8px; margin-top: 12px; }
.affiliate-share-row .form-input { flex: 1; font-size: 12px; }
.affiliate-share-note { font-size: 12px; color: var(--ink-muted); margin-top: 8px; }
.affiliate-share-note a { color: var(--accent-brand); font-weight: 600; }

/* ── Checkout inline auth ── */
.checkout-auth-tabs { display: flex; gap: 6px; margin-bottom: 18px; border-bottom: 1px solid var(--border-light); }
.checkout-auth-tab {
    padding: 10px 16px; border: none; background: none; font-size: 14px; font-weight: 700;
    color: var(--ink-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.checkout-auth-tab.active { color: var(--ink); border-bottom-color: var(--accent-brand); }
.checkout-auth-panel { display: none; }
.checkout-auth-panel.active { display: block; }

/* ── Header profile identity ── */
.profile-menu-btn { display: inline-flex; align-items: center; gap: 8px; }
.profile-menu-id { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; text-align: left; }
.profile-menu-id strong { font-size: 13px; font-weight: 700; color: var(--ink); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu-id span { font-size: 11px; color: var(--ink-muted); font-weight: 600; }
@media (max-width: 900px) { .profile-menu-id { display: none; } }

/* ── Dashboard switch button (header) ── */
.dash-switch-form { display: inline-flex; }
.dash-switch-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--surface);
    font-size: 12.5px; font-weight: 700; color: var(--ink-soft); cursor: pointer; white-space: nowrap;
    transition: all var(--transition);
}
.dash-switch-btn:hover { border-color: var(--accent-brand); color: var(--accent-brand); }

/* ── Chat-style messages ── */
.chat-shell {
    display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); overflow: hidden;
    height: calc(100vh - 300px); min-height: 460px;
}
.chat-scroll { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.chat-row { display: flex; gap: 10px; align-items: flex-end; max-width: 78%; }
.chat-row.chat-mine { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble {
    background: var(--surface-sunken); border-radius: 16px 16px 16px 4px;
    padding: 10px 14px; font-size: 14px; line-height: 1.55; color: var(--ink);
}
.chat-mine .chat-bubble {
    background: var(--accent-brand); color: #fff; border-radius: 16px 16px 4px 16px;
}
.chat-meta { font-size: 11px; color: var(--ink-muted); margin-top: 4px; }
.chat-mine .chat-meta { text-align: right; }
.chat-day-divider {
    align-self: center; font-size: 11px; font-weight: 700; color: var(--ink-muted);
    background: var(--surface-sunken); padding: 4px 12px; border-radius: var(--radius-full); margin: 8px 0;
}
.chat-composer {
    display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--border-light);
    background: var(--surface); align-items: flex-end;
}
.chat-composer textarea {
    flex: 1; resize: none; max-height: 120px; min-height: 44px;
    border: 1px solid var(--border); border-radius: 22px; padding: 11px 16px;
    font-size: 14px; font-family: inherit; outline: none; overflow-y: hidden;
}
.chat-composer textarea:focus { border-color: var(--accent-brand); }
.chat-send-btn {
    width: 44px; height: 44px; border-radius: 50%; border: none;
    background: var(--accent-brand); color: #fff; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chat-send-btn:disabled { opacity: 0.5; cursor: default; }

/* ── Blog cards (visually distinct from product cards) ── */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1000px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .blog-grid { grid-template-columns: 1fr; } }
.blog-card {
    display: flex; flex-direction: column; background: var(--surface);
    border: 1px solid var(--border-light); border-radius: var(--radius-lg);
    overflow: hidden; transition: all var(--transition); position: relative;
}
.blog-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.blog-card-cover { height: 150px; background-size: cover; background-position: center; }
.blog-card-cover-fallback {
    height: 150px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: rgba(255,255,255,0.85); font-size: 34px; font-weight: 800;
}
.blog-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-muted); font-weight: 600; }
.blog-card-cat {
    color: var(--accent-brand); background: var(--accent-soft, rgba(37,99,235,0.08));
    padding: 3px 10px; border-radius: var(--radius-full); font-weight: 700;
}
.blog-card-title { font-size: 16.5px; font-weight: 800; letter-spacing: -0.3px; line-height: 1.35; }
.blog-card-title a { color: var(--ink); }
.blog-card-title a:hover { color: var(--accent-brand); }
.blog-card-excerpt { font-size: 13.5px; color: var(--ink-muted); line-height: 1.6; flex: 1; }
.blog-card-footer { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-muted); padding-top: 10px; border-top: 1px dashed var(--border-light); }
.blog-article-body { max-width: 760px; margin: 0 auto; }

/* ── Help center ── */
.help-hero { text-align: center; padding: 20px 0 34px; }
.help-search { max-width: 560px; margin: 18px auto 0; display: flex; gap: 8px; }
.help-search input { flex: 1; }
.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1000px) { .help-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .help-grid { grid-template-columns: 1fr; } }
.help-cat-card {
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); padding: 22px;
}
.help-cat-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.help-cat-card > p { font-size: 13px; color: var(--ink-muted); margin-bottom: 12px; }
.help-cat-card ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.help-cat-card ul a { font-size: 14px; color: var(--ink-soft); font-weight: 500; }
.help-cat-card ul a:hover { color: var(--accent-brand); }
.help-cat-icon { font-size: 18px; }

/* ── Homepage: flash deals & on-sale strips ── */
.deal-banner {
    display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.8px; color: #b91c1c;
}
.deal-banner .deal-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: dealpulse 1.4s infinite; }
@keyframes dealpulse { 50% { opacity: 0.4; } }
.price-strike { color: var(--ink-muted); text-decoration: line-through; font-weight: 600; font-size: 13px; margin-right: 6px; }

/* ── New releases (functional) ── */
.new-releases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1000px) { .new-releases-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .new-releases-grid { grid-template-columns: 1fr; } }
.nr-card {
    display: flex; align-items: center; gap: 14px; padding: 12px;
    background: var(--surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg);
    transition: all var(--transition);
}
.nr-card:hover { border-color: var(--accent-brand); box-shadow: var(--shadow-xs); }
.nr-thumb {
    /* Square: these tiles show item logos, which are square-ish — a 4:3 box
       left dead space either side. */
    width: 64px; height: 64px; border-radius: var(--radius); flex-shrink: 0;
    background-size: cover; background-position: center; position: relative;
}
.nr-thumb-tag {
    position: absolute; bottom: 5px; left: 5px; font-size: 10px; font-weight: 800;
    background: rgba(0,0,0,0.55); color: #fff; padding: 2px 7px; border-radius: var(--radius-full);
}
.nr-body { flex: 1; min-width: 0; }
.nr-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.nr-cat { font-size: 11px; font-weight: 700; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.4px; }
.nr-new { font-size: 9.5px; font-weight: 800; background: #dcfce7; color: #15803d; padding: 2px 7px; border-radius: var(--radius-full); }
.nr-title { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nr-meta { display: flex; gap: 6px; font-size: 12px; color: var(--ink-muted); margin-top: 3px; }
.nr-side { text-align: right; flex-shrink: 0; }
.nr-price { display: block; font-weight: 800; font-size: 15px; color: var(--ink); }
.nr-cta { font-size: 12px; color: var(--accent-brand); font-weight: 700; }

/* ── Product card cover images ── */
.product-card-thumb { background-size: cover !important; background-position: center !important; }

/* ── Support ticket / standalone pages ── */
.standalone-shell { max-width: 900px; margin: 0 auto; padding: 32px 20px 72px; }
