:root {
    --color-primary: #4f46e5;
    --color-primary-dark: #4338ca;
    --color-primary-soft: rgba(79, 70, 229, 0.12);
    --color-danger: #dc2626;
    --color-danger-dark: #991b1b;
    --color-success: #059669;
    --sidebar-bg: #111827;
    --sidebar-bg-hover: #1f2937;
    --sidebar-text: #9ca3af;
    --sidebar-text-active: #ffffff;
    --border-color: #e5e7eb;
    --text-muted: #6b7280;
    --radius: 8px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f3f4f6;
    color: #111827;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

svg {
    display: block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: none;
    border-radius: 6px;
    padding: 0.55rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn:active:not(:disabled) {
    transform: scale(0.97);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    gap: 0.6rem;
}

.btn-lg svg {
    width: 20px;
    height: 20px;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--site-primary, var(--color-primary));
    color: var(--site-primary, var(--color-primary));
}

.btn-outline:hover:not(:disabled) {
    background: var(--site-primary, var(--color-primary));
    color: #fff;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-dark);
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover:not(:disabled) {
    background: #d1d5db;
}

.btn-link-danger {
    background: none;
    border: none;
    color: var(--color-danger);
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
}

.btn-link-danger:hover {
    color: var(--color-danger-dark);
}

.btn-link {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0;
}

.btn-link:hover {
    color: var(--color-primary-dark);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn-icon:active {
    transform: scale(0.92);
}

.btn-icon:hover {
    background: #f3f4f6;
    color: #111827;
}

.btn-icon.danger:hover {
    background: #fef2f2;
    color: var(--color-danger);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

.spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Cards */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

textarea.form-control {
    resize: vertical;
}

/* Rich text editor */
.rte-wrapper {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem;
    padding: 0.4rem;
    background: #f9fafb;
    border-bottom: 1px solid var(--border-color);
}

.rte-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 0.35rem;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #374151;
    cursor: pointer;
}

.rte-btn:hover {
    background: #e5e7eb;
}

.rte-btn svg {
    width: 16px;
    height: 16px;
}

.rte-btn-label {
    font-size: 0.75rem;
    font-weight: 700;
}

.rte-separator {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 0.25rem;
}

.rte-editable {
    min-height: 160px;
    max-height: 360px;
    overflow-y: auto;
    padding: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.6;
    outline: none;
}

.rte-editable:focus {
    box-shadow: inset 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.rte-editable ul,
.rte-editable ol {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.rte-editable h3 {
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

.rte-editable p {
    margin: 0 0 0.5rem;
}

textarea.rte-source {
    display: none;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-control.is-invalid {
    border-color: var(--color-danger);
}

.field-error {
    display: block;
    color: var(--color-danger);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.muted {
    color: var(--text-muted);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
}

.form-preview {
    margin-top: 0.5rem;
}

.spec-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.6rem;
}

.spec-row .form-control {
    flex: 1;
}

#specification-rows:not(:empty) {
    margin-bottom: 0.75rem;
}

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.6rem;
}

.gallery-item {
    position: relative;
    width: 64px;
    height: 64px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: cover;
}

.gallery-item-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-danger);
    color: #fff;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.gallery-item-remove svg {
    width: 12px;
    height: 12px;
}

.file-drop-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.file-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-align: center;
    padding: 1.5rem 1rem;
    border: 1.5px dashed #d1d5db;
    border-radius: var(--radius);
    background: #f9fafb;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.file-drop:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-soft);
}

.file-drop.has-file {
    border-style: solid;
    border-color: var(--color-primary);
}

.file-drop svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
}

.file-drop-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.file-drop-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Alerts */
.alert {
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: #ecfdf5;
    color: var(--color-success);
}

.alert-error {
    background: #fef2f2;
    color: var(--color-danger-dark);
}

/* Badges */
.badge {
    display: inline-block;
    border-radius: 9999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
}

.badge-success {
    background: #d1fae5;
    color: var(--color-success);
}

.badge-muted {
    background: #f3f4f6;
    color: #4b5563;
}

.badge-info {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.badge-warning {
    background: #fef3c7;
    color: #b45309;
}

.badge-danger {
    background: #fee2e2;
    color: var(--color-danger-dark);
}

/* Table */
.table-wrap {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

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

thead {
    background: #f9fafb;
}

th {
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
}

td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
}

tbody tr {
    transition: background-color 0.1s ease;
}

tbody tr:hover {
    background: #f9fafb;
}

td.text-right, th.text-right {
    text-align: right;
}

.row-actions {
    display: inline-flex;
    gap: 0.25rem;
}

.thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
}

.thumb-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: #f3f4f6;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.thumb-lg {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    object-fit: cover;
}

.empty-row {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
}

/* Admin layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.25rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand svg {
    width: 22px;
    height: 22px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.sidebar-nav {
    margin-top: 1rem;
    padding: 0 0.75rem;
    flex: 1;
}

.sidebar-nav-label {
    padding: 1rem 0.75rem 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(156, 163, 175, 0.6);
}

.sidebar-nav-label:first-child {
    padding-top: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-radius: 6px;
    padding: 0.55rem 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 0.15rem;
    color: var(--sidebar-text);
    border-left: 3px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: var(--sidebar-bg-hover);
    color: var(--sidebar-text-active);
}

.sidebar-link.active {
    background: var(--sidebar-bg-hover);
    color: var(--sidebar-text-active);
    border-left-color: var(--color-primary);
}

.admin-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-backdrop {
    display: none;
}

.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #374151;
    cursor: pointer;
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: #f3f4f6;
}

.sidebar-toggle svg {
    width: 22px;
    height: 22px;
}

.topbar {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: #fff;
    padding: 0.65rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.topbar-logout {
    margin-left: auto;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.875rem;
    color: #374151;
    font-weight: 500;
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.admin-main {
    flex: 1;
    padding: 1.75rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1.5rem;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

/* Admin dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem 1.5rem;
}

.stat-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    flex-shrink: 0;
}

.stat-card-icon svg {
    width: 24px;
    height: 24px;
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}

.stat-card-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.dashboard-chart-card {
    margin-bottom: 1.5rem;
}

.dashboard-chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 160px;
    margin-top: 1rem;
}

.dashboard-chart-bar {
    flex: 1;
    min-width: 2px;
    border-radius: 2px 2px 0 0;
    background: var(--color-primary);
    opacity: 0.85;
    transition: opacity 0.15s ease;
}

.dashboard-chart-bar:hover {
    opacity: 1;
}

.dashboard-columns {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.dashboard-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dashboard-panel-header .section-title {
    margin: 0;
}

.low-stock-list {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.low-stock-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-color);
}

.low-stock-item:last-child {
    border-bottom: 0;
}

.low-stock-item-name {
    font-size: 0.875rem;
    color: #111827;
}

@media (max-width: 900px) {
    .dashboard-columns {
        grid-template-columns: 1fr;
    }
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.filter-bar .form-control,
.filter-bar .ss-wrapper {
    width: auto;
    min-width: 160px;
}

.filter-bar input[type="text"] {
    flex: 1;
    min-width: 200px;
}

/* Searchable select (Select2-like) */
.ss-wrapper {
    position: relative;
    display: block;
    width: 100%;
    min-width: 180px;
}

.ss-native {
    display: none;
}

.ss-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    cursor: pointer;
}

.ss-control:hover {
    border-color: var(--color-primary);
}

.ss-wrapper.open .ss-control {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.ss-control-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ss-control-caret {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.15s ease;
}

.ss-wrapper.open .ss-control-caret {
    transform: rotate(180deg);
}

.ss-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    z-index: 40;
    overflow: hidden;
}

.ss-wrapper.open .ss-dropdown {
    display: block;
}

.ss-search {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: none;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
    outline: none;
}

.ss-options {
    max-height: 220px;
    overflow-y: auto;
}

.ss-option {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.ss-option:hover {
    background: #f3f4f6;
}

.ss-option.selected {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-weight: 500;
}

.ss-no-results {
    padding: 0.6rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Searchable multi-select (chips) */
.ss-multi .ss-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    cursor: text;
    min-height: 42px;
}

.ss-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ss-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.2rem 0.4rem 0.2rem 0.6rem;
    border-radius: 9999px;
}

.ss-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}

.ss-chip-remove:hover {
    background: rgba(79, 70, 229, 0.2);
}

.ss-multi-input {
    flex: 1;
    min-width: 120px;
    border: none;
    outline: none;
    font-size: 0.875rem;
    padding: 0.2rem 0;
}

.page-header .page-title {
    margin-bottom: 0;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.max-w-form {
    max-width: 480px;
}

.max-w-form-lg {
    max-width: 680px;
}

/* Guest (login) layout */
.guest-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.guest-card {
    width: 100%;
    max-width: 360px;
}

.guest-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.guest-brand svg {
    width: 24px;
    height: 24px;
    color: var(--color-primary);
}

/* Auth pages rendered within the storefront layout */
.auth-page {
    display: flex;
    justify-content: center;
    padding: 2rem 1rem 3rem;
}

.auth-card {
    width: 100%;
    max-width: 400px;
}

.auth-card .section-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-card .form-actions,
.auth-card form {
    margin-bottom: 0;
}

.auth-card-links {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-card-links p {
    margin: 0.4rem 0;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.65rem 1rem;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-google:hover {
    background: #f9fafb;
    box-shadow: var(--shadow-sm);
}

.btn-google svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Site (storefront) layout */
.site-topbar {
    background: #111827;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.8rem;
}

.site-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    display: flex;
    gap: 1.5rem;
}

.site-topbar-inner span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.site-topbar-inner svg {
    width: 14px;
    height: 14px;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: var(--shadow-sm);
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 5px;
}

.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin-left: -0.5rem;
    border: 0;
    background: none;
    color: #374151;
    cursor: pointer;
    flex-shrink: 0;
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

.mobile-menu-toggle .icon-close {
    display: none;
}

.mobile-menu-toggle[aria-expanded="true"] .icon-menu {
    display: none;
}

.mobile-menu-toggle[aria-expanded="true"] .icon-close {
    display: block;
}

.site-brand {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    flex-shrink: 0;
}

.site-logo {
    max-height: 60px;
    width: auto;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.site-nav a {
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    transition: color 0.15s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: var(--site-primary, var(--color-primary));
}

.site-search {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 420px;
    min-width: 160px;
    background: #f3f4f6;
    border-radius: 999px;
    padding: 0 0.4rem 0 1rem;
}

.site-search-input {
    flex: 1;
    border: 0;
    background: none;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #111827;
    outline: none;
}

.site-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #6b7280;
    cursor: pointer;
    flex-shrink: 0;
}

.site-search-btn:hover {
    color: var(--site-primary, var(--color-primary));
}

.site-search-btn svg {
    width: 18px;
    height: 18px;
}

.site-header-icons {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-left: auto;
    flex-shrink: 0;
}

.site-icon-link {
    position: relative;
    display: flex;
    align-items: center;
    color: #374151;
}

.site-icon-link:hover {
    color: var(--site-primary, var(--color-primary));
}

.site-icon-link svg {
    width: 24px;
    height: 24px;
}

.site-icon-count {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--site-primary, var(--color-primary));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.site-icon-count.is-bumping {
    animation: icon-count-bump 0.3s ease;
}

@keyframes icon-count-bump {
    0% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.35);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 640px) {
    .site-topbar {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        order: 0;
    }

    .site-logo {
        max-height: 40px;
    }

    .site-header-inner {
        flex-wrap: wrap;
        gap: 0;
    }

    .site-brand {
        order: 1;
    }

    .site-header-icons {
        order: 2;
    }

    .site-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
        min-width: 0;
    }

    .site-nav {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: #fff;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        padding: 0.5rem 1.5rem;
        z-index: 40;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    }

    .site-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .site-nav a {
        padding: 0.85rem 0;
        font-size: 1rem;
    }

    .site-nav a + a {
        border-top: 1px solid var(--border-color);
    }
}

.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
}

.category-tile {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius);
    overflow: hidden;
    background: #f3f4f6;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-tile:hover img {
    transform: scale(1.06);
}

.category-tile-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.55) 100%);
}

.category-name {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.breadcrumb {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.breadcrumb a:hover {
    color: var(--site-primary, var(--color-primary));
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.product-card-link {
    display: block;
    color: inherit;
}

.product-card-image-wrap {
    position: relative;
    overflow: hidden;
}

.product-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #f3f4f6;
    transition: transform 0.35s ease;
}

.product-card:hover .product-card-image {
    transform: scale(1.05);
}

.product-card-body {
    padding: 1rem;
    padding-bottom: 0.5rem;
}

.product-card-actions {
    padding: 0.5rem 1rem 1rem;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-card-actions .btn {
    width: 100%;
}

.product-card-actions .add-to-cart-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.wishlist-btn-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    color: #374151;
}

.wishlist-btn-card:hover:not(:disabled) {
    border-color: #dc2626;
    color: #dc2626;
    background: #fff5f5;
}

.wishlist-btn-card.active {
    border-color: #dc2626;
    color: #dc2626;
    background: #fff0f0;
}

.wishlist-btn-card.active svg {
    fill: #dc2626;
}

.wishlist-btn-card svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.wishlist-btn-card.is-animating svg {
    animation: wishlist-pop 0.4s ease;
}

.stock-badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
}

.stock-badge.inline {
    position: static;
    display: inline-block;
}

.stock-badge.in-stock {
    background: #059669;
}

.stock-badge.out-of-stock {
    background: #dc2626;
}

.wishlist-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #374151;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    z-index: 1;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.wishlist-btn:hover {
    color: #dc2626;
    background: #fff;
    box-shadow: var(--shadow-md);
    transform: scale(1.1);
}

.wishlist-btn:active {
    transform: scale(0.9);
}

.wishlist-btn:disabled {
    cursor: default;
    opacity: 0.7;
    transform: none;
}

.wishlist-btn.active {
    color: #dc2626;
    background: #fff0f0;
}

.wishlist-btn.active svg {
    fill: #dc2626;
}

.wishlist-btn svg {
    width: 17px;
    height: 17px;
    transition: transform 0.2s ease;
}

.wishlist-btn.is-animating svg {
    animation: wishlist-pop 0.4s ease;
}

@keyframes wishlist-pop {
    0% { transform: scale(1); }
    35% { transform: scale(1.4); }
    60% { transform: scale(0.85); }
    100% { transform: scale(1); }
}

.wishlist-btn-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
    padding: 0;
    border: none;
    background: none;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

.wishlist-btn-detail:hover {
    color: #dc2626;
}

.wishlist-btn-detail.active {
    color: #dc2626;
}

.wishlist-btn-detail.active svg {
    fill: #dc2626;
}

.wishlist-btn-detail svg {
    width: 20px;
    height: 20px;
}

.product-card-category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin: 0 0 0.3rem;
}

.product-card-name {
    font-size: 0.925rem;
    font-weight: 500;
    color: #111827;
    margin: 0 0 0.4rem;
}

.product-card-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--site-primary, var(--color-primary));
}

.product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
}

@media (max-width: 720px) {
    .product-detail {
        grid-template-columns: 1fr;
    }
}

.product-detail-main-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--radius);
    background: #f3f4f6;
}

.product-detail-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.product-detail-thumbs img {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
}

.product-detail-thumbs img:hover {
    border-color: var(--site-primary, var(--color-primary));
}

.product-detail-category {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.product-detail-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--site-primary, var(--color-primary));
    margin: 0.5rem 0;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.price-mrp {
    text-decoration: line-through;
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85em;
    margin: 0;
}

.product-detail-description {
    margin-top: 1rem;
    line-height: 1.6;
    color: #374151;
}

.rich-content ul,
.rich-content ol {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.rich-content h3 {
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem;
}

.rich-content p {
    margin: 0 0 0.75rem;
}

.rich-content a {
    color: var(--site-primary, var(--color-primary));
    text-decoration: underline;
}

/* Quantity stepper */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    width: fit-content;
}

.qty-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: #f9fafb;
    color: #374151;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.qty-btn:hover {
    background: #f3f4f6;
}

.qty-input {
    width: 48px;
    height: 38px;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-size: 0.9rem;
    outline: none;
}

/* Product detail purchase box */
.product-detail-purchase {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin: 1.25rem 0;
}

.product-detail-actions {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.product-detail-actions .btn {
    flex: 1;
}

@media (max-width: 480px) {
    .product-detail-actions {
        flex-direction: column;
    }
}

/* Cart page */
.cart-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-row {
    display: grid;
    grid-template-columns: 72px 1fr auto auto auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: #fff;
}

@media (max-width: 640px) {
    .cart-row {
        grid-template-columns: 60px 1fr;
        grid-template-areas:
            "image info"
            "image qty"
            "image subtotal"
            "image remove";
        row-gap: 0.5rem;
    }

    .cart-row-image { grid-area: image; }
    .cart-row-info { grid-area: info; }
    .cart-row-qty { grid-area: qty; }
    .cart-row-subtotal { grid-area: subtotal; }
    .cart-row-remove { grid-area: remove; justify-self: start; }
}

.cart-row-image {
    width: 72px;
    height: 72px;
    border-radius: 6px;
    object-fit: cover;
    background: #f3f4f6;
}

.cart-row-name {
    display: block;
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.25rem;
}

.cart-row-price {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.cart-row-subtotal {
    font-weight: 700;
    color: #111827;
    margin: 0;
    white-space: nowrap;
}

.cart-row-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.cart-row-remove:hover {
    background: #fef2f2;
    color: var(--color-danger);
}

.cart-row-remove svg {
    width: 18px;
    height: 18px;
}

.order-summary {
    max-width: 380px;
    margin-left: auto;
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: #374151;
}

.order-summary-row + .order-summary-row {
    border-top: 1px dashed var(--border-color);
}

.order-summary-savings {
    color: var(--color-success);
    font-weight: 600;
}

.order-summary-row.order-summary-grand-total {
    border-top: 2px solid var(--border-color);
    margin-top: 0.25rem;
    padding-top: 0.85rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #111827;
}

.link-remove-coupon {
    background: none;
    border: none;
    padding: 0;
    margin-left: 0.5rem;
    color: var(--color-danger, #dc2626);
    font-size: 0.8rem;
    text-decoration: underline;
    cursor: pointer;
}

.coupon-apply-box {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-top: 1px dashed var(--border-color);
}

.coupon-apply-box .form-control {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.coupon-error {
    color: var(--color-danger, #dc2626);
    font-size: 0.8rem;
    margin: 0 0 0.5rem;
}

@media (max-width: 640px) {
    .order-summary {
        max-width: none;
    }
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
}

.cart-empty p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 420px;
    padding: 3rem 1.5rem;
}

.empty-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #9ca3af;
    margin-bottom: 1.5rem;
}

.empty-state-icon svg {
    width: 44px;
    height: 44px;
}

.empty-state-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.4rem;
}

.empty-state-text {
    color: var(--text-muted);
    margin: 0 0 1.5rem;
    max-width: 360px;
}

@media (max-width: 640px) {
    .empty-state {
        min-height: 320px;
        padding: 2.5rem 1rem;
    }

    .empty-state-icon {
        width: 76px;
        height: 76px;
        margin-bottom: 1.1rem;
    }

    .empty-state-icon svg {
        width: 34px;
        height: 34px;
    }
}

.site-footer {
    background: #111827;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4rem;
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 640px) {
    .site-footer-inner {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
}

.site-footer-brand-name {
    display: inline-block;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}

.site-footer-heading {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    margin: 0 0 1rem;
}

.site-footer-link {
    display: block;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.6rem;
}

.site-footer-link:hover {
    color: #fff;
}

.site-footer-text {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.site-footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.site-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.site-footer-social a:hover {
    background: var(--site-primary, var(--color-primary));
    color: #fff;
}

.site-footer-social svg {
    width: 16px;
    height: 16px;
}

.site-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Home page */
.home-section {
    margin-bottom: 3rem;
}

.trust-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1.75rem 0.5rem;
    margin-bottom: 3rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

@media (max-width: 720px) {
    .trust-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.trust-item svg {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    color: var(--site-primary, var(--color-primary));
}

.trust-item-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

.trust-item-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 21 / 9;
    background: #f3f4f6;
    margin-bottom: 3rem;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.hero-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.12) 45%, rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
}

.hero-slide-content {
    position: absolute;
    z-index: 1;
    max-width: 480px;
    padding: 1rem;
}

.hero-slide-content.position-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.hero-slide-content.position-top {
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.hero-slide-content.position-bottom {
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.hero-slide-content.position-left {
    top: 50%;
    left: 1.5rem;
    transform: translateY(-50%);
    text-align: left;
}

.hero-slide-content.position-right {
    top: 50%;
    right: 1.5rem;
    transform: translateY(-50%);
    text-align: right;
}

.hero-slide-content.position-top-left {
    top: 1.5rem;
    left: 1.5rem;
    text-align: left;
}

.hero-slide-content.position-top-right {
    top: 1.5rem;
    right: 1.5rem;
    text-align: right;
}

.hero-slide-content.position-bottom-left {
    bottom: 1.5rem;
    left: 1.5rem;
    text-align: left;
}

.hero-slide-content.position-bottom-right {
    bottom: 1.5rem;
    right: 1.5rem;
    text-align: right;
}

.hero-slide-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    margin: 0 0 0.6rem;
}

.hero-slide-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
    margin: 0 0 1.25rem;
}

.hero-slide-btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-slide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.hero-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.hero-slider-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.08);
}

.hero-slider-nav svg {
    width: 20px;
    height: 20px;
}

.hero-slider-nav.prev {
    left: 1rem;
}

.hero-slider-nav.next {
    right: 1rem;
}

.hero-slider-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.hero-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
}

.hero-slider-dot.active {
    background: #fff;
}

@media (max-width: 640px) {
    .hero-slider {
        aspect-ratio: 4 / 3;
    }

    .hero-slide-content {
        max-width: 90%;
    }

    .hero-slide-title {
        font-size: 1.25rem;
    }

    .hero-slide-subtitle {
        font-size: 0.9rem;
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    transform: translateY(8px) scale(0.98);
    transition: transform 0.15s ease;
}

.modal-lg {
    max-width: 620px;
}

.modal-overlay.open .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #111827;
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Toasts */
.toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 60;
}

.toast {
    min-width: 240px;
    max-width: 320px;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    box-shadow: var(--shadow-md);
    color: #fff;
    animation: toast-in 0.2s ease;
}

.toast.is-leaving {
    animation: toast-out 0.2s ease forwards;
}

.toast-success {
    background: var(--color-success);
}

.toast-error {
    background: var(--color-danger);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
}

/* Admin panel: mobile (off-canvas sidebar + stacked layout) */
@media (max-width: 768px) {
    body.no-scroll {
        overflow: hidden;
    }

    .sidebar-toggle {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: var(--shadow-md);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.5);
        z-index: 40;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }

    .sidebar-backdrop.show {
        opacity: 1;
        pointer-events: auto;
    }

    .topbar {
        padding: 0.6rem 1rem;
    }

    .admin-main {
        padding: 1rem;
    }

    .card {
        padding: 1rem;
    }

    .page-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar .form-control,
    .filter-bar input[type="text"],
    .filter-bar .ss-wrapper {
        width: 100%;
        min-width: 0;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .modal-header,
    .modal-footer {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    th,
    td {
        padding: 0.6rem 0.75rem;
        font-size: 0.8125rem;
    }
}

@media (max-width: 420px) {
    .topbar-user-name {
        display: none;
    }
}

/* Site: User menu dropdown */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}

.user-menu-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    min-width: 230px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 40;
}

.user-menu-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #374151;
    width: 100%;
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
}

.user-menu-item:hover {
    background: var(--color-primary-soft);
    color: var(--site-primary, var(--color-primary));
}

.user-menu-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.user-menu-item .badge {
    margin-left: auto;
}

.user-menu-item.danger {
    color: var(--color-danger);
}

.user-menu-item.danger:hover {
    background: rgba(220, 38, 38, 0.08);
    color: var(--color-danger-dark);
}

.user-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.4rem 0;
}

/* Site: Profile page */
.profile-hero {
    background: linear-gradient(135deg, var(--site-primary, var(--color-primary)) 0%, var(--color-primary-dark) 100%);
    border-radius: var(--radius);
    padding: 2.5rem 2rem 4rem;
    color: #fff;
}

.profile-hero-body {
    display: flex;
    align-items: flex-end;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 2rem;
    font-weight: 700;
    box-shadow: var(--shadow-md);
}

.profile-avatar-edit {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    border: 2px solid var(--color-primary-soft);
}

.profile-avatar-edit svg {
    width: 16px;
    height: 16px;
}

.profile-avatar-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.profile-hero-info {
    padding-bottom: 0.5rem;
}

.profile-hero-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.profile-hero-email {
    opacity: 0.85;
    font-size: 0.9rem;
    margin: 0.2rem 0 0;
}

.profile-tabs {
    max-width: 1000px;
    margin: -2.5rem auto 2rem;
    position: relative;
    display: flex;
    gap: 0.5rem;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 0.5rem;
    overflow-x: auto;
}

.profile-tabs-inline {
    margin-top: 0;
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.settings-wrap {
    width: 100%;
}

.settings-wrap .profile-tabs,
.settings-wrap .profile-tab-panel {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.settings-wrap .card {
    margin-bottom: 1.5rem;
}

.settings-wrap .card:last-child {
    margin-bottom: 0;
}

.profile-tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.1rem;
    border-radius: 6px;
    border: 0;
    background: none;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.profile-tab-btn svg {
    width: 18px;
    height: 18px;
}

.profile-tab-btn:hover {
    background: var(--color-primary-soft);
}

.profile-tab-btn.active {
    background: var(--color-primary);
    color: #fff;
}

.profile-tab-panel {
    max-width: 1000px;
    margin: 0 auto 2rem;
    display: none;
}

.profile-tab-panel.active {
    display: block;
}

.profile-status {
    max-width: 1000px;
    margin: 0 auto 1.5rem;
}

@media (max-width: 640px) {
    .profile-hero {
        padding: 2rem 1.25rem 3.5rem;
    }

    .profile-hero-body {
        gap: 1rem;
    }

    .profile-avatar {
        width: 72px;
        height: 72px;
        font-size: 1.5rem;
    }

    .profile-tabs {
        margin-top: -2.25rem;
        justify-content: flex-start;
    }

    .profile-tab-btn {
        padding: 0.55rem 0.85rem;
        font-size: 0.8125rem;
    }

    .profile-tab-btn span {
        display: none;
    }
}

/* Site: Checkout */
.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 1.5rem;
}

.checkout-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.checkout-summary .order-summary {
    margin: 0;
}

.order-summary-checkout-btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 1rem;
}

.address-option-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.address-option {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.address-option:has(input:checked) {
    border-color: var(--site-primary, var(--color-primary));
    background: var(--color-primary-soft);
}

.address-option input[type="radio"] {
    margin-top: 0.3rem;
    flex-shrink: 0;
}

.address-option-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.address-option-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0.15rem 0 0;
    line-height: 1.5;
}

.link-add-address {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--site-primary, var(--color-primary));
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0;
    font-size: 0.9rem;
    cursor: pointer;
}

.payment-option:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.order-confirmation {
    text-align: center;
    max-width: 500px;
    margin: 1rem auto 2rem;
}

.order-confirmation-icon {
    width: 56px;
    height: 56px;
    color: var(--color-success);
    display: block;
    margin: 0 auto 20px;
}

@media (max-width: 768px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

/* Order status history timeline */
.status-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.status-timeline-item {
    position: relative;
    padding: 0 0 1.25rem 1.5rem;
    border-left: 2px solid var(--border-color);
}

.status-timeline-item:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.status-timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--site-primary, var(--color-primary));
}

.status-timeline-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.15rem;
}

.status-timeline-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.status-timeline-note {
    font-size: 0.875rem;
    color: #374151;
    margin: 0.15rem 0 0;
}

/* FAQ accordion */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0 1.25rem;
    background: #fff;
}

.faq-question {
    padding: 1rem 0;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 1rem;
    display: inline-block;
    transition: transform 0.2s ease;
}

.faq-item[open] .faq-question::after {
    transform: rotate(135deg);
}

.faq-answer {
    padding: 0 0 1.25rem;
    color: #374151;
    line-height: 1.6;
    animation: faq-answer-in 0.2s ease;
}

@keyframes faq-answer-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ratings & reviews */
.rating-stars {
    letter-spacing: 1px;
}

.rating-stars-lg {
    font-size: 1.35rem;
    letter-spacing: 2px;
}

.star-filled {
    color: #f59e0b;
}

.star-empty {
    color: #e5e7eb;
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.reviews-section {
    margin: 2rem 0 0;
}

.related-products-section {
    margin: 2.5rem 0 0;
}

.related-products-section .section-title {
    margin-bottom: 1.25rem;
}

.specifications-section {
    margin: 2.5rem 0 0;
}

.specifications-section th {
    width: 240px;
    text-transform: none;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    letter-spacing: normal;
}

.specifications-section td {
    color: #374151;
}

.review-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2.5rem;
    padding-bottom: 1.75rem;
    margin-bottom: 1.75rem;
    border-bottom: 1px solid var(--border-color);
}

.review-summary-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

.review-summary-number {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1;
    color: #111827;
}

.review-summary-count {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.review-summary-bars {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
    min-width: 200px;
    max-width: 340px;
}

.review-summary-bar-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.review-summary-bar-label {
    width: 28px;
    flex-shrink: 0;
}

.review-summary-bar-track {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: #f0f1f3;
    overflow: hidden;
}

.review-summary-bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #f59e0b;
    transition: width 0.4s ease;
}

.review-summary-bar-count {
    width: 24px;
    flex-shrink: 0;
    text-align: right;
}

.review-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.review-item {
    display: flex;
    gap: 0.85rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.review-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.review-item-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.review-item-body {
    flex: 1;
    min-width: 0;
}

.review-item-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.2rem;
    flex-wrap: wrap;
}

.review-item-date {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.review-item-comment {
    color: #374151;
    margin: 0.35rem 0 0;
    line-height: 1.6;
}

.review-form-box {
    max-width: 560px;
    padding: 1.25rem 1.5rem;
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.review-form-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.review-form {
    max-width: 500px;
}

.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.2rem;
}

.star-rating-input input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.star-rating-input label {
    font-size: 2rem;
    line-height: 1;
    color: #e5e7eb;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.1s ease;
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input:checked ~ label {
    color: #f59e0b;
}

.star-rating-input label:active {
    transform: scale(0.9);
}

.star-rating-input input:focus-visible + label {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (max-width: 640px) {
    .review-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .review-summary-score {
        align-items: flex-start;
    }

    .review-summary-bars {
        max-width: none;
        width: 100%;
    }
}

/* Contact page */
.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #374151;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.contact-info-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: var(--site-primary, var(--color-primary));
}

.contact-info-item a {
    color: #374151;
}

.contact-info-item a:hover {
    color: var(--site-primary, var(--color-primary));
}

.contact-map {
    margin-top: 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.contact-map iframe {
    width: 100%;
    height: 280px;
    border: 0;
    display: block;
}

.contact-map-section {
    max-width: none;
    margin-top: 1.5rem;
}

.contact-map-large {
    margin-top: 0;
}

.contact-map-large iframe {
    height: 460px;
}

@media (max-width: 640px) {
    .contact-map-large iframe {
        height: 320px;
    }
}

/* Social badges (Contact page) */
.social-links-grid {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.social-badge-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #374151;
    font-weight: 500;
    font-size: 0.9375rem;
}

.social-badge-link:hover {
    color: var(--site-primary, var(--color-primary));
}

.social-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    flex-shrink: 0;
}

.social-badge svg {
    width: 18px;
    height: 18px;
}

.social-badge-facebook {
    background: #1877f2;
}

.social-badge-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-badge-twitter {
    background: #1da1f2;
}

.social-badge-youtube {
    background: #ff0000;
}

/* Pagination */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: auto;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: #fff;
    color: #374151;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pagination-link svg {
    width: 16px;
    height: 16px;
}

a.pagination-link:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.pagination-link.is-current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    cursor: default;
}

.pagination-link.disabled {
    color: #d1d5db;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.pagination-summary {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .pagination-prev-next-label {
        display: none;
    }

    .pagination-pages {
        gap: 0.15rem;
    }

    .pagination-link {
        min-width: 2rem;
        height: 2rem;
        padding: 0 0.4rem;
    }
}

@media print {
    .no-print {
        display: none !important;
    }

    .sidebar,
    .topbar,
    .sidebar-backdrop,
    .site-header,
    .site-footer,
    .toast-stack {
        display: none !important;
    }

    .admin-content {
        margin: 0 !important;
    }

    .admin-main,
    .site-main {
        padding: 0 !important;
    }

    body {
        background: #fff !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #e5e7eb;
    }
}
