﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(135deg, #2c5a94 0%, #1a3a5c 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
}

.search-section {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

.search-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-bar-wrapper {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-title {
    font-size: 0.875rem;
    color: #333;
    font-weight: 600;
}

.search-input {
    padding: 0.5rem 0.75rem;
    background: #f3f3f3;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    color: #333;
    font-size: 0.875rem;
}

.search-input::placeholder {
    color: #888;
}

.search-input:focus {
    outline: none;
    border-color: #ff9f43;
    background: rgba(0, 0, 0, 0.1);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.action-btn {
    width: 32px;
    height: 32px;
    background: linear-gradient(180deg, #ff9f43, #ff7a18);
    border: none;
    border-radius: 0.25rem;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.action-btn:hover {
    background: linear-gradient(180deg, #ffa94d, #ff851b);
    transform: translateY(-2px);
}

.action-btn-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: #ff9f43;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.action-btn-close:hover {
    color: #ff7a18;
}

.right-panel-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    overflow: hidden;
}

.action-icons {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    width: 28px;
    height: 28px;
    background: linear-gradient(180deg, #ff9f43, #ff7a18);
    border: none;
    border-radius: 0.25rem;
    color: #fff;
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.icon-btn:hover {
    background: linear-gradient(180deg, #ffa94d, #ff851b);
    transform: translateY(-2px);
}

.families-list,
.subfamilies-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.family-row,
.subfamily-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, #2c5c94, #1b3f6b);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.family-row:hover,
.subfamily-row:hover,
.family-row.active,
.subfamily-row.active {
    background: linear-gradient(180deg, #ff9f43, #ff7a18);
}

.family-name,
.subfamily-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.875rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.family-icon,
.subfamily-icon {
    flex-shrink: 0;
    font-size: 1.8rem;
    color: #fff;
}

.default-icon {
    font-size: 1.8rem;
    color: #fff;
}

.family-row::after,
.subfamily-row::after {
    position: absolute;
    right: 1rem;
    color: #fff;
    font-size: 1.4rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.family-row:hover::after,
.subfamily-row:hover::after,
.family-row.active::after,
.subfamily-row.active::after {
    opacity: 1;
}

.family-row.active .family-name,
.subfamily-row.active .subfamily-name {
    color: #fff;
}

.family-actions,
.subfamily-actions {
    display: none !important;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.item-card {
    background: linear-gradient(180deg, #355f8f, #1e416b);
    border-radius: 1rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 8px 20px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    position: relative;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 12px 25px rgba(0, 0, 0, 0.5);
}
    
.item-image-wrapper {
    width: 100%;
    height: 100px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-image-placeholder {
    font-size: 2.5rem;
}

.item-content {
    display: flex;
    flex-direction: column;
    flex-grow: 0;
}

.item-price-badge {
    background: linear-gradient(180deg, #ff9f43, #ff7a18);
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.badge-label {
    color: #fff;
    font-size: 0.75rem;
    font-weight: bold;
}

.item-name {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-details {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.item-detail-badge {
    background: rgba(255, 159, 67, 0.2);
    border: 1px solid rgba(255, 159, 67, 0.5);
    color: #ff9f43;
    font-size: 0.65rem;
    padding: 0.15rem 0.3rem;
    border-radius: 0.2rem;
    white-space: nowrap;
}

.item-actions {
    display: flex;
    gap: 0.25rem;
    margin-top: auto;
}

.item-action-btn {
    flex: 1;
    background: transparent;
    border: 1px solid rgba(255, 159, 67, 0.3);
    color: #ff9f43;
    padding: 0.3rem;
    border-radius: 0.2rem;
    cursor: pointer;
    font-size: 0.65rem;
    transition: all 0.15s ease;
}

.item-action-btn:hover {
    background: rgba(255, 159, 67, 0.2);
    border-color: #ff9f43;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

.empty-state p {
    margin: 0;
}

@media (max-width: 1400px) {
    .catalogue-container {
        gap: 0.75rem;
        padding: 1rem;
    }

    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

@media (max-width: 1024px) {
    .catalogue-container {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .families-panel {
        width: 100%;
    }

    .bottom-panels-side-by-side {
        flex-direction: column;
    }

        .bottom-panels-side-by-side::after {
            display: none;
        }

    .subfamilies-panel {
        width: 100%;
        height: 300px;
    }

    .items-panel {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .catalogue-container {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }

    .item-card {
        padding: 0.5rem;
    }

    .item-image-wrapper {
        height: 80px;
    }

    .action-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .items-grid {
        grid-template-columns: 1fr;
    }

    .action-btn {
        width: 28px;
        height: 28px;
        font-size: 0.875rem;
    }

    .item-name {
        font-size: 0.7rem;
    }
}

button {
    outline: none;
    font-family: inherit;
}

button:active {
    transform: scale(0.98);
}

input[type="text"],
input[type="number"],
select,
textarea {
    font-family: inherit;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    display: none;
}

tr, td {
    border: none !important;
}

td {
    padding: 0;
}

.families-panel,
.right-main-panel,
.top-white-bar,
.bottom-panels-side-by-side::after {
    border: none !important;
}

.top-white-bar {
    background: #f8f9fa !important;
    padding: 1.2rem !important;
    border-radius: 1rem !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 1.5rem !important;
}

.bottom-panels-side-by-side {
    gap: 2.5rem;
    padding: 1.5rem;
}

.bottom-panels-side-by-side::after {
    width: 1px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.subfamilies-panel,
.items-panel {
    background: transparent;
    border: none;
    box-shadow: none;
}

.family-icon,
.subfamily-icon,
.default-icon {
    color: #fff !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.family-name,
.subfamily-name {
    color: #fff !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.family-img,
.subfamily-img,
.default-icon {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.list-icon {
    font-size: 1.4rem;
    color: #ffffff;
    opacity: 0.9;
}

.families-list table,
.subfamilies-list table {
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.families-list table tr,
.subfamilies-list table tr {
    display: block;
    margin-bottom: 0.6rem;
}

.families-list table tr:last-child,
.subfamilies-list table tr:last-child {
     margin-bottom: 0;
}


.family-row,
.subfamily-row {
    padding: 0.45rem 0.75rem;
    gap: 0.6rem;
    min-height: 38px;
}

.family-name,
.subfamily-name {
    font-size: 0.82rem;
    line-height: 1;
}

.list-icon {
    font-size: 1.2rem;
    color: #ffffff;
    opacity: 0.9;
    flex-shrink: 0;
    line-height: 1;
}

.family-row,
.subfamily-row {
    display: flex;
    align-items: center;
}

.family-row td,
.subfamily-row td {
    display: flex;
    align-items: center;
    padding: 0;
}

.family-icon,
.subfamily-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    margin-right: 0.6rem;
}

.family-name,
.subfamily-name {
    display: flex;
    align-items: center;
}

.scroll-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.sub-scroll-buttons, .item-scroll-buttons {
    display: flex;
    gap: 0.5rem;
}

.scroll-btn {
    width: 32px;
    height: 32px;
    background: linear-gradient(180deg, #ff9f43, #ff7a18);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 5px rgba(0,0,0,0.3);
}

.scroll-btn:hover {
    background: linear-gradient(180deg, #ffa94d, #ff851b);
    transform: translateY(-2px);
}

.bottom-activity-panel {
    background: linear-gradient(180deg, #1b3f6b, #132f52);
    border: 3px solid #0d2a45;
    border-radius: 1.2rem;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.bottom-search-bar {
    background: #ffffff;
    padding: 1rem 1.2rem;
    border-radius: 0.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.bottom-search-bar input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

.bottom-search-bar .search-icon {
    color: #ff9f43;
    font-size: 1.2rem;
}

.activity-sections {
    display: flex;
    gap: 2rem;
    flex: 1;
}

.activity-section {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1rem;
    backdrop-filter: blur(5px);
}

.activity-section h3 {
    color: #ff9f43;
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.8rem 1rem;
    border-radius: 0.7rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: rgba(255, 159, 67, 0.15);
    transform: translateX(5px);
}

.activity-item .item-name {
    font-weight: 600;
    color: #fff;
}

.activity-item .item-price {
    color: #ff9f43;
    font-weight: bold;
}

.empty-activity {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

.families-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: linear-gradient(180deg, #ff9f43, #ff7a18);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: #ffffff !important;
    margin: 0.75rem;
    width: calc(100% - 1.5rem);
}

.title-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-icon {
    font-size: 1.8rem;
    color: #ffffff !important;
    font-weight: bold;
}

.title-text {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff !important;
}

.title-right {
    display: flex;
    align-items: center;
}

.dropdown-arrow {
    font-size: 1.2rem;
    color: #ffffff !important;
}

.scroll-controls {
    padding: 0 1.5rem 1rem 1.5rem;
    background: #ffffff;
}

/*.bottom-panels-side-by-side {
    display: flex;
    flex: 1;
    gap: 1rem;
    padding: 0.5rem;
    overflow: hidden;
}*/

.bottom-panels-side-by-side {
    display: flex;
    flex: 1;
    gap: 1rem;
    padding: 0.5rem;
    overflow: hidden;
    min-height: 0; 
}

    /*.bottom-panels-side-by-side::before {
        content: '';
        position: absolute;
        left: calc(260px + 1.5rem + 1rem);
        top: 1.5rem;
        bottom: 1.5rem;
        width: 12px;
        background: linear-gradient(90deg, transparent 0%, rgba(140, 210, 255, 0.5) 50%, transparent 100%);
        border-radius: 6px;
        box-shadow: 0 0 15px rgba(140, 210, 255, 0.4);
        backdrop-filter: blur(3px);
        pointer-events: none;
        z-index: 3;
    }*/

/*.families-panel {
    background: linear-gradient(180deg, #1b3f6b, #132f52);
    border-radius: 1.2rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 280px;
    flex-shrink: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    height: calc(100% - 20px);
}*/

/* 

.families-panel {
    background: linear-gradient(180deg, #1b3f6b, #132f52);
    border-radius: 1.2rem;
    display: flex;
    flex-direction: column;
    width: 280px;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    align-self: stretch;
}*/

.families-panel {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: linear-gradient(180deg, #1b3f6b, #132f52); 
    border-radius: 1.2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    height: 100%; 
}

.families-title-bar {
    flex-shrink: 0;
}

.family-row {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 0.9rem 1.2rem;
    background: linear-gradient(180deg, #2c5c94, #1b3f6b);
    border-radius: 0.7rem;
    cursor: pointer;
    transition: background 0.3s ease;
    min-height: 62px;
    flex-shrink: 0;
}

.family-row:hover,
.family-row.active {
    background: linear-gradient(180deg, #ff9f43, #ff7a18);
}

.family-icon {
    flex-shrink: 0;
    width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.default-icon {
    font-size: 2.1rem;
}

.family-name {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/*.right-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff !important;
    border: 6px solid #ffffff !important;
    border-bottom-color: #a0d0ff !important;
    border-radius: 1.4rem !important;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    height: calc(100vh - 320px); 
    max-height: calc(100vh - 320px);
    min-height: 500px; 
    position: sticky;
    top: 0;
    left: 0;
    z-index: 10;
    overflow-y: hidden;
}

.subfamilies-list,
.items-grid {
    overflow-y: auto !important;
    overflow-x: hidden;
}*/

.right-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff !important;
    border: 6px solid #ffffff !important;
    border-bottom-color: #a0d0ff !important;
    border-radius: 1.4rem !important;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    height: calc(100vh - 180px); 
    max-height: calc(100vh - 180px);
    min-height: 600px; 
    position: sticky;
    top: 0;
    z-index: 10;
}

.subfamilies-panel,
.items-panel {
    margin: 0; 
    background: linear-gradient(180deg, #1b3f6b, #132f52) !important;
    border: 3px solid #0d2a45 !important;
    border-radius: 1.2rem !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5) !important;
    padding: 0.8rem !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.subfamilies-panel.hidden {
    flex: 0 0 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    border: none !important;
}

.items-panel.full {
    flex: 1 1 100% !important;
}

.panel-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0.8rem 1rem !important;
    margin-bottom: 0.2rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    background: rgba(0, 0, 0, 0.1) !important;
}

.toggle-subfamilies-btn {
    cursor: pointer;
    font-size: 1.4rem;
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.toggle-subfamilies-btn:hover {
    opacity: 1;
}

.toggle-subfamilies-btn.open {
    margin-right: 1rem;
}

.navigation-tabs {
    display: flex;
    justify-content: flex-start;
    background: #e8e8e8;
    border-radius: 0.6rem;
    padding: 0.5rem 1rem;
    margin: 0.5rem 0 0 0;
    gap: 2rem; 
    align-items: center;
    flex-wrap: nowrap;
}

.tab-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px; 
}

.tab-arrow {
    font-size: 1.3rem;
    color: #ff9f43;
    opacity: 0;
    stop-opacity:inherit;
    transition: opacity 0.3s ease;
}

.tab-full-label {
    font-size: 1rem;
    font-weight: 600;
    color: #333333;
    transition: opacity 0.3s ease, width 0.3s ease;
    white-space: nowrap;
}

.tab-short-label {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ff9f43;
    opacity: 0;
    position: absolute;
    left: 2.2rem;
    transition: opacity 0.3s ease;
}

.tab-buttons {
    display: flex;
    gap: 0.6rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-action {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
}

.tab-item:hover .tab-full-label {
    color: #ff9f43;
}

.tab-item:hover .tab-underline {
    opacity: 1;
}

.tab-item.active .tab-arrow {
    opacity: 1;
}

.tab-item.active .tab-full-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.tab-item.active .tab-short-label {
    opacity: 1;
}

.tab-item.active .tab-buttons {
    opacity: 1;
}

.tab-underline {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 4px;
    background: #ff9f43;
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-item:hover .tab-underline {
    opacity: 1;
}

.tab-item.active .tab-underline {
    opacity: 0;
}

.subfamily-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(180deg, #2c5c94, #1b3f6b);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.subfamily-row:hover {
    background: linear-gradient(180deg, #ff9f43, #ff7a18);
}

.subfamily-row.active,
.subfamily-row.active:hover {
    background: linear-gradient(180deg, #ff9f43, #ff7a18) !important;
}

.subfamily-row.active .subfamily-name {
    color: #fff !important;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: linear-gradient(135deg, #1e416b, #132f52);
    border-radius: 1.2rem;
    padding: 2rem;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    border: 2px solid #ff9f43;
    color: #fff;
    text-align: center;
}

.modal-content h2 {
    margin: 0 0 1.5rem 0;
    color: #ff9f43;
    font-size: 1.5rem;
}

.modal-content label {
    display: block;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    color: #ddd;
}

.modal-content input {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.1rem;
    border: 2px solid #ff9f43;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    outline: none;
}

.modal-content input:focus {
    border-color: #ff7a18;
    box-shadow: 0 0 10px rgba(255, 159, 67, 0.4);
}

.modal-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-validate {
    background: linear-gradient(90deg, #ff9f43, #ff7a18);
    color: white;
}

.btn-validate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 159, 67, 0.5);
}

.btn-cancel {
    background: #555;
    color: white;
}

.btn-cancel:hover {
    background: #777;
}

/*.subfamilies-panel {
    width: 280px;
    flex: 0 0 280px; 
    min-width: 280px;
}*/

/*.subfamilies-panel {
    flex: 1 1 auto; 
    min-width: 0;
}*/

.items-panel {
    flex: 1 1 auto; 
    min-width: 0;
}

/*.subfamilies-list {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden;
    padding: 0.4rem 0.8rem 1.2rem 0.8rem;
}*/

.subfamilies-list {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden;
    padding: 0.5rem 0; /* 🔑 IDENTIQUE À items-grid */
}

.items-grid { 
    flex: 1 !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    gap: 1rem;
    overflow-y: auto !important;
    overflow-x: hidden;
    padding: 0.5rem 0;
}

.items-container {
    height: 100%;
    overflow: hidden;
}

/*.families-panel {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}*/

.families-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.4rem 0.8rem 1.2rem 0.8rem;
}

.families-list:not(.open) {
    display: none;
}

.families-list::-webkit-scrollbar {
    width: 8px;
}

.families-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.families-list::-webkit-scrollbar-thumb {
    background: #ff9f43;
    border-radius: 10px;
}

.families-list::-webkit-scrollbar-thumb:hover {
    background: #ff7a18;
}

.items-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0; 
}

.items-container {
    flex: 1;
    min-height: 0; 
}

.items-grid {
    align-content: flex-start;
}

.item-card {
    height: auto;
    align-self: flex-start;
    max-height: 260px; 
}

.items-grid::-webkit-scrollbar {
    width: 8px;
}

.items-grid::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.items-grid::-webkit-scrollbar-thumb {
    background: #ff9f43;
    border-radius: 10px;
}

.items-grid::-webkit-scrollbar-thumb:hover {
    background: #ff7a18;
}

.bottom-activity-panel.inside-white {
    margin-top: auto;
    background: linear-gradient(180deg, #1b3f6b, #132f52);
    border-top: 4px solid #a0d0ff;
    border-radius: 0 0 1.2rem 1.2rem;
    padding: 1.2rem;
    box-shadow: inset 0 8px 20px rgba(0,0,0,0.35);
}

.bottom-activity-panel.inside-white .bottom-search-bar {
    background: #ffffff;
    border-radius: 0.8rem;
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.bottom-activity-panel.inside-white input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
}

.bottom-activity-panel.inside-white .activity-sections {
    display: flex;
    gap: 1rem;
}

.bottom-activity-panel.inside-white .activity-section {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border-radius: 0.8rem;
    padding: 0.8rem;
}

.bottom-activity-panel.inside-white h3 {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    color: #ff9f43;
}

.bottom-activity-panel.inside-white {
    flex-shrink: 0; 
    margin-top: auto; 
    background: linear-gradient(180deg, #1b3f6b, #132f52);
    border-top: 4px solid #a0d0ff;
    border-radius: 0 0 1.2rem 1.2rem;
    padding: 1rem;
}

.subfamilies-list::-webkit-scrollbar {
    width: 8px;
}

.subfamilies-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.subfamilies-list::-webkit-scrollbar-thumb {
    background: #ff9f43;
    border-radius: 10px;
}

.subfamilies-list::-webkit-scrollbar-thumb:hover {
    background: #ff7a18;
}

@media (max-width: 1024px) {
    .catalogue-container {
        flex-direction: column;
        height: calc(100vh - 110px); 
        overflow: hidden;
    }
}

.catalogue-container {
    display: flex;
    gap: 2.5rem;
    padding: 2rem;
    height: calc(100vh - 110px);
    overflow: hidden;
}

@media (max-height: 800px) {
    .right-main-content {
        min-height: 500px;
    }
}

@media (max-width: 1024px) {
    .catalogue-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .right-main-content {
        position: relative;
        height: auto;
        max-height: none;
        min-height: 500px;
    }

    .bottom-panels-side-by-side {
        flex-direction: column;
    }

    .subfamilies-panel,
    .items-panel {
        min-height: 260px;
    }
}

@media (max-width: 480px) {
    .items-grid {
        grid-template-columns: 1fr;
    }

    .right-main-content {
        border-radius: 1rem;
    }

    .bottom-activity-panel.inside-white {
        padding: 0.8rem;
    }
}

@media (max-width: 1024px) {
    .families-panel {
        flex: 0 0 auto;
        max-height: 40vh; 
        overflow: hidden;
    }

    .families-list {
        flex: 1;
        overflow-y: auto;
    }
}

.subfamilies-panel,
.items-panel {
    min-height: 0;
}

@media (min-width: 1025px) {

    .bottom-panels-side-by-side {
        display: flex;
        flex-direction: row;
    }

    .subfamilies-panel {
        flex: 0 0 280px;
        width: 280px;
        min-width: 280px;
        max-width: 280px;
    }

    .items-panel {
        flex: 1 1 auto;
        min-width: 0;
    }
}

@media (max-width: 1024px) {

    .families-panel {
        width: 100% !important;
        max-width: 100% !important;
        align-self: stretch;
    }
}

@media (max-width: 1024px) {

    .navigation-tabs {
        flex-direction: column; 
        gap: 0.5rem;
        align-items: stretch;
    }

    .tab-item {
        width: 100%; 
        min-width: 0;
        justify-content: space-between;
    }

    .tab-full-label {
        opacity: 1 !important; 
        width: auto !important;
    }

    .tab-short-label {
        display: none; 
    }

    .tab-buttons {
        margin-left: auto;
    }
}

.right-main-content,
.bottom-panels-side-by-side,
.items-panel {
    min-height: 0;
}

.families-list .family-row::after,
.subfamilies-list .subfamily-row::after {
    content: "" !important;
}

.families-list .family-row::after,
.subfamilies-list .subfamily-row::after {
    content: none !important;
    display: none !important;
}