.ph-associated-products {
    width: 100%;
}

.ph-associated-title {
    margin-bottom: 16px;
    font-size: 24px;
    font-weight: 600;
}

.ph-associated-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.ph-associated-grid.ph-associated-only {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.ph-product-card {
    border: 1px solid #e5e5e5;
    border-radius: 0;
    padding: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.ph-product-thumb img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 0;
    display: block;
}

.ph-product-name {
    font-size: 16px;
    font-weight: 500;
}

.ph-product-link a {
    color: #0073aa;
    font-size: 14px;
}

.ph-product-assoc {
    display: grid;
    gap: 8px;
    width: 100%;
}

.ph-assoc-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 10px;
    align-items: center;
    font-size: 14px;
}

.ph-assoc-item img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

.ph-project-map {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.ph-map-wrapper {
    position: relative;
    width: 100%;
}

.ph-sidebar-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 6;
    border: 1px solid #e5e5e5!important;
    background: #fff!important;
    padding: 6px!important;
    border-radius: 0px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    color: #555;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.ph-sidebar-toggle:hover {
    background: #f7f7f7;
    border-color: #d0d0d0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ph-toggle-icon {
    display: inline-block;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.ph-toggle-hamburger {
    font-size: 18px;
}

.ph-toggle-close {
    font-size: 16px;
    font-weight: bold;
}

.ph-fullscreen-toggle {
    position: absolute;
    top: 16px;
    right: 50px;
    z-index: 6;
    border: 1px solid #e5e5e5!important;
    background: #fff!important;
    padding: 6px!important;
    border-radius: 0px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    color: #555;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.ph-fullscreen-toggle:hover {
    background: #f7f7f7;
    border-color: #d0d0d0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.ph-fullscreen-icon {
    display: inline-block;
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-size: 16px;
}

.ph-fullscreen-enter {
    font-size: 18px;
}

.ph-fullscreen-exit {
    font-size: 16px;
    font-weight: bold;
}

.ph-map-sidebar {
    position: absolute;
    top: 10px;
    left: 16px;
    width: 340px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 5;
    height: calc(100% - 20px);
    overflow: hidden;
}

.ph-map-wrapper.is-collapsed .ph-map-sidebar {
    transform: translateX(-110%);
    opacity: 0;
    pointer-events: none;
}

.ph-map-tabs {
    display: flex;
    gap: 6px;
    overflow: hidden;
    flex-wrap: wrap;
    padding-bottom: 4px;
    margin-bottom: 10px;
}

.ph-map-tab {
    border: 1px solid #e5e5e5;
    background: #f7f7f7;
    padding: 6px 10px!important;
    cursor: pointer;
    border-radius: 6px;
    white-space: nowrap;
    min-width: 80px;
    flex: 1 1 calc(33% - 8px);
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: #555;
    line-height: 1.4;
}

.ph-map-tab:hover {
    background: #f0f0f0;
    border-color: #d0d0d0;
}

.ph-map-tab.active {
    background: #e8f3ff;
    border-color: #5a8dff;
    color: #1a5fb3;
    box-shadow: 0 2px 4px rgba(90, 141, 255, 0.15);
}

.ph-map-panels {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ph-map-panel {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.ph-map-panel.active {
    display: flex;
}

.ph-map-search {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 13px;
    background: #fff;
}

.ph-map-search:focus {
    outline: none;
    border-color: #5a8dff;
    box-shadow: 0 0 0 3px rgba(90, 141, 255, 0.1);
}

.ph-map-list {
    display: grid;
    gap: 6px;
    overflow-y: auto;
    padding-right: 4px;
}

.ph-map-list::-webkit-scrollbar {
    width: 6px;
}

.ph-map-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.ph-map-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.ph-map-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

button.ph-filter-item {
    padding-left: 10px!important;
}

.ph-map-empty {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.ph-filter-item {
    width: 100%;
    text-align: left;
    padding: 7px 10px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    white-space: normal;
    font-size: 13px;
    transition: all 0.2s ease;
    color: #333;
    line-height: 1.4;
}

.ph-filter-item:hover {
    border-color: #c2d8ff;
    background: #f0f6ff;
    transform: translateX(2px);
}

.ph-filter-item.active {
    border-color: #5a8dff;
    background: #eaf1ff;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(90, 141, 255, 0.15);
}

.ph-map-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 6px;
    border-top: 1px solid #f0f0f0;
}

.ph-map-actions .ph-map-reset {
    border: 1px solid #e5e5e5;
    background: #fff;
    padding: 7px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    color: #555;
    line-height: 1.4;
}

.ph-map-actions .ph-map-reset:hover {
    background: #f7f7f7;
    border-color: #d0d0d0;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ph-project-map-canvas {
    width: 100%;
    border-radius: 0px;
    overflow: hidden;
    height: 100%;
}

/* Map Popup Styles */
.ph-map-popup .mapboxgl-popup-content {
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.ph-popup-content {
    max-width: 280px;
    display: flex;
    flex-direction: column;
}

.ph-popup-content img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.ph-popup-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ph-popup-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #333;
}

.ph-popup-button {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff !important;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}

.ph-popup-button:hover {
    background: #005a87;
    color: #fff !important;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.ph-map-popup .mapboxgl-popup-close-button {
    width: 24px;
    height: 24px;
    font-size: 20px;
    line-height: 24px;
    color: #666;
    padding: 0;
    right: 8px;
    top: 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
}

.ph-map-popup .mapboxgl-popup-close-button:hover {
    background: rgba(255, 255, 255, 1);
    color: #000;
}

.ph-map-popup .mapboxgl-popup-tip {
    border-top-color: #fff;
}


