/* Troc — design system 2026 */

:root {
    --bg: #f4f1ec;
    --bg-elevated: #ffffff;
    --bg-muted: #ebe6df;
    --surface-glass: rgba(255, 255, 255, 0.72);

    --text: #1a1f2e;
    --text-muted: #5c6478;
    --text-soft: #8b93a7;

    --brand: #2e5a31;
    --brand-hover: #234825;
    --brand-light: #e8f0e9;
    --brand-glow: rgba(46, 90, 49, 0.2);

    --accent: #e79124;
    --accent-hover: #cf7a12;
    --accent-light: #fdf0dc;

    --success: #059669;
    --success-bg: #d1fae5;
    --warning: #d97706;
    --warning-bg: #fef3c7;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --info: #0284c7;
    --info-bg: #e0f2fe;

    --border: rgba(26, 31, 46, 0.08);
    --border-strong: rgba(26, 31, 46, 0.14);

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-full: 999px;

    --shadow-sm: 0 1px 2px rgba(26, 31, 46, 0.04);
    --shadow: 0 8px 30px rgba(26, 31, 46, 0.08);
    --shadow-lg: 0 20px 50px rgba(26, 31, 46, 0.12);

    --font: "Plus Jakarta Sans", system-ui, sans-serif;
    --header-h: 72px;
    --container: 1180px;
    --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Dungi tiled: 2px verde, 20px alb, 2px portocaliu, 20px alb */
    --stripe-width: 2px;
    --stripe-gap: 20px;
    --stripe-period: 44px;
    --stripe-opacity: 0.1;
    --stripe-bg: repeating-linear-gradient(
        90deg,
        var(--brand) 0,
        var(--brand) 2px,
        #ffffff 2px,
        #ffffff 22px,
        var(--accent) 22px,
        var(--accent) 24px,
        #ffffff 24px,
        #ffffff 44px
    );
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    position: relative;
    isolation: isolate;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: var(--stripe-bg);
    background-size: var(--stripe-period) 100%;
    opacity: var(--stripe-opacity);
    pointer-events: none;
}

img { max-width: 100%; display: block; }

a {
    color: var(--brand);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--brand-hover); }

.container {
    width: min(var(--container), calc(100% - 2rem));
    margin-inline: auto;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-h);
    border-bottom: 1px solid var(--border);
    background: var(--bg-elevated);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.brand:hover { opacity: 0.92; }
.brand-logo {
    height: 42px;
    width: auto;
    display: block;
}
@media (max-width: 480px) {
    .brand-logo { height: 34px; }
}

.nav-desktop {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: background var(--transition), color var(--transition);
}
.nav-link:hover {
    background: var(--bg-muted);
    color: var(--text);
}
.nav-link.is-active {
    background: var(--brand-light);
    color: var(--brand);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 0.5rem;
    padding-left: 0.75rem;
}

.nav-user-name {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-soft);
    font-size: 0.85rem;
}

.nav-user-name:hover,
.nav-user-name.is-active {
    color: var(--text-muted);
}

.nav-logout {
    padding: 0.35rem;
    color: var(--text-soft);
    line-height: 0;
}

.nav-logout:hover {
    color: var(--text-muted);
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text);
}

.nav-mobile {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: rgba(26, 31, 46, 0.35);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}
.nav-mobile.is-open {
    opacity: 1;
    pointer-events: auto;
}
.nav-mobile-panel {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    transition: transform var(--transition);
}
.nav-mobile.is-open .nav-mobile-panel {
    transform: translateY(0);
}
.nav-mobile .nav-link {
    display: block;
    padding: 0.75rem 1rem;
}

@media (max-width: 900px) {
    .nav-desktop { display: none; }
    .nav-toggle { display: grid; place-items: center; }
    .nav-mobile { display: block; }
}

/* Main */
.main-content {
    flex: 1 0 auto;
    padding: 2rem 0 4rem;
}

/* Page header */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}
.page-header h1 {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}
.page-header p {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 1.5rem 4rem;
    max-width: 640px;
    margin: 0 auto 2rem;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    background: var(--brand-light);
    color: var(--brand);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin: 0 0 1rem;
}
.hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin: 0 0 2rem;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 1.25rem;
    border: none;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.925rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    text-decoration: none;
    line-height: 1.2;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--brand);
    color: white;
    box-shadow: 0 4px 16px var(--brand-glow);
}
.btn-primary:hover {
    background: var(--brand-hover);
    color: white;
    box-shadow: 0 6px 22px var(--brand-glow);
}

.btn-accent {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 16px rgba(234, 88, 12, 0.25);
}
.btn-accent:hover { color: white; background: var(--accent-hover); }

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text);
    border: 1px solid var(--border-strong);
}
.btn-secondary:hover {
    background: var(--bg-muted);
    color: var(--text);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    padding: 0.5rem 0.85rem;
}
.btn-ghost:hover {
    background: var(--bg-muted);
    color: var(--text);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
}
.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-success {
    background: var(--success-bg);
    color: var(--success);
}
.btn-success:hover {
    background: var(--success);
    color: white;
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Cards & panels */
.panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.panel-body { padding: 1.5rem; }
.panel-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}
.panel-header h2, .panel-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.product-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.product-card-image {
    aspect-ratio: 4 / 3;
    background: var(--bg-muted);
    position: relative;
    overflow: hidden;
}
.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}
.product-card:hover .product-card-image img {
    transform: scale(1.04);
}
.product-card-image .placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--text-soft);
    font-size: 2.5rem;
}

.product-card-badges {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.product-card-body {
    padding: 1.15rem 1.25rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card-body h3 {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
}
.product-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.product-card-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-soft);
}
.product-card-footer {
    margin-top: auto;
    padding-top: 0.75rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.badge-available { background: var(--success-bg); color: var(--success); }
.badge-blocked { background: var(--warning-bg); color: var(--warning); }
.badge-delivered { background: var(--bg-muted); color: var(--text-muted); }
.badge-pending { background: var(--info-bg); color: var(--info); }
.badge-private { background: #ede9fe; color: #7c3aed; }
.badge-hidden { background: var(--bg-muted); color: var(--text-soft); }

.badge-condition-new { background: #dcfce7; color: #166534; }
.badge-condition-like-new { background: #d1fae5; color: #047857; }
.badge-condition-used { background: #e0f2fe; color: #0369a1; }
.badge-condition-worn { background: #fef3c7; color: #b45309; }
.badge-condition-broken { background: #fee2e2; color: #b91c1c; }
.badge-condition-parts { background: #f3e8ff; color: #7e22ce; }

/* Filter bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-sm);
}
.filter-bar .form-group { flex: 1; min-width: 180px; margin: 0; }
.filter-bar .btn { align-self: flex-end; }

/* Forms */
.form-panel {
    max-width: 520px;
}
.form-panel-wide {
    max-width: 640px;
}

.form-group {
    margin-bottom: 1.15rem;
}
.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
}
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: var(--bg-elevated);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-help {
    font-size: 0.8rem;
    color: var(--text-soft);
    margin-top: 0.35rem;
}
.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 0.35rem;
}
.form-errors {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.form-file {
    padding: 1rem;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    text-align: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}
.form-file:hover {
    border-color: var(--brand);
    background: var(--brand-light);
}

/* Product detail page */
.product-page {
    max-width: 1100px;
    margin: 0 auto;
}

.product-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}
.product-back:hover { color: var(--brand); }

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: 2rem;
    align-items: start;
}
@media (max-width: 900px) {
    .product-detail { grid-template-columns: 1fr; gap: 1.5rem; }
}

.product-gallery-column {
    position: sticky;
    top: calc(var(--header-h) + 1rem);
}
@media (max-width: 900px) {
    .product-gallery-column { position: static; }
}

.product-gallery-wrap,
.product-gallery-column {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.product-gallery {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-elevated);
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow);
    border: none;
    padding: 0;
    width: 100%;
    display: block;
    position: relative;
}
.product-gallery--clickable {
    cursor: zoom-in;
}
.product-gallery--clickable:hover .product-gallery-zoom {
    opacity: 1;
}
.product-gallery-zoom {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(26, 31, 46, 0.72);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-full);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}
.product-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-gallery .placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--text-soft);
    font-size: 4rem;
    background: linear-gradient(145deg, var(--brand-light), var(--bg-elevated));
}

.product-sidebar {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.product-status-banner {
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}
.product-status-banner--available {
    background: var(--success-bg);
    color: #065f46;
}
.product-status-banner--blocked {
    background: var(--warning-bg);
    color: #92400e;
}
.product-status-banner--delivered {
    background: var(--bg-muted);
    color: var(--text-muted);
}

.product-title {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text);
}

.product-owner-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: inherit;
    padding: 0.65rem 0.75rem;
    margin: 0 -0.75rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.product-owner-row:hover {
    background: var(--brand-light);
    color: inherit;
}
.product-owner-row:hover strong { color: var(--brand); }
.product-owner-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.1rem;
}
.product-owner-row strong {
    font-size: 1.05rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.profile-header h1 { margin: 0; }
.profile-header p { margin: 0.35rem 0 0; }

.account-section + .account-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}
.account-section-title {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}
.account-section-help {
    margin: -0.5rem 0 1rem;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.badge-category {
    background: var(--accent-light);
    color: #9a3412;
}

.product-facts {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.product-fact {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 0.75rem;
    align-items: start;
}
.product-fact dt {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-soft);
}
.product-fact dd {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.45;
}
@media (max-width: 480px) {
    .product-fact { grid-template-columns: 1fr; gap: 0.2rem; }
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}
.btn-block {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
}
.product-actions-hint {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-soft);
    text-align: center;
    line-height: 1.4;
}

.product-about h2,
.product-reservation-header h2 {
    margin: 0 0 0.65rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-soft);
}
.product-about-text {
    color: var(--text-muted);
    line-height: 1.75;
    font-size: 0.98rem;
}
.product-about-text p { margin: 0 0 0.75rem; }
.product-about-text p:last-child { margin-bottom: 0; }

.product-about {
    padding-bottom: 0.25rem;
}

.product-reservation {
    padding: 1.15rem;
    background: linear-gradient(135deg, rgba(46, 90, 49, 0.06), rgba(231, 145, 36, 0.06));
    border-radius: var(--radius);
    border-left: 4px solid var(--brand);
}
.product-reservation-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.product-reservation-header h2 { margin: 0; }
.product-reservation-user {
    margin: 0 0 0.75rem;
    font-size: 0.92rem;
    color: var(--text-muted);
}

.product-info h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 1.5rem 0;
}
.meta-item {
    padding: 0.85rem 1rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.meta-item span {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-soft);
    margin-bottom: 0.2rem;
}
.meta-item strong {
    font-size: 0.95rem;
    font-weight: 600;
}

.product-description {
    color: var(--text-muted);
    line-height: 1.7;
    margin: 1.5rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.reservation-panel {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--brand-light), var(--bg-elevated));
    border: 1px solid rgba(15, 118, 110, 0.15);
    border-radius: var(--radius);
}
.reservation-panel h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    font-weight: 700;
}

/* Lists */
.item-list { display: flex; flex-direction: column; gap: 0.75rem; }

.list-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: box-shadow var(--transition);
}
.list-item:hover { box-shadow: var(--shadow-sm); }

.list-item-content h4 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 700;
}
.list-item-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.reservation-item {
    padding: 0;
    overflow: hidden;
    align-items: stretch;
}

.reservation-thumb {
    flex-shrink: 0;
    width: 112px;
    min-height: 112px;
    background: var(--bg-muted);
    display: block;
    overflow: hidden;
}
.reservation-thumb img {
    width: 100%;
    height: 100%;
    min-height: 112px;
    object-fit: cover;
}
.reservation-thumb-placeholder {
    width: 100%;
    height: 100%;
    min-height: 112px;
    display: grid;
    place-items: center;
    font-size: 1.75rem;
    color: var(--text-soft);
}

.reservation-body {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    min-width: 0;
}

@media (max-width: 540px) {
    .reservation-thumb {
        width: 88px;
        min-height: 88px;
    }
    .reservation-thumb img,
    .reservation-thumb-placeholder {
        min-height: 88px;
    }
}

/* Two column layout for friends page */
.split-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}
.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: var(--bg-muted);
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.75rem;
}
.empty-state h3 {
    margin: 0 0 0.5rem;
    color: var(--text);
    font-size: 1.1rem;
}
.empty-state p { margin: 0 0 1.25rem; }

/* Toast messages */
.toast-stack {
    position: fixed;
    top: calc(var(--header-h) + 1rem);
    right: 1rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 380px;
    width: calc(100% - 2rem);
}
.toast {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    animation: slideIn 300ms ease;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.toast-success { background: var(--success-bg); color: #065f46; border-color: rgba(5, 150, 105, 0.2); }
.toast-error, .toast-danger { background: var(--danger-bg); color: #991b1b; }
.toast-info { background: var(--info-bg); color: #075985; }
.toast-warning { background: var(--warning-bg); color: #92400e; }

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
}
.toast-close:hover { opacity: 1; }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Auth pages */
.auth-layout {
    display: grid;
    place-items: center;
    min-height: calc(100vh - var(--header-h) - 4rem);
}
.auth-card {
    width: min(420px, 100%);
    padding: 2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.auth-logo {
    width: 180px;
    height: auto;
    display: block;
    margin: 0 auto 1.25rem;
}
.auth-card h1 {
    margin: 0 0 0.35rem;
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-align: center;
}
.auth-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
    font-size: 0.95rem;
}
.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.notice {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}
.notice-info {
    background: var(--info-bg);
    color: #075985;
    border: 1px solid rgba(2, 132, 199, 0.15);
}

/* Footer */
.site-footer {
    flex-shrink: 0;
    margin-top: auto;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-soft);
    font-size: 0.85rem;
}

/* Product image manager */
.image-manager {
    margin: 1.5rem 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.image-manager-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}
.image-sortable {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
    min-height: 60px;
}
.image-item {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--border);
    background: var(--bg-muted);
    cursor: grab;
}
.image-item:active { cursor: grabbing; }
.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
.image-item-badge {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--brand);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    border-radius: var(--radius-full);
}
.image-item-remove {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: rgba(26, 31, 46, 0.72);
    color: white;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}
.image-item-remove:hover { background: var(--danger); }

.crop-modal[hidden] { display: none !important; }
.crop-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.crop-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 31, 46, 0.55);
}
.crop-modal-dialog {
    position: relative;
    width: min(720px, 100%);
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.crop-modal-header,
.crop-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
}
.crop-modal-header {
    border-bottom: 1px solid var(--border);
}
.crop-modal-header h3 {
    margin: 0;
    font-size: 1.05rem;
}
.crop-modal-close {
    border: none;
    background: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}
.crop-modal-body {
    padding: 1rem;
    max-height: 60vh;
    background: #111;
}
.crop-modal-body img {
    display: block;
    max-width: 100%;
    max-height: 55vh;
}
.crop-modal-footer {
    border-top: 1px solid var(--border);
    justify-content: flex-end;
}

.product-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}
.gallery-thumb {
    flex: 0 0 72px;
    width: 72px;
    aspect-ratio: 4 / 3;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    background: var(--bg-elevated);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--transition), transform var(--transition);
}
.gallery-thumb:hover { transform: translateY(-2px); }
.gallery-thumb.is-active {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px var(--brand-glow);
}
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Photo lightbox */
.lightbox[hidden] { display: none !important; }
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 12, 18, 0.92);
}
.lightbox-inner {
    position: relative;
    z-index: 1;
    width: min(1100px, 94vw);
    height: min(85vh, 900px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 0.5rem;
}
.lightbox-figure {
    margin: 0;
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
}
.lightbox-image {
    max-width: 100%;
    max-height: calc(85vh - 3rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.lightbox-counter {
    margin-top: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
    font-weight: 500;
}
.lightbox-close {
    position: absolute;
    top: -0.25rem;
    right: 0;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition);
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-nav {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background var(--transition), transform var(--transition);
}
.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.05);
}
.lightbox-nav[hidden] { display: none; }

@media (max-width: 640px) {
    .lightbox-inner {
        flex-direction: column;
        height: auto;
        padding-top: 3rem;
    }
    .lightbox-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }
    .lightbox-prev { left: 0.25rem; }
    .lightbox-next { right: 0.25rem; }
    .lightbox-image { max-height: 70vh; }
}

/* Utilities */
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
