.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    font-weight: 600;
    font-size: 0.925rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base), color var(--transition-base), border-color var(--transition-base);
    white-space: nowrap;
    letter-spacing: 0.01em;
}
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(224, 90, 43, 0.25);
}
.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(224, 90, 43, 0.3);
}
.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}
.btn-secondary {
    background: var(--secondary);
    color: white;
}
.btn-secondary:hover:not(:disabled) {
    background: #152a45;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover:not(:disabled) {
    background: #0b8a5f;
    transform: translateY(-1px);
}
.btn-danger {
    background: var(--danger);
    color: white;
}
.btn-danger:hover:not(:disabled) {
    background: #c2323e;
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-outline:hover:not(:disabled) {
    background: var(--primary-light);
}
.btn-ghost {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-ghost:hover:not(:disabled) {
    background: var(--bg-light);
    border-color: var(--text-light);
}
.btn-sm {
    padding: 8px 14px;
    font-size: 0.85rem;
}
.btn-lg {
    padding: 16px 28px;
    font-size: 1rem;
}
.btn-block {
    width: 100%;
}
.btn-icon {
    padding: 12px;
    border-radius: 50%;
}
.form-group {
    margin-bottom: 1.35rem;
}
.form-label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}
.form-label.required::after {
    content: ' *';
    color: var(--danger);
}
.input-field,
.input-field-group textarea,
.input-field-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-main);
    font-size: 0.95rem;
    transition: border-color var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
    font-family: inherit;
    color: var(--text-main);
}
.input-field:focus,
.input-field-group textarea:focus,
.input-field-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
    background: var(--bg-main);
}
.input-field::placeholder {
    color: var(--text-light);
}
.input-field-group {
    position: relative;
}
.input-field-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}
.input-field-icon.left { left: 16px; }
.input-field-icon.right { right: 16px; }
.input-field.has-icon-left { padding-left: 44px; }
.input-field.has-icon-right { padding-right: 44px; }
.form-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}
.form-text.error {
    color: var(--danger);
}
.main-header {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    padding-top: env(safe-area-inset-top);
    z-index: 100;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}
.logo {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-main);
    transition: color var(--transition-base), transform var(--transition-base);
}
.logo:hover {
    color: var(--primary);
    transform: translateY(-1px);
}
.logo span {
    color: var(--primary);
}
.header-search {
    flex: 1;
    max-width: 420px;
    margin: 0 32px;
    position: relative;
}
.header-search .material-icons-round {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.2rem;
    pointer-events: none;
}
.search-input {
    width: 100%;
    padding: 11px 16px 11px 44px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--bg-surface);
    font-size: 0.925rem;
    transition: border-color var(--transition-base), background var(--transition-base), box-shadow var(--transition-base);
}
.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-main);
    box-shadow: var(--focus-ring);
}
.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    padding: 8px 14px;
    border-radius: var(--radius-md);
    transition: background var(--transition-base), color var(--transition-base);
    color: var(--text-main);
    font-size: 0.925rem;
}
.action-item:hover {
    color: var(--primary);
    background: var(--primary-light);
}
.action-item .material-icons-round {
    font-size: 1.25rem;
}
.action-item.is-logged-in {
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 999px;
    padding: 6px 16px;
}
.badge {
    position: absolute;
    top: 2px;
    left: 28px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 50px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    line-height: 1.3;
}
.user-menu-wrapper {
    position: relative;
}
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-main);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    min-width: 220px;
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}
.user-menu-wrapper::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
}
.user-menu-wrapper:hover .dropdown-menu,
.user-menu-wrapper:focus-within .dropdown-menu {
    display: flex;
}
.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-base), color var(--transition-base), padding-left var(--transition-base);
}
.dropdown-menu a:last-child {
    border-bottom: none;
}
.dropdown-menu a:hover {
    background: var(--bg-surface);
    color: var(--primary);
    padding-left: 22px;
}
.dropdown-menu .material-icons-round {
    font-size: 1.15rem;
}
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(18, 24, 32, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.modal-overlay.active {
    display: flex;
}
.modal-content {
    background: var(--bg-main);
    padding: 28px;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 95%;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}
.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}
.modal-close {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 0;
    transition: color var(--transition-base);
}
.modal-close:hover {
    color: var(--text-main);
}
.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}
.product-card {
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: transform var(--transition-slow), box-shadow var(--transition-slow), border-color var(--transition-base);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}
.product-image {
    width: 100%;
    aspect-ratio: 1;
    height: auto;
    background: linear-gradient(145deg, var(--bg-light), var(--bg-elevated));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.product-card:hover .product-image img {
    transform: scale(1.06);
}
.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.product-body {
    padding: 18px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-category {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}
.product-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.3;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 14px;
}
.price-current {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}
.price-original {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
}
.product-footer {
    display: flex;
    gap: 8px;
}
.product-footer .btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 0.875rem;
}
.sidebar-menu {
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    padding: 0;
    overflow: visible;
    margin-bottom: 16px;
}
.sidebar-title {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-color);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-title .material-icons-round {
    color: var(--primary);
    font-size: 1.2rem;
}
.cat-item {
    position: relative;
    list-style: none;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    color: var(--text-main);
    font-weight: 500;
    transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base), padding-left var(--transition-base);
    border-left: 3px solid transparent;
}
.cat-item:first-child .sidebar-link {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.cat-item:last-child .sidebar-link {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.sidebar-link:hover {
    background: var(--bg-surface);
    color: var(--primary);
    border-left-color: var(--primary);
    padding-left: 22px;
}

.sidebar-link.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-cat-row {
    display: flex;
    align-items: center;
}

.sidebar-cat-row .sidebar-link {
    flex: 1;
    min-width: 0;
    padding-right: 4px;
}

.cat-expand-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 13px 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    border-radius: 0;
}

.cat-item:hover > .sidebar-cat-row .sidebar-link {
    background: var(--bg-surface);
    color: var(--primary);
    border-left-color: var(--primary);
}

.cat-item:hover > .sidebar-cat-row .cat-expand-btn {
    color: var(--primary);
}

.cat-expand-btn .cat-arrow {
    font-size: 18px;
    transition: transform 0.2s;
}

.subcats-list {
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 220px;
    background: var(--bg-main);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 8px 0;
    margin: 0;
    list-style: none;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.cat-item:hover > .subcats-list {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.subcats-list .cat-item .sidebar-link {
    font-size: 0.95rem;
    font-weight: 400;
    border-left: none;
    padding: 10px 20px;
    border-radius: 0 !important;
    white-space: nowrap;
}

.subcats-list .sidebar-link:hover {
    padding-left: 22px;
}

.filter-group {
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
}

.filter-title {
    font-family: var(--font-display);
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.filter-title .material-icons-round {
    color: var(--primary);
    font-size: 1.15rem;
}

.filter-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.filter-label {
    cursor: pointer;
    flex: 1;
    font-weight: 500;
    font-size: 0.925rem;
    transition: color var(--transition-base);
}

.filter-label:hover {
    color: var(--primary);
}
.main-footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 56px 0 24px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #f0a060, var(--secondary));
}

.footer-content {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-content.no-contacts {
    grid-template-columns: 1.4fr 1fr 1fr;
}

.footer-section h4 {
    margin-bottom: 18px;
    font-size: 1rem;
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.925rem;
    line-height: 1.7;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.925rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section ul li .material-icons-round {
    font-size: 1rem;
    opacity: 0.7;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.55);
    transition: color var(--transition-base);
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
    display: block;
}

.footer-brand span {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
}

.footer-copy p {
    margin: 0;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base), transform var(--transition-base);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
    font-size: 0.85rem;
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.social-link .material-icons-round {
    font-size: 1.15rem;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 28px 0 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--primary);
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--text-light);
}
.category-card {
    background: linear-gradient(145deg, var(--primary-light) 0%, var(--bg-main) 100%);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    cursor: pointer;
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
    border: 1px solid var(--border-light);
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.category-card-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: var(--primary);
}

.category-card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.category-card-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-main);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.table thead {
    background: var(--bg-surface);
}

.table th {
    padding: 14px 16px;
    font-weight: 700;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: var(--bg-surface);
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-success {
    background: rgba(13, 159, 110, 0.1);
    color: var(--success);
    border: 1px solid rgba(13, 159, 110, 0.2);
}

.alert-error {
    background: rgba(220, 61, 74, 0.1);
    color: var(--danger);
    border: 1px solid rgba(220, 61, 74, 0.2);
}

.alert-warning {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.alert-info {
    background: rgba(30, 58, 95, 0.08);
    color: var(--secondary);
    border: 1px solid rgba(30, 58, 95, 0.15);
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-lg { width: 36px; height: 36px; border-width: 3px; }
.profile-card {
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-card);
    text-align: center;
    border: 1px solid var(--border-light);
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #f0a060);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 2.25rem;
    font-weight: 700;
    color: white;
    font-family: var(--font-display);
    box-shadow: 0 8px 20px rgba(224, 90, 43, 0.25);
}

.profile-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.profile-email {
    color: var(--text-muted);
    margin-bottom: 18px;
}
.carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.carousel-inner {
    display: flex;
    transition: transform var(--transition-slow);
}

.carousel-item {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    min-height: 300px;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(18, 24, 32, 0.45);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base);
    z-index: 10;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(18, 24, 32, 0.7);
}

.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }
.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    margin: 36px 0 8px;
}

.pagination-item {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 600;
    color: var(--text-main);
    background: var(--bg-main);
}

.pagination-item:hover:not(.active):not(.disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.pagination-item.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination-item.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.pagination-dots {
    width: auto;
    padding: 0 4px;
    border: none;
    background: transparent;
}

.page-content {
    padding: 32px 0 48px;
}

.catalog-hero {
    margin-bottom: 32px;
    padding: 36px 40px;
    border-radius: var(--radius-xl);
    background:
            linear-gradient(120deg, rgba(18, 24, 32, 0.92) 0%, rgba(30, 58, 95, 0.85) 55%, rgba(224, 90, 43, 0.75) 100%),
            radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15), transparent 40%);
    color: white;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s ease;
}

.catalog-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.catalog-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.catalog-hero .logo-mark {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 10px;
}

.catalog-hero h1 {
    font-size: 2.35rem;
    color: white;
    margin-bottom: 10px;
    animation: slideUp 0.5s ease 0.05s both;
}

.catalog-hero p {
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
    margin: 0;
    animation: slideUp 0.5s ease 0.12s both;
}

.catalog-layout {
    display: flex;
    gap: 28px;
    min-height: 400px;
}

.catalog-sidebar {
    width: 260px;
    flex-shrink: 0;
}

.catalog-main {
    flex: 1;
    min-width: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.section-title {
    margin: 0;
    font-size: 1.65rem;
}

.section-header .input-field {
    width: 200px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: var(--bg-main);
}

.category-section {
    margin-top: 40px;
    scroll-margin-top: 100px;
    animation: slideUp 0.45s ease both;
}

.category-section:first-child {
    margin-top: 0;
}

.category-section-title {
    margin-bottom: 18px;
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
    margin-left: 8px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

#products-container {
    display: block;
    width: 100%;
}

.toast-container {
    position: fixed;
    bottom: 24px;
    bottom: max(24px, env(safe-area-inset-bottom));
    right: 24px;
    right: max(24px, env(safe-area-inset-right));
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-main);
    color: var(--text-main);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    transform: translateX(120%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    border: 1px solid var(--border-light);
    min-width: 260px;
}

.toast.visible {
    transform: translateX(0);
    opacity: 1;
}

.toast-success { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--danger); }
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 20px;
}

.admin-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
    font-size: 0.925rem;
}

.admin-form .input-field {
    width: 100%;
}

.admin-form textarea.input-field {
    min-height: 100px;
    resize: vertical;
}

.form-status {
    margin-top: 12px;
    font-weight: 600;
    font-size: 0.925rem;
}

.form-status.success { color: var(--success); }
.form-status.error { color: var(--danger); }
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 24px 0 64px;
    background: var(--bg-main);
    padding: 36px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-light);
    animation: slideUp 0.4s ease;
}

.product-detail-gallery {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.product-detail-image {
    width: 100%;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    object-fit: contain;
    background: var(--bg-surface);
}

.product-detail-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.product-detail-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: border-color var(--transition-base), transform var(--transition-base);
    flex-shrink: 0;
}

.product-detail-thumb:hover,
.product-detail-thumb.active {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-detail-category {
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.product-detail-name {
    font-size: 2.2rem;
    color: var(--text-main);
    margin-bottom: 4px;
    font-weight: 800;
    line-height: 1.15;
}

.product-detail-price {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--text-main);
    font-weight: 800;
    margin-bottom: 12px;
}

.product-detail-desc {
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 28px;
    font-size: 1.02rem;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.product-detail-desc img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    display: inline-block;
}
.product-detail-desc table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}
.product-detail-desc table td,
.product-detail-desc table th {
    border: 1px solid var(--border-color);
    padding: 8px 10px;
}
.product-detail-desc iframe {
    max-width: 100%;
    border-radius: var(--radius-md);
}

.product-detail-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.product-detail-actions .btn-primary {
    flex: 1;
    padding: 15px;
    font-size: 1.05rem;
}

.product-detail-actions .btn-ghost {
    padding: 15px;
}

.product-error {
    text-align: center;
    margin: 60px 0;
    padding: 40px;
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.product-error p {
    color: var(--text-muted);
}

.product-error .btn {
    margin-top: 16px;
}

@media (max-width: 900px) {
    .product-detail {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .product-detail-name { font-size: 1.65rem; }
    .product-detail-price { font-size: 1.65rem; }
}

@media (max-width: 767px) {
    .catalog-layout {
        flex-direction: column;
    }

    .catalog-sidebar {
        width: 100%;
    }

    .catalog-hero {
        padding: 28px 24px;
    }

    .catalog-hero h1 {
        font-size: 1.75rem;
    }

    .footer-content, .footer-content.no-contacts {
        grid-template-columns: 1fr 1fr;
    }

    .subcats-list {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 0 10px 0 !important;
        width: 100% !important;
        display: none !important;
        grid-template-rows: none !important;
        grid-auto-flow: row !important;
        grid-auto-columns: auto !important;
    }

    .cat-item.mobile-open > .subcats-list {
        display: block !important;
    }
    
    .cat-item.mobile-open > .sidebar-cat-row .cat-expand-btn .cat-arrow {
        transform: rotate(90deg);
    }
    
    .subcats-list .cat-item .sidebar-link {
        white-space: normal !important;
        padding: 12px 24px 12px 44px !important;
        line-height: 1.4 !important;
    }
    
    .cat-item:hover > .subcats-list {
        display: none !important;
    }
    .cat-item.mobile-open:hover > .subcats-list {
        display: block !important;
    }
}

.profile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.profile-section-title {
    margin: 0;
    font-size: 1.6rem;
}

.profile-section-subtitle {
    color: var(--text-muted);
    margin-top: 4px;
    margin-bottom: 0;
}

.profile-username {
    margin: 0;
    font-size: 1.25rem;
}

.profile-status {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 6px;
    margin-bottom: 0;
}

.profile-status .material-icons-round {
    font-size: 1rem;
    vertical-align: middle;
    color: var(--success);
}

.info-item .material-icons-round {
    font-size: 0.9rem;
    vertical-align: middle;
}

.val-success {
    color: var(--success);
}
.hero-slider {
    position: relative;
    width: 100%;
    height: 360px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    background: var(--bg-dark);
}
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
    z-index: 1;
}
.hero-slide.active { opacity: 1; visibility: visible; z-index: 2; }
.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(18,24,32,0.95) 0%, rgba(18,24,32,0.7) 45%, transparent 100%);
}
.hero-slide-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 60px;
    max-width: 65%;
}
.hero-slide-content h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 12px; color: #ffffff; line-height: 1.15; }
.hero-slide-content p { font-size: 1.05rem; color: rgba(255,255,255,0.75); margin-bottom: 28px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-slide-content .btn { width: fit-content; padding: 12px 28px; font-size: 1rem; border-radius: 8px; }
.hero-arrows { position: absolute; bottom: 30px; right: 40px; z-index: 4; display: flex; gap: 12px; }
.hero-arrows button { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.15); backdrop-filter: blur(8px); border: none; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s ease; }
.hero-arrows button:hover { background: rgba(255,255,255,0.3); }
.hero-dots { position: absolute; bottom: 42px; left: 50%; transform: translateX(-50%); z-index: 4; display: flex; gap: 8px; }
.hero-dot { width: 24px; height: 4px; background: rgba(255,255,255,0.3); border-radius: 2px; cursor: pointer; transition: all 0.3s ease; }
.hero-dot.active { background: var(--primary); width: 32px; }
@media (max-width: 768px) {
    .hero-slider { height: 380px; }
    .hero-slide-content { max-width: 100%; padding: 0 24px; text-align: center; align-items: center; }
    .hero-slide-overlay { background: linear-gradient(0deg, rgba(18,24,32,0.95) 0%, rgba(18,24,32,0.5) 100%); }
    .hero-arrows { display: none; }
}

.custom-select-wrapper {
    position: relative;
    user-select: none;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--bg-main);
    transition: all var(--transition-base);
}

.custom-select-trigger .material-icons-round {
    color: var(--text-light);
    transition: transform 0.2s ease;
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
}

.custom-select-wrapper.open .custom-select-trigger .material-icons-round {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 100%;
    background: var(--bg-main);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    animation: slideDown 0.2s ease;
    max-height: 250px;
}

.custom-select-options::-webkit-scrollbar {
    width: 6px;
}
.custom-select-options::-webkit-scrollbar-track {
    background: transparent;
}
.custom-select-options::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
}

.custom-select-wrapper.open .custom-select-options {
    display: flex;
}

.custom-select-option {
    padding: 10px 16px;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
}

.custom-select-option:hover {
    background: var(--bg-surface);
    color: var(--primary);
}

.custom-select-option.selected {
    background: var(--primary-light);
    color: var(--primary);
}

.custom-select-wrapper select {
    display: none;
}