/* WebCard Custom Styles */

:root {
    --wc-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --wc-primary: rgb(52, 48, 146);
    --wc-primary-hover: rgb(42, 38, 120);
    --wc-secondary: rgb(247, 143, 30);
    --wc-secondary-hover: rgb(230, 125, 15);
    --wc-text: #202124;
    --wc-text-secondary: #5f6368;
    --bs-primary: rgb(52, 48, 146);
    --bs-primary-rgb: 52, 48, 146;
    --bs-secondary: rgb(247, 143, 30);
    --bs-secondary-rgb: 247, 143, 30;
    --wc-border: #dadce0;
    --wc-bg-subtle: #f8f9fa;
    --wc-bg-card: #ffffff;
    --wc-shadow-sm: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    --wc-shadow-md: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
    --wc-radius: 0px;
    --wc-radius-input: 2px;
    --bs-btn-border-radius: 0;
    
}

/* Primary buttons: platform blue */
.btn-primary {
    background-color: var(--wc-primary);
    border-color: var(--wc-primary);
}
.btn-primary:hover {
    background-color: var(--wc-primary-hover);
    border-color: var(--wc-primary-hover);
}
.btn-primary:focus,
.btn-primary.focus {
    background-color: var(--wc-primary-hover);
    border-color: var(--wc-primary-hover);
    box-shadow: 0 0 0 0.25rem rgba(52, 48, 146, 0.25);
}
.btn-primary:active,
.btn-primary.active {
    background-color: var(--wc-primary-hover);
    border-color: var(--wc-primary-hover);
}

/* Outline primary: platform blue */
.btn-outline-primary {
    color: var(--wc-primary);
    border-color: var(--wc-primary);
}
.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--wc-primary);
    border-color: var(--wc-primary);
}
.btn-outline-primary:focus,
.btn-outline-primary.focus {
    box-shadow: 0 0 0 0.25rem rgba(52, 48, 146, 0.25);
}
.btn-outline-primary:active,
.btn-outline-primary.active {
    color: #fff;
    background-color: var(--wc-primary-hover);
    border-color: var(--wc-primary-hover);
}

/* Disabled buttons */
.btn.disabled,
.btn:disabled,
fieldset:disabled .btn {
    opacity: 0.65;
}
.btn-primary.disabled,
.btn-primary:disabled,
fieldset:disabled .btn-primary {
    background-color: var(--wc-primary);
    border-color: var(--wc-primary);
}
.btn-outline-primary.disabled,
.btn-outline-primary:disabled,
fieldset:disabled .btn-outline-primary {
    color: var(--wc-primary);
    border-color: var(--wc-primary);
    background-color: transparent;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--wc-font-sans);
    color: var(--wc-text);
}

main {
    flex: 1;
}

.profile-container {
    min-height: 100vh;
}

/* Custom form styles */
.form-label {
    font-weight: 500;
}

/* Card hover effects (non-auth) */
body:not(.auth-page) .card {
    transition: transform 0.2s;
}

body:not(.auth-page) .card:hover {
    transform: translateY(-2px);
}

/* ========== Auth pages: Google-inspired design ========== */
body.auth-page {
    background: var(--wc-bg-subtle);
}

body.auth-page main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 2rem 1rem;
}

body.auth-page .auth-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    background: var(--wc-bg-card);
    border-radius: var(--wc-radius);
    box-shadow: var(--wc-shadow-md);
    border: none;
    overflow: hidden;
}

body.auth-page .auth-card .card-body {
    padding: 2.5rem 2rem;
}

body.auth-page .auth-panels-wrap {
    position: relative;
    min-height: 380px;
}

body.auth-page .auth-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    transform: translateY(6px);
}

body.auth-page .auth-panel.active {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

body.auth-page .auth-panel-messages {
    min-height: 0;
    margin-bottom: 0.5rem;
}

body.auth-page .auth-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}

body.auth-page .auth-brand-logo-wrap {
    display: inline-block;
    line-height: 0;
    margin-bottom: 0.75rem;
}

body.auth-page .auth-brand-logo {
    height: 100px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    vertical-align: middle;
}

body.auth-page .auth-brand p {
    font-size: 0.9375rem;
    color: var(--wc-text-secondary);
    margin: 0.25rem 0 0;
}

body.auth-page .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wc-text);
    margin-bottom: 0.375rem;
}

body.auth-page .form-control {
    border: 1px solid var(--wc-border);
    border-radius: var(--wc-radius-input);
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    min-height: 48px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

body.auth-page .form-control:hover {
    border-color: #bdc1c6;
}

body.auth-page .form-control:focus {
    border-color: var(--wc-primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
    outline: none;
}

body.auth-page .input-group-text {
    background: var(--wc-bg-subtle);
    border: 1px solid var(--wc-border);
    border-right: none;
    border-radius: var(--wc-radius-input) 0 0 var(--wc-radius-input);
    color: var(--wc-text-secondary);
    min-height: 48px;
}

body.auth-page .input-group .form-control {
    border-left: none;
    border-radius: 0 var(--wc-radius-input) var(--wc-radius-input) 0;
}

body.auth-page .input-group .form-control:focus {
    border-left: none;
}

body.auth-page .input-group:focus-within .input-group-text {
    border-color: var(--wc-primary);
    color: var(--wc-primary);
}

body.auth-page .btn-auth-primary {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
    font-weight: 600;
    background: var(--wc-primary);
    border: none;
    border-radius: var(--wc-radius-input);
    color: #fff;
    padding: 0.625rem 1.25rem;
    transition: background 0.2s, box-shadow 0.2s;
}

body.auth-page .btn-auth-primary:hover {
    background: var(--wc-primary-hover);
    color: #fff;
    box-shadow: var(--wc-shadow-sm);
}

body.auth-page .auth-links {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--wc-border);
    font-size: 0.875rem;
}

body.auth-page .auth-links a {
    color: var(--wc-primary);
    text-decoration: none;
    font-weight: 500;
}

body.auth-page .auth-links a:hover {
    text-decoration: underline;
}

body.auth-page .auth-links .auth-links-sep {
    color: var(--wc-border);
    margin: 0 0.5rem;
}

body.auth-page .alert {
    border-radius: var(--wc-radius-input);
    font-size: 0.875rem;
}

body.auth-page footer {
    background: transparent;
    color: var(--wc-text-secondary);
    font-size: 0.8125rem;
}

/* ========== Dashboard: same design system ========== */
body.dashboard-page {
    background: var(--wc-bg-subtle);
}

body.dashboard-page main {
    /* padding: 2rem 0 3rem; */
}

body.dashboard-page .dashboard-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

body.dashboard-page .dashboard-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--wc-text);
    margin: 0;
    letter-spacing: -0.02em;
}

body.dashboard-page .btn-dashboard-primary {
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: var(--wc-radius-input);
    background: var(--wc-primary);
    border: none;
    color: #fff;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
}

body.dashboard-page .btn-dashboard-primary:hover {
    background: var(--wc-primary-hover);
    color: #fff;
    box-shadow: var(--wc-shadow-sm);
}

/* Profile cards */
body.dashboard-page .profile-card {
    background: var(--wc-bg-card);
    border-radius: var(--wc-radius);
    box-shadow: var(--wc-shadow-sm);
    border: none;
    overflow: hidden;
    transition: box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

body.dashboard-page .profile-card:hover {
    box-shadow: var(--wc-shadow-md);
    transform: none;
}

body.dashboard-page .profile-card .card-body {
    padding: 1.25rem 1.25rem 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
}

body.dashboard-page .profile-card-header {
    margin-bottom: 0.75rem;
}

body.dashboard-page .profile-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--wc-text);
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

body.dashboard-page .profile-card-slug {
    font-size: 0.8125rem;
    font-family: ui-monospace, monospace;
    color: var(--wc-text-secondary);
    margin: 0;
    word-break: break-all;
}

body.dashboard-page .profile-card-public-link {
    color: var(--wc-text-secondary);
    text-decoration: none;
    position: relative;
    z-index: 3;
}

body.dashboard-page .profile-card-public-link .profile-card-domain {
    color: var(--wc-text-secondary);
}

body.dashboard-page .profile-card-public-link .profile-card-path {
    color: var(--wc-primary);
}

body.dashboard-page .profile-card-public-link:hover {
    text-decoration: underline;
}

body.dashboard-page .profile-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    font-size: 0.8125rem;
    color: var(--wc-text-secondary);
    margin-bottom: 0.75rem;
}

body.dashboard-page .profile-card-meta .badge {
    font-weight: 500;
    font-size: 0.75rem;
}

body.dashboard-page .profile-card-photo-wrap {
    text-align: center;
}

body.dashboard-page .profile-card-photo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

body.dashboard-page .profile-card-photo-crop-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    display: block;
}

body.dashboard-page .profile-card-photo-cropped {
    max-width: none;
    display: block;
}

.edit-profile-photo-crop-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.edit-profile-photo-crop-ring img {
    max-width: none;
    display: block;
}

/* Placeholder for future: subscription, active/inactive toggle */
body.dashboard-page .profile-card-actions {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--wc-border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

body.dashboard-page .profile-card-actions .btn-group-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

body.dashboard-page .profile-card-actions .btn-sm {
    font-size: 0.8125rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--wc-radius-input);
}

body.dashboard-page .profile-card-actions .btn-outline-primary {
    border-color: var(--wc-border);
    color: var(--wc-primary);
}

body.dashboard-page .profile-card-actions .btn-outline-primary:hover {
    background: rgba(26, 115, 232, 0.08);
    border-color: var(--wc-primary);
    color: var(--wc-primary-hover);
}

body.dashboard-page .alert {
    border-radius: var(--wc-radius-input);
    border: none;
}

/* Dashboard form pages (edit profile, etc.) */
body.dashboard-page .dashboard-form-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

body.dashboard-page .dashboard-form-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--wc-text);
    margin: 0;
    letter-spacing: -0.02em;
}

body.dashboard-page .dashboard-form-header .back-link {
    font-size: 0.9375rem;
    color: var(--wc-primary);
    text-decoration: none;
}

body.dashboard-page .dashboard-form-header .back-link:hover {
    text-decoration: underline;
}

body.dashboard-page .dashboard-form-header-with-lang {
    flex-wrap: wrap;
    gap: 0.75rem;
}

body.dashboard-page .dashboard-form-header-with-lang #edit-language-select {
    font-size: 0.875rem;
}

body.dashboard-page .dashboard-form-card {
    background: var(--wc-bg-card);
    border-radius: var(--wc-radius);
    box-shadow: var(--wc-shadow-sm);
    border: none;
    overflow: hidden;
}

body.dashboard-page .dashboard-form-card .card-body {
    padding: 1.5rem 1.75rem;
}

body.dashboard-page .dashboard-form-card .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wc-text);
}

body.dashboard-page .dashboard-form-card .form-control,
body.dashboard-page .dashboard-form-card .form-select {
    border: 1px solid var(--wc-border);
    border-radius: var(--wc-radius-input);
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
}

body.dashboard-page .dashboard-form-card .form-control:focus,
body.dashboard-page .dashboard-form-card .form-select:focus {
    border-color: var(--wc-primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
    outline: none;
}

body.dashboard-page .dashboard-form-card .form-text {
    font-size: 0.8125rem;
    color: var(--wc-text-secondary);
}

body.dashboard-page .dashboard-form-card .form-check-input:checked {
    background-color: var(--wc-primary);
    border-color: var(--wc-primary);
}

body.dashboard-page .dashboard-form-card .btn-primary {
    background: var(--wc-primary);
    border-color: var(--wc-primary);
}

body.dashboard-page .dashboard-form-card .btn-primary:hover {
    background: var(--wc-primary-hover);
    border-color: var(--wc-primary-hover);
}

body.dashboard-page .dashboard-form-card .btn-secondary {
    border: 1px solid var(--wc-border);
    color: var(--wc-text-secondary);
}

body.dashboard-page .dashboard-form-card .section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--wc-text);
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
}

body.dashboard-page .dashboard-form-card .table {
    font-size: 0.875rem;
    color: var(--wc-text);
}

body.dashboard-page .dashboard-form-card .table th {
    font-weight: 500;
    color: var(--wc-text-secondary);
    border-color: var(--wc-border);
}

body.dashboard-page .dashboard-form-card .table td {
    border-color: var(--wc-border);
    vertical-align: middle;
}

body.dashboard-page .dashboard-form-card .row-address .card {
    background: var(--wc-bg-subtle);
    border: 1px solid var(--wc-border);
    border-radius: var(--wc-radius-input);
}

body.dashboard-page .dashboard-form-card hr {
    border-color: var(--wc-border);
    margin: 1.5rem 0;
}

/* Edit profile: 2 columns 60/40 + section boxes */
body.dashboard-page .edit-profile-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 992px) {
    body.dashboard-page .edit-profile-layout {
        grid-template-columns: 60% 1fr;
        align-items: start;
    }
}

body.dashboard-page .edit-col-left {
    min-width: 0;
}

body.dashboard-page .edit-col-right {
    min-width: 0;
}

body.dashboard-page .edit-section {
    background: var(--wc-bg-card);
    border-radius: var(--wc-radius);
    box-shadow: var(--wc-shadow-sm);
    border: 1px solid var(--wc-border);
    overflow: hidden;
}

body.dashboard-page .edit-section-header {
    font-size: 1rem;
    font-weight: 600;
    color: var(--wc-text);
    padding: 0.75rem 1rem;
    background: var(--wc-bg-subtle);
    border-bottom: 1px solid var(--wc-border);
    margin: 0;
}

body.dashboard-page .edit-section-body {
    padding: 1rem;
}

body.dashboard-page .edit-section-body .form-label {
    font-size: 0.875rem;
    font-weight: 500;
}

body.dashboard-page .edit-section-body .form-control,
body.dashboard-page .edit-section-body .form-select {
    border: 1px solid var(--wc-border);
    border-radius: var(--wc-radius-input);
    padding: 0.5rem 0.75rem;
}

body.dashboard-page .edit-section-body .form-control:focus,
body.dashboard-page .edit-section-body .form-select:focus {
    border-color: var(--wc-primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
    outline: none;
}

body.dashboard-page .edit-section-body .form-text {
    font-size: 0.8125rem;
    color: var(--wc-text-secondary);
}

body.dashboard-page #profile-url-link {
    color: var(--wc-primary);
    text-decoration: none;
}

body.dashboard-page #profile-url-link:hover {
    text-decoration: underline;
}

body.dashboard-page .slug-edit-wrap .form-text.text-warning {
    color: #664d03;
    background: #fff3cd;
    border: 1px solid #ffecb5;
    border-radius: var(--wc-radius-input, 4px);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

body.dashboard-page #slug-change-link,
body.dashboard-page #slug-edit-cancel {
    color: var(--wc-primary);
    text-decoration: none;
}

body.dashboard-page #slug-change-link:hover,
body.dashboard-page #slug-edit-cancel:hover {
    text-decoration: underline;
}

body.dashboard-page .edit-section .table {
    font-size: 0.875rem;
    margin-bottom: 0;
}

body.dashboard-page .edit-section .table th {
    font-weight: 500;
    color: var(--wc-text-secondary);
    border-color: var(--wc-border);
}

body.dashboard-page .edit-section .table td {
    border-color: var(--wc-border);
    vertical-align: middle;
}

body.dashboard-page .languages-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem 0;
}

body.dashboard-page .languages-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--wc-border);
    font-size: 0.875rem;
}

body.dashboard-page .languages-list li:last-child {
    border-bottom: none;
}

body.dashboard-page .languages-add {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-end;
}

body.dashboard-page .edit-section .row-address .card {
    background: var(--wc-bg-subtle);
    border: 1px solid var(--wc-border);
    border-radius: var(--wc-radius-input);
}

body.dashboard-page .edit-section-message .alert {
    font-size: 0.8125rem;
}

/* Icon-only buttons: consistent size, icons not clickable (button is) */
body.dashboard-page .btn i.fa-solid {
    pointer-events: none;
}

body.dashboard-page .edit-section .table .btn.btn-sm.social-move,
body.dashboard-page .edit-section .table .btn.btn-sm.social-delete,
body.dashboard-page .btn-remove-row.btn-sm {
    min-width: 2rem;
    padding: 0.25rem 0.4rem;
}

/* Match button height to form-control (default size) */
body.dashboard-page .btn-match-input {
    height: calc(1.5em + 0.75rem + 2px);
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
}

/* Match button height to form-control-sm in row-phone */
body.dashboard-page .btn-match-input-sm {
    height: calc(1.5em + 0.5rem + 2px);
    min-width: 2rem;
    padding: 0.25rem 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.dashboard-page .input-group-match .btn-remove-row {
    height: 100%;
}

body.dashboard-page .languages-add-match {
    align-items: stretch;
}

body.dashboard-page .languages-add-match .btn-match-input {
    flex-shrink: 0;
}

/* ========== Toasts: fixed bottom-right, slide in, then slide up and remove ========== */
.toast-container {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 1090;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    max-width: 360px;
    pointer-events: none;
}

.toast-item {
    pointer-events: auto;
    padding: 0.75rem 1rem;
    border-radius: var(--wc-radius, 8px);
    box-shadow: var(--wc-shadow-md, 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15));
    font-size: 0.875rem;
    animation: toast-enter 0.3s ease-out forwards;
}

.toast-item.toast-exit {
    animation: toast-exit 0.35s ease-in forwards;
}

.toast-item.toast-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.toast-item.toast-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.toast-item.toast-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.toast-item.toast-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

@keyframes toast-enter {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toast-exit {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-12px);
    }
}

/* Cart badge in navbar */
.navbar .nav-link.position-relative {
    padding-right: 1.5rem !important;
}

.navbar .nav-link .fa-cart-shopping {
    font-size: 1.1rem;
    position: relative;
}

.navbar .nav-item.cart-item {
    margin-right: 0.5rem;
    position: relative;
}
.navbar .nav-item.cart-item a {
    padding-right: 0
}

/* Custom cart badge styling */
.navbar .nav-link .cart-badge {
    position: absolute;
    top: 1px;
    right: -12px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    background: #dc3545;
    color: #fff;
    border-radius: 9px;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

/* For larger numbers, adjust width */
.navbar .nav-link .cart-badge:has-text {
    padding: 0 5px;
}

/* Hover effect on cart link */
.navbar .nav-link[href="/dashboard/cart"]:hover .cart-badge {
    background: #c82333;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

/* ========== Logged-in app layout: vertical sidebar + topbar ========== */
.app-layout {
    --sidebar-width: 260px;
    display: flex;
    min-height: 100vh;
}

/* Sidebar: fixed left, scrollable. Width from variable so aside and main-wrap stay in sync (override Bootstrap .offcanvas) */
.app-layout .sidebar,
.app-layout #sidebar.sidebar {
    background: #dfdaee;
    width: var(--sidebar-width) !important;
    max-width: var(--sidebar-width) !important;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    z-index: 1041;
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--wc-border);
    flex-shrink: 0;
    /* background:var(--wc-bg-card); */
}

.sidebar-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    display: block;
    line-height: 0;
    text-decoration: none;
}

.sidebar-brand-img {
    /* height: 36px; */
    width: 85%;
    /* max-width: 140px; */
    object-fit: contain;
    vertical-align: middle;
    /* margin-bottom:1rem; */
}

.navbar-brand-img {
    height: 32px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    vertical-align: middle;
}

/* Language flags under WebCard */
.sidebar-lang-flags {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0.5rem;
}

.sidebar-lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    opacity: 0.4;
    transition: opacity 0.15s, box-shadow 0.15s;
    overflow: hidden;
}

.sidebar-lang-flag .fi {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.sidebar-lang-flag:hover {
    opacity: 1;
}

.sidebar-lang-flag.active {
    opacity: 1;
    /* box-shadow: 0 0 0 2px var(--wc-primary); */
    background:#fff;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
}

.sidebar-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav-item {
    margin: 0;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    color: var(--wc-text);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: background 0.15s, color 0.15s;
}

.sidebar-nav-link:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--wc-primary);
}

.sidebar-nav-link.active {
    background: rgba(26, 115, 232, 0.14);
    color: var(--wc-primary);
    font-weight: 600;
    border-left: 3px solid var(--wc-primary);
    padding-left: calc(1.25rem - 3px);
}

.sidebar-nav-link.active i:first-child {
    color: var(--wc-primary);
}

.sidebar-nav-link i:first-child {
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
    color: var(--wc-text-secondary);
}

.sidebar-nav-link:hover i:first-child {
    color: var(--wc-primary);
}

.sidebar-nav-item.sidebar-nav-divider {
    height: 1px;
    margin: 0.5rem 1.25rem;
    background: rgba(0, 0, 0, 0.12);
    padding: 0;
}

/* Sidebar footer: stuck to bottom, email + logout + language */
.sidebar-footer {
    margin-top: auto;
    flex-shrink: 0;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.03);
}

.sidebar-user-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-email-link {
    margin-bottom: 0.25rem;
}

.sidebar-user-email-link .sidebar-user-email {
    font-size: 0.8125rem;
    color: var(--wc-text-secondary);
}

.sidebar-user-email-link:hover .sidebar-user-email {
    color: var(--wc-primary);
}

.main-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Topbar: sticky, breadcrumbs left, cart right */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--wc-bg-card);
    border-bottom: 1px solid var(--wc-border);
    box-shadow: var(--wc-shadow-sm);
}

.topbar-sidebar-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 1px solid var(--wc-border);
    border-radius: var(--wc-radius-input);
    background: var(--wc-bg-card);
    color: var(--wc-text);
}

.topbar-sidebar-toggler:hover {
    background: var(--wc-bg-subtle);
    border-color: var(--wc-primary);
    color: var(--wc-primary);
}

.topbar-breadcrumb {
    flex: 1;
    min-width: 0;
}

.topbar .breadcrumb {
    font-size: 0.875rem;
    background: transparent;
    padding: 0;
}

.topbar .breadcrumb-item a {
    color: var(--wc-primary);
    text-decoration: none;
}

.topbar .breadcrumb-item a:hover {
    text-decoration: underline;
}

.topbar .breadcrumb-item.active {
    color: var(--wc-text-secondary);
}

.topbar-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--wc-radius-input);
    color: var(--wc-text);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.topbar-cart:hover {
    background: var(--wc-bg-subtle);
    color: var(--wc-primary);
}

.topbar-cart .fa-cart-shopping {
    font-size: 1.25rem;
}

.topbar-cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    background: #dc3545;
    color: #fff;
    border-radius: 9px;
    border: 2px solid var(--wc-bg-card);
}

.main-content {
    flex: 1;
    padding: 1.5rem 1.5rem 3rem;
}

/* Large screens: sidebar fixed, always visible (override offcanvas) */
@media (min-width: 992px) {
    .app-layout .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        height: 100vh;
        width: var(--sidebar-width) !important;
        max-width: var(--sidebar-width) !important;
        transform: none !important;
        visibility: visible !important;
    }

    .app-layout .sidebar.offcanvas {
        transition: none;
    }

    .app-layout .main-wrap {
        margin-left: var(--sidebar-width);
    }

    .app-layout .topbar-sidebar-toggler {
        display: none !important;
    }

    .app-layout .sidebar-header .btn-close {
        display: none !important;
    }

    .app-layout .offcanvas-backdrop {
        display: none !important;
    }
}

/* Small screens: sidebar is offcanvas (toggle), same width variable */
@media (max-width: 991.98px) {
    .app-layout .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        width: var(--sidebar-width) !important;
        max-width: min(var(--sidebar-width), 85vw) !important;
    }

    .app-layout .sidebar:not(.show) {
        transform: translateX(-100%);
    }
}